예제 #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);
     }
 }
예제 #2
0
 function __construct()
 {
     list($func, $id) = CORE::$args;
     $nav_class = 'INTRO';
     switch ($func) {
         case "add":
             self::$temp["MAIN"] = 'ogs-admin-intro-insert-tpl.html';
             self::$temp["SEO"] = self::$temp_option["SEO"];
             CORE::res_init('tab', 'box');
             self::add();
             break;
         case "insert":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             self::insert();
             break;
         case "detail":
             self::$temp["MAIN"] = 'ogs-admin-intro-modify-tpl.html';
             self::$temp["SEO"] = self::$temp_option["SEO"];
             CORE::res_init('tab', 'box');
             self::detail($id);
             break;
         case "modify":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             self::modify();
             break;
         case "del":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             self::delete($id);
             break;
         case "multi":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             parent::multi('intro', CORE::$manage . 'intro/');
             break;
         case "multiChange":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             $idArray = parent::multiChange('intro');
             if (is_array($idArray)) {
                 foreach ($idArray as $id) {
                     $_POST['id'] = $id;
                     self::modify();
                 }
             }
             break;
         default:
             self::$temp["MAIN"] = 'ogs-admin-intro-list-tpl.html';
             self::row();
             break;
     }
     self::nav_current($nav_class, $nav_func);
 }
예제 #3
0
 function __construct()
 {
     list($func, $id) = CORE::$args;
     $nav_class = 'CONTACT';
     switch ($func) {
         case "subject":
             $nav_class = 'CONTACT_SUBJECT';
             self::$temp["MAIN"] = 'ogs-admin-contact-subject-tpl.html';
             self::subject();
             break;
         case "subject_replace":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             self::subject_replace();
             break;
         case "subject_del":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             self::subject_del($id);
             break;
         case "detail":
             self::$temp["MAIN"] = 'ogs-admin-contact-detail-tpl.html';
             self::detail($id);
             break;
         case "del":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             self::delete($id);
             break;
         case "multi":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             parent::multi('contact', CORE::$manage . 'contact/');
             break;
         case "reply":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             self::reply();
             break;
         default:
             self::$temp["MAIN"] = 'ogs-admin-contact-list-tpl.html';
             self::row();
             break;
     }
     self::nav_current($nav_class, $nav_func);
 }
예제 #4
0
 function __construct()
 {
     list($func, $id) = CORE::$args;
     $nav_class = 'FEEDBACK';
     switch ($func) {
         case "status":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             self::status($id);
             break;
         case "del":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             self::delete($id);
             break;
         case "multi":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             parent::multi('feedback', CORE::$manage . 'feedback/');
             break;
         default:
             self::$temp["MAIN"] = 'ogs-admin-feedback-list-tpl.html';
             self::row();
             break;
     }
     self::nav_current($nav_class, $nav_func);
 }
예제 #5
0
 function __construct()
 {
     list($func, $id) = CORE::$args;
     $nav_class = 'AD';
     switch ($func) {
         /*
         case "cate":
         	$nav_func = "CATE";
         	self::$temp["MAIN"] = 'ogs-admin-ad-cate-list-tpl.html';
         	self::cate();
         break;
         case "cate-add":
         	$nav_func = "CATE";
         	self::$temp["MAIN"] = 'ogs-admin-ad-cate-insert-tpl.html';
         	self::cate_add();
         break;
         case "cate-insert":
         	self::$temp["MAIN"] = self::$temp_option["MSG"];
         	self::cate_insert();
         break;
         case "cate-detail":
         	$nav_func = "CATE";
         	self::$temp["MAIN"] = 'ogs-admin-ad-cate-modify-tpl.html';
         	self::cate_detail($id);
         break;
         case "cate-modify":
         	self::$temp["MAIN"] = self::$temp_option["MSG"];
         	self::cate_modify();
         break;
         case "cate-del":
         	self::$temp["MAIN"] = self::$temp_option["MSG"];
         	self::cate_delete($id);
         break;
         case "cate-multi":
         	self::$temp["MAIN"] = self::$temp_option["MSG"];
         	parent::multi('ad_cate',CORE::$manage.'ad/cate/');
         break;
         */
         case "add":
             self::$temp["MAIN"] = 'ogs-admin-ad-insert-tpl.html';
             self::$temp["IMAGE"] = self::$temp_option["IMAGE"];
             self::add();
             break;
         case "insert":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             self::insert();
             break;
         case "detail":
             self::$temp["MAIN"] = 'ogs-admin-ad-modify-tpl.html';
             self::$temp["IMAGE"] = self::$temp_option["IMAGE"];
             self::detail($id);
             break;
         case "modify":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             self::modify();
             break;
         case "del":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             self::delete($id);
             break;
         case "multi":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             parent::multi('ad', CORE::$manage . 'ad/');
             break;
         default:
             self::$temp["MAIN"] = 'ogs-admin-ad-list-tpl.html';
             self::row($func);
             break;
     }
     self::nav_current($nav_class, $nav_func);
 }
