Beispiel #1
0
 /**
  * Запускает выполнение перехода на разделы, а также поиск и запуск соответствующего модуля
  */
 public function run()
 {
     try {
         $this->_sql = MySQL::creator("5.131.95.121", "test", "testtest");
     } catch (Exception $ex) {
         $this->_sql = MySQL::creator(DB_SERVER, DB_USER, DB_PASSWORD);
     }
     $this->_sql->selectDB(DB_NAME);
     try {
         $this->urlScaner();
     } catch (Exception $ex) {
         if ($ex->getCode() == 404) {
             header("Location: /error/404/");
         }
     }
     header("Content-type: text/html; charset=\"win-1251\"");
     $moduleType = (int) $this->_arr["module"];
     $data = $this->makeGet();
     $module = new ModuleLoader($moduleType, $data);
     $this->_out = $module->getOutput();
     if ($this->_out["title"] == "") {
         $this->_out["title"] = SITE_NAME . ": " . $this->_out["title"] . $this->_arr["title_tag"];
     } else {
         $this->_out["title"] = SITE_NAME . ": " . $this->_out["title"];
     }
 }