当前位置: 首页>>代码示例>>PHP>>正文


PHP fn_baigoEncrypt函数代码示例

本文整理汇总了PHP中fn_baigoEncrypt函数的典型用法代码示例。如果您正苦于以下问题:PHP fn_baigoEncrypt函数的具体用法?PHP fn_baigoEncrypt怎么用?PHP fn_baigoEncrypt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了fn_baigoEncrypt函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: notice_login

 /**
  * notice_list function.
  *
  * @access public
  * @return void
  */
 function notice_login()
 {
     $_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"]);
     $_arr_adminRow = $this->mdl_admin->mdl_read($_arr_decode["user_id"]);
     if ($_arr_adminRow["alert"] != "y020102") {
         $this->obj_notice->halt_re($_arr_adminRow);
     }
     if ($_arr_adminRow["admin_status"] == "disable") {
         $_arr_return = array("alert" => "x020401");
         $this->obj_notice->halt_re($_arr_return);
     }
     $_str_rand = fn_rand(6);
     $this->mdl_admin->mdl_login($_arr_decode["user_id"], $_str_rand);
     fn_session("admin_id", "mk", $_arr_decode["user_id"]);
     fn_session("admin_ssin_time", "mk", time());
     fn_session("admin_hash", "mk", fn_baigoEncrypt($_arr_adminRow["admin_time"], $_str_rand));
     $this->obj_notice->halt_re($_arr_adminRow);
 }
开发者ID:richardcj,项目名称:baigoCMS,代码行数:37,代码来源:admin.class.php

示例2: mdl_submit

 /** 提交
  * mdl_submit function.
  *
  * @access public
  * @return void
  */
 function mdl_submit($num_userId, $str_mail)
 {
     $_arr_verifyRow = $this->mdl_read($num_userId, "verify_user_id");
     $_str_rand = fn_rand(6);
     $_str_token = fn_rand(32);
     $_str_tokenDo = fn_baigoEncrypt($_str_token, $_str_rand);
     $_arr_verifyData = array("verify_user_id" => $num_userId, "verify_mail" => $str_mail, "verify_token" => $_str_token, "verify_rand" => $_str_rand, "verify_token_expire" => time() + BG_VERIFY_EXPIRE * 60, "verify_status" => "enable", "verify_time_refresh" => time());
     if ($_arr_verifyRow["alert"] == "x120102") {
         $_arr_verifyData["verify_time"] = time();
         $_num_verifyId = $this->obj_db->insert(BG_DB_TABLE . "verify", $_arr_verifyData);
         //更新数据
         if ($_num_verifyId > 0) {
             $_str_alert = "y120101";
             //更新成功
         } else {
             return array("alert" => "x120101");
         }
     } else {
         $_num_verifyId = $_arr_verifyRow["verify_id"];
         $_num_mysql = $this->obj_db->update(BG_DB_TABLE . "verify", $_arr_verifyData, "verify_id=" . $_num_verifyId);
         //更新数据
         if ($_num_mysql > 0) {
             $_str_alert = "y120103";
             //更新成功
         } else {
             return array("alert" => "x120103");
         }
     }
     return array("verify_id" => $_num_verifyId, "verify_token" => $_str_tokenDo, "alert" => $_str_alert);
 }
开发者ID:itviewer,项目名称:baigoSSO,代码行数:36,代码来源:verify.class.php

示例3: fn_ssin_begin

/**
 * 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;
}
开发者ID:richardcj,项目名称:baigoCMS,代码行数:38,代码来源:session.func.php

示例4: ctl_login

 /**
  * ctl_login function.
  *
  * @access public
  * @return void
  */
 function ctl_login()
 {
     $_arr_adminLogin = $this->mdl_admin->input_login();
     if ($_arr_adminLogin["alert"] != "ok") {
         return $_arr_adminLogin;
         exit;
     }
     $_arr_adminRow = $this->mdl_admin->mdl_read($_arr_adminLogin["admin_name"], "admin_name");
     if ($_arr_adminRow["alert"] != "y020102") {
         return $_arr_adminRow;
         exit;
     }
     if (fn_baigoEncrypt($_arr_adminLogin["admin_pass"], $_arr_adminRow["admin_rand"]) != $_arr_adminRow["admin_pass"]) {
         return array("forward" => $_arr_adminLogin["forward"], "alert" => "x020207");
         exit;
     }
     if ($_arr_adminRow["admin_status"] != "enable") {
         return array("forward" => $_arr_adminLogin["forward"], "alert" => "x020402");
         exit;
     }
     $_str_adminRand = fn_rand(6);
     $this->mdl_admin->mdl_login($_arr_adminRow["admin_id"], fn_baigoEncrypt($_arr_adminLogin["admin_pass"], $_str_adminRand), $_str_adminRand);
     fn_session("admin_id", "mk", $_arr_adminRow["admin_id"]);
     fn_session("admin_ssin_time", "mk", time());
     fn_session("admin_hash", "mk", fn_baigoEncrypt($_arr_adminRow["admin_time"], $_str_adminRand));
     return array("admin_id" => $_arr_adminLogin["admin_id"], "forward" => $_arr_adminLogin["forward"], "alert" => "y020201");
 }
