From 5d2010ba1d0d3708192865126fcac5e7f716443a Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Tue, 8 Oct 2013 03:35:49 +0000 Subject: [PATCH] =?UTF-8?q?#552=20=E6=B7=BB=E5=8A=A0=E5=BE=85=E5=A4=84?= =?UTF-8?q?=E7=90=86=E5=88=97=E8=A1=A8=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controllers/DownController.php | 29 ++++++++++++++----- .../admin/views/scripts/down/offlineapp.phtml | 2 +- application/models/Dataorder.php | 6 +++- 3 files changed, 28 insertions(+), 9 deletions(-) diff --git a/application/admin/controllers/DownController.php b/application/admin/controllers/DownController.php index 9c20a359..f1cc7f45 100644 --- a/application/admin/controllers/DownController.php +++ b/application/admin/controllers/DownController.php @@ -169,7 +169,7 @@ class Admin_DownController extends Zend_Controller_Action //离线数据申请管理 function offlineappAction() - { + { set_time_limit(0); include_once("Dataorder.php"); $DO = new Dataorder($this->db); @@ -182,8 +182,23 @@ class Admin_DownController extends Zend_Controller_Action $page =(int)$this->_getParam('page'); $reset =(int)$this->_getParam('reset'); $status =(int)$this->_getParam('status'); + $ac = $this->_getParam('ac'); $q = $this->_getParam('q'); + if($ac == "pending") + { + $keyword = ""; + if(!empty($q)) + { + $keyword = $q; + } + + $rows = $DO->fetchAllOfflineApp(3,$keyword); + + view::addPaginator($rows,$this,10); + return true; + } + if (!$page) $page=1; if ($view) { //查看此次申请的pdf @@ -216,15 +231,15 @@ class Admin_DownController extends Zend_Controller_Action //如果是wsn数据则生成数据 $dataservice = new DataService(); - $offlineapp = new Offlineapp(); - if ($offlineapp->hasWsnData($start)) - { - @$dataservice->makeWsnData(array('uid'=>$row['userid'],'action'=>'prepare')); + $offlineapp = new Offlineapp(); + if ($offlineapp->hasWsnData($start)) + { + @$dataservice->makeWsnData(array('uid'=>$row['userid'],'action'=>'prepare')); } $sql="select applicationform as pdflink from offlineapp where id=?"; $row=$this->db->fetchRow($sql,array($start)); - $filecontent=file_get_contents($row['pdflink']); + $filecontent=file_get_contents($row['pdflink']); //对每条数据的管理员用户发送相应的邮件通知,同一用户的邮件需要合并 //需要取出对应数据的标题、uuid,以及对应的作者的email(一条数据可能有多个作者,一次申请可能有多条数据对应同一个作者) @@ -548,7 +563,7 @@ class Admin_DownController extends Zend_Controller_Action //$this->_redirect('/admin/down/offlineapp/'.$page); } - //如果是wsn数据则生成数据 + //如果是wsn数据则生成数据 //wsn数据在ftp服务器端进行处理 /*$dataservice = new DataService(); @$dataservice->makeWsnData();*/ diff --git a/application/admin/views/scripts/down/offlineapp.phtml b/application/admin/views/scripts/down/offlineapp.phtml index b1c55745..fdf6189a 100644 --- a/application/admin/views/scripts/down/offlineapp.phtml +++ b/application/admin/views/scripts/down/offlineapp.phtml @@ -32,7 +32,7 @@ 重置1年前的所有未收到申请表的记录 | 已收到的申请 | 已拒绝的申请 - | 待处理的申请 + | 待处理的申请 | 已通过的申请(离线服务记录)