1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
<?php
/*
* Session Management for PHP3
*
* Copyright (c) 1998-2000 NetUSE AG
* Boris Erdmann, Kristian Koehntopp
*
* $Id: user.inc,v 1.2 2000/07/12 18:22:35 kk Exp $
*
*/
class User extends Session {
var $classname = "User"; ## Needed for object serialization.
var $that_class = "Session_sql"; ## Name of data storage container
##
## End of parameters.
##
var $name; ## Session name
var $id; ## Unique Session ID
var $pt = array(); ## This Array contains the registered things
var $that;
## get_id():
##
## Propagate the session id according to mode and lifetime.
## Will create a new id if necessary. To take over abandoned sessions,
## one may provide the new session id as a parameter (not recommended).
function get_id($id = "") {
$this->id = $id;
}
## put_id():
##
## Stop using the current session id (unset cookie, ...) and
## abandon a session.
function put_id() {
;
}
##
## Initialization
##
function start($sid = "") {
$this->get_id($sid);
if(!isset($this->cookiename)) { $this->cookiename=""; };
$this->name = $this->cookiename == "" ? $this->classname : $this->cookiename;
$name = $this->that_class;
$this->that = new $name;
$this->that->ac_start();
$this->thaw();
}
}
?>
|