diff --git a/application/admin/controllers/DownController.php b/application/admin/controllers/DownController.php index 44bd5d65..2ad3948f 100644 --- a/application/admin/controllers/DownController.php +++ b/application/admin/controllers/DownController.php @@ -338,9 +338,9 @@ class Admin_DownController extends Zend_Controller_Action if(empty($show)) { $select=$this->db->select(); - $select->from('onlineapp as o','count(o.id) as num') + $select->from('dataorder as o','count(o.id) as num') ->join('metadata as m', 'o.uuid = m.uuid', array('title','uuid')) - ->where('o.uuid = m.uuid') + ->where('o.uuid = m.uuid and (o.status=0 or o.status=5)') ->group('m.title') ->group('m.uuid') ->order('num desc'); @@ -355,18 +355,19 @@ class Admin_DownController extends Zend_Controller_Action elseif($show) { $select=$this->db->select(); - $select->from('onlineapp as o',array('id','username','ts_created','userid')) + $select->from('dataorder as o',array('ts_created')) ->join('metadata as m', 'o.uuid = m.uuid', array('title','uuid')) - ->where('m.uuid = ?', $show) + ->join('users as u', 'o.userid=u.id',array('id as userid','username','realname')) + ->where('m.uuid = ? and (o.status=0 or o.status=5)', $show) ->order('o.id desc'); $paginator = Zend_Paginator::factory($select); $paginator->setCurrentPageNumber($this->_getParam('page')); - $paginator->setItemCountPerPage(30); + $paginator->setItemCountPerPage($this->view->config->page->max); $paginator->setView($this->view); Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml'); $this->view->paginator=$paginator; - $sql="select title from metadata where uuid='$show'"; + $sql="select title,uuid from metadata where uuid='$show'"; $re=$this->db->query($sql); $t=$re->fetch(); $this->view->infos=$t;