From 25cf1963c6e18c0132d11543452b266afe7c835c Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Wed, 14 Sep 2011 09:50:39 +0000 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E5=9C=A8=E7=BA=BF?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E8=AE=B0=E5=BD=95=E7=9A=84=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=BF=AE=E6=94=B9=E4=BA=86=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controllers/DownController.php | 42 ++++++++++++-- .../admin/views/scripts/down/offline.phtml | 48 +++++++++------- .../admin/views/scripts/down/offlineapp.phtml | 57 +++++++++++-------- .../admin/views/scripts/down/online.phtml | 22 +++++-- 4 files changed, 116 insertions(+), 53 deletions(-) diff --git a/application/admin/controllers/DownController.php b/application/admin/controllers/DownController.php index 2ad3948f..1f9c4b19 100644 --- a/application/admin/controllers/DownController.php +++ b/application/admin/controllers/DownController.php @@ -253,10 +253,8 @@ class Admin_DownController extends Zend_Controller_Action Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml'); $this->view->paginator=$paginator; - $count="select count(id) as total from onlineapp"; - $re=$this->db->query($count); - $t=$re->fetch(); - $this->view->t=$t; + $count = count($this->db->fetchAll($select)); + $this->view->count=$count; }//列表 elseif($delete) @@ -377,5 +375,41 @@ class Admin_DownController extends Zend_Controller_Action }//dataAction 数据下载情况 + function searchAction() + { + $search = $this->_getParam('search'); + $keyword = $this->view->keyword = $this->_getParam('keyword'); + + $select=$this->db->select(); + + if(!empty($search) && !empty($keyword)) + { + + $select ->from('onlineapp as o',array('id','userid','unit','username','ts_created','project')) + ->Where('o.username like ? ','%'.$keyword.'%') + ->orWhere('o.unit like ? ','%'.$keyword.'%') + ->orWhere('o.project like ? ','%'.$keyword.'%') + ->orWhere('m.title like ? ','%'.$keyword.'%') + ->join('metadata as m', 'o.uuid = m.uuid', array('title','uuid')) + ->order('o.id desc'); + + $paginator = Zend_Paginator::factory($select); + $paginator->setCurrentPageNumber($this->_getParam('page')); + $paginator->setItemCountPerPage(15); + $paginator->setView($this->view); + Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml'); + $this->view->paginator=$paginator; + $this->_helper->viewRenderer('online'); + + $count = count($this->db->fetchAll($select)); + $this->view->count=$count; + $this->view->title='搜索结果 :'; + } + else { + $this->_redirect("/admin/down/online"); + } + + }//searchAction 搜索 + } diff --git a/application/admin/views/scripts/down/offline.phtml b/application/admin/views/scripts/down/offline.phtml index 7fd9351b..5ea981cc 100644 --- a/application/admin/views/scripts/down/offline.phtml +++ b/application/admin/views/scripts/down/offline.phtml @@ -22,33 +22,39 @@ +
离线数据服务记录
添加新的离线服务记录 | 下载所有离线服务记录 -paginator; ?> paginator)): ?> - +
- - - - - - - - + + + + + + + + -paginator as $item): ?> - - - - - - - - + + paginator as $item): ?> + + > + + + + + + + +
姓名单位地址邮编用途数据清单申请时间操作姓名单位地址邮编用途数据清单申请时间操作
- 编辑 | 删除
+ 编辑 | 删除
- + +
+paginator; ?> +
\ No newline at end of file diff --git a/application/admin/views/scripts/down/offlineapp.phtml b/application/admin/views/scripts/down/offlineapp.phtml index c9c75450..6617896f 100644 --- a/application/admin/views/scripts/down/offlineapp.phtml +++ b/application/admin/views/scripts/down/offlineapp.phtml @@ -13,7 +13,7 @@ partial('down/left.phtml'); ?>
-paginator; ?> + msg or $this->messages) :?>
msg) : ?> @@ -23,34 +23,43 @@
+ +
离线数据申请管理
+ paginator)): ?> - +
- - - - - - - - + + + + + + + + -paginator as $item): ?> - - - - - - - - + + paginator as $item): ?> + + > + + + + + + + +
姓名单位地址邮编用途数据清单申请时间操作姓名单位地址邮编用途数据清单申请时间操作
- 收到 - 通过 - 删除 - 拒绝
+ 收到 + 通过 + 删除 + 拒绝
- + +
+paginator; ?> +
\ No newline at end of file diff --git a/application/admin/views/scripts/down/online.phtml b/application/admin/views/scripts/down/online.phtml index 1d0eb786..82337c2e 100644 --- a/application/admin/views/scripts/down/online.phtml +++ b/application/admin/views/scripts/down/online.phtml @@ -24,9 +24,22 @@
-
共有 t['total'];?> 条在线下载记录
+ +
title)) echo $this->title;?>共有 count;?> 条在线下载记录
+ + + - + + @@ -34,15 +47,16 @@ +paginator)): ?> paginator as $item): ?> > - + - +
姓名 单位 数据下载时间 操作
'>详细