1<?php 2/*************************************************************************** 3* copyright : (C) 2001-2003 Advanced Internet Designs Inc. 4* email : forum@prohost.org 5* $Id: cookies.inc.t 21069 2010-03-25 22:47:48Z Caeies $ 6* 7* This program is free software; you can redistribute it and/or modify it 8* under the terms of the GNU General Public License as published by the 9* Free Software Foundation; either version 2 of the License, or 10* (at your option) any later version. 11***************************************************************************/ 12 13function ses_update_status($ses_id, $str=null, $forum_id=0, $ret='') 14{ 15 q('UPDATE {SQL_TABLE_PREFIX}ses SET forum_id='.$forum_id.', time_sec='.__request_timestamp__.', action='.($str ? "'".addslashes($str)."'" : 'NULL').', returnto='.(!is_int($ret) ? strnull(addslashes($_SERVER['QUERY_STRING'])) : 'returnto').' WHERE id='.$ses_id); 16} 17 18function ses_putvar($ses_id, $data) 19{ 20 if (empty($data)) { 21 q('UPDATE {SQL_TABLE_PREFIX}ses SET data=NULL WHERE id='.$ses_id); 22 } else { 23 q("UPDATE {SQL_TABLE_PREFIX}ses SET data='".addslashes(serialize($data))."' WHERE id=".$ses_id); 24 } 25} 26?>