diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index db6809b7..bc060e88 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -45,8 +45,10 @@ class DataController extends Zend_Controller_Action $k5=$state->fetchAll(); $this->view->keywords=array('place'=>$k1,'theme'=>$k2,'discipline'=>$k3,'stratum'=>$k4,'temporal'=>$k5); //最新10个入库数据 - $state=$this->db->query("select id,uuid,title from {$this->submd} order by id desc limit 10"); + $state=$this->db->query("select id,uuid,title,ts_created from {$this->submd} order by ts_created desc limit 10"); $this->view->metadata = $state->fetchAll(); + $state=$this->db->query("select m.id,m.uuid,m.title,s.viewed from {$this->submd} m left join mdstat s on m.uuid=s.uuid order by s.viewed desc limit 10"); + $this->view->viewedmd = $state->fetchAll(); //服务 $searchform=new SearchForm(); $this->view->searchform=$searchform; @@ -1798,11 +1800,11 @@ class DataController extends Zend_Controller_Action $page=(int)$this->_request->getParam('page'); if (empty($page)) $page=1; $offset=$this->limit*($page-1); - $state=$this->db->query("select count(*) from normalmetadata"); + $state=$this->db->query("select count(*) from $this->submd"); $row=$state->fetchAll(); $sum=$row[0]['count']; $select=$this->db->select(); - $select->from('normalmetadata as m','m.*') + $select->from($this->submd.' as m','m.*') ->order('m.title desc')->limitPage($page,9); $this->view->metadata = $this->db->fetchAll($select); $this->view->page=new Pagination($sum,$page,$this->limit); diff --git a/application/default/views/scripts/data/index.phtml b/application/default/views/scripts/data/index.phtml index 942f1c1b..25ba7ba0 100755 --- a/application/default/views/scripts/data/index.phtml +++ b/application/default/views/scripts/data/index.phtml @@ -7,6 +7,7 @@
- -
-

 

- -
- +
+
+

数据最近更新

+ +
+
+

最多浏览数据集

+ +
+
\ No newline at end of file diff --git a/application/default/views/scripts/index/index.phtml b/application/default/views/scripts/index/index.phtml index 9535b096..3944e3e0 100755 --- a/application/default/views/scripts/index/index.phtml +++ b/application/default/views/scripts/index/index.phtml @@ -92,7 +92,7 @@ - 更多>> + 更多>> @@ -106,7 +106,7 @@ - 更多>> + 更多>> diff --git a/application/module/Westdc/Visual/Visual.php b/application/module/Westdc/Visual/Visual.php index fe1c1404..d4a59fa6 100644 --- a/application/module/Westdc/Visual/Visual.php +++ b/application/module/Westdc/Visual/Visual.php @@ -115,7 +115,8 @@ class Visual { $sql = "SELECT * FROM {$this->metadataTable} md LEFT JOIN {$this->mainTable} v ON v.uuid = md.uuid - WHERE v.uuid IS NOT NULL"; + WHERE v.uuid IS NOT NULL + order by v.ts_changed desc"; $rs = $this->db->query($sql); return $rs->fetchAll(\PDO::FETCH_ASSOC);