开发者ID:gorgee,项目名称:baigoADS,代码行数:33,代码来源:logon.class.php

示例5: ajax_submit

 /**
  * ajax_submit function.
  *
  * @access public
  * @return void
  */
 function ajax_submit()
 {
     $_arr_adminSubmit = $this->mdl_admin->input_submit();
     if ($_arr_adminSubmit["alert"] != "ok") {
         $this->obj_ajax->halt_alert($_arr_adminSubmit["alert"]);
     }
     $_str_adminPassDo = "";
     $_str_adminRand = "";
     if ($_arr_adminSubmit["admin_id"] > 0) {
         if (!isset($this->adminLogged["admin_allow"]["admin"]["edit"]) && !$this->is_super) {
             $this->obj_ajax->halt_alert("x020303");
         }
         if ($_arr_adminSubmit["admin_id"] == $this->adminLogged["admin_id"] && !$this->is_super) {
             $this->obj_ajax->halt_alert("x020306");
         }
         $_str_adminPass = fn_post("admin_pass");
         if (!fn_isEmpty($_str_adminPass)) {
             $_str_adminRand = fn_rand(6);
             $_str_adminPassDo = fn_baigoEncrypt($_str_adminPass, $_str_adminRand);
         }
     } else {
         if (!isset($this->adminLogged["admin_allow"]["admin"]["add"]) && !$this->is_super) {
             $this->obj_ajax->halt_alert("x020302");
         }
         $_arr_adminPass = validateStr(fn_post("admin_pass"), 1, 0);
         switch ($_arr_adminPass["status"]) {
             case "too_short":
                 $this->obj_ajax->halt_alert("x020205");
                 break;
             case "ok":
                 $_str_adminPass = $_arr_adminPass["str"];
                 break;
         }
         $_str_adminRand = fn_rand(6);
         $_str_adminPassDo = fn_baigoEncrypt($_str_adminPass, $_str_adminRand);
     }
     $_arr_adminRow = $this->mdl_admin->mdl_submit($_str_adminPassDo, $_str_adminRand);
     if ($_arr_adminRow["alert"] == "y020101" || $_arr_adminRow["alert"] == "y020103") {
         $_arr_targets[] = array("admin_id" => $_arr_adminRow["admin_id"]);
         $_str_targets = json_encode($_arr_targets);
         if ($_arr_adminRow["alert"] == "y020101") {
             $_type = "add";
         } else {
             $_type = "edit";
         }
         $_str_adminRow = json_encode($_arr_adminRow);
         $_arr_logData = array("log_targets" => $_str_targets, "log_target_type" => "admin", "log_title" => $this->log["admin"][$_type], "log_result" => $_str_adminRow, "log_type" => "admin");
         $this->mdl_log->mdl_submit($_arr_logData, $this->adminLogged["admin_id"]);
     }
     $this->obj_ajax->halt_alert($_arr_adminRow["alert"]);
 }
开发者ID:baigoStudio,项目名称:baigoADS,代码行数:57,代码来源:admin.class.php

示例6: api_admin

 function api_admin()
 {
     $this->check_db();
     include_once BG_PATH_MODEL . "admin.class.php";
     //载入管理帐号模型
     $_mdl_admin = new MODEL_ADMIN();
     $_arr_adminAdd = $_mdl_admin->api_add();
     if ($_arr_adminAdd["alert"] != "ok") {
         $this->obj_api->halt_re($_arr_adminAdd);
     }
     $_str_rand = fn_rand(6);
     $_str_adminPassDo = fn_baigoEncrypt($_arr_adminAdd["admin_pass"], $_str_rand, true);
     $_arr_adminRow = $_mdl_admin->mdl_submit($_str_adminPassDo, $_str_rand);
     $this->obj_api->halt_re($_arr_adminRow);
 }
