|
@@ -127,7 +127,7 @@ class Send_sms_adminAction extends Action
|
|
$c = 100;
|
|
$c = 100;
|
|
$p = ceil($count/100);
|
|
$p = ceil($count/100);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ $send_type=1;
|
|
if ($_POST['template_id']) {
|
|
if ($_POST['template_id']) {
|
|
$id = $_POST['template_id'];
|
|
$id = $_POST['template_id'];
|
|
$one_info = $admin->select_onesms_template($id);
|
|
$one_info = $admin->select_onesms_template($id);
|
|
@@ -195,6 +195,7 @@ class Send_sms_adminAction extends Action
|
|
'template_body' => $content
|
|
'template_body' => $content
|
|
);
|
|
);
|
|
if($uid==7||$uid==1||$uid==6||$uid==3||$uid==4){//--牛信云
|
|
if($uid==7||$uid==1||$uid==6||$uid==3||$uid==4){//--牛信云
|
|
|
|
+ $send_type=2;
|
|
if($uid==5){
|
|
if($uid==5){
|
|
$params = array(
|
|
$params = array(
|
|
'appkey' => $appkey,
|
|
'appkey' => $appkey,
|
|
@@ -217,6 +218,17 @@ class Send_sms_adminAction extends Action
|
|
}
|
|
}
|
|
$params_arr[] = $params;
|
|
$params_arr[] = $params;
|
|
}
|
|
}
|
|
|
|
+ if($send_type==1){
|
|
|
|
+ $apid=$accessKeyId;
|
|
|
|
+ $apsecret=$accessKeySecret;
|
|
|
|
+ }else{
|
|
|
|
+ $apid=$appkey;
|
|
|
|
+ $apsecret=$secretkey;
|
|
|
|
+ }
|
|
|
|
+ if($count>0){
|
|
|
|
+ //$one_info['msg_content'],$_POST['group_name']
|
|
|
|
+ $admin->add_sms_data_logs($uid,$_POST['group_name'],$one_info['msg_title'],$count,$send_type,$showtime,$datetime,$apid,$apsecret);
|
|
|
|
+ }
|
|
if($uid==7||$uid==1||$uid==6||$uid==3||$uid==4){
|
|
if($uid==7||$uid==1||$uid==6||$uid==3||$uid==4){
|
|
$result = $admin->add_sms_data_queue_new($params_arr,$showtime,$datetime);
|
|
$result = $admin->add_sms_data_queue_new($params_arr,$showtime,$datetime);
|
|
}else{
|
|
}else{
|
|
@@ -240,6 +252,58 @@ class Send_sms_adminAction extends Action
|
|
$this->display("index.html");
|
|
$this->display("index.html");
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ function query(){
|
|
|
|
+ require_once (ONU_ROOT . "frame/Page.class.php");
|
|
|
|
+ $admin = new AdvertAdminAction();
|
|
|
|
+ $where = "where 1=1 ";
|
|
|
|
+ $page = $_REQUEST['page']?$_REQUEST['page']:1;
|
|
|
|
+ $pageSize = 5;
|
|
|
|
+ $n = ($page-1)*$pageSize;
|
|
|
|
+ $pa = "";//查询参数
|
|
|
|
+ $limit = " $n,$pageSize";
|
|
|
|
+ $info = $_REQUEST['info'];
|
|
|
|
+ $error = $_REQUEST['error'];
|
|
|
|
+ $uname = $_SESSION['user_infos']['uname'];
|
|
|
|
+ $list = $admin->select_smslog_list($where,$limit);
|
|
|
|
+ $all_total = $admin->select_smslog_count($where);
|
|
|
|
+ $p = new Page($all_total,$pageSize,$pa);
|
|
|
|
+ $pp = $p->fpage();
|
|
|
|
+ $send_array = array(
|
|
|
|
+ '1' => '阿里',
|
|
|
|
+ '2' => '牛信云',
|
|
|
|
+ );
|
|
|
|
+ $status_array = array(
|
|
|
|
+ '1' => '已发送',
|
|
|
|
+ '2' => '未发送',
|
|
|
|
+ );
|
|
|
|
+ $new=array();
|
|
|
|
+ $times=time();
|
|
|
|
+ $where.=" and sendtime> $times ";
|
|
|
|
+ $lists = $admin->select_smslog_list($where);
|
|
|
|
+ $wnums=0;
|
|
|
|
+ foreach ($lists as $ks=>$vs){
|
|
|
|
+ $wnums=$wnums+$vs['count'];
|
|
|
|
+ }
|
|
|
|
+ foreach ($list as $k=>$v){
|
|
|
|
+ $new[$k]=$v;
|
|
|
|
+ $new[$k]['status']=1;
|
|
|
|
+ $new[$k]['sendtime']=date('Y-m-d H:i:s',$v['sendtime']);
|
|
|
|
+ if($v['sendtime']>time()){
|
|
|
|
+ $new[$k]['status']=2;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ $this->assign('status_array',$status_array);
|
|
|
|
+ $this->assign('send_array',$send_array);
|
|
|
|
+ $this->assign('wnums',$wnums);
|
|
|
|
+ $this->assign('info',$info);
|
|
|
|
+ $this->assign('error',$error);
|
|
|
|
+ $this->assign('page',$page);
|
|
|
|
+ $this->assign("show",$pp);
|
|
|
|
+ $this->assign('list',$new);
|
|
|
|
+ $this->assign('uname',$uname);
|
|
|
|
+ $this->display('query.html');
|
|
|
|
+ }
|
|
//过滤已加入分组美加用户州区号
|
|
//过滤已加入分组美加用户州区号
|
|
public function jinList(){
|
|
public function jinList(){
|
|
$admin = new AdvertAdminAction();
|
|
$admin = new AdvertAdminAction();
|