Beispiel #1
0
 function ctl_logout()
 {
     $_str_forward = fn_getSafe(fn_get("forward"), "txt", "");
     if (!$_str_forward) {
         $_str_forward = fn_forward(BG_URL_ADMIN . "ctl.php");
     }
     fn_ssin_end();
     return array("forward" => fn_forward($_str_forward));
 }
Beispiel #2
0
<?php

/*-----------------------------------------------------------------
!!!!警告!!!!
以下为系统文件,请勿修改
-----------------------------------------------------------------*/
//不能非法包含或直接执行
if (!defined("IN_BAIGO")) {
    exit("Access Denied");
}
if ($GLOBALS["adminLogged"]["alert"] != "y020102") {
    if ($GLOBALS["view"] == "iframe") {
        $_str_location = "Location: " . BG_URL_ADMIN . "ctl.php?mod=alert&act_get=show&alert=" . $GLOBALS["adminLogged"]["alert"] . "&view=" . $GLOBALS["view"];
    } else {
        if (!fn_isEmpty(fn_server("REQUEST_URI"))) {
            $_str_attach = fn_forward(fn_server("REQUEST_URI"));
        }
        $_str_location = "Location: " . BG_URL_ADMIN . "ctl.php?mod=logon&forward=" . $_str_attach;
    }
    header($_str_location);
    //未登录就跳转至登录界面
    exit;
}
Beispiel #3
0
 function ver_process($method = "auto")
 {
     $_arr_data = array("name" => "baigoADS", "ver" => PRD_ADS_VER, "referer" => fn_forward(fn_server("SERVER_NAME") . BG_URL_ROOT), "method" => $method);
     $_str_ver = fn_http(PRD_VER_CHECK, $_arr_data, "get");
     $this->obj_dir->put_file(BG_PATH_CACHE . "sys/latest_ver.json", $_str_ver["ret"]);
 }
Beispiel #4
0
 /**
  * fn_adminLogin function.
  *
  * @access public
  * @return void
  */
 function input_login()
 {
     $_arr_adminLogin["forward"] = fn_getSafe(fn_post("forward"), "txt", "");
     if (!$_arr_adminLogin["forward"]) {
         $_arr_adminLogin["forward"] = fn_forward(BG_URL_ADMIN . "ctl.php");
     }
     if (!fn_seccode()) {
         //验证码
         return array("forward" => $_arr_adminLogin["forward"], "alert" => "x030205");
     }
     if (!fn_token("chk")) {
         //令牌
         return array("forward" => $_arr_adminLogin["forward"], "alert" => "x030206");
     }
     $_arr_adminName = validateStr(fn_post("admin_name"), 1, 30, "str", "strDigit");
     switch ($_arr_adminName["status"]) {
         case "too_short":
             return array("forward" => $_arr_adminLogin["forward"], "alert" => "x020201");
             break;
         case "too_long":
             return array("forward" => $_arr_adminLogin["forward"], "alert" => "x020202");
             break;
         case "format_err":
             return array("forward" => $_arr_adminLogin["forward"], "alert" => "x020203");
             break;
         case "ok":
             $_arr_adminLogin["admin_name"] = $_arr_adminName["str"];
             break;
     }
     $_arr_adminPass = validateStr(fn_post("admin_pass"), 1, 0);
     switch ($_arr_adminPass["status"]) {
         case "too_short":
             return array("forward" => $_arr_adminLogin["forward"], "alert" => "x020208");
             break;
         case "ok":
             $_arr_adminLogin["admin_pass"] = $_arr_adminPass["str"];
             break;
     }
     $_arr_adminLogin["alert"] = "ok";
     return $_arr_adminLogin;
 }
Beispiel #5
0
<?php

/*-----------------------------------------------------------------

!!!!警告!!!!
以下为系统文件,请勿修改

-----------------------------------------------------------------*/
//不能非法包含或直接执行
if (!defined("IN_BAIGO")) {
    exit("Access Denied");
}
if ($GLOBALS["adminLogged"]["alert"] != "y020102") {
    if ($GLOBALS["view"]) {
        $_str_location = "Location: " . BG_URL_ADMIN . "ctl.php?mod=alert&act_get=show&alert=" . $GLOBALS["adminLogged"]["alert"] . "&view=" . $GLOBALS["view"];
    } else {
        if (fn_server("REQUEST_URI")) {
            $_str_forward = fn_forward(fn_server("REQUEST_URI"));
        } else {
            $_str_forward = fn_forward(BG_URL_ADMIN . "ctl.php");
        }
        $_str_location = "Location: " . BG_URL_ADMIN . "ctl.php?mod=logon&forward=" . $_str_forward;
    }
    header($_str_location);
    //未登录就跳转至登录界面
    exit;
}