|
From: OryNider <ory...@us...> - 2007-06-28 16:56:25
|
Update of /cvsroot/mxbb/mx_online_adv/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31499/includes Modified Files: functions.php online_adv_hack.php online_common.php Log Message: $sql="update ".ONLINE_ADV_SESSION_TABLE." SET time='$time' and bot_id='$bot_id' WHERE username='$nick'"; should be: $sql="update ".ONLINE_ADV_SESSION_TABLE." SET time='$time', bot_id='$bot_id' WHERE username='$nick'"; Index: online_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_online_adv/includes/online_common.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** online_common.php 28 Jun 2007 15:22:26 -0000 1.2 --- online_common.php 28 Jun 2007 16:56:20 -0000 1.3 *************** *** 48,55 **** //Set Time and Period // - //$period = 1240000000; - //$period = 1200000000; $time = date("U"); ! $period = $board_config['session_length']*1000; --- 48,53 ---- //Set Time and Period // $time = date("U"); ! $period = $board_config['session_length']; *************** *** 388,406 **** - $current_time=date("U"); - //prevent delay - $period=$period+2; - // Calcul max_time - $max_time=$current_time-$period; ! $sql2 = "SELECT * ! FROM ". ONLINE_ADV_SESSION_TABLE ." ! WHERE time<'$max_time'"; ! if( ($result = $db->sql_query($sql2)) ) ! { ! drop_spiders_surfing($period); ! } ! ?> --- 386,394 ---- ! drop_spiders_surfing($period); ! ! unset($time, $sql, $agent, $bot_id); ?> Index: online_adv_hack.php =================================================================== RCS file: /cvsroot/mxbb/mx_online_adv/includes/online_adv_hack.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** online_adv_hack.php 28 Jun 2007 15:22:26 -0000 1.2 --- online_adv_hack.php 28 Jun 2007 16:56:20 -0000 1.3 *************** *** 51,58 **** //Set Time and Period // ! //$this_period = 1240000000; ! $this_period = $board_config['session_length']*1000; $time = date("U"); - //$this_period = $board_config['session_length']*1000000; // --- 51,56 ---- //Set Time and Period // ! $this_period = $board_config['session_length']; $time = date("U"); // *************** *** 395,413 **** } ! ! $current_time=date("U"); ! //prevent delay ! $this_period=$this_period+2; ! // Calcul max_time ! $max_time=$current_time-$this_period; ! ! $sql2 = "SELECT * ! FROM ". ONLINE_ADV_SESSION_TABLE ." ! WHERE time<'$max_time'"; ! ! if( ($result = $db->sql_query($sql2)) ) ! { ! drop_spiders_surfing($this_period); ! } // -------------------------------------------------------------------------------- --- 393,398 ---- } ! drop_spiders_surfing($this_period); ! // -------------------------------------------------------------------------------- Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_online_adv/includes/functions.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** functions.php 28 Jun 2007 15:22:26 -0000 1.2 --- functions.php 28 Jun 2007 16:56:19 -0000 1.3 *************** *** 38,42 **** global $board_config, $db, $lang; ! $sql="update ".ONLINE_ADV_SESSION_TABLE." set time='$time' and bot_id='$bot_id' where username='$nick'"; if( !$result = $db->sql_query($sql) ) --- 38,44 ---- global $board_config, $db, $lang; ! $sql="update ".ONLINE_ADV_SESSION_TABLE." ! SET time='$time', bot_id='$bot_id' ! WHERE username='$nick'"; if( !$result = $db->sql_query($sql) ) *************** *** 44,48 **** mx_message_die(GENERAL_ERROR, 'SQL Error in function update_spiders_surfing()', '', __LINE__, __FILE__, $sql); } - } --- 46,49 ---- *************** *** 64,68 **** mx_message_die(GENERAL_ERROR, 'SQL Error in function drop_spiders_surfing()', '', __LINE__, __FILE__, $sql); } - } --- 65,68 ---- |