AlaK4X
Linux lhjmq-records 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64



Your IP : 3.144.242.149


Current Path : /var/www/lhjmq-records.qc.ca/public_html/administration/session/
Upload File :
Current File : /var/www/lhjmq-records.qc.ca/public_html/administration/session/session_close.php

<?
//Standard includes
include("../includes/secur_isloggedin.php");
include("../includes/mysql_connect.php");
include("../includes/module_audit_func.php");

//Start the session
// 20060904 sb@netsimplify
cluster_session_start();

//Get the user information
$query = "SELECT * FROM secur_usagers WHERE id_usager = $session_id_usager";
$row = mysql_fetch_array(mysql_query("$query", $mysql_link));

//Write the audit of successful logout
$resolutiontime = date("j/n/Y - H:i:s");
$useripaddress = $REMOTE_ADDR;
//Audit the action
$description = "User -$row[username]- logged out at -$resolutiontime- from IP -$useripaddress- successfully";
$action = "logout.success";
audit_add($mysql_link, $session_id_usager, $moduleclassid, "$action", "$description");

//Destroy all variables
session_unset();
//Kill the session
session_destroy();
//Redirect to destination
header("location: $destination");

//Standard includes
include("../includes/mysql_cleanup.php");
?>