From 10c9736c6ef4d7acbf550f0763a92d386638f039 Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Thu, 29 Sep 2011 02:28:27 +0000 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controllers/DownController.php | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/application/admin/controllers/DownController.php b/application/admin/controllers/DownController.php index 1b924bfd..7a90588a 100644 --- a/application/admin/controllers/DownController.php +++ b/application/admin/controllers/DownController.php @@ -206,7 +206,9 @@ class Admin_DownController extends Zend_Controller_Action } $this->view->form=$form; $this->_helper->viewRenderer('offlineadd'); - } elseif ($edit){ + } //添加服务记录 + + elseif ($edit){ $form=new OfflinelogForm(); $form->pdf->setRequired(false); if ($this->_request->isPost()) { @@ -237,7 +239,9 @@ class Admin_DownController extends Zend_Controller_Action $this->view->form=$form; $this->_helper->viewRenderer('offlineadd'); - } elseif ($delete) { + } //编辑 + + elseif ($delete) { $sql="delete from offlineapp where id='$delete'"; $sql2="delete from dataorder where offlineappid='$delete'"; @@ -258,7 +262,9 @@ class Admin_DownController extends Zend_Controller_Action $this->messenger->addMessage('删除失败'); $this->_redirect("/admin/down/offline"); } - }elseif ($down) { + }//删除服务记录 + + else if ($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"; @@ -278,7 +284,9 @@ class Admin_DownController extends Zend_Controller_Action ->setHeader('Pragma','public') ->setBody($content); - } else if ($update) { + } //下载离线服务记录 + + else if ($update) { $sql = 'select o.id as oid,o.userid,o.username as un,u.email as uemail,o.email,u.realname as rn,u.id as uid from offlineapp o right join users u on o.email=u.email @@ -299,6 +307,7 @@ class Admin_DownController extends Zend_Controller_Action $this->_redirect('/admin/down/offline'); }//同步用户账户与离线申请记录 + else if($show){ $sql="select * from offlineapp where id='$show'"; @@ -312,9 +321,9 @@ class Admin_DownController extends Zend_Controller_Action $this->_helper->viewRenderer('offlineshow'); }//查看单条记录 + else if($emaillist) { - $sql = "select distinct(t.*) from ( select u.email from dataorder d left join users u on d.userid=u.id where (d.status=0 or d.status=5) @@ -342,10 +351,8 @@ class Admin_DownController extends Zend_Controller_Action ->setHeader('Pragma','public') ->setBody($filecontent); - - - }//下载邮箱地址列表 + $select=$this->db->select(); $select->from('offlineapp')->where('ts_approved is not null')->where('pdflink is not null')->order('ts_created desc'); $paginator = Zend_Paginator::factory($select);