Ejemplo n.º 1
0
    public function update(History $history)
    {
        $query = $this->_db->prepare(' UPDATE t_history SET 
		action=:action, target=:target, description=:description, updated=:updated, updatedBy=:updatedBy
		WHERE id=:id') or die(print_r($this->_db->errorInfo()));
        $query->bindValue(':id', $history->id());
        $query->bindValue(':action', $history->action());
        $query->bindValue(':target', $history->target());
        $query->bindValue(':description', $history->description());
        $query->bindValue(':updated', $history->updated());
        $query->bindValue(':updatedBy', $history->updatedBy());
        $query->execute();
        $query->closeCursor();
    }
Ejemplo n.º 2
0
 public static function forward()
 {
     if (self::is_forward()) {
         $_SESSION['client']['__history_id__']++;
     }
     self::$action = true;
     $data = DB::GetOne('SELECT data FROM history WHERE session_name=%s AND page_id=%d AND client_id=%d', array(self::session_id(), $_SESSION['client']['__history_id__'] - 1, CID));
     //		$data = DB::BlobDecode($data);
     if (GZIP_HISTORY && function_exists('gzuncompress')) {
         $data = gzuncompress($data);
     }
     $_SESSION['client']['__module_vars__'] = unserialize($data);
     location(array());
 }