/**
  *	Private: Setup Variables
  *
  *	@return	void
  */
 private static function Setup()
 {
     if (CTM_ROOT_AREA == "public") {
         $template = CTM_Command::instance()->output->template;
         $publicDir = PUBLIC_DIRECTORY . "/%s/" . $template . "/";
         CTM_Command::instance()->updateVars("public_directory", PUBLIC_DIRECTORY . "/");
         CTM_Command::instance()->updateVars("admincp_directory", ADMINCP_DIRECTORY . "/");
         CTM_Command::instance()->updateVars("style_dirs,skin_styles", sprintf($publicDir, "style_css"));
         CTM_Command::instance()->updateVars("style_dirs,skin_images", sprintf($publicDir, "style_images"));
         CTM_Command::instance()->updateVars("style_dirs,skin_res", sprintf($publicDir, "style_resources"));
         CTM_Command::instance()->updateVars("style_dirs,styles", PUBLIC_DIRECTORY . "/style_css/");
         CTM_Command::instance()->updateVars("style_dirs,images", PUBLIC_DIRECTORY . "/images/");
         CTM_Command::instance()->updateVars("style_dirs,js", PUBLIC_DIRECTORY . "/javascripts/");
         CTM_Command::instance()->updateVars("board_host", CTM_URLEngine::URLHost());
         CTM_Command::instance()->updateVars("board_url", CTM_URLEngine::URLBase());
         CTM_Command::instance()->updateVars("path_url", CTM_URLEngine::URIString());
         CTM_Command::instance()->updateVars("language_js", EffectWebData::LANGUAGE_JS . CTM_Command::instance()->lang->language);
         define("SESSION_USER_LOGGED", Authentication::Check());
     }
 }
Beispiel #2
0
 /**
  *	Private: Setup AdminCP
  *
  *	@return	void
  */
 private static function setup($core_module)
 {
     global $appsCache, $acp_modules_name;
     $app = $_GET['app'] ? $_GET['app'] : "core";
     if ($_GET['module']) {
         $core_module = $acp_modules_name[$app][$_GET['module']];
     } elseif ($core_module == "*DEFAULT*" || !$core_module) {
         $core_module = $appsCache['core']['module'];
     }
     if (!$core_module) {
         $core_module = "API Error";
     }
     $app_title = $appsCache[$app]['title'];
     self::acp_instance()->updateACPVars("title", "Effect Web 2 " . (!ACP_SESSION_LOGGED ? "AdminCP: Log In" : "> " . $app_title . " > " . $core_module));
     self::acp_instance()->updateACPVars("acp_url", CTM_URLEngine::URLBase());
     self::acp_instance()->updateACPVars("root_url", str_replace(ADMINCP_DIRECTORY . "/", NULL, CTM_URLEngine::URLBase()));
     self::acp_instance()->updateACPVars("current_url", CTM_URLEngine::URLHost() . CTM_URLEngine::URIString());
     self::acp_instance()->updateACPVars("ctm_name", CTM_Framework::LIBINFO_DEVELOPER_NAME);
     self::acp_instance()->updateACPVars("ctm_addr", CTM_Framework::LIBINFO_DEVELOPER_ADDR);
     self::acp_instance()->updateACPVars("ctm_mail", CTM_Framework::LIBINFO_DEVELOPER_MAIL);
     self::acp_instance()->updateACPVars("ctm_year", CTM_Framework::LIBINFO_DEVELOPER_YEAR);
 }