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

PHP text函数代码示例

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

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



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

示例1: reviewofs_report

function reviewofs_report($pid, $encounter, $cols, $id)
{
    $count = 0;
    $data = formFetch("form_reviewofs", $id);
    if ($data) {
        print "<table><tr>";
        foreach ($data as $key => $value) {
            if ($key == "id" || $key == "pid" || $key == "user" || $key == "groupname" || $key == "authorized" || $key == "activity" || $key == "date" || $value == "" || $value == "0000-00-00 00:00:00") {
                continue;
            }
            if ($value == "on") {
                $value = "yes";
            }
            $key = ucwords(str_replace("_", " ", $key));
            //modified by BM 07-2009 for internationalization
            if ($key == "Additional Notes") {
                print "<td><span class=bold>" . xl($key) . ": </span><span class=text>" . text($value) . "</span></td>";
            } else {
                print "<td><span class=bold>" . xl($key) . ": </span><span class=text>" . xl($value) . "</span></td>";
            }
            $count++;
            if ($count == $cols) {
                $count = 0;
                print "</tr><tr>\n";
            }
        }
    }
    print "</tr></table>";
}
开发者ID:juggernautsei,项目名称:openemr,代码行数:29,代码来源:report.php


示例2: apply

 public function apply()
 {
     $xtime = strtotime("-1 month");
     $vo = M('member_apply')->field('apply_status')->where("uid={$this->uid}")->order("id DESC")->find();
     $xcount = M('member_apply')->field('add_time')->where("uid={$this->uid} AND add_time>{$xtime}")->order("id DESC")->find();
     if (is_array($vo) && $vo['apply_status'] == 0) {
         $xs = "是您的申请正在审核,请等待此次审核结束再提交新的申请";
         ajaxmsg($xs, 0);
     } elseif (is_array($xcount)) {
         $timex = date("Y-m-d", $xcount['add_time']);
         $xs = "一个月内只能进行一次额度申请,您已在{$timex}申请过了,如急需额度,请直接联系客服";
         ajaxmsg($xs, 0);
     } else {
         $apply['uid'] = $this->uid;
         $apply['apply_type'] = intval($_POST['apply_type']);
         $apply['apply_money'] = floatval($_POST['apply_money']);
         $apply['apply_info'] = text($_POST['apply_info']);
         $apply['add_time'] = time();
         $apply['apply_status'] = 0;
         $apply['add_ip'] = get_client_ip();
         $nid = M('member_apply')->add($apply);
     }
     if ($nid) {
         ajaxmsg('申请已提交,请等待审核');
     } else {
         ajaxmsg('申请提交失败,请重试', 0);
     }
 }
开发者ID:kinglong366,项目名称:p2p,代码行数:28,代码来源:MoneylimitController.class.php


示例3: savetip

 public function savetip()
 {
     $duration = explode(",", text($_POST['loancycle']));
     $data['uid'] = $this->uid;
     $data['account_money'] = floatval($_POST['miniamount']);
     $data['borrow_type'] = intval($_POST['borrowkind']);
     $data['interest_rate'] = intval($_POST['interestrates']);
     $data['duration_from'] = intval($duration[0]);
     $data['duration_to'] = intval($duration[1]);
     $c = M('borrow_tip')->field('id')->where("uid={$this->uid}")->find();
     if (is_array($c)) {
         $data['id'] = $c['id'];
         $newid = M('borrow_tip')->save($data);
         if ($newid) {
             ajaxmsg("修改成功", 1);
         } else {
             ajaxmsg("修改失败,请重试", 0);
         }
     } else {
         $newid = M('borrow_tip')->add($data);
         if ($newid) {
             ajaxmsg("添加成功", 1);
         } else {
             ajaxmsg("添加失败,请重试", 0);
         }
     }
 }
开发者ID:kinglong366,项目名称:p2p,代码行数:27,代码来源:NewtipController.class.php


