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年前的所有未收到申请表的记录 | 已收到的申请 | 已拒绝的申请 - | 待处理的申请 + | 待处理的申请 | 已通过的申请(离线服务记录)