开发者ID:itviewer,项目名称:baigoSSO,代码行数:15,代码来源:install.class.php

示例7: ajax_pass

 function ajax_pass()
 {
     if (isset($this->adminLogged["admin_allow"]["pass"])) {
         $this->obj_ajax->halt_alert("x020109");
     }
     $_arr_adminPass = $this->mdl_admin->input_pass();
     if ($_arr_adminPass["alert"] != "ok") {
         $this->obj_ajax->halt_alert($_arr_adminPass["alert"]);
     }
     $_arr_adminRow = $this->mdl_admin->mdl_read($this->adminLogged["admin_id"]);
     if ($_arr_adminRow["alert"] != "y020102") {
         return $_arr_adminRow;
     }
     if (fn_baigoEncrypt($_arr_adminPass["admin_pass"], $_arr_adminRow["admin_rand"]) != $_arr_adminRow["admin_pass"]) {
         $this->obj_ajax->halt_alert("x020207");
     }
     $_arr_adminRow = $this->mdl_admin->mdl_pass($this->adminLogged["admin_id"]);
     $this->obj_ajax->halt_alert($_arr_adminRow["alert"]);
 }
开发者ID:itviewer,项目名称:baigoSSO,代码行数:19,代码来源:profile.class.php

示例8: fn_ssin_login

function fn_ssin_login($num_adminId)
{
    $_mdl_admin = new MODEL_ADMIN();
    //设置管理员对象
    $_arr_adminRow = $_mdl_admin->mdl_read($num_adminId);
    //本地数据库处理
    if ($_arr_adminRow["alert"] != "y020102") {
        return $_arr_adminRow;
    }
    if ($_arr_adminRow["admin_status"] == "disable") {
        return array("alert" => "x020401");
    }
    $_str_rand = fn_rand(6);
    $_mdl_admin->mdl_login($num_adminId, $_str_rand);
    fn_session("admin_id", "mk", $num_adminId);
    fn_session("admin_ssin_time", "mk", time());
    fn_session("admin_hash", "mk", fn_baigoEncrypt($_arr_adminRow["admin_time"], $_str_rand));
    return array("alert" => "ok");
}
开发者ID:baigoStudio,项目名称:baigoADS,代码行数:19,代码来源:session.func.php

示例9: fn_ssin_begin

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"] = "x020401";
        return $_arr_adminRow;
        exit;
    }
    $_arr_adminRow = $_mdl_admin->mdl_read(fn_session("admin_id"));
    //print_r($_arr_adminRow);
    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;
    }
    fn_session("admin_ssin_time", "mk", time());
    return $_arr_adminRow;
}
开发者ID:baigoStudio,项目名称:baigoSSO,代码行数:23,代码来源:session.func.php

示例10: ctl_login

 /**
  * ctl_login function.
  *
  * @access public
  * @return void
  */
 function ctl_login()
 {
     $_arr_adminLogin = $this->input_login();
     if ($_arr_adminLogin["alert"] != "ok") {
         return $_arr_adminLogin;
         exit;
     }
     $_arr_ssoLogin = $this->obj_sso->sso_login($_arr_adminLogin["admin_name"], $_arr_adminLogin["admin_pass"]);
     //sso验证
     if ($_arr_ssoLogin["alert"] != "y010401") {
         $_arr_ssoLogin["forward"] = $_arr_adminLogin["forward"];
         return $_arr_ssoLogin;
         exit;
     }
     $_arr_adminRow = $this->mdl_admin->mdl_read($_arr_ssoLogin["user_id"]);
     //本地数据库处理
     if ($_arr_adminRow["alert"] != "y020102") {
         $_arr_adminRow["forward"] = $_arr_adminLogin["forward"];
         return $_arr_adminRow;
         exit;
     }
     if ($_arr_adminRow["admin_status"] == "disable") {
         return array("forward" => $_arr_adminLogin["forward"], "alert" => "x020401");
         exit;
     }
     $_str_rand = fn_rand(6);
     $this->mdl_admin->mdl_login($_arr_ssoLogin["user_id"], $_str_rand);
     fn_session("admin_id", "mk", $_arr_ssoLogin["user_id"]);
     fn_session("admin_ssin_time", "mk", time());
     fn_session("admin_hash", "mk", fn_baigoEncrypt($_arr_adminRow["admin_time"], $_str_rand));
     if (defined("BG_SSO_SYNLOGON") && BG_SSO_SYNLOGON == "on") {
         $_arr_sync = $this->obj_sso->sso_sync_login($_arr_ssoLogin["user_id"]);
         echo $_arr_sync["html"];
     }
     exit;
     return array("admin_id" => $_arr_ssoLogin["user_id"], "forward" => $_arr_adminLogin["forward"], "alert" => "y020401");
 }
