#298 修改了离线数据服务记录编辑后的跳转连接
This commit is contained in:
parent
3a9d129642
commit
00928d1e77
|
@ -51,27 +51,27 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$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();
|
||||||
|
|
||||||
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-admin',array('user'=>$row['username'],'datalist'=>$datalist));
|
$mailtp=new EmailText($this->db,'offline-start-admin',array('user'=>$row['username'],'datalist'=>$datalist));
|
||||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
||||||
$sql="select distinct(res.email) from dataorder d left join role on d.uuid=role.uuid left join responsible res on role.resid=res.id where length(res.email)>4 and d.offlineappid=? and role.role in ('pointOfContact','resourceProvider')";
|
$sql="select distinct(res.email) from dataorder d left join role on d.uuid=role.uuid left join responsible res on role.resid=res.id where length(res.email)>4 and d.offlineappid=? and role.role in ('pointOfContact','resourceProvider')";
|
||||||
$rows=$this->db->fetchAll($this->db->quoteInto($sql,$start));
|
$rows=$this->db->fetchAll($this->db->quoteInto($sql,$start));
|
||||||
$addrs=array();
|
$addrs=array();
|
||||||
foreach($rows as $row)
|
foreach($rows as $row)
|
||||||
{
|
{
|
||||||
$addrs[]=$row['email'];
|
$addrs[]=$row['email'];
|
||||||
}
|
}
|
||||||
//收件人邮箱
|
//收件人邮箱
|
||||||
$addrs[] = 'nztong@lzb.ac.cn';
|
$addrs[] = 'nztong@lzb.ac.cn';
|
||||||
$addrs[] = 'wjian@lzb.ac.cn';
|
$addrs[] = 'wjian@lzb.ac.cn';
|
||||||
$addrs[] = 'lixin@lzb.ac.cn';
|
$addrs[] = 'lixin@lzb.ac.cn';
|
||||||
$mail->setBodyText($mailtp->getBody());
|
$mail->setBodyText($mailtp->getBody());
|
||||||
$mail->setSubject($mailtp->getSubject());
|
$mail->setSubject($mailtp->getSubject());
|
||||||
$mail->addTo($addrs);
|
$mail->addTo($addrs);
|
||||||
$mail->addCc($this->view->config->service->email,'西部数据中心服务组');
|
$mail->addCc($this->view->config->service->email,'西部数据中心服务组');
|
||||||
$sql="select pdflink from offlineapp where id=?";
|
$sql="select pdflink from offlineapp where id=?";
|
||||||
$row=$this->db->fetchRow($sql,array($start));
|
$row=$this->db->fetchRow($sql,array($start));
|
||||||
$filecontent=file_get_contents($this->view->config->offline->savepath."/".$row['pdflink']);
|
$filecontent=file_get_contents($this->view->config->offline->savepath."/".$row['pdflink']);
|
||||||
|
@ -247,7 +247,11 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$param[]=$edit;
|
$param[]=$edit;
|
||||||
$this->db->query($sql,$param);
|
$this->db->query($sql,$param);
|
||||||
$this->messenger->addMessage('提示信息:您已经编辑添加该记录。');
|
$this->messenger->addMessage('提示信息:您已经编辑添加该记录。');
|
||||||
$this->_redirect('/admin/down/offline');
|
$page = $this->_getParam('page');
|
||||||
|
if(!empty($page))
|
||||||
|
$this->_redirect('/admin/down/offline/page/'.$page);
|
||||||
|
else
|
||||||
|
$this->_redirect('/admin/down/offline/');
|
||||||
} else {
|
} else {
|
||||||
$form->populate($formdata);
|
$form->populate($formdata);
|
||||||
}
|
}
|
||||||
|
@ -382,6 +386,8 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$paginator->setView($this->view);
|
$paginator->setView($this->view);
|
||||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||||
$this->view->paginator=$paginator;
|
$this->view->paginator=$paginator;
|
||||||
|
|
||||||
|
$this->view->page = $this->_getParam('page');
|
||||||
}
|
}
|
||||||
//在线数据下载情况,仅针对onlineapp表,自2011-9-8开始记录。
|
//在线数据下载情况,仅针对onlineapp表,自2011-9-8开始记录。
|
||||||
function onlineAction()
|
function onlineAction()
|
||||||
|
@ -393,7 +399,7 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$select=$this->db->select();
|
$select=$this->db->select();
|
||||||
$select->from('onlineapp as o',array('id','userid','unit','username','ts_created','project'))
|
$select->from('onlineapp as o',array('id','userid','unit','username','ts_created','project'))
|
||||||
->join('metadata as m', 'o.uuid = m.uuid', array('title','uuid'))
|
->join('metadata as m', 'o.uuid = m.uuid', array('title','uuid'))
|
||||||
->where('o.id in (select distinct(onlineappid) from dataorder)')
|
->where('o.id in (select distinct(onlineappid) from dataorder)')
|
||||||
->order('o.id desc');
|
->order('o.id desc');
|
||||||
$paginator = Zend_Paginator::factory($select);
|
$paginator = Zend_Paginator::factory($select);
|
||||||
|
@ -409,10 +415,10 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
|
|
||||||
elseif($delete)
|
elseif($delete)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$sql="delete from onlineapp where id=?";
|
$sql="delete from onlineapp where id=?";
|
||||||
$this->db->query($sql,array($delete));
|
$this->db->query($sql,array($delete));
|
||||||
$sql="delete from dataorder where onlineappid=?";
|
$sql="delete from dataorder where onlineappid=?";
|
||||||
$this->db->query($sql,array($delete));
|
$this->db->query($sql,array($delete));
|
||||||
$this->messenger->addMessage('该记录已删除');
|
$this->messenger->addMessage('该记录已删除');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
|
|
@ -49,10 +49,10 @@
|
||||||
<td><textarea readonly="readonly" style="width:300px;height:100px;border:none;font-size:12px;<?php if($autoindex%2 == 0) echo 'background:#CCCCCC;'; else echo 'background:#FFF;'; ?>"><?= $item['datalist']; ?></textarea></td>
|
<td><textarea readonly="readonly" style="width:300px;height:100px;border:none;font-size:12px;<?php if($autoindex%2 == 0) echo 'background:#CCCCCC;'; else echo 'background:#FFF;'; ?>"><?= $item['datalist']; ?></textarea></td>
|
||||||
<td><?= date('Y-m-d',strtotime($item['ts_created'])); ?></td>
|
<td><?= date('Y-m-d',strtotime($item['ts_created'])); ?></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="/admin/down/offline/edit/<?= $item['id']; ?>">编辑</a> |
|
<a href="/admin/down/offline/edit/<?= $item['id']; ?><?php if(empty($this->page)) "" ; else echo "/page/".$this->page; ?>">编辑</a> |
|
||||||
<a href="/admin/down/offline/delete/<?= $item['id']; ?>" title="该操作将删除此记录并且删除与此记录有关的申请记录!请谨慎操作" onclick="return confirm('请仅删除测试用途的离线服务记录!')">删除</a> |
|
<a href="/admin/down/offline/delete/<?= $item['id']; ?>" title="该操作将删除此记录并且删除与此记录有关的申请记录!请谨慎操作" onclick="return confirm('请仅删除测试用途的离线服务记录!')">删除</a> |
|
||||||
<a href="/admin/down/offlineapp/view/<?= $item['id']; ?>">PDF</a> |
|
<a href="/admin/down/offlineapp/view/<?= $item['id']; ?>">PDF</a> |
|
||||||
<a href="/admin/down/offline/show/<?= $item['id']; ?>">详细</a> |
|
<a href="/admin/down/offline/show/<?= $item['id']; ?>">详细</a> |
|
||||||
<a href="/admin/down/offlineapp/finish/<?= $item['id']; ?>">重新通过</a>
|
<a href="/admin/down/offlineapp/finish/<?= $item['id']; ?>">重新通过</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Reference in New Issue