Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
Class.SessionCache.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 /**
7  * Cache session date of validated
8  *
9  * @author Anakeen
10  * @version $Id: Class.SessionCache.php,v 1.4 2005/06/28 13:53:24 eric Exp $
11  * @package FDL
12  * @subpackage CORE
13  */
14 /**
15  */
16 
17 include_once ('Class.DbObj.php');
18 
19 class SessionCache extends DbObj
20 {
21 
22  var $fields = array(
23  "index",
24  "lasttime"
25  );
26 
27  var $id_fields = array(
28  "index"
29  );
30 
31  var $dbtable = "session_cache";
32 
33  var $sqlcreate = "create table session_cache ( index varchar(100),
34  lasttime int);";
35 
36  function __construct($dbaccess = '', $id = '', $res = '', $dbid = 0)
37  {
38  parent::__construct($dbaccess, $id, $res, $dbid);
39  if ((!$this->isAffected()) && ($id != '')) {
40  $this->index = $id;
41 
42  $date = gettimeofday();
43  $this->lasttime = $date['sec'];
44  $this->Add();
45  }
46  }
47  // modify with current date
48  function setTime()
49  {
50  $date = gettimeofday();
51  $this->lasttime = $date['sec'];
52  $this->Modify();
53  }
54 }
55 ?>
Add($nopost=false, $nopre=false)
isAffected()
__construct($dbaccess= '', $id= '', $res= '', $dbid=0)
← centre documentaire © anakeen