后台数据下载记录的分平台限制
This commit is contained in:
parent
bb5a48cd6d
commit
e24d2472b6
|
@ -88,7 +88,7 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$mail->setBodyText($mailtp->getBody());
|
$mail->setBodyText($mailtp->getBody());
|
||||||
$mail->setSubject($mailtp->getSubject());
|
$mail->setSubject($mailtp->getSubject());
|
||||||
$mail->addTo($row['email']);
|
$mail->addTo($row['email']);
|
||||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
$mail->setFrom($this->view->config->service->email,'数据服务组');
|
||||||
$mail->send();
|
$mail->send();
|
||||||
|
|
||||||
//如果是wsn数据则生成数据
|
//如果是wsn数据则生成数据
|
||||||
|
@ -126,12 +126,12 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
unset($mail);
|
unset($mail);
|
||||||
$mail = new WestdcMailer($this->view->config->smtp);
|
$mail = new WestdcMailer($this->view->config->smtp);
|
||||||
$mailtp=new EmailText($this->db,'offline-start-subject',array('user'=>$username,'datalist'=>$data,'source'=>$source));
|
$mailtp=new EmailText($this->db,'offline-start-subject',array('user'=>$username,'datalist'=>$data,'source'=>$source));
|
||||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
$mail->setFrom($this->view->config->service->email,'数据服务组');
|
||||||
$mail->setBodyText($mailtp->getBody());
|
$mail->setBodyText($mailtp->getBody());
|
||||||
$mail->setSubject($mailtp->getSubject());
|
$mail->setSubject($mailtp->getSubject());
|
||||||
$mail_addrs=explode(",",substr($tmp_email,1,-1));
|
$mail_addrs=explode(",",substr($tmp_email,1,-1));
|
||||||
$mail->addTo($mail_addrs);
|
$mail->addTo($mail_addrs);
|
||||||
$mail->addCc($this->view->config->service->email,'西部数据中心服务组');
|
$mail->addCc($this->view->config->service->email,'数据服务组');
|
||||||
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
||||||
$mail->send();
|
$mail->send();
|
||||||
$data="";
|
$data="";
|
||||||
|
@ -150,12 +150,12 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
unset($mail);
|
unset($mail);
|
||||||
$mail = new WestdcMailer($this->view->config->smtp);
|
$mail = new WestdcMailer($this->view->config->smtp);
|
||||||
$mailtp=new EmailText($this->db,'offline-start-author',array('user'=>$username,'datalist'=>$data,'source'=>$source));
|
$mailtp=new EmailText($this->db,'offline-start-author',array('user'=>$username,'datalist'=>$data,'source'=>$source));
|
||||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
$mail->setFrom($this->view->config->service->email,'数据服务组');
|
||||||
$mail->setBodyText($mailtp->getBody());
|
$mail->setBodyText($mailtp->getBody());
|
||||||
$mail->setSubject($mailtp->getSubject());
|
$mail->setSubject($mailtp->getSubject());
|
||||||
$mail_addrs=explode(",",substr($tmp_email,1,-1));
|
$mail_addrs=explode(",",substr($tmp_email,1,-1));
|
||||||
$mail->addTo($mail_addrs);
|
$mail->addTo($mail_addrs);
|
||||||
$mail->addCc($this->view->config->service->email,'西部数据中心服务组');
|
$mail->addCc($this->view->config->service->email,'数据服务组');
|
||||||
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
||||||
$mail->send();
|
$mail->send();
|
||||||
}
|
}
|
||||||
|
@ -179,11 +179,11 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
unset($mail);
|
unset($mail);
|
||||||
$mail = new WestdcMailer($this->view->config->smtp);
|
$mail = new WestdcMailer($this->view->config->smtp);
|
||||||
$mailtp=new EmailText($this->db,'offline-start-author',array('user'=>$username,'datalist'=>$data));
|
$mailtp=new EmailText($this->db,'offline-start-author',array('user'=>$username,'datalist'=>$data));
|
||||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
$mail->setFrom($this->view->config->service->email,'数据服务组');
|
||||||
$mail->setBodyText($mailtp->getBody());
|
$mail->setBodyText($mailtp->getBody());
|
||||||
$mail->setSubject($mailtp->getSubject());
|
$mail->setSubject($mailtp->getSubject());
|
||||||
$mail->addTo($tmp_email);
|
$mail->addTo($tmp_email);
|
||||||
$mail->addCc($this->view->config->service->email,'西部数据中心服务组');
|
$mail->addCc($this->view->config->service->email,'数据服务组');
|
||||||
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
||||||
$mail->send();
|
$mail->send();
|
||||||
$data="";
|
$data="";
|
||||||
|
@ -203,11 +203,11 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
unset($mail);
|
unset($mail);
|
||||||
$mail = new WestdcMailer($this->view->config->smtp);
|
$mail = new WestdcMailer($this->view->config->smtp);
|
||||||
$mailtp=new EmailText($this->db,'offline-start-author',array('user'=>$username,'datalist'=>$data));
|
$mailtp=new EmailText($this->db,'offline-start-author',array('user'=>$username,'datalist'=>$data));
|
||||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
$mail->setFrom($this->view->config->service->email,'数据服务组');
|
||||||
$mail->setBodyText($mailtp->getBody());
|
$mail->setBodyText($mailtp->getBody());
|
||||||
$mail->setSubject($mailtp->getSubject());
|
$mail->setSubject($mailtp->getSubject());
|
||||||
$mail->addTo($tmp_email);
|
$mail->addTo($tmp_email);
|
||||||
$mail->addCc($this->view->config->service->email,'西部数据中心服务组');
|
$mail->addCc($this->view->config->service->email,'数据服务组');
|
||||||
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
||||||
$mail->send();
|
$mail->send();
|
||||||
}
|
}
|
||||||
|
@ -231,7 +231,7 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
unset($mail);
|
unset($mail);
|
||||||
$mail = new WestdcMailer($this->view->config->smtp);
|
$mail = new WestdcMailer($this->view->config->smtp);
|
||||||
$mailtp=new EmailText($this->db,'offline-start-dcadmin',array('user'=>$username,'datalist'=>$data));
|
$mailtp=new EmailText($this->db,'offline-start-dcadmin',array('user'=>$username,'datalist'=>$data));
|
||||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
$mail->setFrom($this->view->config->service->email,'数据服务组');
|
||||||
$mail->setBodyText($mailtp->getBody());
|
$mail->setBodyText($mailtp->getBody());
|
||||||
$mail->setSubject($mailtp->getSubject());
|
$mail->setSubject($mailtp->getSubject());
|
||||||
$addrs=array();
|
$addrs=array();
|
||||||
|
@ -239,7 +239,7 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$addrs[] = 'wangliangxu@lzb.ac.cn';
|
$addrs[] = 'wangliangxu@lzb.ac.cn';
|
||||||
$addrs[] = 'wulizong@lzb.ac.cn';
|
$addrs[] = 'wulizong@lzb.ac.cn';
|
||||||
$mail->addTo($addrs);
|
$mail->addTo($addrs);
|
||||||
$mail->addCc($this->view->config->service->email,'西部数据中心服务组');
|
$mail->addCc($this->view->config->service->email,'数据服务组');
|
||||||
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
||||||
$mail->send();
|
$mail->send();
|
||||||
}
|
}
|
||||||
|
@ -361,11 +361,11 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
unset($mail);
|
unset($mail);
|
||||||
$mail = new WestdcMailer($this->view->config->smtp);
|
$mail = new WestdcMailer($this->view->config->smtp);
|
||||||
$mailtp=new EmailText($this->db,'offline-start-mdadmin',array('user'=>$username,'datalist'=>$data));
|
$mailtp=new EmailText($this->db,'offline-start-mdadmin',array('user'=>$username,'datalist'=>$data));
|
||||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
$mail->setFrom($this->view->config->service->email,'数据服务组');
|
||||||
$mail->setBodyText($mailtp->getBody());
|
$mail->setBodyText($mailtp->getBody());
|
||||||
$mail->setSubject($mailtp->getSubject());
|
$mail->setSubject($mailtp->getSubject());
|
||||||
$mail->addTo($tmp_email);
|
$mail->addTo($tmp_email);
|
||||||
$mail->addCc($this->view->config->service->email,'西部数据中心服务组');
|
$mail->addCc($this->view->config->service->email,'数据服务组');
|
||||||
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
||||||
$mail->send();
|
$mail->send();
|
||||||
$data='';
|
$data='';
|
||||||
|
@ -382,11 +382,11 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
unset($mail);
|
unset($mail);
|
||||||
$mail = new WestdcMailer($this->view->config->smtp);
|
$mail = new WestdcMailer($this->view->config->smtp);
|
||||||
$mailtp=new EmailText($this->db,'offline-start-mdadmin',array('user'=>$username,'datalist'=>$data));
|
$mailtp=new EmailText($this->db,'offline-start-mdadmin',array('user'=>$username,'datalist'=>$data));
|
||||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
$mail->setFrom($this->view->config->service->email,'数据服务组');
|
||||||
$mail->setBodyText($mailtp->getBody());
|
$mail->setBodyText($mailtp->getBody());
|
||||||
$mail->setSubject($mailtp->getSubject());
|
$mail->setSubject($mailtp->getSubject());
|
||||||
$mail->addTo($tmp_email);
|
$mail->addTo($tmp_email);
|
||||||
$mail->addCc($this->view->config->service->email,'西部数据中心服务组');
|
$mail->addCc($this->view->config->service->email,'数据服务组');
|
||||||
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
||||||
$mail->send();
|
$mail->send();
|
||||||
}
|
}
|
||||||
|
@ -523,9 +523,9 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
array('user'=>$row['username'],'datalist'=>str_replace(";","\n",$row['datalist']),
|
array('user'=>$row['username'],'datalist'=>str_replace(";","\n",$row['datalist']),
|
||||||
'ftpuser'=>$user->username,'ftppwd'=>$proftp->pwd,'ftptime'=>$proftp->time,'ftphost'=>$ftphost));
|
'ftpuser'=>$user->username,'ftppwd'=>$proftp->pwd,'ftptime'=>$proftp->time,'ftphost'=>$ftphost));
|
||||||
$mail->setBodyText($mailtp->getBody());
|
$mail->setBodyText($mailtp->getBody());
|
||||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
$mail->setFrom($this->view->config->service->email,'数据服务组');
|
||||||
$mail->addTo($row['email']);
|
$mail->addTo($row['email']);
|
||||||
$mail->addCc($this->view->config->service->email,'西部数据中心服务组');
|
$mail->addCc($this->view->config->service->email,'数据服务组');
|
||||||
$mail->setSubject($mailtp->getSubject());
|
$mail->setSubject($mailtp->getSubject());
|
||||||
$mail->send();
|
$mail->send();
|
||||||
} //offline deal
|
} //offline deal
|
||||||
|
@ -1025,6 +1025,7 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$show=(int)$this->_getParam('show');
|
$show=(int)$this->_getParam('show');
|
||||||
$delete=(int)$this->_getParam('delete');
|
$delete=(int)$this->_getParam('delete');
|
||||||
|
$submd=$this->view->config->sub->metadata;
|
||||||
|
|
||||||
if(empty($show) && empty($delete))
|
if(empty($show) && empty($delete))
|
||||||
{
|
{
|
||||||
|
@ -1137,13 +1138,14 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$show = $this->_getParam('show');
|
$show = $this->_getParam('show');
|
||||||
$search = $this->_getParam('search');
|
$search = $this->_getParam('search');
|
||||||
$keyword = $this->view->keyword = $this->_getParam('keyword');
|
$keyword = $this->view->keyword = $this->_getParam('keyword');
|
||||||
|
$submd=$this->view->config->sub->metadata;
|
||||||
|
|
||||||
if(empty($show))
|
if(empty($show))
|
||||||
{
|
{
|
||||||
$select=$this->db->select();
|
$select=$this->db->select();
|
||||||
$select->from('dataorder as o','count(o.id) as num')
|
$select->from('dataorder as o','count(o.id) as num')
|
||||||
->join('metadata as m', 'o.uuid = m.uuid', array('title','uuid'))
|
->join($submd.' as m', 'o.uuid = m.uuid', array('title','uuid'))
|
||||||
->where('o.uuid = m.uuid and (o.status=0 or o.status=5)');
|
->where('o.uuid = m.uuid and (o.status=0 or o.status=5)')
|
||||||
if(!empty($search) && !empty($keyword))
|
if(!empty($search) && !empty($keyword))
|
||||||
{
|
{
|
||||||
$select ->Where('m.title like ? or m.title_en like ?','%'.$keyword.'%');
|
$select ->Where('m.title like ? or m.title_en like ?','%'.$keyword.'%');
|
||||||
|
@ -1168,7 +1170,7 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$select=$this->db->select();
|
$select=$this->db->select();
|
||||||
$select->from('dataorder as o',array('ts_created','ts_created','offlineappid','onlineappid'))
|
$select->from('dataorder as o',array('ts_created','ts_created','offlineappid','onlineappid'))
|
||||||
->join('metadata as m', 'o.uuid = m.uuid', array('title','uuid'))
|
->join($submd.' as m', 'o.uuid = m.uuid', array('title','uuid'))
|
||||||
->join('users as u', 'o.userid=u.id',array('id as userid','username','realname'))
|
->join('users as u', 'o.userid=u.id',array('id as userid','username','realname'))
|
||||||
->where('m.uuid = ? and (o.status=0 or o.status=5)', $show)
|
->where('m.uuid = ? and (o.status=0 or o.status=5)', $show)
|
||||||
->order('o.id desc');
|
->order('o.id desc');
|
||||||
|
@ -1179,7 +1181,7 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||||
$this->view->paginator=$paginator;
|
$this->view->paginator=$paginator;
|
||||||
|
|
||||||
$sql="select title,uuid from metadata where uuid='$show'";
|
$sql="select title,uuid from $submd where uuid='$show'";
|
||||||
$re=$this->db->query($sql);
|
$re=$this->db->query($sql);
|
||||||
$t=$re->fetch();
|
$t=$re->fetch();
|
||||||
$this->view->infos=$t;
|
$this->view->infos=$t;
|
||||||
|
@ -1257,7 +1259,7 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
foreach($mails as $k=>$v)
|
foreach($mails as $k=>$v)
|
||||||
{
|
{
|
||||||
$mail=new WestdcMailer($this->view->config->smtp);
|
$mail=new WestdcMailer($this->view->config->smtp);
|
||||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
$mail->setFrom($this->view->config->service->email,'数据服务组');
|
||||||
$mail->setBodyText($body);
|
$mail->setBodyText($body);
|
||||||
$mail->setSubject($title);
|
$mail->setSubject($title);
|
||||||
$mail->addTo($v['email']);
|
$mail->addTo($v['email']);
|
||||||
|
|
|
@ -34,9 +34,7 @@ table thead tr th {background:#EBF2F6;color:#444;}
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<a href="/admin/down/offline/add/1" class="btn btn-info">添加新的离线服务记录</a>
|
<a href="/admin/down/offline/add/1" class="btn btn-info">添加新的离线服务记录</a>
|
||||||
<a href="/admin/down/offline/down/1" class="btn btn-info">下载所有离线服务记录</a>
|
<a href="/admin/down/offline/down/1" class="btn btn-info">下载所有离线服务记录</a>
|
||||||
<a href="/admin/down/offline/update/1" class="btn btn-info" onclick="return confirm('该操作需要较长时间,请不要中途刷新页面,是否确定继续?')">自动匹配离线下载用户与网站用户</a>
|
|
||||||
<a href="/admin/down/offline/emaillist/1" class="btn btn-info">下载服务用户邮箱列表</a>
|
<a href="/admin/down/offline/emaillist/1" class="btn btn-info">下载服务用户邮箱列表</a>
|
||||||
<a href="/admin/down/offline/monthreport/1" class="btn btn-info">下载上月服务记录(科技部上报)</a>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="input-append pull-right">
|
<div class="input-append pull-right">
|
||||||
<form id="datasearch" class="search_form" action="">
|
<form id="datasearch" class="search_form" action="">
|
||||||
|
|
Loading…
Reference in New Issue