diff --git a/application/admin/controllers/DownController.php b/application/admin/controllers/DownController.php index bc231a56..e24018f5 100644 --- a/application/admin/controllers/DownController.php +++ b/application/admin/controllers/DownController.php @@ -123,10 +123,15 @@ class Admin_DownController extends Zend_Controller_Action $this->messenger->addMessage('提示信息:已删除该用户离线申请。'); $this->_redirect('/admin/down/offlineapp/'.$page); } elseif ($deny) { - //todo + $sql="update dataorder set status=-1 where offlineappid=? and (status=3 or status=4)"; + $this->db->query($sql,array($deny)); + $sql="update offlineapp set ts_approved=now(),status=-1 where id=? and ts_approved is null"; + $this->db->query($sql,array($deny)); + $this->messenger->addMessage('提示信息:已拒绝该用户离线申请。'); + $this->_redirect('/admin/down/offlineapp/'.$page); } $select=$this->db->select(); - $select->from('offlineapp')->where('ts_approved is null')->where('pdflink is not null')->order('ts_created desc'); + $select->from('offlineapp')->where('ts_approved is null')->where('pdflink is not null and status>=0')->order('ts_created desc'); $paginator = Zend_Paginator::factory($select); $paginator->setCurrentPageNumber($page); $paginator->setItemCountPerPage($this->view->config->page->max); @@ -221,7 +226,7 @@ class Admin_DownController extends Zend_Controller_Action } $select=$this->db->select(); - $select->from('offlineapp')->where('ts_approved is not null')->where('pdflink is not null')->order('ts_created desc'); + $select->from('offlineapp')->where('ts_approved is not null')->where('pdflink is not null and status>=0')->order('ts_created desc'); $paginator = Zend_Paginator::factory($select); $paginator->setCurrentPageNumber($this->_getParam('page')); $paginator->setItemCountPerPage($this->view->config->page->max); diff --git a/application/admin/views/scripts/down/offlineapp.phtml b/application/admin/views/scripts/down/offlineapp.phtml index e9a76d18..c9c75450 100644 --- a/application/admin/views/scripts/down/offlineapp.phtml +++ b/application/admin/views/scripts/down/offlineapp.phtml @@ -47,8 +47,8 @@ 收到 通过 - 取消 - 未通过 + 删除 + 拒绝