This commit is contained in:
parent
c701107f1a
commit
a4932e2b0a
|
@ -54,6 +54,18 @@ class DataController extends Zend_Controller_Action
|
||||||
$this->view->metadata = $state->fetchAll();
|
$this->view->metadata = $state->fetchAll();
|
||||||
//特色数据
|
//特色数据
|
||||||
|
|
||||||
|
$page=(int)$this->_request->getParam('page');
|
||||||
|
if (empty($page)) $page=1;
|
||||||
|
$limit=15;
|
||||||
|
$offset=$limit*($page-1);
|
||||||
|
$state=$this->db->query('select count(*) from normalmetadata');
|
||||||
|
$row=$state->fetchAll();
|
||||||
|
$sum=$row[0]['count'];
|
||||||
|
$select=$this->db->select();
|
||||||
|
$select->from('normalmetadata','*')->joinLeft('mdstat','normalmetadata.uuid=mdstat.uuid', ['viewed','downloaded'])->where('datatype=0')->order('title')->limitPage($page,$limit);
|
||||||
|
$this->view->metadata = $this->db->fetchAll($select);
|
||||||
|
|
||||||
|
view::addPaginator($select, $this);
|
||||||
//服务
|
//服务
|
||||||
$l=new mydir($this->view->config->paths->newsletter,"newsletter_*.pdf");
|
$l=new mydir($this->view->config->paths->newsletter,"newsletter_*.pdf");
|
||||||
$this->view->newsletter=$l->getLast();
|
$this->view->newsletter=$l->getLast();
|
||||||
|
|
Loading…
Reference in New Issue