• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP validateStr函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: api_decode

 /**
  * api_decode function.
  *
  * @access public
  * @return void
  */
 function api_decode()
 {
     $this->app_check("post");
     $_arr_code = validateStr(fn_post("code"), 1, 0);
     switch ($_arr_code["status"]) {
         case "too_short":
             $_arr_return = array("alert" => "x080202");
             $this->obj_api->halt_re($_arr_return);
             break;
         case "ok":
             $_str_code = $_arr_code["str"];
             break;
     }
     $_arr_key = validateStr(fn_post("key"), 1, 0);
     switch ($_arr_key["status"]) {
         case "too_short":
             $_arr_return = array("alert" => "x080203");
             $this->obj_api->halt_re($_arr_return);
             break;
         case "ok":
             $_str_key = $_arr_key["str"];
             break;
     }
     $_str_result = fn_baigoDecode($_str_code, $_str_key);
     exit($_str_result);
 }
开发者ID:itviewer,项目名称:baigoSSO,代码行数:32,代码来源:code.class.php


示例2: mdl_const

 function mdl_const($str_type)
 {
     if (!fn_token("chk")) {
         //令牌
         $this->obj_ajax->halt_alert("x030102");
     }
     $_arr_opt = fn_post("opt");
     $_str_content = "<?php" . PHP_EOL;
     foreach ($_arr_opt as $_key => $_value) {
         $_arr_optChk = validateStr($_value, 1, 900);
         $_str_optValue = $_arr_optChk["str"];
         if (is_numeric($_value)) {
             $_str_content .= "define(\"" . $_key . "\", " . $_str_optValue . ");" . PHP_EOL;
         } else {
             $_str_content .= "define(\"" . $_key . "\", \"" . str_replace(PHP_EOL, "|", $_str_optValue) . "\");" . PHP_EOL;
         }
     }
     if ($str_type == "base") {
         $_str_content .= "define(\"BG_SITE_SSIN\", \"" . fn_rand(6) . "\");" . PHP_EOL;
     } else {
         if ($str_type == "visit") {
             if ($_arr_opt["BG_VISIT_TYPE"] != "static") {
                 $_str_content .= "define(\"BG_VISIT_FILE\", \"html\");" . PHP_EOL;
             }
         }
     }
     $_str_content = str_replace("||", "", $_str_content);
     $_num_size = file_put_contents(BG_PATH_CONFIG . "opt_" . $str_type . ".inc.php", $_str_content);
     if ($_num_size > 0) {
         $_str_alert = "y060101";
     } else {
         $_str_alert = "x060101";
     }
     return array("alert" => $_str_alert);
 }
开发者ID:richardcj,项目名称:baigoCMS,代码行数:35,代码来源:opt.class.php


示例3: 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


示例4: 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"]);
     }
     if ($_arr_adminSubmit["admin_id"] > 0) {
         if (!isset($this->adminLogged["admin_allow"]["admin"]["edit"])) {
             $this->obj_ajax->halt_alert("x020303");
         }
         if ($_arr_adminSubmit["admin_id"] == $this->adminLogged["admin_id"]) {
             $this->obj_ajax->halt_alert("x020306");
         }
         $_arr_ssoGet = $this->obj_sso->sso_get($_arr_adminSubmit["admin_id"]);
         if ($_arr_ssoGet["alert"] != "y010102") {
             $this->obj_ajax->halt_alert($_arr_ssoGet["alert"]);
         }
         $_str_adminPass = fn_post("admin_pass");
         $_arr_ssoEdit = $this->obj_sso->sso_edit($_arr_adminSubmit["admin_name"], "", $_str_adminPass, $_arr_adminSubmit["admin_mail"], $_arr_adminSubmit["admin_nick"]);
         $_num_adminId = $_arr_adminSubmit["admin_id"];
     } else {
         if (!isset($this->adminLogged["admin_allow"]["admin"]["add"])) {
             $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("x020210");
                 break;
             case "ok":
                 $_str_adminPass = $_arr_adminPass["str"];
                 break;
         }
         $_arr_ssoReg = $this->obj_sso->sso_reg($_arr_adminSubmit["admin_name"], $_str_adminPass, $_arr_adminSubmit["admin_mail"], $_arr_adminSubmit["admin_nick"]);
         if ($_arr_ssoReg["alert"] != "y010101") {
             $this->obj_ajax->halt_alert($_arr_ssoReg["alert"]);
         }
         $_num_adminId = $_arr_ssoReg["user_id"];
     }
     $_arr_adminRow = $this->mdl_admin->mdl_submit($_num_adminId);
     if ($_arr_ssoEdit["alert"] == "y010103" || $_arr_adminRow["alert"] == "y020103") {
         $_str_alert = "y020103";
     } else {
         $_str_alert = $_arr_adminRow["alert"];
     }
     $this->obj_ajax->halt_alert($_str_alert);
 }
开发者ID:gorgee,项目名称:baigoADS,代码行数:53,代码来源:admin.class.php


示例5: app_get

 /** 读取 app 信息
  * app_get function.
  *
  * @access public
  * @param bool $chk_token (default: false)
  * @return void
  */
 function app_get($str_method = "get", $chk_token = false)
 {
     if ($str_method == "post") {
         $num_appId = fn_post("app_id");
         $str_appKey = fn_post("app_key");
     } else {
         $num_appId = fn_get("app_id");
         $str_appKey = fn_get("app_key");
     }
     $_arr_appId = validateStr($num_appId, 1, 0, "str", "int");
     switch ($_arr_appId["status"]) {
         case "too_short":
             return array("alert" => "x190203");
             exit;
             break;
         case "format_err":
             return array("alert" => "x190204");
             exit;
             break;
         case "ok":
             $_arr_appGet["app_id"] = $_arr_appId["str"];
             break;
     }
     $_arr_appKey = validateStr($str_appKey, 1, 64, "str", "alphabetDigit");
     switch ($_arr_appKey["status"]) {
         case "too_short":
             return array("alert" => "x190214");
             exit;
             break;
         case "too_long":
             return array("alert" => "x190215");
             exit;
             break;
         case "format_err":
             return array("alert" => "x190216");
             exit;
             break;
         case "ok":
             $_arr_appGet["app_key"] = $_arr_appKey["str"];
             break;
     }
     $_arr_appGet["alert"] = "ok";
     return $_arr_appGet;
 }
开发者ID:xiaodin1,项目名称:baigoCMS,代码行数:51,代码来源:api.class.php


示例6: api_decode

 /**
  * api_decode function.
  *
  * @access public
  * @return void
  */
 function api_decode()
 {
     $this->app_check("post");
     $_arr_code = validateStr(fn_post("code"), 1, 0);
     switch ($_arr_code["status"]) {
         case "too_short":
             $_arr_return = array("alert" => "x050223");
             $this->obj_api->halt_re($_arr_return);
             break;
         case "ok":
             $_str_code = $_arr_code["str"];
             break;
     }
     $_arr_sign = array("act_post" => $GLOBALS["act_post"], "code" => $_str_code);
     if (!$this->obj_sign->sign_check(array_merge($this->appRequest, $_arr_sign), $this->appRequest["signature"])) {
         $_arr_return = array("alert" => "x050403");
         $this->obj_api->halt_re($_arr_return);
     }
     $_str_result = $this->obj_crypt->decrypt($_str_code, $this->appRow["app_key"]);
     exit($_str_result);
 }
开发者ID:baigoStudio,项目名称:baigoSSO,代码行数:27,代码来源:code.class.php


示例7: api_verify

 /**
  * api_verify function.
  *
  * @access public
  * @return void
  */
 function api_verify()
 {
     $this->app_check("post");
     $_arr_params = fn_post("params");
     $_arr_signature = validateStr(fn_post("signature"), 1, 0);
     switch ($_arr_signature["status"]) {
         case "too_short":
             $_arr_return = array("alert" => "x050226");
             $this->obj_api->halt_re($_arr_return);
             break;
         case "ok":
             $_str_sign = $_arr_signature["str"];
             break;
     }
     if ($this->obj_sign->sign_check($_arr_params, $_str_sign)) {
         $_str_alert = "y050403";
     } else {
         $_str_alert = "x050403";
     }
     $_arr_return = array("alert" => $_str_alert);
     $this->obj_api->halt_re($_arr_return);
 }
开发者ID:baigoStudio,项目名称:baigoSSO,代码行数:28,代码来源:signature.class.php


示例8: 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


示例9: 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:richardcj,项目名称:baigoCMS,代码行数:36,代码来源:user.class.php


示例10: input_dbconfig

 function input_dbconfig()
 {
     $_arr_dbHost = validateStr(fn_post("db_host"), 1, 0);
     switch ($_arr_dbHost["status"]) {
         case "too_short":
             return array("alert" => "x030204");
             exit;
             break;
         case "ok":
             $this->dbconfig["db_host"] = $_arr_dbHost["str"];
             break;
     }
     $_arr_dbPort = validateStr(fn_post("db_port"), 1, 0);
     switch ($_arr_dbPort["status"]) {
         case "too_short":
             return array("alert" => "x030211");
             exit;
             break;
         case "ok":
             $this->dbconfig["db_port"] = $_arr_dbPort["str"];
             break;
     }
     $_arr_dbName = validateStr(fn_post("db_name"), 1, 0);
     switch ($_arr_dbName["status"]) {
         case "too_short":
             return array("alert" => "x030205");
             exit;
             break;
         case "ok":
             $this->dbconfig["db_name"] = $_arr_dbName["str"];
             break;
     }
     $_arr_dbUser = validateStr(fn_post("db_user"), 1, 0);
     switch ($_arr_dbUser["status"]) {
         case "too_short":
             return array("alert" => "x030206");
             exit;
             break;
         case "ok":
             $this->dbconfig["db_user"] = $_arr_dbUser["str"];
             break;
     }
     $_arr_dbPass = validateStr(fn_post("db_pass"), 1, 0);
     switch ($_arr_dbPass["status"]) {
         case "too_short":
             return array("alert" => "x030207");
             exit;
             break;
         case "ok":
             $this->dbconfig["db_pass"] = $_arr_dbPass["str"];
             break;
     }
     $_arr_dbCharset = validateStr(fn_post("db_charset"), 1, 0);
     switch ($_arr_dbCharset["status"]) {
         case "too_short":
             return array("alert" => "x030208");
             exit;
             break;
         case "ok":
             $this->dbconfig["db_charset"] = $_arr_dbCharset["str"];
             break;
     }
     $_arr_dbTable = validateStr(fn_post("db_table"), 1, 0);
     switch ($_arr_dbTable["status"]) {
         case "too_short":
             return array("alert" => "x030209");
             exit;
             break;
         case "ok":
             $this->dbconfig["db_table"] = $_arr_dbTable["str"];
             break;
     }
     $this->dbconfig["alert"] = "ok";
     return $this->dbconfig;
 }
开发者ID:humor-zo,项目名称:baigoADS,代码行数:75,代码来源:opt.class.php


示例11: input_login

 /**
  * fn_adminLogin function.
  *
  * @access public
  * @return void
  */
 private function input_login()
 {
     $_arr_adminLogin["forward"] = fn_getSafe(fn_post("forward"), "txt", "");
     if (!$_arr_adminLogin["forward"]) {
         $_arr_adminLogin["forward"] = base64_encode(BG_URL_ADMIN . "ctl.php");
     }
     if (!fn_seccode()) {
         //验证码
         return array("forward" => $_arr_adminLogin["forward"], "alert" => "x030101");
         exit;
     }
     if (!fn_token("chk")) {
         //令牌
         return array("forward" => $_arr_adminLogin["forward"], "alert" => "x030102");
         exit;
     }
     $_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");
             exit;
             break;
         case "too_long":
             return array("forward" => $_arr_adminLogin["forward"], "alert" => "x020202");
             exit;
             break;
         case "format_err":
             return array("forward" => $_arr_adminLogin["forward"], "alert" => "x020203");
             exit;
             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");
             exit;
             break;
         case "ok":
             $_arr_adminLogin["admin_pass"] = $_arr_adminPass["str"];
             break;
     }
     $_arr_adminLogin["alert"] = "ok";
     $_arr_adminLogin["view"] = fn_getSafe(fn_post("view"), "txt", "");
     return $_arr_adminLogin;
 }
开发者ID:gorgee,项目名称:baigoADS,代码行数:54,代码来源:logon.class.php


示例12: notify_input

 /** 读取 app 信息
  * app_get function.
  *
  * @access public
  * @param bool $chk_token (default: false)
  * @return void
  */
 function notify_input($str_method = "get", $chk_token = false)
 {
     switch ($str_method) {
         case "post":
             $_str_time = fn_post("time");
             $_str_signature = fn_post("signature");
             $_str_code = fn_post("code");
             $this->jsonp_callback = fn_post("callback");
             $_arr_notifyInput["act_post"] = fn_post("act_post");
             break;
         default:
             $_str_time = fn_get("time");
             $_str_signature = fn_get("signature");
             $_str_code = fn_get("code");
             $this->jsonp_callback = fn_get("callback");
             $_arr_notifyInput["act_get"] = fn_get("act_get");
             break;
     }
     $_arr_time = validateStr($_str_time, 1, 0);
     switch ($_arr_time["status"]) {
         case "too_short":
             return array("alert" => "x220201");
             break;
         case "ok":
             $_arr_notifyInput["time"] = $_arr_time["str"];
             break;
     }
     $_arr_signature = validateStr($_str_signature, 1, 0);
     switch ($_arr_signature["status"]) {
         case "too_short":
             return array("alert" => "x220203");
             break;
         case "ok":
             $_arr_notifyInput["signature"] = $_arr_signature["str"];
             break;
     }
     $_arr_code = validateStr($_str_code, 1, 0);
     switch ($_arr_code["status"]) {
         case "too_short":
             return array("alert" => "x220204");
             break;
         case "ok":
             $_arr_notifyInput["code"] = $_arr_code["str"];
             break;
     }
     $_arr_notifyInput["alert"] = "ok";
     return $_arr_notifyInput;
 }
开发者ID:baigoStudio,项目名称:baigoSSO,代码行数:55,代码来源:notify.class.php


示例13: input_submit

 function input_submit()
 {
     if (!fn_token("chk")) {
         //令牌
         return array("alert" => "x030102");
         exit;
     }
     $this->tagSubmit["tag_id"] = fn_getSafe(fn_post("tag_id"), "int", 0);
     if ($this->tagSubmit["tag_id"] > 0) {
         $_arr_tagRow = $this->mdl_read($this->tagSubmit["tag_id"]);
         if ($_arr_tagRow["alert"] != "y130102") {
             return $_arr_tagRow;
             exit;
         }
     }
     $_arr_tagName = validateStr(fn_post("tag_name"), 1, 30);
     switch ($_arr_tagName["status"]) {
         case "too_short":
             return array("alert" => "x130201");
             exit;
             break;
         case "too_long":
             return array("alert" => "x130202");
             exit;
             break;
         case "ok":
             $this->tagSubmit["tag_name"] = $_arr_tagName["str"];
             break;
     }
     $_arr_tagRow = $this->mdl_read($this->tagSubmit["tag_name"], "tag_name", $this->tagSubmit["tag_id"]);
     if ($_arr_tagRow["alert"] == "y130102") {
         return array("alert" => "x130203");
         exit;
     }
     $_arr_tagStatus = validateStr(fn_post("tag_status"), 1, 0);
     switch ($_arr_tagStatus["status"]) {
         case "too_short":
             return array("alert" => "x130204");
             exit;
             break;
         case "ok":
             $this->tagSubmit["tag_status"] = $_arr_tagStatus["str"];
             break;
     }
     $this->tagSubmit["alert"] = "ok";
     return $this->tagSubmit;
 }
开发者ID:richardcj,项目名称:baigoCMS,代码行数:47,代码来源:tag.class.php


示例14: input_verify

 function input_verify()
 {
     if (!fn_token("chk")) {
         //令牌
         return array("alert" => "x030214");
     }
     $_arr_verifyId = validateStr(fn_post("verify_id"), 1, 0);
     switch ($_arr_verifyId["status"]) {
         case "too_short":
             return array("alert" => "x120201");
             break;
         case "ok":
             $this->verifySubmit["verify_id"] = $_arr_verifyId["str"];
             break;
     }
     $_arr_verifyToken = validateStr(fn_post("verify_token"), 1, 0);
     switch ($_arr_verifyToken["status"]) {
         case "too_short":
             return array("alert" => "x120202");
             break;
         case "ok":
             $this->verifySubmit["verify_token"] = $_arr_verifyToken["str"];
             break;
     }
     $this->verifySubmit["alert"] = "ok";
     return $this->verifySubmit;
 }
开发者ID:itviewer,项目名称:baigoSSO,代码行数:27,代码来源:verify.class.php


示例15: input_submit

 function input_submit()
 {
     if (!fn_token("chk")) {
         //令牌
         return array("alert" => "x030102");
         exit;
     }
     $this->callSubmit["call_id"] = fn_getSafe(fn_post("call_id"), "int", 0);
     if ($this->callSubmit["call_id"] > 0) {
         $_arr_callRow = $this->mdl_read($this->callSubmit["call_id"]);
         if ($_arr_callRow["alert"] != "y170102") {
             return $_arr_callRows;
             exit;
         }
     }
     $_arr_callName = validateStr(fn_post("call_name"), 1, 300);
     switch ($_arr_callName["status"]) {
         case "too_short":
             return array("alert" => "x170201");
             exit;
             break;
         case "too_long":
             return array("alert" => "x170202");
             exit;
             break;
         case "ok":
             $this->callSubmit["call_name"] = $_arr_callName["str"];
             break;
     }
     $_arr_callType = validateStr(fn_post("call_type"), 1, 0);
     switch ($_arr_callType["status"]) {
         case "too_short":
             return array("alert" => "x170204");
             exit;
             break;
         case "ok":
             $this->callSubmit["call_type"] = $_arr_callType["str"];
             break;
     }
     $_arr_callStatus = validateStr(fn_post("call_status"), 1, 0);
     switch ($_arr_callStatus["status"]) {
         case "too_short":
             return array("alert" => "x170206");
             exit;
             break;
         case "ok":
             $this->callSubmit["call_status"] = $_arr_callStatus["str"];
             break;
     }
     $this->callSubmit["call_file"] = fn_getSafe(fn_post("call_file"), "txt", "");
     $this->callSubmit["call_attach"] = fn_getSafe(fn_post("call_attach"), "txt", "");
     $this->callSubmit["call_cate_id"] = fn_getSafe(fn_post("call_cate_id"), "int", 0);
     $this->callSubmit["call_spec_id"] = fn_getSafe(fn_post("call_spec_id"), "int", 0);
     $this->callSubmit["call_cate_ids"] = fn_jsonEncode(fn_post("call_cate_ids"), "no");
     $this->callSubmit["call_cate_excepts"] = fn_jsonEncode(fn_post("call_cate_excepts"), "no");
     $this->callSubmit["call_mark_ids"] = fn_jsonEncode(fn_post("call_mark_ids"), "no");
     $this->callSubmit["call_amount"] = fn_jsonEncode(fn_post("call_amount"), "no");
     $this->callSubmit["alert"] = "ok";
     return $this->callSubmit;
 }
开发者ID:xiaodin1,项目名称:baigoCMS,代码行数:60,代码来源:call.class.php


示例16: input_submit

 function input_submit()
 {
     if (!fn_token("chk")) {
         //令牌
         return array("alert" => "x030102");
         exit;
     }
     $this->mimeSubmit["mime_id"] = fn_getSafe(fn_post("mime_id"), "int", 0);
     if ($this->mimeSubmit["mime_id"] > 0) {
         $_arr_mimeRow = $this->mdl_read($this->mimeSubmit["mime_id"]);
         if ($_arr_mimeRow["alert"] != "y080102") {
             return $_arr_mimeRow;
             exit;
         }
     }
     $_arr_mimeName = validateStr(fn_post("mime_name"), 1, 300);
     switch ($_arr_mimeName["status"]) {
         case "too_short":
             return array("alert" => "x080201");
             exit;
             break;
         case "too_long":
             return array("alert" => "x080202");
             exit;
             break;
         case "ok":
             $this->mimeSubmit["mime_name"] = $_arr_mimeName["str"];
             break;
     }
     $_arr_mimeRow = $this->mdl_read($this->mimeSubmit["mime_name"], "mime_name", $this->mimeSubmit["mime_id"]);
     if ($_arr_mimeRow["alert"] == "y080102") {
         return array("alert" => "x080206");
         exit;
     }
     $_arr_mimeExt = validateStr(fn_post("mime_ext"), 1, 10);
     switch ($_arr_mimeExt["status"]) {
         case "too_short":
             return array("alert" => "x080203");
             exit;
             break;
         case "too_long":
             return array("alert" => "x080204");
             exit;
             break;
         case "ok":
             $this->mimeSubmit["mime_ext"] = $_arr_mimeExt["str"];
             break;
     }
     $_arr_mimeNote = validateStr(fn_post("mime_note"), 0, 300);
     switch ($_arr_mimeNote["status"]) {
         case "too_long":
             return array("alert" => "x080205");
             exit;
             break;
         case "ok":
             $this->mimeSubmit["mime_note"] = $_arr_mimeNote["str"];
             break;
     }
     $this->mimeSubmit["alert"] = "ok";
     return $this->mimeSubmit;
 }
开发者ID:xiaodin1,项目名称:baigoCMS,代码行数:61,代码来源:mime.class.php


示例17: api_decode

 /**
  * api_decode function.
  *
  * @access public
  * @return void
  */
 function api_decode()
 {
     $this->app_check("get");
     if (!isset($this->appAllow["code"]["decode"])) {
         $_arr_return = array("alert" => "x050315");
         $this->log_do($_arr_return, "decode");
         $this->obj_api->halt_re($_arr_return);
     }
     $_arr_code = validateStr(fn_get("code"), 1, 0);
     switch ($_arr_code["status"]) {
         case "too_short":
             $_arr_return = array("alert" => "x080202");
             $this->obj_api->halt_re($_arr_return);
             break;
         case "ok":
             $_str_code = $_arr_code["str"];
             break;
     }
     $_arr_key = validateStr(fn_get("key"), 1, 0);
     switch ($_arr_key["status"]) {
         case "too_short":
             $_arr_return = array("alert" => "x080203");
             $this->obj_api->halt_re($_arr_return);
             break;
         case "ok":
             $_str_key = $_arr_key["str"];
             break;
     }
     $_str_result = fn_baigoDecode($_str_code, $_str_key);
     exit($_str_result);
 }
开发者ID:richardcj,项目名称:baigoCMS,代码行数:37,代码来源:code.class.php