开发者ID:richardcj,项目名称:baigoCMS,代码行数:43,代码来源:logon.class.php

示例11: ajax_submit

 function ajax_submit()
 {
     $_arr_userSubmit = $this->mdl_user->input_submit();
     $_str_userPassDo = "";
     $_str_userRand = "";
     if ($_arr_userSubmit["alert"] != "ok") {
         $this->obj_ajax->halt_alert($_arr_userSubmit["alert"]);
     }
     if ($_arr_userSubmit["user_id"] > 0) {
         if (!isset($this->adminLogged["admin_allow"]["user"]["edit"])) {
             $this->obj_ajax->halt_alert("x010303");
         }
         $_str_userPass = fn_post("user_pass");
         if ($_str_userPass) {
             $_str_userRand = fn_rand(6);
             $_str_userPassDo = fn_baigoEncrypt($_str_userPass, $_str_userRand);
         }
     } else {
         if (!isset($this->adminLogged["admin_allow"]["user"]["add"])) {
             $this->obj_ajax->halt_alert("x010302");
         }
         $_arr_userPass = validateStr(fn_post("user_pass"), 1, 0);
         switch ($_arr_userPass["status"]) {
             case "too_short":
                 $this->obj_ajax->halt_alert("x010212");
                 break;
             case "ok":
                 $_str_userPass = $_arr_userPass["str"];
                 break;
         }
         $_str_userRand = fn_rand(6);
         $_str_userPassDo = fn_baigoEncrypt($_str_userPass, $_str_userRand);
     }
     $_arr_userRow = $this->mdl_user->mdl_submit($_str_userPassDo, $_str_userRand);
     $this->obj_ajax->halt_alert($_arr_userRow["alert"]);
 }
开发者ID:humor-zo,项目名称:baigoADS,代码行数:36,代码来源:user.class.php

示例12: ctl_mailbox

 function ctl_mailbox()
 {
     $_num_verifyId = fn_getSafe(fn_get("verify_id"), "int", 0);
     $_str_verifyToken = fn_getSafe(fn_get("verify_token"), "txt", "");
     if ($_num_verifyId < 1) {
         return array("alert" => "x120201");
     }
     if (fn_isEmpty($_str_verifyToken)) {
         return array("alert" => "x120202");
     }
     $_arr_verifyRow = $this->mdl_verify->mdl_read($_num_verifyId);
     if ($_arr_verifyRow["alert"] != "y120102") {
         return $_arr_verifyRow;
     }
     if ($_arr_verifyRow["verify_status"] != "enable") {
         return array("alert" => "x120203");
     }
     if ($_arr_verifyRow["verify_token_expire"] < time()) {
         return array("alert" => "x120204");
     }
     if (fn_baigoEncrypt($_arr_verifyRow["verify_token"], $_arr_verifyRow["verify_rand"]) != $_str_verifyToken) {
         return array("alert" => "x120205");
     }
     $_arr_userRow = $this->mdl_user->mdl_read($_arr_verifyRow["verify_user_id"]);
     if ($_arr_userRow["alert"] != "y010102") {
         return $_arr_userRow;
     }
     $_arr_verifyRow["verify_token"] = $_str_verifyToken;
     $_arr_tplData = array("userRow" => $_arr_userRow, "verifyRow" => $_arr_verifyRow);
     $this->obj_tpl->tplDisplay("reg_mailbox.tpl", $_arr_tplData);
     return array("alert" => "y010102");
 }
开发者ID:baigoStudio,项目名称:baigoADS,代码行数:32,代码来源:reg.class.php

