CONTROL_OPT::ctl_form PHP 메소드

ctl_form() 공개 메소드

public ctl_form ( )
    function ctl_form()
    {
        $_act_get = fn_getSafe(fn_get("act_get"), "text", "base");
        if (!isset($this->adminLogged["admin_allow"]["opt"][$_act_get]) && !$this->is_super) {
            return array("alert" => "x040301");
        }
        if ($_act_get == "base") {
            $this->tplData["tplRows"] = $this->obj_dir->list_dir(BG_PATH_TPL . "user/");
            $_arr_timezoneRows = (include_once BG_PATH_LANG . $this->config["lang"] . "/timezone.php");
            $_arr_timezone[] = "";
            if (stristr(BG_SITE_TIMEZONE, "/")) {
                $_arr_timezone = explode("/", BG_SITE_TIMEZONE);
            }
            $this->tplData["timezoneRows"] = $_arr_timezoneRows;
            $this->tplData["timezoneJson"] = json_encode($_arr_timezoneRows);
            $this->tplData["timezoneType"] = $_arr_timezone[0];
        }
        $this->tplData["act_get"] = $_act_get;
        $this->obj_tpl->tplDisplay("opt_form.tpl", $this->tplData);
        return array("alert" => "y040301");
    }

Usage Example

예제 #1
0
파일: opt.php 프로젝트: itviewer/baigoSSO
if (!defined("IN_BAIGO")) {
    exit("Access Denied");
}
include_once BG_PATH_FUNC . "init.func.php";
//管理员通用
fn_init(true, true, "Content-Type: text/html; charset=utf-8", true, "ctl", true);
include_once BG_PATH_INC . "is_install.inc.php";
//验证是否已登录
include_once BG_PATH_INC . "is_admin.inc.php";
//验证是否已登录
include_once BG_PATH_CONTROL . "admin/ctl/opt.class.php";
//载入设置控制器
$ctl_opt = new CONTROL_OPT();
//初始化设置对象
switch ($GLOBALS["act_get"]) {
    case "dbconfig":
        $arr_optRow = $ctl_opt->ctl_dbconfig();
        if ($arr_optRow["alert"] != "y040301") {
            header("Location: " . BG_URL_ADMIN . "ctl.php?mod=alert&act_get=show&alert=" . $arr_optRow["alert"]);
            exit;
        }
        break;
    default:
        //基本
        $arr_optRow = $ctl_opt->ctl_form();
        if ($arr_optRow["alert"] != "y040301") {
            header("Location: " . BG_URL_ADMIN . "ctl.php?mod=alert&act_get=show&alert=" . $arr_optRow["alert"]);
            exit;
        }
        break;
}