CONTROL_UPGRADE::ctl_dbconfig PHP Method

ctl_dbconfig() public method

public ctl_dbconfig ( )
    function ctl_dbconfig()
    {
        if ($this->errCount > 0) {
            return array("alert" => "x030414");
        }
        $this->obj_tpl->tplDisplay("upgrade_dbconfig.tpl", $this->tplData);
        return array("alert" => "y030404");
    }

Usage Example

Example #1
0
        $arr_set = array("base" => true, "ssin" => true, "header" => "Content-Type: text/html; charset=utf-8", "db" => true, "type" => "install");
        break;
    default:
        $arr_set = array("base" => true, "ssin" => true, "header" => "Content-Type: text/html; charset=utf-8", "ssin_file" => true);
        break;
}
fn_init($arr_set);
include_once BG_PATH_CLASS . "mysqli.class.php";
//载入数据库类
include_once BG_PATH_CONTROL . "install/ctl/upgrade.class.php";
//载入栏目控制器
$ctl_upgrade = new CONTROL_UPGRADE();
//初始化商家
switch ($GLOBALS["act_get"]) {
    case "dbconfig":
        $arr_upgradeRow = $ctl_upgrade->ctl_dbconfig();
        if ($arr_upgradeRow["alert"] != "y030404") {
            header("Location: " . BG_URL_INSTALL . "ctl.php?mod=alert&act_get=show&alert=" . $arr_upgradeRow["alert"]);
            exit;
        }
        break;
    case "dbtable":
        $arr_upgradeRow = $ctl_upgrade->ctl_dbtable();
        if ($arr_upgradeRow["alert"] != "y030404") {
            header("Location: " . BG_URL_INSTALL . "ctl.php?mod=alert&act_get=show&alert=" . $arr_upgradeRow["alert"]);
            exit;
        }
        break;
    case "base":
    case "upload":
    case "sso":