|
@@ -108,7 +108,44 @@ class Sms_customer_list_adminAction extends Action{
|
|
$this->assign("show",$pp);
|
|
$this->assign("show",$pp);
|
|
$this->display("blacklist.html");
|
|
$this->display("blacklist.html");
|
|
}
|
|
}
|
|
|
|
+ public function nosendList(){
|
|
|
|
|
|
|
|
+ require_once (ONU_ROOT . "frame/Page.class.php");
|
|
|
|
+
|
|
|
|
+ $admin = new AdvertAdminAction();
|
|
|
|
+
|
|
|
|
+ $info = $_REQUEST['info'];
|
|
|
|
+
|
|
|
|
+ $page = $_REQUEST['page']?$_REQUEST['page']:1;
|
|
|
|
+ $pageSize = isset($_REQUEST['pagesize'])?$_REQUEST['pagesize']:20;
|
|
|
|
+
|
|
|
|
+ $n = ($page-1)*$pageSize;
|
|
|
|
+ $pa = "";//查询参数
|
|
|
|
+ $pa='&pagesize='.$pageSize;
|
|
|
|
+ $limit = " $n,$pageSize";
|
|
|
|
+ $where = " where 1=1 ";
|
|
|
|
+
|
|
|
|
+ $tel = trim($_REQUEST['tel']);
|
|
|
|
+ if(!empty($tel)) {
|
|
|
|
+ $where.=" and tel='$tel'";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $where.=" and is_send=2";
|
|
|
|
+ $customer_list = $admin->selesctSmsCustomer($where,$limit);
|
|
|
|
+ $all_total = $admin->selectSmsCustomerCount($where);
|
|
|
|
+
|
|
|
|
+ $p = new Page($all_total,$pageSize,$pa);
|
|
|
|
+ $pp = $p->fpage();
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ $this->assign('tel',$tel);
|
|
|
|
+ $this->assign('list',$customer_list);
|
|
|
|
+ $this->assign('info',$info);
|
|
|
|
+ $this->assign('page',$page);
|
|
|
|
+ $this->assign('pagesize',$pageSize);
|
|
|
|
+ $this->assign("show",$pp);
|
|
|
|
+ $this->display("nosendList.html");
|
|
|
|
+ }
|
|
public function remove(){
|
|
public function remove(){
|
|
|
|
|
|
$admin = new AdvertAdminAction();
|
|
$admin = new AdvertAdminAction();
|
|
@@ -248,6 +285,12 @@ class Sms_customer_list_adminAction extends Action{
|
|
public function import(){
|
|
public function import(){
|
|
|
|
|
|
$admin = new AdvertAdminAction();
|
|
$admin = new AdvertAdminAction();
|
|
|
|
+ $city_code =$admin->selectCityCode();
|
|
|
|
+ $new=array();
|
|
|
|
+ foreach ($city_code as $v){
|
|
|
|
+ $new[]=$v['code'];
|
|
|
|
+ }
|
|
|
|
+ $is_send=1;
|
|
$uid = $_SESSION['user_infos']['id'];
|
|
$uid = $_SESSION['user_infos']['id'];
|
|
|
|
|
|
if($_POST['to_import_user']=='yes'){
|
|
if($_POST['to_import_user']=='yes'){
|
|
@@ -272,15 +315,22 @@ class Sms_customer_list_adminAction extends Action{
|
|
$tel = trim($array[1]);
|
|
$tel = trim($array[1]);
|
|
$country = trim($array[2]);
|
|
$country = trim($array[2]);
|
|
$groupName = trim($array[3]);
|
|
$groupName = trim($array[3]);
|
|
-
|
|
|
|
if(in_array($tel, $blackListArr)) {
|
|
if(in_array($tel, $blackListArr)) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
-
|
|
|
|
- $values .= "('{$uname}', '{$country}', '{$tel}', {$uid}, '{$groupName}', 0),";
|
|
|
|
|
|
+ if($country=='United States'||$country=='Canada'){
|
|
|
|
+ $code = substr($tel , 0 , 3);
|
|
|
|
+ if (in_array($code, $new)) {
|
|
|
|
+ $is_send=1;
|
|
|
|
+ }else{
|
|
|
|
+ $is_send=2;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ $values .= "('{$uname}', '{$country}', '{$tel}', {$uid}, '{$groupName}', 0, '{$is_send}'),";
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
if($values) {
|
|
if($values) {
|
|
$values = trim($values, ",");
|
|
$values = trim($values, ",");
|
|
$insert = $admin->import_sms_customer($values);
|
|
$insert = $admin->import_sms_customer($values);
|