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); } }
function __construct() { list($func) = CORE::$args; $nav_class = 'SALE'; MANAGER::level_check(1); CORE::res_init('pyramid', 'css'); switch ($func) { case "bonus": # 未發送獎金列表 $nav_func = 'BONUS'; self::$temp["MAIN"] = 'ogs-admin-sale-bonus-tpl.html'; self::bonus(); break; case "grant": # 獎金發送 self::$temp["MAIN"] = self::$temp_option["MSG"]; self::grant(); break; case "granted": # 已發送獎金列表 $nav_func = 'GRANTED'; self::$temp["MAIN"] = 'ogs-admin-sale-granted-tpl.html'; self::granted(); break; default: self::$id = $func; self::$temp["MAIN"] = 'ogs-admin-sale-tpl.html'; self::row(); break; } self::nav_current($nav_class, $nav_func); }
function __construct() { list($func, $id) = CORE::$args; $nav_class = 'MEMBER'; switch ($func) { case "add": $nav_func = 'add'; self::$temp["MAIN"] = 'ogs-admin-member-insert-tpl.html'; self::add(); break; case "insert": self::$temp["MAIN"] = self::$temp_option["MSG"]; self::insert(); break; case "detail": MANAGER::level_check(1); self::$temp["MAIN"] = 'ogs-admin-member-detail-tpl.html'; self::detail($id); break; case "reset-password": MANAGER::level_check(1); self::$temp["MAIN"] = self::$temp_option["MSG"]; self::reset_password($id); break; case "replace": MANAGER::level_check(1); self::$temp["MAIN"] = self::$temp_option["MSG"]; self::replace(); break; case "del": MANAGER::level_check(1); self::$temp["MAIN"] = self::$temp_option["MSG"]; self::del($id); break; default: self::$temp["MAIN"] = 'ogs-admin-member-list-tpl.html'; self::row(); $func = false; break; } self::nav_current($nav_class, $nav_func); }
include_once $DIR_LIBS . 'mysql.php'; // added for 3.5 sql_* wrapper global $MYSQL_HANDLER; if (!isset($MYSQL_HANDLER)) { $MYSQL_HANDLER = array('mysql', ''); } if ($MYSQL_HANDLER[0] == '') { $MYSQL_HANDLER[0] = 'mysql'; } include_once $DIR_LIBS . 'sql/' . $MYSQL_HANDLER[0] . '.php'; // end new for 3.5 sql_* wrapper include $DIR_LIBS . 'MEMBER.php'; include $DIR_LIBS . 'ACTIONLOG.php'; include $DIR_LIBS . 'MANAGER.php'; include $DIR_LIBS . 'PLUGIN.php'; $manager =& MANAGER::instance(); // make sure there's no unnecessary escaping: //set_magic_quotes_runtime(0); if (version_compare(PHP_VERSION, '5.3.0', '<')) { ini_set('magic_quotes_runtime', '0'); } // Avoid notices if (!isset($CONF['UsingAdminArea'])) { $CONF['UsingAdminArea'] = 0; } // only needed when updating logs if ($CONF['UsingAdminArea']) { include $DIR_LIBS . 'xmlrpc.inc.php'; // XML-RPC client classes include_once $DIR_LIBS . 'ADMIN.php'; }
function __construct() { self::$origin_args = CORE::$args; $func = array_shift(CORE::$args); CORE::summon(__FILE__); self::$endClass = __CLASS__ . "_BACKEND"; new self::$endClass(); switch ($func) { case "verify": # 開通管理員帳號 self::$temp["NAV"] = ''; self::$temp["MAIN"] = self::$temp_option["MSG"]; self::verify(); new VIEW(self::$temp_option["HULL"], self::$temp, false, 1); break; case "login": # 管理員登入頁 self::$temp["NAV"] = ''; self::$temp["MAIN"] = 'ogs-admin-manager-login-tpl.html'; self::autologin(); new VIEW(self::$temp_option["HULL"], self::$temp, false, 1); break; case "login-act": self::$temp["NAV"] = ''; self::$temp["MAIN"] = self::$temp_option["MSG"]; self::login(); new VIEW(self::$temp_option["HULL"], self::$temp, false, 1); break; case "regist": self::$temp["NAV"] = ''; self::$temp["MAIN"] = 'ogs-admin-manager-regist-tpl.html'; new VIEW(self::$temp_option["HULL"], self::$temp, false, 1); break; case "regist-act": self::$temp["NAV"] = ''; self::$temp["MAIN"] = self::$temp_option["MSG"]; self::regist(); new VIEW(self::$temp_option["HULL"], self::$temp, false, 1); break; case "forget": session_destroy(); self::$temp["NAV"] = ''; self::$temp["MAIN"] = 'ogs-admin-manager-forget-tpl.html'; new VIEW(self::$temp_option["HULL"], self::$temp, false, 1); break; case "forget-act": session_destroy(); self::$temp["NAV"] = ''; self::$temp["MAIN"] = self::$temp_option["MSG"]; self::forget(); new VIEW(self::$temp_option["HULL"], self::$temp, false, 1); break; case "logout": session_destroy(); self::$temp["NAV"] = ''; self::$temp["MAIN"] = self::$temp_option["MSG"]; CORE::msg(self::$lang["logout_done"], CORE::$manage); new VIEW(self::$temp_option["HULL"], self::$temp, false, 1); break; } }