Location: PHPKode > projects > CoreAsset > coreasset/logout_org.php
<?php
session_start();
require_once("lib/inc.php");
$user_id = $_SESSION['user_id'];

$database->update("update asset_users set last_logout=NOW(), login_status='0' where user_id='$user_id'");

/*
$row	= $database->get_from_database("select * from asset_users where user_id='$user_id'");
$se_id	= $row['login_sid'];
$sess_file = session_save_path()."/sess_".$se_id;
if(file_exists($sess_file))
{
	//unlink($sess_file);
}
*/
foreach($_SESSION as $n=>$v)
{
 session_unset($_SESSION[$n]);
}
session_destroy();
redirect("index.php","Logout");
?>
Return current item: CoreAsset