Logo Search packages:      
Sourcecode: letodms version File versions  Download package

LetoDMS_Session::load ( id )

Load session by its id from database

Parameters:
string$idid of session
Returns:
boolean true if successful otherwise false

Definition at line 68 of file inc.ClassSession.php.

                         { /* {{{ */
            $queryStr = "SELECT * FROM tblSessions WHERE id = '".$id."'";
            $resArr = $this->db->getResultArray($queryStr);
            if (is_bool($resArr) && $resArr == false)
                  return false;
            if (count($resArr) == 0)
                  return false;
            $queryStr = "UPDATE tblSessions SET lastAccess = " . mktime() . " WHERE id = '" . $id . "'";
            if (!$this->db->getResult($queryStr))
                  return false;
            return $resArr[0];
      } /* }}} */

Generated by  Doxygen 1.6.0   Back to index