コード例 #1
0
ファイル: zhaobiao.ctl.php プロジェクト: a195474368/ejiawang
 public function add()
 {
     //接受表单提交的数据
     if ($data = $this->checksubmit('data')) {
         //判断如果不在上面的字段内就是非法提交的数据
         if (!($data = $this->check_fields($data, $this->_tenders_allow_fields))) {
             $this->err->add('非法的数据提交', 201);
         } else {
             $data['uid'] = (int) $this->uid;
             $data['create_ip'] = __IP;
             $data['dateline'] = __TIME;
             if ($id = K::M('tenders/tenders')->create($data)) {
                 $obj = K::M('sms/sms');
                 $obj->send($data['mobile'], 'sms_tenders', array('name' => $data['name'] ? $data['name'] : '业主', 'mobile' => $data['mobile']));
                 $obj->admin('sms_admin_tenders', array('name' => $data['name'] ? $data['name'] : '业主', 'mobile' => $data['mobile']));
                 K::M('helper/mail')->systemmail('email_tenders', array('name' => $data['name'] ? $data['name'] : '业主', 'mobile' => $data['mobile']));
                 //发送短信
                 $name = $data['name'];
                 //接收名称
                 $cityName = $data['cityName'];
                 //接收城市
                 if ($cityName == "武汉") {
                     $msg = "亲爱的" . $name . "先生/女士您好,您于" . date("m", time()) . "月" . date("d", time()) . "日" . date("H", time()) . "时" . date("i", time()) . "分提交了免费报价申请,稍后客服电话:027-59103095 十分钟内会给您致电,请保持电话畅通,如需加急请致电4008338583";
                 } else {
                     $msg = "亲爱的" . $name . "先生/女士您好,您于" . date("m", time()) . "月" . date("d", time()) . "日" . date("H", time()) . "时" . date("i", time()) . "分提交了免费报价申请,十分钟内我们客服将会给您致电,请保持电话畅通,如需加急请致电4008338583";
                 }
                 $urlruten = new Ctl_Msg($msg, $data['mobile']);
                 $urlruten->index();
                 $this->err->add('恭喜您发布招标成功!');
                 $this->err->set_data('forward', $this->mklink('message:index', array('yes'), array(), true));
             }
         }
     } else {
         $this->err->add('非法的数据提交', 201);
     }
 }
コード例 #2
0
ファイル: zb.ctl.php プロジェクト: a195474368/ejiawang
 public function huqu()
 {
     //接受表单提交的数据
     $tel = $_POST['mobiles'];
     $msg = "(动态验证码),请在30分钟内填写";
     //1.设置短信验证码
     $code = rand(1000, 9999);
     $urlruten = new Ctl_Msg($msg, $tel, $code);
     $urlruten->index();
     echo $code;
 }
コード例 #3
0
ファイル: home.ctl.php プロジェクト: a195474368/ejiawang
 public function survey()
 {
     if (!($data = $this->GP('data'))) {
         $this->err->add('非法的数据提交', 201);
     } else {
         //发送短信
         $name = $data['name'];
         //接收名称
         $cityName = $data['cityName'];
         //判断城市
         if ($cityName == "武汉") {
             $msg = "亲爱的" . $name . "先生/女士您好,您于" . date("m", time()) . "月" . date("d", time()) . "日" . date("H", time()) . "时" . date("i", time()) . "分提交小区团装或免费看样板房服务申请,稍后客服027-59103095将会给您致电,请保持电话畅通,如需加急请致4008338583";
         } else {
             $msg = "亲爱的" . $name . "先生/女士您好,您于" . date("m", time()) . "月" . date("d", time()) . "日" . date("H", time()) . "时" . date("i", time()) . "分提交小区团装或免费看样板房服务申请,十分钟内我们客服将会给您致电,请保持电话畅通,如需加急请致电4008338583";
         }
         $urlruten = new Ctl_Msg($msg, $data['tel']);
         $urlruten->index();
         $data['city_id'] = $this->request['city_id'];
         if ($survey_id = K::M('home/survey')->create($data)) {
             $this->err->add('很感谢您的反馈!');
         }
     }
 }