Exemplo n.º 1
0
 function __construct()
 {
     CORE::$bgend = true;
     CORE::summon(__FILE__);
     self::$func = $func = array_shift(CORE::$args);
     self::$temp = CORE::$cfg["temp"]['admin'];
     self::$temp_option = CORE::$cfg["temp"]['admin_option'];
     self::$lang = (include CORE::$path . 'lang/lang-cht.php');
     CORE::res_init('ogs_admin', 'font', 'fix', 'css');
     CORE::res_init('default', 'js');
     # 預定使用功能
     $function = array('system' => false, 'manager' => true, 'ad' => true, 'intro' => true, 'faq' => true, 'news' => true, 'products' => true, 'order' => false, 'member' => true, 'contact' => true, 'sk' => false, 'blog' => true, 'feedback' => true, 'gallery' => true, 'rewrite' => true);
     MANAGER::ban_check();
     MANAGER::class_handle($function);
     if (isset($function[$func])) {
         $func_name = strtoupper($func);
         new $func_name($function[$func]);
     } else {
         self::$temp["MAIN"] = self::$temp_option["INDEX"];
     }
     MANAGER::check();
     # 登入檢查
     MANAGER::level_check($func);
     # 權限檢查
     self::language_select();
     if (!CORE::$mobile) {
         VIEW::assignGlobal('TAG_PC', 'pc');
     }
     if (!CHECK::is_ajax()) {
         new VIEW(self::$temp_option["HULL"], self::$temp, false, 1);
     }
 }
Exemplo n.º 2
0
 function __construct()
 {
     $func = array_shift(CORE::$args);
     self::$id = SESS::get('m_id');
     self::$temp = CORE::$temp_main;
     self::$option_temp = CORE::$temp_option;
     switch ($func) {
         case "add":
             self::$temp["MAIN"] = self::$option_temp["MSG"];
             self::add();
             break;
         case "modify":
             self::$temp["MAIN"] = self::$option_temp["MSG"];
             self::modify();
             break;
         case "del":
             self::$temp["MAIN"] = self::$option_temp["MSG"];
             self::del();
             break;
         case "detail":
             $first = array_shift(CORE::$args);
             self::$first = $first == 'first-shop' ? true : false;
             if (!empty(self::$id) || self::$first) {
                 self::$temp["MAIN"] = 'ogs-cart-detail-tpl.html';
             } else {
                 self::$temp["MAIN"] = 'ogs-cart-login-tpl.html';
             }
             self::detail();
             break;
         case "finish":
             self::$temp["MAIN"] = self::$option_temp["MSG"];
             self::finish();
             break;
         default:
             self::$temp["MAIN"] = 'ogs-cart-car-tpl.html';
             self::car();
             break;
     }
     if (!CHECK::is_ajax()) {
         new VIEW(self::$option_temp["HULL"], self::$temp, false, false);
     }
 }