diff --git a/application/default/controllers/IndexController.php b/application/default/controllers/IndexController.php index 56d7b627..bcce6c28 100755 --- a/application/default/controllers/IndexController.php +++ b/application/default/controllers/IndexController.php @@ -68,7 +68,22 @@ class IndexController extends Zend_Controller_Action } $this->view->news = $rows; - + + $time = date("Y-m-d H:i:s",time()); + $sql = "SELECT * FROM archive WHERE is_pub=true AND ts_published<'$time' LIMIT 8"; + $sth = $this->db->query($sql); + $rows = $sth->fetchAll(PDO::FETCH_BOTH); + + foreach($rows as $k=>$v) + { + $url = $News->getArchiveUrlByCid($v['id']); + $rows[$k]['url'] = $url['archive_url']; + $rows[$k]['type_title'] = $url['type_title']; + $rows[$k]['type_url'] = $url['type_url']; + } + + $this->view->list_news = $rows; + } } diff --git a/application/default/views/scripts/index/index.phtml b/application/default/views/scripts/index/index.phtml index 8c6281dd..a073780e 100755 --- a/application/default/views/scripts/index/index.phtml +++ b/application/default/views/scripts/index/index.phtml @@ -123,28 +123,16 @@
-
-
datasetcd['title']; ?>
-
简介:datasetcd['descript']; ?>
- - +
-
数据服务
- -
- 数据通讯  - 不定期发布数据通讯,通告中心动态、最新数据和工具
- -newsletterno; ?>期数据通讯 - (pdf)
-
-
- 文献服务  - 数据中心依托中科院资环信息中心提供西部环境与生态文献和文档服务 -
用户服务
-最近20条离线数据服务记录(共offlinenum; ?>)
diff --git a/htdocs/css/index.css b/htdocs/css/index.css index 5a7301e9..91f72dec 100755 --- a/htdocs/css/index.css +++ b/htdocs/css/index.css @@ -149,4 +149,8 @@ dd,dt{margin:0;} #slides .pagination li.current{background:#444;} #slides .pagination li.current a{color:#FFF} #slides a.prev{position:relative;left:0px;top:-146px;z-index:999;} - #slides a.next{position:relative;left:475px;top:-146px;z-index:999;} \ No newline at end of file + #slides a.next{position:relative;left:475px;top:-146px;z-index:999;} + +.news-list{width:520px; overflow:hidden} + .news-list li{overflow:hidden; border-bottom:1px dotted #ccc;line-height:20px;} + .news-list li span{float:right;width:100px;} \ No newline at end of file