示例4: savelong

 public function savelong()
 {
     $x = M('members')->field("time_limit,user_leve")->find($this->uid);
     $x['time_limit'] > 0 && $x['user_leve'] == 1 ? $is_vip = 1 : ($is_vip = 0);
     intval($_POST['tendAmount']) == 0 && $is_vip == 1 ? $is_full = 1 : ($is_full = 0);
     $duration = explode(",", text($_POST['loancycle']));
     $data['uid'] = $this->uid;
     $data['account_money'] = floatval($_POST['miniamount']);
     $data['borrow_type'] = intval($_POST['borrowtype']);
     $data['interest_rate'] = intval($_POST['interest']);
     $data['duration_from'] = intval($duration[0]);
     $data['end_time'] = strtotime($_POST['expireddate'] . " 00:00:00");
     $data['duration_to'] = intval($duration[1]);
     $data['is_auto_full'] = $is_full;
     $data['invest_money'] = floatval($_POST['tendAmount']);
     $data['add_ip'] = get_client_ip();
     $data['add_time'] = time();
     $c = M('auto_borrow')->field('id')->where("uid={$this->uid} AND borrow_type={$data['borrow_type']}")->find();
     if (is_array($c)) {
         $data['id'] = $c['id'];
         $newid = M('auto_borrow')->save($data);
         if ($newid) {
             ajaxmsg("修改成功", 1);
         } else {
             ajaxmsg("修改失败,请重试", 0);
         }
     } else {
         $newid = M('auto_borrow')->add($data);
         if ($newid) {
             ajaxmsg("添加成功", 1);
         } else {
             ajaxmsg("添加失败,请重试", 0);
         }
     }
 }
开发者ID:hutao1004,项目名称:yintt,代码行数:35,代码来源:AutoAction.class.php


示例5: text

 /**
  * @desc 文本自动回复
  * @return string
  */
 public function text()
 {
     $keyword = trim($this->_postObj->Content);
     switch ($keyword) {
         case '':
             echo text($this->_postObj, '你什么意思?');
             break;
         case '你好!':
             echo text($this->_postObj, '你好呀!');
             break;
         case 'hello':
             echo text($this->_postObj, 'Hi!!');
             break;
         case 'Hi':
             echo text($this->_postObj, 'Oh!');
             break;
         case '换行':
             echo text($this->_postObj, '这是第一行!' . "\n" . '我是第二行!');
             break;
         case '多图文':
             $array = [['Title' => '多图文一', 'Description' => '第一个文本内容', 'PicUrl' => 'http://7xqoks.com1.z0.glb.clouddn.com/1455679468779.jpg', 'Url' => 'http://www.goto318.com'], ['Title' => '多图文二', 'Description' => '第二个文本内容', 'PicUrl' => 'http://7xqoks.com1.z0.glb.clouddn.com/10.jpg', 'Url' => 'http://www.goto318.com']];
             echo images($this->_postObj, $array);
         default:
             echo text($this->_postObj, '/::)');
             break;
     }
 }
开发者ID:benxiaohair,项目名称:goto318,代码行数:31,代码来源:IndexController.class.php


示例6: getLinkContent

 public function getLinkContent()
 {
     require_once './ThinkPHP/Library/Vendor/Collection/phpQuery.php';
     $link = op_t(I('post.url'));
     $content = get_content_by_url($link);
     $charset = preg_match("/<meta.+?charset=[^\\w]?([-\\w]+)/i", $content, $temp) ? strtolower($temp[1]) : "utf-8";
     \phpQuery::$defaultCharset = $charset;
     \phpQuery::newDocument($content);
     $title = pq("meta[name='title']")->attr('content');
     if (empty($title)) {
         $title = pq("title")->html();
     }
     $title = iconv($charset, "UTF-8", $title);
     $keywords = pq("meta[name='keywords'],meta[name='Keywords']")->attr('content');
     $description = pq("meta[name='description'],meta[name='Description']")->attr('content');
     $url = parse_url($link);
     $img = pq("img")->eq(0)->attr('src');
     if (is_bool(strpos($img, 'http://'))) {
         $img = 'http://' . $url['host'] . $img;
     }
     $title = text($title);
     $description = text($description);
     $keywords = text($keywords);
     $return['title'] = $title;
     $return['img'] = $img;
     $return['description'] = empty($description) ? $title : $description;
     $return['keywords'] = empty($keywords) ? $title : $keywords;
     exit(json_encode($return));
 }
