shenzhipeng há 2 anos atrás
pai
commit
7a300715f8

+ 8 - 8
application/module/ctrl/Sms_customer_list_adminAction.class.php

@@ -170,9 +170,9 @@ class Sms_customer_list_adminAction extends Action{
 
 		if($_POST['tel']){
 			$data['uname'] = $_POST['username'];
-			$data['tel'] = $_POST['tel'];
-			$data['group_name'] = $_POST['group_name'];
-			$data['country'] = $_POST['country'];
+			$data['tel'] = trim($_POST['tel']);
+			$data['group_name'] = trim($_POST['group_name']);
+			$data['country'] = trim($_POST['country']);
 			$data['uid'] = $uid;
 
 			$is_exist = $admin->selectCustomerByTel($data['tel'], $data['uid']);
@@ -205,8 +205,8 @@ class Sms_customer_list_adminAction extends Action{
         if($_POST['tel']){
             $info = '添加失败';
             $uname = $_POST['username'];
-            $tel = $_POST['tel'];
-            $country = $_POST['country'];
+            $tel = trim($_POST['tel']);
+            $country = trim($_POST['country']);
             $group_name ='黑名单';
             $user = $admin->selectOneCustomerBymobile($tel);//查询手机号是否存在
            
@@ -242,9 +242,9 @@ class Sms_customer_list_adminAction extends Action{
 		if($_POST['tel']){
 			$id = $_POST['id'];
 			$data['uname'] = $_POST['username'];
-			$data['group_name'] = $_POST['group_name'];
-			$data['country'] = $_POST['country'];
-			$data['tel'] = $_POST['tel'];
+			$data['group_name'] = trim($_POST['group_name']);
+			$data['country'] = trim($_POST['country']);
+			$data['tel'] = trim($_POST['tel']);
 			$update = $admin->updateSmsCustomer($data,$id);
 
 			if($update){