$Date: 2005-10-10 14:08:54 +0100 (Mon, 10 Oct 2005) $ | > $Revision: 23 $ | > $Author: matt $ +--------------------------------------------------------------------------- | | > TASK SCRIPT: Test | > Script written by Matt Mecham | > Date started: 28th January 2004 | +-------------------------------------------------------------------------- */ //----------------------------------------- // THIS TASKS OPERATIONS: // Clean out 'dead' sessions, validations, registration image entires, etc //+-------------------------------------------------------------------------- if ( ! defined( 'IN_IPB' ) ) { print "

Некорректный адрес

Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; exit(); } class task_item { var $class = ""; var $root_path = ""; var $task = ""; /*-------------------------------------------------------------------------*/ // Our 'auto_run' function // ADD CODE HERE /*-------------------------------------------------------------------------*/ function run_task() { //----------------------------------------- // Delete reg_anti_spam //----------------------------------------- $date = time() - (60*60*6); $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'reg_antispam', 'where' => 'ctime < '.$date ) ); //----------------------------------------- // Delete old sessions //----------------------------------------- $date = $this->ipsclass->vars['session_expiration'] ? (time() - $this->ipsclass->vars['session_expiration']) : (time() - 3600); $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'sessions', 'where' => "running_time < {$date}" ) ); //----------------------------------------- // Delete old searches //----------------------------------------- $date = time() - (60*60*24); $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'search_results', 'where' => "search_date < {$date}" ) ); //----------------------------------------- // Log to log table - modify but dont delete //----------------------------------------- $this->class->append_task_log( $this->task, 'Старые сессии, ненужные изображения и результаты поиска удалены' ); //----------------------------------------- // Unlock Task: DO NOT MODIFY! //----------------------------------------- $this->class->unlock_task( $this->task ); } /*-------------------------------------------------------------------------*/ // register_class // LEAVE ALONE /*-------------------------------------------------------------------------*/ function register_class(&$class) { $this->class = $class; $this->ipsclass =& $class->ipsclass; $this->root_path = $this->class->root_path; } /*-------------------------------------------------------------------------*/ // pass_task // LEAVE ALONE /*-------------------------------------------------------------------------*/ function pass_task( $this_task ) { $this->task = $this_task; } } ?>