/[cvs]/nfo/php/libs/org.netfrag.flib/Tracker/Session.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.flib/Tracker/Session.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by jonen, Sat Dec 28 01:17:53 2002 UTC revision 1.9 by joko, Sun Feb 9 17:44:51 2003 UTC
# Line 3  Line 3 
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
# Line 53  class Session { Line 56  class Session {
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);
# Line 79  class Session { Line 83  class Session {
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() {
# Line 111  class Session { Line 116  class Session {
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 {

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed