From ef2e9de3e449c62e88b53032a2f5250d01ee109e Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Mon, 26 Dec 2011 07:03:21 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=BA=86=E6=96=B0=E9=97=BB?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E5=89=8D=E5=8F=B0=E9=A6=96=E9=A1=B5=E6=A0=8F?= =?UTF-8?q?=E7=9B=AE=E9=93=BE=E6=8E=A5=E4=B8=8D=E7=8E=B0=E5=AE=9E=E7=9A=84?= =?UTF-8?q?bug=EF=BC=8C=E6=A0=B7=E5=BC=8F=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/default/controllers/NewsController.php | 5 ++++- application/default/views/scripts/news/archive.phtml | 6 ------ application/default/views/scripts/news/index.phtml | 10 ++-------- application/default/views/scripts/news/list.phtml | 10 ++-------- 4 files changed, 8 insertions(+), 23 deletions(-) diff --git a/application/default/controllers/NewsController.php b/application/default/controllers/NewsController.php index 7c0784ea..b5c7e8d5 100644 --- a/application/default/controllers/NewsController.php +++ b/application/default/controllers/NewsController.php @@ -71,7 +71,10 @@ class NewsController extends Zend_Controller_Action $this->view->types=$types; - $sql = "SELECT * FROM news_archives WHERE typeid='{$row['id']}' AND ts_published<".time()." AND pub>=1 ORDER BY ts_published DESC"; + $sql = "SELECT arc.*,c.url FROM news_archives arc + left join news_catlog c ON arc.typeid=c.id + WHERE arc.typeid='{$row['id']}' AND arc.ts_published<".time()." AND arc.pub>=1 + ORDER BY arc.ts_published DESC"; $rs = $this->db->query($sql); $rows = $rs->fetchAll(); diff --git a/application/default/views/scripts/news/archive.phtml b/application/default/views/scripts/news/archive.phtml index c4cf5b50..32dd32aa 100644 --- a/application/default/views/scripts/news/archive.phtml +++ b/application/default/views/scripts/news/archive.phtml @@ -32,12 +32,6 @@ $this->headMeta()->appendName('description', mb_substr($this->infos['description -
-
Search
-
- -
-
diff --git a/application/default/views/scripts/news/index.phtml b/application/default/views/scripts/news/index.phtml index f441242c..6f48d5c7 100644 --- a/application/default/views/scripts/news/index.phtml +++ b/application/default/views/scripts/news/index.phtml @@ -27,12 +27,6 @@ $this->breadcrumb()->setSeparator(' > ');
-
-
Search
-
- -
-
@@ -48,12 +42,12 @@ $this->breadcrumb()->setSeparator(' > '); $description = "No description"; }else if (mb_strlen($v['description'])>160) { - $description = mb_substr($v['description'],0,160,'utf-8').'...(more)'; + $description = mb_substr($v['description'],0,160,'utf-8').'...(more)'; }else{ $description = $v['description']; } echo '
  • - '.$v['title'].'
    + ['.$v['typetitle'].''.$v['title'].'
    TIME : '.date("Y-m-d H:i",$v['ts_published']).'

    '.$description.'

  • '; diff --git a/application/default/views/scripts/news/list.phtml b/application/default/views/scripts/news/list.phtml index ccb9272f..9e4dc0c0 100644 --- a/application/default/views/scripts/news/list.phtml +++ b/application/default/views/scripts/news/list.phtml @@ -28,12 +28,6 @@ $this->breadcrumb()->setSeparator(' > ');
    -
    -
    Search
    -
    - -
    -
    @@ -49,12 +43,12 @@ $this->breadcrumb()->setSeparator(' > '); $description = "No description"; }else if (mb_strlen($v['description'])>160) { - $description = mb_substr($v['description'],0,160,'utf-8').'...(more)'; + $description = mb_substr($v['description'],0,160,'utf-8').'...(more)'; }else{ $description = $v['description']; } echo '
  • - '.$v['title'].'
    + '.$v['title'].'
    TIME : '.date("Y-m-d H:i",$v['ts_published']).'

    '.$description.'

  • ';