fix ticket #300, add classified function for offline application.

This commit is contained in:
wlx 2012-02-16 03:43:28 +00:00
parent 9a8981e75e
commit 8204c92b44
2 changed files with 13 additions and 5 deletions

View File

@ -27,6 +27,7 @@ class Admin_DownController extends Zend_Controller_Action
$deny =(int)$this->_getParam('deny'); $deny =(int)$this->_getParam('deny');
$page =(int)$this->_getParam('page'); $page =(int)$this->_getParam('page');
$reset =(int)$this->_getParam('reset'); $reset =(int)$this->_getParam('reset');
$status =(int)$this->_getParam('status');
if (!$page) $page=1; if (!$page) $page=1;
if ($view) { if ($view) {
@ -185,9 +186,14 @@ class Admin_DownController extends Zend_Controller_Action
$select="select distinct(o.*) from offlineapp o $select="select distinct(o.*) from offlineapp o
left join dataorder d on o.id=d.offlineappid left join dataorder d on o.id=d.offlineappid
where o.ts_approved is null where o.ts_approved is null
and o.pdflink is not null and o.pdflink is not null ";
and d.status in (3,4) if ($status==4)
order by o.ts_created desc"; $select.=" and d.status=4";
elseif ($status==-1)
$select.=" and d.status=-1";
else
$select.=" and d.status in (3,4)";
$select.=" order by o.ts_created desc";
$rs=$this->db->query($select); $rs=$this->db->query($select);
$rows=$rs->fetchAll(); $rows=$rs->fetchAll();
$paginator = Zend_Paginator::factory($rows); $paginator = Zend_Paginator::factory($rows);

View File

@ -27,7 +27,9 @@
<div class="right_title">离线数据申请管理</div> <div class="right_title">离线数据申请管理</div>
<a href="/admin/down/offlineapp/reset/-1" onclick="return confirm('是否重置该申请?')">重置1年前的所有未收到申请表的记录</a> <a href="/admin/down/offlineapp/reset/-1" onclick="return confirm('是否重置该申请?')">重置1年前的所有未收到申请表的记录</a>
| <a href="/admin/down/offlineapp/status/4">已收到的申请</a>
| <a href="/admin/down/offlineapp/status/-1">已拒绝的申请</a>
| <a href="/admin/down/offline">已通过的申请</a>
<?php if (count($this->paginator)): ?> <?php if (count($this->paginator)): ?>
<table> <table>
<thead><tr> <thead><tr>