diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index db6809b7..c7cc0b63 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -45,7 +45,9 @@ 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->metadata = $state->fetchAll(); //服务 $searchform=new SearchForm(); diff --git a/application/default/views/scripts/data/index.phtml b/application/default/views/scripts/data/index.phtml index 776c4412..57304d25 100755 --- a/application/default/views/scripts/data/index.phtml +++ b/application/default/views/scripts/data/index.phtml @@ -57,12 +57,22 @@