2
/////////////////////////////////////////////////////////
4
// include/session_close.DB.inc
6
// (C)Copyright 2002 Ryo Chijiiwa <Ryo@IlohaMail.org>
8
// This file is part of IlohaMail, and released under GPL.
9
// See COPYING, or http://www.fsf.org/copyleft/gpl.html
11
/////////////////////////////////////////////////////////
12
/********************************************************
16
This page is include'd in "source/login.php" which is loaded upon logout.
17
Session should be closed, and any cached data (i.e. password) purged.
19
This file is for the default DB back-end.
21
********************************************************/
23
// delete this session and any old unclosed ones
24
include_once("../conf/db_conf.php");
25
include_once("../conf/conf.inc");
28
include_once("../include/idba.$DB_TYPE.inc");
31
$expTime = time() - $MAX_SESSION_TIME; //close all session that are over 24 hours old
32
$sql = "delete from $DB_SESSIONS_TABLE where (sid = '$user') or (inTime < $expTime)";
33
if (!$db->query($sql)) echo "DB query failed: $sql <br>\n";
35
echo "DB connection failed.<br>\n";
b'\\ No newline at end of file'