3 |
// $Id$ |
// $Id$ |
4 |
// ------------------------------------------------------------------------- |
// ------------------------------------------------------------------------- |
5 |
// $Log$ |
// $Log$ |
6 |
|
// Revision 1.9 2003/02/09 17:44:51 joko |
7 |
|
// + minor fix related to empty resultsets from rdbms |
8 |
|
// |
9 |
// Revision 1.8 2002/12/28 01:17:53 jonen |
// Revision 1.8 2002/12/28 01:17:53 jonen |
10 |
// - moved 'validate_idle()' to 'presentation.php' cause some problems |
// - moved 'validate_idle()' to 'presentation.php' cause some problems |
11 |
// with '$site->request->overrideRequestIdentifer()' at class scope |
// with '$site->request->overrideRequestIdentifer()' at class scope |
56 |
} |
} |
57 |
|
|
58 |
function start() { |
function start() { |
59 |
|
// FIXME: global $session_cfg; |
60 |
global $session_cfg; |
global $session_cfg; |
61 |
$session_exists = $this->exists($session_cfg["session_id"]); |
$session_exists = $this->exists($session_cfg["session_id"]); |
62 |
//print Dumper($session_exists); |
//print Dumper($session_exists); |
83 |
} |
} |
84 |
|
|
85 |
function add_session($scfg) { |
function add_session($scfg) { |
86 |
//session_start(); |
//session_start(); |
87 |
//session_register('user_status_val'); |
//session_register('user_status_val'); |
88 |
connectdb(); |
// FIXME: use PEAR here! |
89 |
$sql="INSERT INTO f_td_sessions VALUES ('','$scfg[session_id]','1','$scfg[remote_ip]','$scfg[remote_port]','$scfg[user_agent]','$scfg[http_referer]','$scfg[date]','$scfg[date]')"; |
connectdb(); |
90 |
$res = send_sql($sql); |
$sql="INSERT INTO f_td_sessions VALUES ('','$scfg[session_id]','1','$scfg[remote_ip]','$scfg[remote_port]','$scfg[user_agent]','$scfg[http_referer]','$scfg[date]','$scfg[date]')"; |
91 |
|
$res = send_sql($sql); |
92 |
} |
} |
93 |
|
|
94 |
function bindUser() { |
function bindUser() { |
116 |
connectdb(); |
connectdb(); |
117 |
$sql_exists = "SELECT session_uid,session_id FROM f_td_sessions WHERE session_id='$session_id'"; |
$sql_exists = "SELECT session_uid,session_id FROM f_td_sessions WHERE session_id='$session_id'"; |
118 |
$res_exists = send_sql($sql_exists); |
$res_exists = send_sql($sql_exists); |
119 |
if (!mysql_num_rows($res_exists) > 0) { |
if (!$res_exists || !mysql_num_rows($res_exists) > 0) { |
120 |
return 0; |
return 0; |
121 |
} |
} |
122 |
else { |
else { |