Subversion Repositories cheapmusic

Rev

Rev 20 | Rev 22 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 20 Rev 21
Line 108... Line 108...
108
 
108
 
109
        return '';
109
        return '';
110
    }
110
    }
111
 
111
 
112
    public function write($id, $data)
112
    public function write($id, $data)
-
 
113
    {
-
 
114
        return; // see commit()
-
 
115
    }
-
 
116
 
-
 
117
    public static function commit($id)
113
    {
118
    {
114
        $id = mysqli_real_escape_string(self::$_sess_db, $id);
119
        $id = mysqli_real_escape_string(self::$_sess_db, $id);
115
        $access = mysqli_real_escape_string(self::$_sess_db, time());
120
        $access = mysqli_real_escape_string(self::$_sess_db, time());
116
        $encrypted = Cryptor::Encrypt(json_encode($_SESSION)); // not using $data because its already serialized
121
        $encrypted = Cryptor::Encrypt(json_encode($_SESSION));
117
 
122
 
118
        $sql = "REPLACE
123
        $sql = "REPLACE
119
                INTO    sessions
124
                INTO    sessions
120
                VALUES  ('$id', '" . self::getSessionTab() . "', '$access', '$encrypted')";
125
                VALUES  ('$id', '" . self::getSessionTab() . "', '$access', '$encrypted')";
121
 
126