$SessionID, 'last_active'=>$now, 'data'=>$val)); } else { $now = time(); $retval_write = db_process_sql_update ('tsessions_php', array('last_active'=>$now, 'data'=>$val), array('id_session'=>$SessionID)); } return $retval_write; } function mysql_session_destroy ($SessionID) { $SessionID = addslashes($SessionID); $retval = db_process_sql ("DELETE FROM tsessions_php WHERE id_session = '$SessionID'"); return $retval; } function mysql_session_gc ($maxlifetime = 300) { global $config; if (isset($config['session_timeout'])) { $maxlifetime = $config['session_timeout']; } $CutoffTime = time() - $maxlifetime; $retval = db_process_sql("DELETE FROM tsessions_php WHERE last_active < $CutoffTime"); return $retval; } $resultado_handler = session_set_save_handler ('mysql_session_open', 'mysql_session_close', 'mysql_session_read', 'mysql_session_write', 'mysql_session_destroy', 'mysql_session_gc'); ?>