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

PHP get_safe_replace函数代码示例

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

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



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

示例1: ajax

 function ajax()
 {
     $model = M('Order');
     $id = intval($_POST['id']);
     $order = $model->find($id);
     if ($order['userid'] != $this->_userid) {
         die(json_encode(array('msg' => L('do_empty'))));
     }
     $_POST = get_safe_replace($_POST);
     if ($_GET['do'] == 'saveaddress') {
         $r = $model->save($_POST);
         die(json_encode(array('id' => 1)));
     } elseif ($_GET['do'] == 'order_status') {
         $_POST['status'] = 3;
         $_POST['confirm_time'] = time();
         $r = $model->save($_POST);
         die(json_encode(array('id' => 1)));
     } elseif ($_GET['do'] == 'pay_status') {
         $_POST['pay_status'] = 3;
         $r = $model->save($_POST);
         die(json_encode(array('id' => 1)));
     } elseif ($_GET['do'] == 'shipping_status') {
         $_POST['shipping_status'] = $_POST['num'];
         unset($_POST['num']);
         $_POST['accept_time'] = $_POST['shipping_status'] == 2 ? time() : '';
         $r = $model->save($_POST);
         die(json_encode(array('id' => 1)));
     }
 }
开发者ID:yunsite,项目名称:yourphpcms,代码行数:29,代码来源:OrderAction.class.php


示例2: _initialize

 function _initialize()
 {
     parent::_initialize();
     import('@.EXT.Online');
     new Online();
     $this->dao = M('Cart');
     $this->sessionid = get_safe_replace(cookie('onlineid'));
     $_POST = get_safe_replace($_POST);
 }
开发者ID:bossyuetao,项目名称:yuephp,代码行数:9,代码来源:OrderAction.class.php


示例3: _empty

 public function _empty()
 {
     //空操作 空模块
     if (MODULE_NAME != 'Urlrule') {
         $Mod = F('Mod');
         if (!$Mod[MODULE_NAME]) {
             throw_exception('404');
         }
     }
     $a = ACTION_NAME;
     $id = intval($_REQUEST['id']);
     $catid = intval($_REQUEST['catid']);
     $moduleid = intval($_REQUEST['moduleid']);
     if (MODULE_NAME == 'Urlrule') {
         if (APP_LANG) {
             $l = get_safe_replace($_REQUEST['l']);
             $lang = $l ? '_' . $l : '_' . C('DEFAULT_LANG');
         }
         $catdir = get_safe_replace($_REQUEST['catdir']);
         if ($catdir) {
             $Cat = F('Cat' . $lang);
             $catid = $catid ? $catid : $Cat[$catdir];
             unset($Cat);
         }
         if ($_REQUEST['module']) {
             $m = get_safe_replace($_REQUEST['module']);
         } elseif ($moduleid) {
             $Module = F('Module');
             $m = $Module[$moduleid]['module'];
             unset($Module);
         } elseif ($catid) {
             $Category = F('Category' . $lang);
             $m = $Category[$catid]['module'];
             unset($Category);
         } else {
             throw_exception('404');
         }
         if ($a == 'index') {
             $id = $catid;
         }
     } else {
         if (empty($id)) {
             $Cat = F('Cat' . $lang);
             $id = $Cat[$id];
             unset($Cat);
         }
         $m = MODULE_NAME;
     }
     import('@.Action.Base');
     $bae = new BaseAction();
     if (!method_exists($bae, $a)) {
         throw_exception('404');
     }
     $bae->{$a}($id, $m);
 }
开发者ID:anywn3773,项目名称:gzsrex,代码行数:55,代码来源:EmptyAction.class.php


