// Error Reporting error_reporting(E_ERROR | E_WARNING | E_PARSE); // Start Timer class Timer { var $start; var $stop; var $time; function Timer() { $this->start = $this->_get_time(); } function stop($accuracy = 2) { $this->stop = $this->_get_time(); $this->time = $this->stop - $this->start; return round($this->time, $accuracy); } function _get_time() { list($usec, $sec) = explode(" ",microtime()); return ((float)$usec + (float)$sec); } } $timer = new Timer; // Include Configuration File and Constants require "settings.php"; require $data['path'] . "constants.php"; // Check settings aren't corrupt if (!$data['driver']) { exit('
The settings file appears to be corrupt.

Please re-create settings.php from the backup file settings-bak.php'); } // Create the super class require $data['path'] . 'sources/lib/base.php'; $_TSL = new Base($data); // Add a link to the timer $_TSL->timer =& $timer; // Load Lite System if templates not needed if (in_array($HTTP_GET_VARS['act'],array('image','hit'))) { $_TSL->run(array( 'list_output', 'database' )); } else { $_TSL->run(array( 'list_output', 'database', 'user_session', 'language', 'template', 'check_bans', 'check_access', 'check_load', 'check_gateway', 'mysql_debugging', 'check_archiving', 'check_positionlog' )); } if ($_GET['boo']) { $_TSL->db->query('SELECT id,url FROM tsl_sites'); $checker = $_TSL->load('link_checker'); $fp = fopen('output.txt','w'); while ($row = $_TSL->db->fetch_assoc()) { $b = new Timer; $res = $checker->check($row['url']); fwrite($fp, $b->stop() . ' ' . $row['url']); if (!$res) { fwrite($fp,' ( '.$checker->status_code . '; '.$checker->status_desc." )\r\n"); } else { fwrite($fp, "\r\n"); } } fclose($fp); exit(); } // Include source file if ($_TSL->var['list_offline'] && !$_TSL->session->profile['admin']) { $act = 'locked'; } elseif (!isset($_TSL->in['act']) || !preg_match('/^([a-z_]+)$/',$_TSL->in['act'])) { if ($_TSL->var['directory_as_default']) { $act = 'directory'; } else { $act = 'site_list'; } } else { $act = $_TSL->in['act']; // Alias' if ($act == 'in') { $act = 'vote'; $_TSL->in['code'] = '01'; } elseif ($act == 'rate') { $act = 'vote'; $_TSL->in['code'] = '05'; } elseif ($act == 'hit') { $act = 'image'; $_TSL->in['code'] = '01'; } } // Exempt items if (0 && $_TSL->session->profile['admin']) { // $exempt = array('register_antispam', 'email_validation', 'email_admin', 'admin_authorise', 'email_validation', 'email_admin', 'validate_comments','site_antispam','email_antispam'); } else { $exempt = array(); } foreach ($exempt as $value) { $_TSL->var[ $value ] = 0; } // Load the module $_TSL->load($act,'index'); // Send Output $_TSL->out->process_output(); // Shutdown $_TSL->shutdown(); ?>