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 @@
+
离线数据服务记录
添加新的离线服务记录 | 下载所有离线服务记录
-= $this->paginator; ?>
paginator)): ?>
-
+
- 姓名 |
- 单位 |
- 地址 |
- 邮编 |
- 用途 |
- 数据清单 |
- 申请时间 |
- 操作 |
+ 姓名 |
+ 单位 |
+ 地址 |
+ 邮编 |
+ 用途 |
+ 数据清单 |
+ 申请时间 |
+ 操作 |
-paginator as $item): ?>
- = $item['username']; ?> |
- = $item['unit']; ?> |
- = $item['address']; ?> |
- = $item['postcode']; ?> |
- = $item['project']; ?> |
- = $item['datalist']; ?> |
- = date('Y-m-d',strtotime($item['ts_created'])); ?> |
-
- 编辑 | 删除 |
+
+ paginator as $item): ?>
+
+
>
+ = $item['username']; ?> |
+ = $item['unit']; ?> |
+ = $item['address']; ?> |
+ = $item['postcode']; ?> |
+ |
+ |
+ = date('Y-m-d',strtotime($item['ts_created'])); ?> |
+
+ 编辑 | 删除 |
-
+
+
+= $this->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 @@
= $this->partial('down/left.phtml'); ?>
-= $this->paginator; ?>
+
msg or $this->messages) :?>
msg) : ?>
@@ -23,34 +23,43 @@
+
+
离线数据申请管理
+
paginator)): ?>
-
+
- 姓名 |
- 单位 |
- 地址 |
- 邮编 |
- 用途 |
- 数据清单 |
- 申请时间 |
- 操作 |
+ 姓名 |
+ 单位 |
+ 地址 |
+ 邮编 |
+ 用途 |
+ 数据清单 |
+ 申请时间 |
+ 操作 |
-paginator as $item): ?>
- = $item['username']; ?> |
- = $item['unit']; ?> |
- = $item['address']; ?> |
- = $item['postcode']; ?> |
- = $item['project']; ?> |
- = $item['datalist']; ?> |
- = date('Y-m-d',strtotime($item['ts_created'])); ?> |
-
- 收到
- 通过
- 删除
- 拒绝 |
+
+ paginator as $item): ?>
+
+
>
+ = $item['username']; ?> |
+ = $item['unit']; ?> |
+ = $item['address']; ?> |
+ = $item['postcode']; ?> |
+ |
+ |
+ = date('Y-m-d',strtotime($item['ts_created'])); ?> |
+
+ 收到
+ 通过
+ 删除
+ 拒绝 |
-
+
+
+= $this->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;?> 条在线下载记录
+
+
+