开发者ID:ccccy,项目名称:wuanlife,代码行数:29,代码来源:LinkController.class.php


示例7: upload

 /**
  * 文件上传保存
  * @author MaWei (http://www.phpyrb.com)
  * @date 2014-10-19  下午2:33:29
  */
 function upload()
 {
     $_FILES['file']['name'];
     $data = array();
     dump($this->mid);
     $data['uid'] = $this->mid;
     $data['title'] = text($_REQUEST['title']);
     $data['cateid'] = intval($_REQUEST['cateid']);
     $data['type'] = intval($_REQUEST['sourctype']);
     $data['grade'] = intval($_REQUEST['grade']);
     $data['keyword'] = text($_REQUEST['keyword']);
     $data['discription'] = text($_REQUEST['discription']);
     $data['uptime'] = time();
     $reid = add_updata($data, 'Sourc');
     if ($reid) {
         $attach = array();
         $file = fileUpload();
         $attach['sourc_id'] = $reid;
         $attach['name'] = $file['name'];
         $attach['path'] = $file['path'];
         $attach['size'] = $file['size'];
         $attach['hash'] = $file['hash'];
         $reid = add_updata($attach, 'SourcAttach');
     }
     dump($reid);
 }
开发者ID:mwei0321,项目名称:mw,代码行数:31,代码来源:MemberController.class.php


示例8: parseExtra

 public function parseExtra(&$extra = array())
 {
     $extra['title'] = text($extra['title']);
     $extra['description'] = text($extra['description']);
     $extra['keywords'] = text($extra['keywords']);
     return $extra;
 }
开发者ID:ccccy,项目名称:wuanlife,代码行数:7,代码来源:InsertLinkAddon.class.php


示例9: note_report

function note_report($pid, $encounter, $cols, $id)
{
    $count = 0;
    $data = formFetch("form_note", $id);
    if ($data) {
        print "<table><tr>";
        foreach ($data as $key => $value) {
            if ($key == "id" || $key == "pid" || $key == "user" || $key == "groupname" || $key == "authorized" || $key == "activity" || $key == "date" || $value == "" || $value == "0000-00-00 00:00:00") {
                continue;
            }
            if ($value == "on") {
                $value = "yes";
            }
            $key = ucwords(str_replace("_", " ", $key));
            print "<tr>\n";
            print "<tr>\n";
            if ($key == "Note Type") {
                print "<td><span class=bold>" . xlt($key) . ": </span><span class=text>" . xlt($value) . "</span></td>";
            } else {
                print "<td><span class=bold>" . xlt($key) . ": </span><span class=text>" . text($value) . "</span></td>";
            }
            $count++;
            if ($count == $cols) {
                $count = 0;
                print "</tr><tr>\n";
            }
        }
    }
    print "</tr></table>";
}
开发者ID:juggernautsei,项目名称:openemr,代码行数:30,代码来源:report.php