示例13: api_mailbox

 /**
  * api_mailbox function.
  *
  * @access public
  * @return void
  */
 function api_mailbox()
 {
     $this->app_check("post");
     if (!isset($this->appAllow["user"]["mailbox"])) {
         //无权限并记录日志
         $_arr_return = array("alert" => "x050308");
         $_arr_logTarget[] = array("app_id" => $this->appRequest["app_id"]);
         $_arr_logType = array("user", "mailbox");
         $this->log_do($_arr_logTarget, "app", $_arr_return, $_arr_logType);
         $this->obj_api->halt_re($_arr_return);
     }
     $_arr_userSubmit = $this->mdl_user->input_mail_api();
     if ($_arr_userSubmit["alert"] != "ok") {
         $this->obj_api->halt_re($_arr_userSubmit);
     }
     $_arr_userRow = $this->mdl_user->mdl_read($_arr_userSubmit["user_str"], $_arr_userSubmit["user_by"]);
     if ($_arr_userRow["alert"] != "y010102") {
         $this->obj_api->halt_re($_arr_userRow);
     }
     if ($_arr_userRow["user_status"] != "enable") {
         $_arr_return = array("alert" => "x010401");
         $this->obj_api->halt_re($_arr_return);
     }
     if ($_arr_userSubmit["user_mail_new"] == $_arr_userRow["user_mail"]) {
         $_arr_return = array("alert" => "x010223");
         $this->obj_api->halt_re($_arr_return);
     }
     $_is_pass = false;
     if ($_arr_userSubmit["user_check_pass"] == true) {
         if (fn_baigoEncrypt($_arr_userSubmit["user_pass"], $_arr_userRow["user_rand"], true) != $_arr_userRow["user_pass"]) {
             $_arr_return = array("alert" => "x010213");
             $this->obj_api->halt_re($_arr_return);
         } else {
             $_is_pass = true;
         }
     }
     if (!isset($this->appAllow["user"]["global"]) && !$_is_pass) {
         $_arr_belongRow = $this->mdl_belong->mdl_read($_arr_userRow["user_id"], $this->appRequest["app_id"]);
         if ($_arr_belongRow["alert"] != "y070102") {
             $_arr_return = array("alert" => "x050308");
             $this->obj_api->halt_re($_arr_return);
         }
     }
     if ((BG_REG_ONEMAIL == "false" || BG_LOGIN_MAIL == "on") && $_arr_userSubmit["user_mail_new"]) {
         $_arr_userRowChk = $this->mdl_user->mdl_read($_arr_userSubmit["user_mail_new"], "user_mail", $_arr_userRow["user_id"]);
         //检查邮箱
         if ($_arr_userRowChk["alert"] == "y010102") {
             $_arr_return = array("alert" => "x010211");
             $this->obj_api->halt_re($_arr_return);
         }
     }
     //file_put_contents(BG_PATH_ROOT . "test.txt", $_str_userPass . "||" . $_str_rand);
     if (BG_REG_CONFIRM == "on") {
         $_arr_returnRow = $this->mdl_verify->mdl_submit($_arr_userRow["user_id"], $_arr_userSubmit["user_mail_new"]);
         if ($_arr_returnRow["alert"] != "y120101" && $_arr_returnRow["alert"] != "y120103") {
             $_arr_return = array("alert" => "x010405");
             $this->obj_api->halt_re($_arr_return);
         }
         $_str_verifyUrl = BG_SITE_URL . BG_URL_ROOT . "user/ctl.php?mod=reg&act_get=mailbox&verify_id=" . $_arr_returnRow["verify_id"] . "&verify_token=" . $_arr_returnRow["verify_token"];
         $_str_url = "<a href=\"" . $_str_verifyUrl . "\">" . $_str_verifyUrl . "</a>";
         $_str_html = str_replace("{verify_url}", $_str_url, $this->obj_api->mail["mailbox"]["content"]);
         if (fn_mailSend($_arr_userSubmit["user_mail_new"], $this->obj_api->mail["mailbox"]["subject"], $_str_html)) {
             $_arr_returnRow["alert"] = "y010406";
         } else {
             $_arr_returnRow["alert"] = "x010406";
         }
     } else {
         $_arr_returnRow = $this->mdl_user->mdl_mail($_arr_userRow["user_id"], $_arr_userSubmit["user_mail_new"]);
     }
     $_arr_returnRow["user_id"] = $_arr_userRow["user_id"];
     $_arr_returnRow["user_name"] = $_arr_userRow["user_name"];
     $_str_key = fn_rand(6);
     $_str_code = $this->obj_api->api_encode($_arr_returnRow, $_str_key);
     $_arr_return = array("code" => $_str_code, "key" => $_str_key);
     //通知
     $_arr_notice = $_arr_return;
     $_arr_notice["act_post"] = "mailbox";
     $this->obj_api->api_notice($_arr_notice, $this->appRows);
     $_arr_return["alert"] = $_arr_returnRow["alert"];
     $this->obj_api->halt_re($_arr_return);
 }
