diff --git a/application/default/controllers/HeiheController.php b/application/default/controllers/HeiheController.php index 95b21795..eb32d886 100644 --- a/application/default/controllers/HeiheController.php +++ b/application/default/controllers/HeiheController.php @@ -36,11 +36,15 @@ class HeiheController extends DataController $page=(int)$this->_request->getParam('page'); if (empty($page)) $page=1; $offset=$this->limit*($page-1); - $state=$this->db->query("select count(*) from metadata where source='e3ad32dc-f573-11e0-aa7b-b768cfd88d80'"); + $state=$this->db->query("select count(*) from normalmetadata where source='e3ad32dc-f573-11e0-aa7b-b768cfd88d80'"); $row=$state->fetchAll(); $sum=$row[0]['count']; $select=$this->db->select(); - $select->from('metadata','*')->where("source=?",'e3ad32dc-f573-11e0-aa7b-b768cfd88d80')->order('title desc')->limitPage($page,$this->limit); + $select->from('normalmetadata as m','m.*') + ->joinLeft('heihegn as g','g.uuid=m.uuid','g.id as gid') + ->joinLeft('thumbnail as t','t.id=m.id','t.filename') + ->where("m.source=?",'e3ad32dc-f573-11e0-aa7b-b768cfd88d80') + ->order('m.title desc')->limitPage($page,$this->limit); $this->view->metadata = $this->db->fetchAll($select); $this->view->page=new Pagination($sum,$page,$this->limit); } diff --git a/application/default/views/scripts/heihe/thumb.phtml b/application/default/views/scripts/heihe/thumb.phtml index 69d134eb..bd0672fe 100644 --- a/application/default/views/scripts/heihe/thumb.phtml +++ b/application/default/views/scripts/heihe/thumb.phtml @@ -4,6 +4,7 @@ $this->headTitle('全部浏览'); $this->headTitle()->setSeparator(' - '); $this->headLink()->appendStylesheet('/css/water.css'); +$this->headScript()->appendFile('/js/pubfunc.js'); $this->breadcrumb('首页'); $this->breadcrumb(''.$this->config->title->data.''); $this->breadcrumb('数字黑河'); @@ -19,10 +20,19 @@ $this->breadcrumb()->setSeparator(' > '); page->getNavigation(); ?>