示例10: addupdata

 /**
  * 会员添加修改数据库操作
  * @author MaWei (http://www.phpyrb.com)
  * @date 2014-8-4 下午3:23:27
  */
 function addupdata()
 {
     $data = array();
     $_REQUEST['id'] && ($data['id'] = intval($_REQUEST['id']));
     $data['uname'] = text($_REQUEST['name']);
     $data['email'] = text($_REQUEST['email']);
     $_REQUEST['passwd'] && ($data['passwd'] = sha1_encrypt(text($_REQUEST['passwd'])));
     $data['home'] = text($_REQUEST['home']);
     $data['status'] = intval($_REQUEST['status']);
     $data['qq'] = intval($_REQUEST['qq']);
     $data['sex'] = intval($_REQUEST['sex']);
     if ($_FILES['file']['name']) {
         $avatar = uploads(array('path' => 'avatar', 'ImgWidth' => 150, 'ImgHeight' => 150), true);
         $data['avatar'] = $avatar['thumb'];
     }
     $data['lasttime'] = time();
     empty($_REQUEST['uid']) && ($data['registertime'] = time());
     $data['lastip'] = get_client_ip();
     $reid = add_updata($data, 'Member');
     if ($reid === false) {
         $this->error('保存失败!', U('Admin/Member/index'));
     } else {
         $this->success('保存成功!', U('Admin/Member/index'));
     }
 }
开发者ID:mwei0321,项目名称:mw,代码行数:30,代码来源:MemberController.class.php


示例11: bindbank

 public function bindbank()
 {
     $bank_info = M('member_banks')->field("uid, bank_num")->where("uid=" . $this->uid)->find();
     !$bank_info['uid'] && ($data['uid'] = $this->uid);
     $data['bank_num'] = text($_POST['account']);
     $data['bank_name'] = text($_POST['bankname']);
     $data['bank_address'] = text($_POST['bankaddress']);
     $data['bank_province'] = text($_POST['province']);
     $data['bank_city'] = text($_POST['cityName']);
     $data['add_ip'] = get_client_ip();
     $data['add_time'] = time();
     if ($bank_info['uid']) {
         /////////////////////新增银行卡修改锁定开关 开始 20130510 fans///////////////////////////
         if (intval($this->glo['edit_bank']) != 1 && $bank_info['bank_num']) {
             ajaxmsg("为了您的帐户资金安全,银行卡已锁定,如需修改,请联系客服", 0);
         }
         /////////////////////新增银行卡修改锁定开关 结束 20130510 fans///////////////////////////
         $old = text($_POST['oldaccount']);
         if ($bank_info['bank_num'] && $old != $bank_info['bank_num']) {
             ajaxmsg('原银卡号不对', 0);
         }
         $newid = M('member_banks')->where("uid=" . $this->uid)->save($data);
     } else {
         $newid = M('member_banks')->add($data);
     }
     if ($newid) {
         MTip('chk2', $this->uid);
         ajaxmsg();
     } else {
         ajaxmsg('操作失败,请重试', 0);
     }
 }
开发者ID:kinglong366,项目名称:p2p,代码行数:32,代码来源:BankController.class.php


示例12: misc_billing_options_report

function misc_billing_options_report($pid, $encounter, $cols, $id)
{
    $count = 0;
    $data = formFetch("form_misc_billing_options", $id);
    if ($data) {
        print "<table><tr>";
        foreach ($data as $key => $value) {
            if ($key == "id" || $key == "pid" || $key == "user" || $key == "groupname" || $key == "authorized" || $key == "activity" || $key == "date" || $value == "" || $value == "0" || $value == "0000-00-00 00:00:00" || $value == "0000-00-00") {
                continue;
            }
            if ($value == "1") {
                $value = "yes";
            }
            if ($key === 'box_14_date_qual' || $key === 'box_15_date_qual') {
                $value = text(qual_id_to_description($key, $value));
            }
            if ($key === 'provider_id') {
                $trow = sqlQuery("SELECT id, lname, fname FROM users WHERE " . "id = ? ", array($value));
                $value = $trow['fname'] . ' ' . $trow['lname'];
            }
            $key = ucwords(str_replace("_", " ", $key));
            print "<td><span class=bold>{$key}: </span><span class=text>" . text($value) . "</span></td>";
            $count++;
            if ($count == $cols) {
                $count = 0;
                print "</tr><tr>\n";
            }
        }
    }
    print "</tr></table>";
}
开发者ID:juggernautsei,项目名称:openemr,代码行数:31,代码来源:report.php


示例13: doEdit

 public function doEdit()
 {
     $data['user_name'] = text($_POST['user_name']);
     $data['user_id'] = M('members')->getFieldByUser_name($data['user_name'], "id");
     if (!$data['user_id']) {
         $this->error("找不到你要备注的会员");
     }
     $data['remark'] = text($_POST['remark']);
     if (!$data['remark']) {
         $this->error("备注信息不可为空");
     }
     $data['admin_id'] = $_SESSION['admin_id'];
     $data['admin_real_name'] = $_SESSION['admin_user_name'];
     $data['add_time'] = time();
     $newid = M('member_remark')->add($data);
     if ($newid) {
         alogs("Remark", $newid, 1, '成功执行了备注信息的添加操作!');
         //管理员操作日志
         $this->success("添加成功");
     } else {
         alogs("Remark", $newid, 0, '执行备注信息的添加操作失败!');
         //管理员操作日志
         $this->error("添加失败");
     }
 }
开发者ID:caotieshuan,项目名称:ishoutou,代码行数:25,代码来源:RemarkAction.class.php


示例14: misc_billing_options_report

function misc_billing_options_report($pid, $encounter, $cols, $id)
{
    $count = 0;
    $data = formFetch("form_misc_billing_options", $id);
    if ($data) {
        print "<table><tr>";
        foreach ($data as $key => $value) {
            if ($key == "id" || $key == "pid" || $key == "user" || $key == "groupname" || $key == "authorized" || $key == "activity" || $key == "date" || $value == "" || $value == "0" || $value == "0000-00-00 00:00:00" || $value == "0000-00-00") {
                continue;
            }
            if ($value == "1") {
                $value = "yes";
            }
            if ($key === 'box_14_date_qual' || $key === 'box_15_date_qual') {
                $value = text(qual_id_to_description($key, $value));
            }
            $key = ucwords(str_replace("_", " ", $key));
            print "<td><span class=bold>{$key}: </span><span class=text>{$value}</span></td>";
            $count++;
            if ($count == $cols) {
                $count = 0;
                print "</tr><tr>\n";
            }
        }
    }
    print "</tr></table>";
}
开发者ID:jatin-52,项目名称:erm,代码行数:27,代码来源:report.php


示例15: doAdd

 public function doAdd()
 {
     $udata['user_name'] = text($_POST['user_name']);
     $cs = M('members')->where($udata)->count('id');
     if ($cs > 0) {
         $this->error("添加失败,此用户名已被占用,请重试");
         exit;
     }
     if (empty($udata['user_name'])) {
         $this->error("用户名不能为空,请重试");
         exit;
     }
     $udata['is_transfer'] = 1;
     $udata['reg_ip'] = get_client_ip();
     $udata['user_leve'] = 1;
     $udata['time_limit'] = time() + 24 * 3600 * 365;
     $udata['user_pass'] = md5(time() . rand(10, 99));
     $udata['reg_time'] = strtotime($_POST['reg_time'] . " " . date("H:i:s", time()));
     $newid = M('members')->add($udata);
     if ($newid) {
         $idata['uid'] = $newid;
         $idata['address'] = text($_POST['address']);
         $idata['info'] = text($_POST['info']);
         M('member_info')->add($idata);
         $this->success("添加成功");
     } else {
         $this->error("添加失败,请重试");
     }
     $this->display();
 }
开发者ID:hutao1004,项目名称:yintt,代码行数:30,代码来源:TmembersAction.class.php


示例16: myCellText

/**
 * Adapt text to be suitable as the contents of a table cell.
 *
 * @param  string  $s  Input text.
 * @return string  Output text.
 */
function myCellText($s)
{
    if ($s === '') {
        return '&nbsp;';
    }
    return text($s);
}
开发者ID:katopenzz,项目名称:openemr,代码行数:13,代码来源:list_requests.php


示例17: customerFields

function customerFields($data, $badFields)
{
    global $states;
    global $COUNTRIES;
    if (userLoggedIn() && array_key_exists("CID", $data) && $data["CID"] != "") {
        tableRow(array(tableData(prompt("<b>CID:</b>"), "right", "top"), tableData(prompt($data["CID"]), "left", "top")));
        prepDatePicker();
        tableRow(array(tableData(prompt("<b>Met Date:</b>"), "right", "top"), tableData(text($data, "metDate", "", "", "datepicker"), "left", "middle")));
    }
    tableRow(array(tableData(prompt("<b>First name*:</b>", in_array("fname", $badFields)), "right"), tableData(text($data, "fname"), "left", "middle"), tableData(prompt("<b>Last name*:</b>", in_array("lname", $badFields)), "right"), tableData(text($data, "lname"), "left", "middle")));
    tableRow(array(tableData(prompt("<b>Email*:</b>", in_array("email", $badFields)), "right"), tableData(text($data, "email"), "left", "middle"), tableData(prompt("<b>Phone Number:</b>", in_array("phoneNum", $badFields)), "right"), tableData(text($data, "phoneNum"), "left", "middle")));
    tableRow(array(tableData(prompt("<b>Title:</b>", in_array("title", $badFields)), "right"), tableData(radioButton($data, "title", "Mr.", false, "Mr."), "center", "middle"), tableData(radioButton($data, "title", "Ms.", false, "Ms."), "center", "middle"), tableData(radioButton($data, "title", "Mrs.", false, "Mrs."), "center", "middle"), tableData(radioButton($data, "title", "Dr.", false, "Dr."), "center", "middle")));
    if (!userLoggedIn()) {
        if ($data["charity"] == true) {
            tableRow(array(tableData(prompt("Tell us about your situtation, your team and why you need a ChapR. The more information the better!"), "middle", "top", 6)));
        } else {
            tableRow(array(tableData(prompt("Write anything else you would like us to know about you below: <br> team info (type, name, number), how you heard about us (where, from who?) etc."), "middle", "top", 6)));
        }
    }
    tableRow(array(tableData(prompt("<b>Comments:</b>", in_array("customerCNotes", $badFields), ""), "right", "top"), tableData(textArea($data, "customerCNotes", 3), "center", "", 5)));
    tableRow(array(tableData(prompt("<b>Street1*:</b>", in_array("street1", $badFields)), "right"), tableData(text($data, "street1"), "left", "middle", 3)));
    tableRow(array(tableData(prompt("<b>Street2:</b>", in_array("street2", $badFields)), "right"), tableData(text($data, "street2"), "left", "middle", 3)));
    $stateDirections = 'only applicable for domestic teams';
    tableRow(array(tableData(prompt("<b>City*:</b>", in_array("city", $badFields)), "right"), tableData(text($data, "city"), "left", "middle"), tableData(prompt("<b>State*:</b>", in_array("state", $badFields), "", $stateDirections), "right"), tableData(dropDown($data, "state", $states, "--------Choose Your State-------"), "left", "middle")));
    tableRow(array(tableData(prompt("<b>Zip*:</b>", in_array("zip", $badFields)), "right"), tableData(text($data, "zip"), "left", "middle"), tableData(prompt("<b>Country:</b>", in_array("country", $badFields)), "right"), tableData(dropDown($data, "country", $COUNTRIES), "left", "middle")));
    if (userLoggedIn()) {
        tableRow(array(tableData(prompt("<b>Admin Comments:</b>", in_array("adminCNotes", $badFields), "", $commentDirections), "right", "top"), tableData(textArea($data, "adminCNotes", 3), "center", "", 5)));
    }
    tableRow(array(tableData(hiddenField("CID", $data["CID"])), tableData(hiddenField("OID", $data["OID"]))));
}
开发者ID:ChapResearch,项目名称:Online-Orders-Database,代码行数:30,代码来源:customerForm.php


示例18: doEdit

 public function doEdit()
 {
     $id = intval($_POST['id']);
     $sms_content = text($_POST['smsContent']);
     $smsReceiver = $_POST['smsReceiver'];
     if (empty($sms_content)) {
         $this->error("短信内容不能为空");
     }
     $len = cnstrlen($sms_content);
     if ($len > 240) {
         $this->error("短信内容为不能超过240个汉字、字符、数字组成的字符串");
     }
     if (empty($id)) {
         $ret = massSmsNotify($sms_content, $this->admin_id);
         if ($ret) {
             $this->success("添加成功");
         } else {
             $this->error("添加失败");
         }
     } else {
         $deal_flag = M('sms_content')->getFieldById($id, "deal_flag");
         if ($deal_flag == 1) {
             $this->error("已被处理过的记录无法更改短信内容");
         }
         M('sms_content')->where(array("id" => $id))->save(array("sms_content" => $sms_content));
         $this->success("修改成功");
     }
 }
开发者ID:hutao1004,项目名称:yintt,代码行数:28,代码来源:MassSendAction.class.php


示例19: doAddMul

 public function doAddMul()
 {
     $mul_type = explode(",", $_POST['type_name']);
     $mul_nid = explode(",", $_POST['type_nid']);
     $Type = D("Aacategory");
     foreach ($mul_type as $key => $v) {
         $data = array();
         $data['type_name'] = $v;
         $data['type_nid'] = $mul_nid[$key];
         $data['parent_id'] = intval($_POST['parent_id']);
         $data['type_set'] = intval($_POST['type_set']);
         $data['is_hiden'] = intval($_POST['is_hiden']);
         $data['type_url'] = text($_POST['type_url']);
         $data['area_id'] = session("admin_area_id");
         $newid = $Type->add($data);
     }
     if ($newid) {
         alogs("Aacategory", $newid, 1, '栏目批量添加成功!');
         //管理员操作日志
         $this->success("栏目批量添加成功");
     } else {
         alogs("Aacategory", $newid, 0, '栏目批量添加失败!');
         //管理员操作日志
         $this->error("添加失败");
     }
 }
开发者ID:kinglong366,项目名称:p2p,代码行数:26,代码来源:AacategoryController.class.php


示例20: register

 /**
  * 会员注册
  * @author MaWei (http://www.phpyrb.com)
  * @date 2014-10-6  下午3:28:30
  */
 function register()
 {
     $data = array();
     $data['uname'] = text($_REQUEST['name']);
     $data['passwd'] = text($_REQUEST['passwd']);
     $data['email'] = text($_REQUEST['email']);
     $data['status'] = 1;
     $data['sex'] = 3;
     $data['lasttime'] = $data['registertime'] = time();
     $data['lastip'] = get_client_ip();
     //检测用户名
     if ($this->member->checkname($data['uname'])) {
         echo json_encode(array('status' => null, 'msg' => '用户名已存在'));
         exit;
     }
     //检测邮箱
     if ($this->member->checkemail($data['email'])) {
         echo json_encode(array('status' => null, 'msg' => '邮箱已存在'));
         exit;
     }
     $data['passwd'] = $this->member->encrypt($data['passwd']);
     $reid = add_updata($data, 'Member');
     if ($reid === false) {
         echo json_encode(array('status' => -1, 'msg' => '非常抱歉,由于网络原因!注册失败!'));
     } else {
         echo json_encode(array('status' => 1, 'msg' => '恭喜您!注册成功!'));
     }
 }
开发者ID:mwei0321,项目名称:mw,代码行数:33,代码来源:LoginController.class.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP text2words函数代码示例发布时间:2022-05-23
下一篇:
PHP tests_add_filter函数代码示例发布时间: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