示例18: input_send

 /** 发送表单验证
  * input_send function.
  *
  * @access public
  * @return void
  */
 function input_send()
 {
     if (!fn_token("chk")) {
         //令牌
         return array("alert" => "x030206");
     }
     $_arr_pmTitle = validateStr(fn_post("pm_title"), 0, 90);
     switch ($_arr_pmTitle["status"]) {
         case "too_long":
             return array("alert" => "x110202");
             break;
         case "ok":
             $this->pmSubmit["pm_title"] = $_arr_pmTitle["str"];
             break;
     }
     $_arr_pmContent = validateStr(fn_post("pm_content"), 1, 900);
     switch ($_arr_pmContent["status"]) {
         case "too_short":
             return array("alert" => "x110201");
             break;
         case "too_long":
             return array("alert" => "x110203");
             break;
         case "ok":
             $this->pmSubmit["pm_content"] = $_arr_pmContent["str"];
             break;
     }
     if (!$this->pmSubmit["pm_title"]) {
         $this->pmSubmit["pm_title"] = fn_substr_utf8($this->pmSubmit["pm_content"], 0, 30);
     }
     $_arr_pmTo = validateStr(fn_post("pm_to"), 1, 0);
     switch ($_arr_pmTo["status"]) {
         case "too_short":
             return array("alert" => "x110205");
             break;
         case "ok":
             $this->pmSubmit["pm_to"] = $_arr_pmTo["str"];
             break;
     }
     $this->pmSubmit["alert"] = "ok";
     return $this->pmSubmit;
 }
开发者ID:baigoStudio,项目名称:baigoSSO,代码行数:48,代码来源:pm.class.php


示例19: sync_get

 function sync_get($chk_token = false)
 {
     $_arr_time = validateStr(fn_get("time"), 1, 0);
     switch ($_arr_time["status"]) {
         case "too_short":
             return array("alert" => "x090201");
             exit;
             break;
         case "ok":
             $_tm_time = $_arr_time["str"];
             break;
     }
     $_arr_random = validateStr(fn_get("random"), 1, 0);
     switch ($_arr_random["status"]) {
         case "too_short":
             return array("alert" => "x090202");
             exit;
             break;
         case "ok":
             $_str_rand = $_arr_random["str"];
             break;
     }
     $_arr_signature = validateStr(fn_get("signature"), 1, 0);
     switch ($_arr_signature["status"]) {
         case "too_short":
             return array("alert" => "x090203");
             exit;
             break;
         case "ok":
             $_str_sign = $_arr_signature["str"];
             break;
     }
     if (!fn_baigoSignChk($_tm_time, $_str_rand, $_str_sign)) {
         $_arr_return = array("alert" => "x050403");
         return $_arr_return;
         exit;
     }
     $_arr_code = validateStr(fn_get("code"), 1, 0);
     switch ($_arr_code["status"]) {
         case "too_short":
             return array("alert" => "x080202");
             exit;
             break;
         case "ok":
             $_str_code = $_arr_code["str"];
             break;
     }
     $_arr_key = validateStr(fn_get("key"), 1, 0);
     switch ($_arr_key["status"]) {
         case "too_short":
             return array("alert" => "x080203");
             exit;
             break;
         case "ok":
             $_str_key = $_arr_key["str"];
             break;
     }
     $_arr_result = $this->sync_decode($_str_code, $_str_key);
     if (!isset($_arr_result["app_id"])) {
         return array("alert" => "x050203");
         exit;
     }
     $_arr_appId = validateStr($_arr_result["app_id"], 1, 0, "str", "int");
     switch ($_arr_appId["status"]) {
         case "too_short":
             return array("alert" => "x050203");
             exit;
             break;
         case "format_err":
             return array("alert" => "x050204");
             exit;
             break;
         case "ok":
             $_arr_syncGet["app_id"] = $_arr_appId["str"];
             break;
     }
     if (!isset($_arr_result["app_key"])) {
         return array("alert" => "x050214");
         exit;
     }
     $_arr_appKey = validateStr($_arr_result["app_key"], 1, 64, "str", "alphabetDigit");
  

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP validateSystemid函数代码示例发布时间:2022-05-23
下一篇:
PHP validateSession函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap