} } if (check_ver() == 'True') { setcookie("ie", "yes", time() + 60 * 60 * 24 * 360); header("Location: /ie6/ie6.html"); } date_default_timezone_set('Asia/Novosibirsk'); define('START_TIME', microtime(true)); ob_start(); error_reporting(E_ALL | E_STRICT); ini_set('register_globals', 0); ini_set('display_errors', 1); mb_internal_encoding('utf-8'); define('DOC_ROOT', realpath(dirname(__FILE__)) . "/"); define('CORE_ROOT', DOC_ROOT . 'core/'); include CORE_ROOT . 'error_handlers.php'; include CORE_ROOT . 'config.php'; include CORE_ROOT . 'functions.php'; if (get_magic_quotes_gpc()) { $_POST = RemoveQuotes($_POST); $_GET = RemoveQuotes($_GET); $_COOKIE = RemoveQuotes($_COOKIE); $_REQUEST = RemoveQuotes($_REQUEST); } Router::init(); MySQL::getInstance(); Config::init(); MySession::getInstance(); File::init(); Controller::getInstance()->run(); die;
public function indexFile($file_path) { $file_path = trim($file_path, '/'); $FileInstance = new File(array('init' => false)); if ($this->db) { $FileInstance->setConnection($this->db); } $FileInstance->init(); if ($UnIndexedPage = $FileInstance->findFirstBy('path AND has_been_analyzed', $file_path, false)) { $ComponentInstance = new Component(array('init' => false)); if ($this->db) { $ComponentInstance->setConnection($this->db); } $ComponentInstance->init(); $ClassInstance = new Klass(array('init' => false)); if ($this->db) { $ClassInstance->setConnection($this->db); } $ClassInstance->init(); $this->log('Analyzing file ' . $UnIndexedPage->path); $Component = $ComponentInstance->updateComponentDetails($UnIndexedPage, $this); $Classes = $ClassInstance->updateClassDetails($UnIndexedPage, $Component, $this); if (!empty($Classes)) { //AkDebug::debug($Classes); } $UnIndexedPage->set('has_been_analyzed', true); $UnIndexedPage->save(); } }