Exemplo n.º 1
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();
 }
Exemplo n.º 2
0
 /**
  *	Start Dashboard
  *
  *	@return	void
  */
 public static function init()
 {
     global $furlCache, $appsCache;
     if (!self::$inApplication) {
         if (CTM_ROOT_AREA == "admin") {
             $application = "Core";
             $section = "System";
             if ($_GET['app'] && array_key_exists($_GET['app'], $appsCache)) {
                 $cache = $appsCache[$_GET['app']];
                 $application = $cache['name'];
                 $section = $cache['module'];
                 define("CTM_BOARD_APP", $application);
                 define("ACP_LOAD_MODULE", $section);
             } elseif ($_GET['app']) {
                 return CTM_ACPBoard::output()->loadSkinCache("server")->application_failed();
             }
         } else {
             $application = CTM_Registry::$initdata['DEFAULT_APPLICATION'];
             $section = CTM_Registry::$initdata['DEFAULT_APP_SECTION'];
             if (CTM_URLEngine::$URLData[0] && array_key_exists(CTM_URLEngine::$URLData[0], $furlCache)) {
                 $furl = $furlCache[CTM_URLEngine::$URLData[0]];
                 $application = $appsCache[$furl['app']]['name'];
                 $section = $furl['module'];
                 $load = $furl['section'];
             } elseif ($_GET['app'] && array_key_exists($_GET['app'], $appsCache)) {
                 $cache = $appsCache[$_GET['app']];
                 $application = $cache['name'];
                 $section = $cache['module'];
             } elseif ($_GET['app'] && CTM_URLEngine::$URLData[0]) {
                 return CTM_Controller::instance()->output->loadSkinCache("server", "applicationFailed");
             }
         }
         CTM_Command::instance()->registry();
         CTM_Command::instance()->lang->loadLanguageFile("global", $application, false);
         if (CTM_ROOT_AREA == "admin") {
             if ($application == "Core") {
                 self::$application = "Core";
                 define("CTM_BOARD_APP", "Core");
                 define("ACP_LOAD_MODULE", $section);
                 return;
             }
         }
         if (CTM_ROOT_AREA == "public") {
             $load = $load ? $load : "app_section.php";
             self::LoadApplication($application, $section, $load);
         }
     }
 }
Exemplo n.º 3
0
 /**
  *	Logout Module
  *
  *	@return void
  */
 public static function LogoutModule($onlyDestroy = FALSE)
 {
     CTM_Cookies::setCookie("ACP_AuthLogin", NULL);
     CTM_Cookies::setCookie("ACP_AuthSession", NULL);
     CTM_Cookies::setCookie("ACP_AuthKey", NULL);
     unset($_SESSION['ACP_ACCOUNT_DATA']);
     unset($_SESSION['ACP_AUTH_SESSION']);
     unset($_SESSION['ACP_AUTH_SECURE_TIMER']);
     session_destroy();
     if ($onlyDestroy == false) {
         self::instance()->lang->loadLanguageFile("auth");
         CTM_ACPBoard::output()->redirectPage(self::instance()->lang->words['Auth']['Redirect']['Logout'], NULL);
     }
 }