예제 #6
0
 function __construct()
 {
     list($func, $id) = CORE::$args;
     $nav_class = 'BLOG';
     switch ($func) {
         case "cate":
             $nav_func = "CATE";
             self::$temp["MAIN"] = 'ogs-admin-blog-cate-list-tpl.html';
             self::cate();
             break;
         case "cate-add":
             $nav_func = "CATE";
             self::$temp["MAIN"] = 'ogs-admin-blog-cate-insert-tpl.html';
             self::$temp["SEO"] = self::$temp_option["SEO"];
             CORE::res_init('tab', 'box');
             self::cate_add();
             break;
         case "cate-insert":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             self::cate_insert();
             break;
         case "cate-detail":
             $nav_func = "CATE";
             self::$temp["MAIN"] = 'ogs-admin-blog-cate-modify-tpl.html';
             self::$temp["SEO"] = self::$temp_option["SEO"];
             CORE::res_init('tab', 'box');
             self::cate_detail($id);
             break;
         case "cate-modify":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             self::cate_modify();
             break;
         case "cate-del":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             self::cate_delete($id);
             break;
         case "cate-multi":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             parent::multi('blog_cate', CORE::$manage . 'blog/cate/');
             break;
         case "add":
             self::$temp["MAIN"] = 'ogs-admin-blog-insert-tpl.html';
             self::$temp["SEO"] = self::$temp_option["SEO"];
             self::$temp["IMAGE"] = self::$temp_option["IMAGE"];
             CORE::res_init('tab', 'box');
             self::add();
             break;
         case "insert":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             self::insert();
             break;
         case "detail":
             self::$temp["MAIN"] = 'ogs-admin-blog-modify-tpl.html';
             self::$temp["SEO"] = self::$temp_option["SEO"];
             self::$temp["IMAGE"] = self::$temp_option["IMAGE"];
             CORE::res_init('tab', 'box');
             self::detail($id);
             break;
         case "modify":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             self::modify();
             break;
         case "del":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             self::delete($id);
             break;
         case "multi":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             parent::multi('blog', CORE::$manage . 'blog/');
             break;
         default:
             self::$temp["MAIN"] = 'ogs-admin-blog-list-tpl.html';
             self::row($func);
             break;
     }
     self::nav_current($nav_class, $nav_func);
 }
예제 #7
0
 function __construct()
 {
     list($func, $args) = CORE::$args;
     if (is_null($args)) {
         $args = "null";
     }
     $nav_class = 'PRODUCTS';
     switch ($func) {
         case "cate":
             $nav_func = "CATE";
             self::$temp["MAIN"] = 'ogs-admin-products-cate-list-tpl.html';
             self::$temp["TREE"] = self::$temp_option["TREE"];
             PRODUCTS::tree();
             self::cate();
             break;
         case "cate-add":
             $nav_func = "CATE";
             self::$temp["MAIN"] = 'ogs-admin-products-cate-insert-tpl.html';
             self::$temp["SEO"] = self::$temp_option["SEO"];
             self::$temp["IMAGE"] = self::$temp_option["IMAGE"];
             CORE::res_init('tab', 'box');
             self::cate_add();
             break;
         case "cate-insert":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             self::cate_insert();
             break;
         case "cate-detail":
             $nav_func = "CATE";
             self::$temp["MAIN"] = 'ogs-admin-products-cate-modify-tpl.html';
             self::$temp["SEO"] = self::$temp_option["SEO"];
             self::$temp["IMAGE"] = self::$temp_option["IMAGE"];
             CORE::res_init('tab', 'box');
             self::cate_detail($args);
             break;
         case "cate-modify":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             self::cate_modify();
             break;
         case "cate-del":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             self::cate_delete($args);
             break;
         case "cate-multi":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             parent::multi('products_cate', CORE::$manage . 'products/cate/');
             break;
         case "add":
             self::$temp["MAIN"] = 'ogs-admin-products-insert-tpl.html';
             self::$temp["SEO"] = self::$temp_option["SEO"];
             self::$temp["IMAGE"] = self::$temp_option["IMAGE"];
             CORE::res_init('tab', 'get', 'box');
             self::add();
             break;
         case "insert":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             self::insert();
             break;
         case "detail":
             self::$temp["MAIN"] = 'ogs-admin-products-modify-tpl.html';
             self::$temp["SEO"] = self::$temp_option["SEO"];
             self::$temp["IMAGE"] = self::$temp_option["IMAGE"];
             CORE::res_init('tab', 'get', 'box');
             self::detail($args);
             break;
         case "modify":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             self::modify();
             break;
         case "del":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             self::delete($args);
             break;
         case "multi":
             self::$temp["MAIN"] = self::$temp_option["MSG"];
             parent::multi('products', CORE::$manage . 'products/');
             break;
         case "getSort":
             parent::getSort($args);
             break;
         case "seek":
             self::seek($args);
             break;
         default:
             self::$temp["MAIN"] = 'ogs-admin-products-list-tpl.html';
             self::$temp["TREE"] = self::$temp_option["TREE"];
             PRODUCTS::tree('p');
             self::row();
             break;
     }
     self::nav_current($nav_class, $nav_func);
 }
예제 #8
0
 public static function class_handle(array $class)
 {
     $unset = array('sk');
     foreach ($unset as $funcname) {
         unset($class[$funcname]);
     }
     foreach ($class as $className => $classActive) {
         if ($classActive) {
             $classUse[] = $className;
         }
     }
     OGSADMIN::$class = $classUse;
 }