开发者ID:itviewer,项目名称:baigoSSO,代码行数:87,代码来源:user.class.php

示例14: mdl_convert

 function mdl_convert()
 {
     $_num_errChk = 0;
     $_arr_csvRows = $this->mdl_import();
     /*print_r($this->userConvert["user_list"]["convert"]);
     		exit;*/
     foreach ($_arr_csvRows as $_key_row => $_value_row) {
         foreach ($this->userConvert["user_convert"] as $_key_cel => $_value_cel) {
             $_arr_userRow = $this->mdl_read($_value_row["user_name"], "user_name");
             if ($_arr_userRow["alert"] == "x010102") {
                 $_str_rand = fn_rand(6);
                 $_arr_userData["user_rand"] = $_str_rand;
                 switch ($_value_cel) {
                     case "user_pass":
                         $_str_userPass = fn_baigoEncrypt($_value_row[$_key_cel], $_str_rand, true);
                         $_arr_userData["user_pass"] = $_str_userPass;
                         break;
                     case "abort":
                         break;
                     default:
                         $_arr_userData[$_value_cel] = $_value_row[$_key_cel];
                         break;
                 }
             }
         }
         //print_r($_arr_userData);
         $_num_userId = 0;
         if ($_key_row > 0) {
             $_num_userId = $this->obj_db->insert(BG_DB_TABLE . "user", $_arr_userData);
         }
         if ($_num_userId > 0) {
             //数据库插入是否成功
             $_num_errChk++;
         }
         unset($_arr_userData["user_abort"]);
     }
     if ($_num_errChk > 0) {
         $_str_alert = "y010402";
     } else {
         $_str_alert = "x010402";
     }
     return array("user_id" => $_num_userId, "alert" => $_str_alert);
 }
开发者ID:renyinew,项目名称:baigoSSO,代码行数:43,代码来源:user.class.php

示例15: ajax_admin

 function ajax_admin()
 {
     $this->check_db();
     include_once BG_PATH_MODEL . "admin.class.php";
     //载入管理帐号模型
     $_mdl_admin = new MODEL_ADMIN();
     $_arr_adminSubmit = $_mdl_admin->input_submit();
     if ($_arr_adminSubmit["alert"] != "ok") {
         $this->obj_ajax->halt_alert($_arr_adminSubmit["alert"]);
     }
     $_arr_adminPass = validateStr(fn_post("admin_pass"), 1, 0);
     switch ($_arr_adminPass["status"]) {
         case "too_short":
             $this->obj_ajax->halt_alert("x020205");
             break;
         case "ok":
             $_str_adminPass = $_arr_adminPass["str"];
             break;
     }
     $_arr_adminPassConfirm = validateStr(fn_post("admin_pass_confirm"), 1, 0);
     switch ($_arr_adminPassConfirm["status"]) {
         case "too_short":
             $this->obj_ajax->halt_alert("x020211");
             break;
         case "ok":
             $_str_adminPassConfirm = $_arr_adminPassConfirm["str"];
             break;
     }
     if ($_str_adminPass != $_str_adminPassConfirm) {
         $this->obj_ajax->halt_alert("x020206");
     }
     $_str_adminRand = fn_rand(6);
     $_str_adminPassDo = fn_baigoEncrypt($_str_adminPass, $_str_adminRand);
     $_arr_adminRow = $_mdl_admin->mdl_submit($_str_adminPassDo, $_str_adminRand);
     $this->obj_ajax->halt_alert("y030407");
 }
开发者ID:gorgee,项目名称:baigoADS,代码行数:36,代码来源:install.class.php


注:本文中的fn_baigoEncrypt函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。