From fabcd090aa1237171d5a36e79654aedc1323999f Mon Sep 17 00:00:00 2001 From: wlx Date: Tue, 25 Oct 2011 04:12:44 +0000 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BA=86=E7=BC=A9=E7=95=A5?= =?UTF-8?q?=E5=9B=BE=E6=98=BE=E7=A4=BA=E6=96=B9=E5=BC=8F=EF=BC=8C=E5=B9=B6?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E7=82=B9=E5=87=BB=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=A4=A7=E5=9B=BE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/controllers/HeiheController.php | 8 ++++++-- .../default/views/scripts/heihe/thumb.phtml | 16 +++++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) 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(); ?>
-metadata as $md) : ?> +metadata as $md) : + $thumburl='/gndata/'.sprintf('%05d',floor(($md['gid']+0.1)/100)*100).'-'.sprintf('%05d',ceil(($md['gid']+0.1)/100)*100-1)."/".$md['gid']; + $thumburl.='/public/'.str_replace('_s.','.',$md['filename']); +?>