合并删除操作

This commit is contained in:
Li Jianxuan 2011-09-16 10:13:59 +00:00
parent 31dcf2bf10
commit 383fbea968
2 changed files with 5 additions and 16 deletions

View File

@ -237,17 +237,8 @@ class Admin_DownController extends Zend_Controller_Action
$this->_helper->viewRenderer('offlineadd');
} elseif ($delete) {
$sql="delete from offlineapp where id=?";
try {
$this->db->query($sql,array($delete));
$this->messenger->addMessage('提示信息:您已经成功删除该服务记录。');
} catch (Exception $e) {
$this->messenger->addMessage($e->getMessage());
}
$this->_redirect("/admin/down/offline");
}else if($undelete){
$sql="delete from offlineapp where id='$undelete'";
$sql2="delete from dataorder where offlineappid='$undelete'";
$sql="delete from offlineapp where id='$delete'";
$sql2="delete from dataorder where offlineappid='$delete'";
if($this->db->exec($sql)>0)
{
@ -266,8 +257,7 @@ class Admin_DownController extends Zend_Controller_Action
$this->messenger->addMessage('删除失败');
$this->_redirect("/admin/down/offline");
}
}
elseif ($down) {
}elseif ($down) {
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$sql="select * from offlineapp where ts_approved is not null and pdflink is not null order by ts_created desc";

View File

@ -50,10 +50,9 @@
<td><?= date('Y-m-d',strtotime($item['ts_created'])); ?></td>
<td>
<a href="/admin/down/offline/edit/<?= $item['id']; ?>">编辑</a> |
<a href="/admin/down/offline/delete/<?= $item['id']; ?>" 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/offline/show/<?= $item['id']; ?>">查看详细</a>
<br /><a href="/admin/down/offline/undelete/<?= $item['id']; ?>" title="该操作将删除此记录并且删除与此记录有关的申请记录!请谨慎操作" onclick="return confirm('请仅删除测试用途的离线服务记录!')">清理记录</a>
</td>
</tr>
<?php endforeach; ?>