예제 #1
0
 /**
  *	Protected: Driver Class
  *
  *	@return	void
  */
 protected static function Driver()
 {
     if (CTM_Registry::fetchDriver()) {
         return CTM_Registry::fetchDriver();
     }
     $class = new CTM_Driver();
     return $class;
 }
예제 #2
0
 /**
  *	Init Now
  *
  *	@return	void
  */
 public static function initNow()
 {
     require_once CTM_ROOT_PATH . "cache/server_cache/db_php/core_sources/installation_info.php";
     $_SERVER['REQUEST_URI'] = str_replace("&ajaxLoadSet", "/&ajaxLoadSet", CTM_URLEngine::URIString());
     CTM_Controller::PHPErrors();
     CTM_LoadTime::startTime();
     date_default_timezone_set("America/Sao_Paulo");
     if ($installation['is_installed'] == false) {
         if (CTM_ROOT_AREA == "admin") {
             header("Location: " . CTM_URLEngine::URLBase() . "installer/?app=install");
             exit;
         } else {
             CTM_Error::kernelError("The board is not installed");
         }
     } elseif (EW_THIS_VERSION > str_pad($installation['current_version'], 5, 0, STR_PAD_RIGHT)) {
         if (CTM_ROOT_AREA == "admin") {
             header("Location: " . CTM_URLEngine::URLBase() . "installer/?app=upgrade");
             exit;
         } else {
             CTM_Error::kernelError("The board is in update process");
         }
     }
     CTM_Cookies::$cookiePath = COOKIE_PATH;
     CTM_Cookies::$cookieDomain = COOKIE_DOMAIN;
     CTM_Registry::init();
     CTM_Command::instance()->registry();
     CTM_Registry::fetchDriver()->settings['mssql']['hostname'] = MSSQL_HOSTNAME;
     CTM_Registry::fetchDriver()->settings['mssql']['hostport'] = MSSQL_HOSTPORT;
     CTM_Registry::fetchDriver()->settings['mssql']['username'] = MSSQL_USERNAME;
     CTM_Registry::fetchDriver()->settings['mssql']['password'] = MSSQL_PASSWORD;
     CTM_Registry::fetchDriver()->settings['mssql']['database'] = CTMEW_CORE;
     CTM_Registry::fetchDriver()->settings['mssql']['persistent'] = MSSQL_PERSISTENT;
     CTM_Registry::fetchDriver()->settings['mssql']['debug'] = in_array("mssql", explode(",", CTM_SQL_DEBUG_MODE));
     CTM_Registry::fetchDriver()->settings['mssql']['log_folder'] = "MSSQL";
     CTM_Registry::fetchDriver()->Connect("mssql");
     if (CTM_Command::instance()->settings['CRONJOB']['ENABLE'] == TRUE) {
         $CronJob = new CronJob();
         $CronJob->Start(CTM_Command::instance()->settings['CRONJOB']['DEBUG']);
         $CronJob->RunAllTasks();
         $CronJob->Finish();
     }
     Authentication::init();
     CTM_Controller::Setup();
     CTM_Dashboard::init();
     CTM_Registry::setSetup("application", CTM_Dashboard::$application);
     if (CTM_ROOT_AREA == "public") {
         print self::GetContent();
         print "\r\n<!-- Effect Web " . EW_PUBLIC_VERSION . " / Powered by Erick-Master & Litlle / (c) 2012 -->";
     } else {
         CTM_ACPBoard::init(ACP_LOAD_MODULE);
     }
     exit;
 }
예제 #3
0
 /**
  *	Registry instance
  *
  *	@return	void
  */
 public function registry()
 {
     $this->settings = CTM_Registry::fetchSettings();
     $this->vars = CTM_Registry::fetchVariables();
     $this->output = CTM_Registry::fetchOutput();
     $this->lang = CTM_Registry::fetchLanguage();
     $this->functions = CTM_Registry::fetchFunctions();
     $this->email = CTM_Registry::fetchEmail();
     $this->mailer = $GLOBALS['CTM_Mailer'];
     $this->DB = CTM_Registry::fetchDriver();
     $this->URLData = CTM_Registry::fetchURLData();
 }
예제 #4
0
 /**
  *	Registry instance
  *
  *	@return	void
  */
 public function registry()
 {
     parent::instance()->registry();
     $this->settings = CTM_Registry::fetchSettings();
     $this->acp_vars = CTM_ACPRegistry::fetchVariables();
     $this->output = CTM_ACPBoard::output();
     $this->lang = CTM_Command::instance()->lang;
     $this->email = CTM_Command::instance()->email;
     $this->functions = CTM_Command::instance()->functions;
     $this->mailer = $GLOBALS['CTM_Mailer'];
     $this->DB = CTM_Registry::fetchDriver();
     $this->member = CTM_ACPRegistry::fetchMember();
 }
예제 #5
0
 /**
  *	Registry instance
  *
  *	@return	void
  */
 public function registry()
 {
     $this->settings = CTM_Registry::fetchSettings();
     $this->vars = CTM_Registry::fetchVariables();
     $this->output = CTM_Registry::fetchOutput();
     $this->lang = CTM_Registry::fetchLanguage();
     $this->functions = CTM_Registry::fetchFunctions();
     $this->DB = CTM_Registry::fetchDriver();
     $this->section = CTM_Registry::fetchSection();
     if (count(CTM_Registry::$libs) > 0) {
         foreach (CTM_Registry::$libs as $key => $class) {
             $this->{$key} = $class;
         }
     }
 }