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


PHP iPHP::seccode方法代码示例

本文整理汇总了PHP中iPHP::seccode方法的典型用法代码示例。如果您正苦于以下问题:PHP iPHP::seccode方法的具体用法?PHP iPHP::seccode怎么用?PHP iPHP::seccode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在iPHP的用法示例。


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

示例1: check_seccode

 public static function check_seccode()
 {
     if ($_POST['username'] && $_POST['password']) {
         $seccode = iS::escapeStr($_POST['iACP_seccode']);
         iPHP::seccode($seccode, true, 'iACP_seccode') or iPHP::code(0, 'iCMS:seccode:error', 'seccode', 'json');
     }
 }
开发者ID:World3D,项目名称:iCMS,代码行数:7,代码来源:iACP.class.php

示例2: ACTION_add

 public function ACTION_add()
 {
     if (!iCMS::$config['comment']['enable']) {
         iPHP::code(0, 'iCMS:comment:close', 0, 'json');
     }
     iPHP::app('user.class', 'static');
     user::get_cookie() or iPHP::code(0, 'iCMS:!login', 0, 'json');
     $seccode = iS::escapeStr($_POST['seccode']);
     if (iCMS::$config['comment']['seccode']) {
         iPHP::seccode($seccode, true) or iPHP::code(0, 'iCMS:seccode:error', 'seccode', 'json');
     }
     iPHP::app('user.msg.class', 'static');
     $appid = (int) $_POST['appid'];
     $iid = (int) $_POST['iid'];
     $cid = (int) $_POST['cid'];
     $suid = (int) $_POST['suid'];
     $reply_id = (int) $_POST['id'];
     $reply_uid = (int) $_POST['userid'];
     $reply_name = iS::escapeStr($_POST['name']);
     $title = iS::escapeStr($_POST['title']);
     $content = iS::escapeStr($_POST['content']);
     $iid or iPHP::code(0, 'iCMS:article:empty_id', 0, 'json');
     $content or iPHP::code(0, 'iCMS:comment:empty', 0, 'json');
     $fwd = iCMS::filter($content);
     $fwd && iPHP::code(0, 'iCMS:comment:filter', 0, 'json');
     $appid or $appid = iCMS_APP_ARTICLE;
     $addtime = $_SERVER['REQUEST_TIME'];
     $ip = iPHP::getIp();
     $userid = user::$userid;
     $username = user::$nickname;
     $status = iCMS::$config['comment']['examine'] ? '0' : '1';
     $up = '0';
     $down = '0';
     $quote = '0';
     $floor = '0';
     $fields = array('appid', 'cid', 'iid', 'suid', 'title', 'userid', 'username', 'content', 'reply_id', 'reply_uid', 'reply_name', 'addtime', 'status', 'up', 'down', 'ip', 'quote', 'floor');
     $data = compact($fields);
     $id = iDB::insert('comment', $data);
     iDB::query("UPDATE `#iCMS@__article` SET comments=comments+1 WHERE `id` ='{$iid}' limit 1");
     user::update_count($userid, 1, 'comments');
     if (iCMS::$config['comment']['examine']) {
         iPHP::code(0, 'iCMS:comment:examine', $id, 'json');
     }
     iPHP::code(1, 'iCMS:comment:success', $id, 'json');
 }
开发者ID:sunhk25,项目名称:iCMS,代码行数:45,代码来源:comment.app.php

示例3: API_check

 public function API_check()
 {
     $name = iS::escapeStr($_GET['name']);
     $value = iS::escapeStr($_GET['value']);
     $a = iPHP::code(1, '', $name);
     switch ($name) {
         case 'username':
             if (!preg_match("/^[\\w\\-\\.]+@[\\w\\-]+(\\.\\w+)+\$/i", $value)) {
                 $a = iPHP::code(0, 'user:register:username:error', 'username');
             } else {
                 user::check($value, 'username') && ($a = iPHP::code(0, 'user:register:username:exist', 'username'));
             }
             break;
         case 'nickname':
             if (preg_match("/\\d/", $value[0]) || cstrlen($value) > 20 || cstrlen($value) < 4) {
                 $a = iPHP::code(0, 'user:register:nickname:error', 'nickname');
             } else {
                 user::check($value, 'nickname') && ($a = iPHP::code(0, 'user:register:nickname:exist', 'nickname'));
             }
             break;
         case 'password':
             strlen($value) < 6 && ($a = iPHP::code(0, 'user:password:error', 'password'));
             break;
         case 'seccode':
             iPHP::seccode($value) or $a = iPHP::code(0, 'iCMS:seccode:error', 'seccode');
             break;
     }
     iPHP::json($a);
 }
开发者ID:sunhk25,项目名称:iCMS,代码行数:29,代码来源:user.app.php


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