示例4: downloadxls

 public function downloadxls()
 {
     $where = 1;
     $name = "全部订单:" . time();
     if ($_REQUEST["time1"] || $_REQUEST["time2"]) {
         $time1 = get_safe_replace($_REQUEST["time1"]);
         $time2 = get_safe_replace($_REQUEST["time2"]);
         /*strtotime($time2)-($day*86400);*/
         if ($time1 == $time2) {
             $time1 = strtotime($time1) - 86400;
         } else {
             $time1 = strtotime($time1);
         }
         /*相同日期则选择一天*/
         $where .= " and add_time > '" . $time1 . "' and add_time < '" . strtotime($time2) . "'";
         $name = "时间段" . toDate($time1, "Y/m/d") . "-" . toDate(strtotime($time2), "Y/m/d");
     }
     $order = M(MODULE_NAME)->where($where)->getfield('id,sn,add_time,consignee,mobile,order_amount,province,city,area,address');
     //
     $data = array();
     foreach ($order as $key => $vv) {
         $oid .= $key == 0 ? $vv['id'] : ',' . $vv['id'];
     }
     if (empty($oid)) {
         $this->success('数据为空!');
         exit;
     }
     $od['order_id'] = array('in', $oid);
     $order_data = M("order_data")->where($od)->select();
     $area = M('area')->getfield('id,name');
     foreach ($order_data as $key => $v) {
         $data[$key][1] = $order[$v['order_id']]['sn'] . "号";
         $data[$key][2] = toDate($order[$v['order_id']]["add_time"], "Y/m/d H:i:s");
         $data[$key][3] = $v['product_name'];
         $data[$key][4] = $v['type_name'];
         $data[$key][5] = $order[$v['order_id']]["pay_status"] == 2 ? '已支付' : '未支付';
         $data[$key][6] = $order[$v['order_id']]["order_amount"] . "元";
         $data[$key][7] = $order[$v['order_id']]["consignee"];
         $data[$key][8] = $order[$v['order_id']]["mobile"];
         $data[$key][9] = $area[$order[$v['order_id']]["province"]];
         $data[$key][10] = $area[$order[$v['order_id']]["city"]];
         $data[$key][11] = $area[$order[$v['order_id']]["area"]];
         $data[$key][12] = $order[$v['order_id']]["address"];
     }
     $title = array(1 => "订单编号", 2 => "订单时间", 3 => "订购产品", 4 => "订购类型", 5 => "支付状态", 6 => "订单价格", 7 => "姓名", 8 => "手机", 9 => "省份", 10 => "城市", 11 => "区域", 12 => "地址");
     $this->exportexcel($data, $title, $name);
 }
开发者ID:anywn3773,项目名称:bydproject,代码行数:47,代码来源:OrderAction.class.php


示例5: _initialize

 function _initialize()
 {
     parent::_initialize();
     if (!$this->_userid) {
         $this->assign('jumpUrl', U('User/Login/index'));
         $this->error(L('nologin'));
         exit;
     }
     $this->dao = M('User');
     $this->assign('bcid', 0);
     $user = $this->dao->find($this->_userid);
     $this->assign('vo', $user);
     unset($_POST['status']);
     unset($_POST['groupid']);
     unset($_POST['amount']);
     unset($_POST['point']);
     $_GET = get_safe_replace($_GET);
 }
开发者ID:JavaAFei,项目名称:yun001,代码行数:18,代码来源:IndexAction.class.php


示例6: downloadxls

 public function downloadxls()
 {
     $where = 1;
     $name = "全部订单:" . time();
     if ($_REQUEST["time1"] || $_REQUEST["time2"]) {
         $time1 = get_safe_replace($_REQUEST["time1"]);
         $time2 = get_safe_replace($_REQUEST["time2"]);
         /*strtotime($time2)-($day*86400);*/
         if ($time1 == $time2) {
             $time1 = strtotime($time1) - 86400;
         } else {
             $time1 = strtotime($time1);
         }
         /*相同日期则选择一天*/
         $where .= " and createtime > '" . $time1 . "' and createtime < '" . strtotime($time2) . "'";
         $name = "预约试驾" . toDate($time1, "Y/m/d") . "-" . toDate(strtotime($time2), "Y/m/d");
     }
     $area = M('area')->getfield('id,name');
     $bill = M(MODULE_NAME)->where($where)->select();
     foreach ($bill as $key => $vo) {
         $pro = M("product")->where('id=' . $vo['car_name'])->cache(true)->find();
         $data[$key][1] = $vo['id'];
         $data[$key][2] = $pro['title'];
         $data[$key][3] = toDate($vo['datetime'], "Y/m/d");
         $data[$key][4] = $vo['username'];
         $data[$key][5] = $vo['sex'] == 1 ? "先生" : '女士';
         if ($vo['sex'] == 0) {
             $data[$key][5] = '未知';
         }
         $data[$key][6] = '手机' . $vo['mobile'];
         $data[$key][7] = $area[$vo['province']];
         $data[$key][8] = $area[$vo['city']];
         $data[$key][9] = $area[$vo['area']];
         $shopname = M("shop")->where('shopcode=\'' . $vo['shop_name'] . '\'')->getfield('sname');
         if (!$shopname) {
             $shopname = "客户未选择";
         }
         $data[$key][10] = $shopname;
     }
     $title = array(1 => "预约号", 2 => "预约车型", 3 => "预约时间", 4 => "预约人", 5 => "性别", 6 => "电话", 7 => "省份", 8 => "城市", 9 => "区域", 10 => "经销商");
     $order = A('Admin/Order');
     $order->exportexcel($data, $title, $name);
 }
开发者ID:anywn3773,项目名称:bydproject,代码行数:43,代码来源:BillAction.class.php


示例7: order

 public function order()
 {
     $uid = intval($_REQUEST['uid']);
     $this->assign('uid', $uid);
     $mid = intval($_REQUEST['id']);
     $mx = get_safe_replace($_REQUEST['mx']);
     if ($mid > 0 && strlen($mx) > 0) {
         $pro = M($mx)->where("id=" . $mid)->find();
     }
     if ($this->Config["wap"] && is_mobile()) {
         /*开启手机访问*/
         $tmp = THEME_PATH . "wap/Index_order.html";
     }
     $this->assign('mx', $mx);
     $this->assign('mid', $mid);
     $this->assign('order', $pro);
     print_r($user);
     $this->display($tmp);
 }
开发者ID:anywn3773,项目名称:gzsrex,代码行数:19,代码来源:IndexAction.class.php


示例8: respond

 public function respond()
 {
     $pay_code = !empty($_REQUEST['code']) ? get_safe_replace($_REQUEST['code']) : '';
     $pay_code = ucfirst($pay_code);
     $Payment = M('Payment')->getByPayCode($pay_code);
     if (empty($Payment)) {
         $this->error(L('PAY CODE EROOR!'));
     }
     $aliapy_config = unserialize($Payment['pay_config']);
     import("@.Pay." . $pay_code);
     $pay = new $pay_code($aliapy_config);
     $r = $pay->respond();
     $this->assign('jumpUrl', URL('User-Order/index'));
     if ($r) {
         $this->error(L('PAY_OK'));
     } else {
         $this->error(L('PAY_FAIL'));
     }
 }
开发者ID:yunsite,项目名称:yourphpcms,代码行数:19,代码来源:PayAction.class.php


示例9: respond

 public function respond()
 {
     if (!empty($_POST)) {
         foreach ($_POST as $key => $data) {
             $_GET[$key] = $data;
         }
     }
     $seller_email = rawurldecode($_GET['seller_email']);
     //$order_sn = str_replace($_GET['subject'], '', $_GET['out_trade_no']);
     $order_sn = trim($_GET['out_trade_no']);
     $record = intval($_GET['record']);
     $total_fee = get_safe_replace($_GET['total_fee']);
     /* 检查数字签名是否正确 */
     ksort($_GET);
     reset($_GET);
     $sign = '';
     foreach ($_GET as $key => $val) {
         if ($key != 'sign' && $key != 'sign_type' && $key != 'code' && $key != 'g' && $key != 'm' && $key != 'a' && $key != 'record') {
             $sign .= "{$key}={$val}&";
         }
     }
     $sign = substr($sign, 0, -1) . $this->config['alipay_key'];
     //$sign = substr($sign, 0, -1) . ALIPAY_AUTH;
     if (md5($sign) != $_GET['sign']) {
         return false;
     }
     if ($_GET['trade_status'] == 'WAIT_SELLER_SEND_GOODS' || $_GET['trade_status'] == 'WAIT_BUYER_CONFIRM_GOODS' || $_GET['trade_status'] == 'WAIT_BUYER_PAY') {
         /* 改变订单状态 进行中*/
         return order_pay_status($order_sn, '1', $total_fee, $record);
     } elseif ($_GET['trade_status'] == 'TRADE_FINISHED') {
         /* 改变订单状态 */
         return order_pay_status($order_sn, '2', $total_fee, $record);
     } elseif ($_GET['trade_status'] == 'TRADE_SUCCESS') {
         /* 改变订单状态 即时交易成功*/
         return order_pay_status($order_sn, '2', $total_fee, $record);
     } else {
         return false;
     }
 }
开发者ID:bossyuetao,项目名称:yuephp,代码行数:39,代码来源:Alipay.class.php


示例10: downloadxls

 public function downloadxls()
 {
     $where = 1;
     $name = "全部订单:" . time();
     if ($_REQUEST["time1"] || $_REQUEST["time2"]) {
         $time1 = get_safe_replace($_REQUEST["time1"]);
         $time2 = get_safe_replace($_REQUEST["time2"]);
         /*strtotime($time2)-($day*86400);*/
         if ($time1 == $time2) {
             $time1 = strtotime($time1) - 86400;
         } else {
             $time1 = strtotime($time1);
         }
         /*相同日期则选择一天*/
         $where .= " and createtime > '" . $time1 . "' and createtime < '" . strtotime($time2) . "'";
         $name = "时间段" . toDate($time1, "Y/m/d") . "-" . toDate(strtotime($time2), "Y/m/d");
     }
     $order = M(MODULE_NAME)->where($where)->getfield('id,username,realname,createtime,username,username,username,username');
     //
     $title = array(1 => "订单编号", 2 => "订单时间", 3 => "订购产品", 4 => "订购类型", 5 => "支付状态", 6 => "订单价格", 7 => "姓名", 8 => "手机", 9 => "省份", 10 => "城市", 11 => "区域", 12 => "地址");
     $order = A('Order');
     $order->exportexcel($data, $title, $name);
 }
开发者ID:anywn3773,项目名称:bydproject,代码行数:23,代码来源:UserAction.class.php


示例11: sendmail

 function sendmail()
 {
     $verifyCode = trim($_POST['verifyCode']);
     $username = get_safe_replace($_POST['username']);
     $email = get_safe_replace($_POST['email']);
     if (empty($username) || empty($email)) {
         $this->error(L('empty_username_empty_password'));
     } elseif (md5($verifyCode) != $_SESSION['verify']) {
         $this->error(L('error_verify'));
     }
     $user = M('User');
     //判断邮箱是用户是否正确
     $data = $user->where("username='{$username}' and email='{$email}'")->find();
     if ($data) {
         $yourphp_auth = authcode($data['id'] . "-" . $data['username'] . "-" . $data['email'], 'ENCODE', $this->sysConfig['ADMIN_ACCESS'], 3600 * 24 * 3);
         //3天有效期
         $username = $data['username'];
         $url = 'http://' . $_SERVER['HTTP_HOST'] . U('User/Login/repassword?code=' . $yourphp_auth);
         $message = str_replace(array('{username}', '{url}', '{sitename}'), array($username, $url, $this->Config['site_name']), $this->member_config['member_getpwdemaitpl']);
         $r = sendmail($email, L('USER_FORGOT_PASSWORD') . '-' . $this->Config['site_name'], $message, $this->Config);
         if ($r) {
             $returndata['username'] = $data['username'];
             $returndata['email'] = $data['email'];
             $this->ajaxReturn($returndata, L('USER_EMAIL_ERROR'), 1);
         } else {
             $this->ajaxReturn(0, L('SENDMAIL_ERROR'), 0);
         }
     } else {
         $this->ajaxReturn(0, L('USER_EMAIL_ERROR'), 0);
     }
     //$this->ajaxReturn(1,L('login_ok'),1);
 }
开发者ID:JavaAFei,项目名称:yun001,代码行数:32,代码来源:LoginAction.class.php


示例12: editup

 public function editup()
 {
     $_REQUEST = get_safe_replace($_REQUEST);
     $menuname = $_REQUEST["menuname"];
     $key = $_REQUEST["key"];
     $url = $_REQUEST["url"];
     $type = $_REQUEST["type"];
     $fatherid = intval($_REQUEST["fatherid"]);
     if (empty($menuname)) {
         $info = "菜单名字不可为空!";
         $this->ajaxreturn($data, $info, 0);
     }
     if ($type == "view") {
         $map["url"] = $url;
         if (empty($url)) {
             $info = "连接不可为空!";
             $this->ajaxreturn($data, $info, 0);
         }
     } else {
         $map["key"] = $key;
         if (empty($key)) {
             $info = "关键词不可为空!";
             $this->ajaxreturn($data, $info, 0);
         }
     }
     $map["menuname"] = $menuname;
     $map["type"] = $type;
     $r = M("wxmenu")->where("id=" . $fatherid)->save($map);
     if ($r) {
         $info = "修改成功";
         $this->ajaxreturn($data, $info, 1);
     } else {
         $info = "{$menuname}:{$key}:{$url}:{$type}";
         $this->ajaxreturn($data, $info, 0);
     }
 }
开发者ID:anywn3773,项目名称:gzsrex,代码行数:36,代码来源:WxmenuAction.class.php


示例13: get_safe_replace

function get_safe_replace($array)
{
    if (!is_array($array)) {
        return safe_replace(strip_tags($array));
    }
    foreach ($array as $k => $val) {
        $array[$k] = get_safe_replace($val);
    }
    return $array;
}
开发者ID:JavaAFei,项目名称:yun001,代码行数:10,代码来源:~runtime.php


示例14: verify

 public function verify()
 {
     header('Content-type: image/jpeg');
     $type = isset($_GET['type']) ? get_safe_replace($_GET['type']) : 'jpeg';
     import("@.EXT.Image");
     Image::buildImageVerify(4, 1, $type);
 }
开发者ID:bossyuetao,项目名称:yuephp,代码行数:7,代码来源:AdminbaseAction.class.php


示例15: downloadxls

 public function downloadxls()
 {
     // $list=$this->_list(MODULE_NAME);
     $where = 1;
     $name = "全部订单:" . time();
     if (intval($_REQUEST["uid"])) {
         $where .= " and userid=" . intval($_REQUEST["uid"]);
         $name = "用户" . intval($_REQUEST["uid"]);
     }
     if (intval($_REQUEST["mid"])) {
         $where .= " and mid=" . intval($_REQUEST["mid"]);
     }
     if ($_REQUEST["mx"]) {
         $where .= " and mx='" . get_safe_replace($_REQUEST["mx"]) . "'";
         $name = get_safe_replace($_REQUEST["mx"]) . intval($_REQUEST["uid"]);
     }
     if ($_REQUEST["mb"]) {
         $where .= " and mobile='" . get_safe_replace($_REQUEST["mb"]) . "'";
         $name = "手机" . get_safe_replace($_REQUEST["mb"]);
     }
     $udata = M(MODULE_NAME)->where($where)->select();
     $data = array();
     foreach ($udata as $key => $v) {
         $data[$key][1] = $key;
         $data[$key][2] = $v["username"];
         $data[$key][3] = $v["mobile"];
         $data[$key][4] = str_cut($v["title"], 20, "");
         $data[$key][5] = $v["mcount"];
         $data[$key][6] = $v["amount"];
         $data[$key][7] = $v["godate"];
         $data[$key][8] = toDate($v["add_time"], "Y/m/d H:i:s");
     }
     $title = array(1 => "订单编号", 2 => "姓名", 3 => "手机", 4 => "线路", 5 => "数量", 6 => "总价格", 7 => "出发时间", 8 => "添加时间");
     $this->exportexcel($data, $title, $name);
 }
开发者ID:anywn3773,项目名称:gzsrex,代码行数:35,代码来源:PiaoorderAction.class.php


示例16: downloadxls

 public function downloadxls()
 {
     // $list=$this->_list(MODULE_NAME);
     $where = 1;
     $name = "全部订单:" . time();
     if (intval($_REQUEST["uid"])) {
         $where['userid'] = intval($_REQUEST["uid"]);
         $name = "用户" . intval($_REQUEST["uid"]);
     }
     if ($_REQUEST["username"]) {
         $where['username'] = $_REQUEST["username"];
         $name = "用户-" . $_REQUEST["username"];
     }
     if (intval($_REQUEST["mid"])) {
         $where["mid"] = intval($_REQUEST["mid"]);
     }
     if ($_REQUEST["mx"]) {
         $where["mx"] = get_safe_replace($_REQUEST["mx"]);
         $name = get_safe_replace($_REQUEST["mx"]) . intval($_REQUEST["uid"]);
     }
     if ($_REQUEST["mb"]) {
         $where["mobile"] = get_safe_replace($_REQUEST["mb"]);
         $name = "手机" . get_safe_replace($_REQUEST["mb"]);
     }
     if ($_REQUEST["time1"] || $_REQUEST["time2"]) {
         $time1 = get_safe_replace($_REQUEST["time1"]);
         $time2 = get_safe_replace($_REQUEST["time2"]);
         /*strtotime($time2)-($day*86400);*/
         if ($time1 == $time2) {
             $time1 = strtotime($time1) - 86400;
         } else {
             $time1 = strtotime($time1);
         }
         /*相同日期则选择一天*/
         $where["createtime"] = array('between', array($time1, strtotime($time2)));
         $name = "时间段" . $time1;
     }
     $udata = M(MODULE_NAME)->where($where)->select();
     $data = array();
     foreach ($udata as $key => $v) {
         $data[$key][1] = $key;
         $data[$key][2] = $v["username"];
         $data[$key][3] = $v["creditno"];
         $data[$key][4] = $v["mobile"];
         $data[$key][5] = str_cut($v["title"], 20, "");
         $data[$key][6] = $v["mcount"];
         $data[$key][7] = $v["amount"];
         $data[$key][8] = $v["godate"];
         $data[$key][9] = toDate($v["add_time"], "Y/m/d H:i:s");
     }
     $title = array(1 => "订单编号", 2 => "姓名", 3 => "身份证", 4 => "手机", 5 => "线路", 6 => "数量", 7 => "总价格", 8 => "出发时间", 9 => "添加时间");
     $this->exportexcel($data, $title, $name);
 }
开发者ID:anywn3773,项目名称:gzsrex,代码行数:53,代码来源:OrderAction.class2.php


示例17: doreg

 public function doreg()
 {
     $username = get_safe_replace($_POST['username']);
     $password = get_safe_replace($_POST['password']);
     $mobile = get_safe_replace($_POST['mobile']);
     $verifyCode = $_POST['verifyCode'];
     if (empty($username) || empty($password) || empty($mobile)) {
         $this->error(L('empty_username_empty_password_empty_email'));
     }
     if ($this->member_config['member_login_verify'] && md5($verifyCode) != $_SESSION['verify']) {
         $this->error(L('error_verify'));
     }
     $status = $this->member_config['member_registecheck'] ? 0 : 1;
     if ($this->member_config['member_emailcheck']) {
         $status = 1;
         $groupid = 5;
     }
     $groupid = $groupid ? $groupid : 3;
     /*-------------------------打入论坛----------------------------*/
     import('@.ORG.Uc');
     $uc = new Uc();
     $bbsuid = $uc->user_regeist($username, $password, $mobile . "@qq.com");
     $uc->bbsid_login($bbsuid);
     /*-----------------------------------------------------------*/
     $data = array();
     $data['username'] = $username;
     $data['fatherid'] = intval($_SESSION["uid"]);
     $data['mobile'] = $mobile;
     $data['groupid'] = $groupid;
     $data['login_count'] = 1;
     $data['createtime'] = time();
     $data['updatetime'] = time();
     $data['last_logintime'] = time();
     $data['reg_ip'] = get_client_ip();
     $data['status'] = $status;
     $data['bbs'] = $bbsuid;
     $authInfo['password'] = $data['password'] = sysmd5($password);
     if ($r = $this->dao->create($data)) {
         if (false !== $this->dao->add()) {
             $authInfo['id'] = $uid = $this->dao->getLastInsID();
             $authInfo['groupid'] = $ru['role_id'] = $data['groupid'];
             $ru['user_id'] = $uid;
             $roleuser = M('RoleUser');
             $roleuser->add($ru);
             session_start();
             $_SESSION["userid"] = $uid;
             if ($data['fatherid']) {
                 /*推广id*/
                 $sm["userid"] = $data['fatherid'];
                 $sm["share_ip"] = get_client_ip();
                 $sm["share_time"] = time();
                 $sm["mx"] = MODULE_NAME;
                 $sm["ma"] = ACTION_NAME;
                 $sm["mid"] = $uid;
                 $sm["type"] = 3;
                 //0点击,1,购买,3,注册
                 M("sharehistory")->add($sm);
             }
             /*				if($this->member_config['member_emailcheck']){
             					$yourphp_auth = authcode($uid."-".$username."-".$mobile, 'ENCODE',$this->sysConfig['ADMIN_ACCESS'],3600*24*3);//3天有效期
             					$url = 'http://'.$_SERVER['HTTP_HOST'].U('User/Login/regcheckemail?code='.$yourphp_auth);
             					$click = "<a href=\"$url\" target=\"_blank\">".L('CLICK_THIS')."</a>";
             					$message = str_replace(array('{click}','{url}','{sitename}'),array($click,$url,$this->Config['site_name']),$this->member_config['member_emailchecktpl']);
             					$r = sendmail($email,L('USER_REGISTER_CHECKEMAIL').'-'.$this->Config['site_name'],$message,$this->Config);
             					$this->assign('send_ok',1);
             					$this->assign('username',$username);
             					$this->assign('email',$email);
             					$this->display('Login:emailcheck');
             					exit;
             				}*/
             $yourphp_auth_key = sysmd5($this->sysConfig['ADMIN_ACCESS'] . $_SERVER['HTTP_USER_AGENT']);
             $yourphp_auth = authcode($authInfo['id'] . "-" . $authInfo['groupid'] . "-" . $authInfo['password'], 'ENCODE', $yourphp_auth_key);
             $authInfo['username'] = $data['username'];
             $authInfo['mobile'] = $data['mobile'];
             cookie('auth', $yourphp_auth, $cookietime);
             cookie('username', $authInfo['username'], $cookietime);
             cookie('groupid', $authInfo['groupid'], $cookietime);
             cookie('userid', $authInfo['id'], $cookietime);
             cookie('mobile', $authInfo['mobile'], $cookietime);
             $this->assign('jumpUrl', $this->forward);
             $this->success(L('reg_ok'));
         } else {
             $this->error(L('reg_error'));
         }
     } else {
         $this->error($this->dao->getError());
     }
 }
开发者ID:anywn3773,项目名称:gzsrex,代码行数:88,代码来源:RegisterAction.class.php


示例18: status

 public function status()
 {
     $name = MODULE_NAME;
     $model = D($name);
     $_GET = get_safe_replace($_GET);
     if ($model->save($_GET)) {
         savecache(MODULE_NAME);
         $this->success(L('do_ok'));
     } else {
         $this->error(L('do_error'));
     }
 }
开发者ID:Brave-Cheng,项目名称:huashengxiongdi,代码行数:12,代码来源:AdminbaseAction.class.php


示例19: msgadd

 public function msgadd()
 {
     //print_r($_REQUEST);
     //exit;
     $toid = intval($_REQUEST["toid"]);
     $time = intval($_REQUEST["time"]);
     $formid = intval($_REQUEST["formid"]);
     $toname = get_safe_replace($_REQUEST["toname"]);
     $body = get_safe_replace($_REQUEST["comment_text"]);
     $map["touser"] = $toid;
     $map["fromid"] = $formid;
     $map["body"] = $body;
     $map["createtime"] = $time;
     $map["status"] = 1;
     $map["sys"] = intval($_REQUEST["sys"]) != "" ? intval($_REQUEST["sys"]) : 0;
     $map["username"] = $toname;
     $map["formname"] = get_safe_replace($_REQUEST["formname"]) != "" ? get_safe_replace($_REQUEST["formname"]) : 0;
     $map["lang"] = 1;
     $resule = M("message")->add($map);
     if ($resule) {
         $this->success("留言成功!");
     } else {
         $this->success("留言失败!");
     }
     //$this->AjaxReturn($data,$info,$statu);
 }
开发者ID:anywn3773,项目名称:gzsrex,代码行数:26,代码来源:IndexAction.class.php


示例20: insert

 /**
  * 录入
  *
  */
 public function insert()
 {
     switch ($_POST["typeid"]) {
         case 0:
             $type = "无选择";
             break;
         case 4:
             $type = " 反馈类别";
             break;
         case 5:
             $type = "信息咨询";
             break;
         case 6:
             $type = "请求实名认证";
             break;
         case 7:
             $type = "捐赠求助";
             break;
     }
     $data["name"] = $_POST["username"];
     $data["tel"] = $_POST["telephone"];
     $data["addr"] = $_POST["title"];
     //到站
     $data["msg"] .= " QQ(" . $_POST["email"] . ")";
     //qq
     $data["msg"] .= " 备注信息(" . $_POST["content"] . ")--【" . $type . "】";
     //$data["mail"]="[email protected]";//客户信息
     $data["msg"] .= " 用户提交的请求,请尽快处理!";
     $data["all"] = "【满天星捐赠】!";
     import("@.ORG.PostData");
     $send = new postdata();
     $back = $send->send_post("http://1.gzsrex.sinaapp.com/", $data);
     $data["mail"] = "[email protected]";
     //客户信息
     // $back=$send->send_post("http://1.gzsrex.sinaapp.com/",$data);
     if ($this->moduleid != 6 && !in_array($this->_groupid, explode(',', $this->categorys[$_POST['catid']]['postgroup']))) {
         $this->error(L('add_no_postgroup'));
     }
     $c = A('Admin/Content');
     $_POST['ip'] = get_client_ip();
     $userid = $this->_userid;
     $username = $this->_username ? $this->_username : get_safe_replace($_POST['username']);
     $c->insert($this->module[$this->moduleid]['name'], $this->fields, $userid, $username, $this->_groupid);
 }
开发者ID:anywn3773,项目名称:gzsrex,代码行数:48,代码来源:PostAction.class.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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