|
@@ -69,6 +69,45 @@ class Sms_customer_list_adminAction extends Action{
|
|
$this->display("index.html");
|
|
$this->display("index.html");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public function blackList(){
|
|
|
|
+
|
|
|
|
+ require_once (ONU_ROOT . "frame/Page.class.php");
|
|
|
|
+
|
|
|
|
+ $admin = new AdvertAdminAction();
|
|
|
|
+ $uid = $_SESSION['user_infos']['id'];
|
|
|
|
+
|
|
|
|
+ $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 uid='$uid' and is_block=1 ";
|
|
|
|
+
|
|
|
|
+ $tel = trim($_REQUEST['tel']);
|
|
|
|
+ if(!empty($tel)) {
|
|
|
|
+ $where.=" and tel='$tel'";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $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("blacklist.html");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
//添加客户
|
|
//添加客户
|
|
public function add(){
|
|
public function add(){
|
|
@@ -218,7 +257,7 @@ class Sms_customer_list_adminAction extends Action{
|
|
$tel = trim($array[2]);
|
|
$tel = trim($array[2]);
|
|
$groupName = trim($array[3]);
|
|
$groupName = trim($array[3]);
|
|
|
|
|
|
- $values .= "('{$uname}', '{$country}', '{$tel}', {$uid}, '{$groupName}'),";
|
|
|
|
|
|
+ $values .= "('{$uname}', '{$country}', '{$tel}', {$uid}, '{$groupName}', 0),";
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -236,6 +275,50 @@ class Sms_customer_list_adminAction extends Action{
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public function importBlackList(){
|
|
|
|
+
|
|
|
|
+ $admin = new AdvertAdminAction();
|
|
|
|
+ $uid = $_SESSION['user_infos']['id'];
|
|
|
|
+
|
|
|
|
+ if($_POST['to_import_user']=='yes'){
|
|
|
|
+ $filename = $_FILES['inputExcel']['name'];
|
|
|
|
+ $tmp_name = $_FILES['inputExcel']['tmp_name'];
|
|
|
|
+
|
|
|
|
+ $excel_array = $this->uploadFile($filename,$tmp_name);
|
|
|
|
+
|
|
|
|
+ if(!empty($excel_array['error'])){
|
|
|
|
+ $info = $excel_array['error'];
|
|
|
|
+
|
|
|
|
+ }else{
|
|
|
|
+
|
|
|
|
+ unset($excel_array[0]);//若第一排的数据是字段名的话,删除
|
|
|
|
+ header("Content-type: text/html; charset=utf-8");
|
|
|
|
+ $values = '';
|
|
|
|
+ foreach($excel_array as $array){
|
|
|
|
+ if(!empty($array[2])){
|
|
|
|
+ $uname = str_replace("'", '', $array[0]);;
|
|
|
|
+ $country = trim($array[1]);
|
|
|
|
+ $tel = trim($array[2]);
|
|
|
|
+ $groupName = trim($array[3]);
|
|
|
|
+
|
|
|
|
+ $values .= "('{$uname}', '{$country}', '{$tel}', {$uid}, '{$groupName}', 1),";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if($values) {
|
|
|
|
+ $values = trim($values, ",");
|
|
|
|
+ $insert = $admin->import_sms_customer($values);
|
|
|
|
+ $info = '导入数据成功';
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ header("Location:/?a=sms_customer_list_admin&m=blacklist&info=$info");
|
|
|
|
+ exit();
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|