コード例 #1
0
ファイル: sync.class.php プロジェクト: gorgee/baigoADS
 function notice_logout()
 {
     $_arr_noticeInput = $this->obj_notice->notice_input("post");
     if ($_arr_noticeInput["alert"] != "ok") {
         $this->obj_notice->halt_re($_arr_noticeInput);
     }
     $_tm_now = time();
     if ($_arr_noticeInput["time"] - $_tm_now > 300) {
         $_arr_return = array("alert" => "x220213");
         $this->obj_notice->halt_re($_arr_return);
     }
     $_arr_signature = $this->obj_sso->sso_verify($_arr_noticeInput["time"], $_arr_noticeInput["random"], $_arr_noticeInput["signature"]);
     if ($_arr_signature["alert"] != "y050403") {
         $this->obj_notice->halt_re($_arr_signature);
     }
     $_arr_decode = $this->obj_sso->sso_decode($_arr_noticeInput["code"], $_arr_noticeInput["key"]);
     if ($_arr_decode["app_id"] != BG_SSO_APPID) {
         $_arr_return = array("alert" => "x220208");
         $this->obj_notice->halt_re($_arr_return);
     }
     if ($_arr_decode["app_key"] != BG_SSO_APPKEY) {
         $_arr_return = array("alert" => "x220212");
         $this->obj_notice->halt_re($_arr_return);
     }
     fn_ssin_end();
     $_arr_return = array("alert" => "y020406");
     $this->obj_notice->halt_re($_arr_return);
 }
コード例 #2
0
ファイル: sync.class.php プロジェクト: baigoStudio/baigoADS
 function api_logout()
 {
     $_arr_notifyInput = $this->obj_notify->notify_input("get");
     if ($_arr_notifyInput["alert"] != "ok") {
         $this->obj_notify->halt_re($_arr_notifyInput);
     }
     $_arr_notifyInput["code"] = fn_htmlcode($_arr_notifyInput["code"], "decode", "crypt");
     $_arr_signature = $this->obj_sso->sso_verify(array_merge($this->arr_data, $_arr_notifyInput), $_arr_notifyInput["signature"]);
     if ($_arr_signature["alert"] != "y050403") {
         $this->obj_notify->halt_re($_arr_signature);
     }
     $_tm_diff = $_arr_notifyInput["time"] - time();
     if ($_tm_diff > 1800 || $_tm_diff < -1800) {
         $_arr_return = array("alert" => "x220213");
         $this->obj_notify->halt_re($_arr_return);
     }
     $_arr_decode = $this->obj_sso->sso_decode($_arr_notifyInput["code"]);
     $_arr_appChk = $this->obj_notify->app_chk($_arr_decode["app_id"], $_arr_decode["app_key"]);
     if ($_arr_appChk["alert"] != "ok") {
         $this->obj_notify->halt_re($_arr_appChk);
     }
     fn_ssin_end();
     $_arr_return = array("alert" => "y020406");
     $this->obj_notify->halt_re($_arr_return, false, true);
 }
コード例 #3
0
ファイル: session.func.php プロジェクト: xiaodin1/baigoCMS
/**
 * fn_ssin_begin function.
 *
 * @access public
 * @return void
 */
function fn_ssin_begin()
{
    $_mdl_admin = new MODEL_ADMIN();
    //设置管理员对象
    $_mdl_group = new MODEL_GROUP();
    //设置管理员对象
    $_num_adminTimeDiff = fn_session("admin_ssin_time") + BG_DEFAULT_SESSION;
    //session有效期
    if (!fn_session("admin_id") || !fn_session("admin_ssin_time") || !fn_session("admin_hash") || $_num_adminTimeDiff < time()) {
        fn_ssin_end();
        $_arr_adminRow["alert"] = "x020402";
        return $_arr_adminRow;
        exit;
    }
    $_arr_adminRow = $_mdl_admin->mdl_read(fn_session("admin_id"));
    if (fn_baigoEncrypt($_arr_adminRow["admin_time"], $_arr_adminRow["admin_rand"]) != fn_session("admin_hash")) {
        fn_ssin_end();
        $_arr_adminRow["alert"] = "x020403";
        return $_arr_adminRow;
        exit;
    }
    $_arr_groupRow = $_mdl_group->mdl_read($_arr_adminRow["admin_group_id"]);
    if (isset($_arr_groupRow["group_status"]) && $_arr_groupRow["group_status"] == "disable") {
        fn_ssin_end();
        $_arr_adminRow["alert"] = "x040401";
        return $_arr_adminRow;
        exit;
    }
    $_arr_adminRow["groupRow"] = $_arr_groupRow;
    fn_session("admin_ssin_time", "mk", time());
    return $_arr_adminRow;
}
コード例 #4
0
ファイル: logon.class.php プロジェクト: gorgee/baigoADS
 function ctl_logout()
 {
     $_str_forward = fn_getSafe(fn_get("forward"), "txt", "");
     if (!$_str_forward) {
         $_str_forward = base64_encode(BG_URL_ADMIN . "ctl.php");
     }
     fn_ssin_end();
     return array("forward" => $_str_forward);
 }
コード例 #5
0
ファイル: sync.class.php プロジェクト: humor-zo/baigoADS
 function notice_logout()
 {
     $_arr_noticeGet = $this->obj_notice->notice_get("get");
     if ($_arr_noticeGet["alert"] != "ok") {
         $this->obj_notice->halt_re($_arr_noticeGet);
     }
     $_tm_now = time();
     if ($_arr_noticeGet["time"] - $_tm_now > 300) {
         $_arr_return = array("alert" => "x220213");
         $this->obj_notice->halt_re($_arr_return);
     }
     $_arr_signature = $this->obj_sso->sso_verify($_arr_noticeGet["time"], $_arr_noticeGet["random"], $_arr_noticeGet["signature"]);
     if ($_arr_signature["alert"] != "y050403") {
         $this->obj_notice->halt_re($_arr_signature);
     }
     $_arr_decode = $this->obj_sso->sso_decode($_arr_noticeGet["code"], $_arr_noticeGet["key"]);
     fn_ssin_end();
     $_arr_return = array("alert" => "y020406");
     $this->obj_notice->halt_re($_arr_return);
 }
コード例 #6
0
ファイル: session.func.php プロジェクト: baigoStudio/baigoADS
/**
 * fn_ssin_begin function.
 *
 * @access public
 * @return void
 */
function fn_ssin_begin()
{
    $_mdl_admin = new MODEL_ADMIN();
    //设置管理员对象
    $_num_adminTimeDiff = fn_session("admin_ssin_time") + BG_DEFAULT_SESSION;
    //session有效期
    if (!fn_session("admin_id") || !fn_session("admin_ssin_time") || !fn_session("admin_hash") || $_num_adminTimeDiff < time()) {
        fn_ssin_end();
        $_arr_adminRow["alert"] = "x020402";
        return $_arr_adminRow;
    }
    $_arr_adminRow = $_mdl_admin->mdl_read(fn_session("admin_id"));
    if (fn_baigoEncrypt($_arr_adminRow["admin_time"], $_arr_adminRow["admin_rand"]) != fn_session("admin_hash")) {
        fn_ssin_end();
        $_arr_adminRow["alert"] = "x020403";
        return $_arr_adminRow;
    }
    fn_session("admin_ssin_time", "mk", time());
    return $_arr_adminRow;
}
コード例 #7
0
ファイル: logon.class.php プロジェクト: baigoStudio/baigoADS
 /**
  * ctl_logout function.
  *
  * @access public
  * @return void
  */
 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, "decode"));
 }