From c7e81e1dab62205a52dbbfeab391a543ea359ad6 Mon Sep 17 00:00:00 2001 From: wlx Date: Sat, 7 Feb 2015 13:35:11 +0000 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9C=A8=E7=BA=BF=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE=E7=9A=84=E5=89=8D=E5=8F=B0=E6=B5=8F=E8=A7=88=E4=B8=8E?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/controllers/DataController.php | 17 ++ .../default/views/scripts/data/index.phtml | 1 + .../default/views/scripts/data/map-list.phtml | 37 +++ .../default/views/scripts/data/map.phtml | 262 ++++++++++++++++++ 4 files changed, 317 insertions(+) create mode 100644 application/default/views/scripts/data/map-list.phtml create mode 100644 application/default/views/scripts/data/map.phtml diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index fbf4e877..b4f19921 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -2325,5 +2325,22 @@ order by m.title"; } } + public function mapAction() + { + $uuid = $this->_request->getParam('uuid'); + $sql="select d.*,m.title,m.description from datamap d left join normalmetadata m on d.uuid=m.uuid where d.status=1"; + if (!empty($uuid) && \Helpers\Uuid::test($uuid) !== false) + { + $sql.=" and d.uuid='$uuid'"; + $sth = $this->db->prepare($sql); + $rs = $sth->execute(); + $this->view->map = $sth->fetch(); + } else { + $sth = $this->db->prepare($sql); + $rs = $sth->execute(); + view::addPaginator($sth->fetchAll(),$this,10); + $this->_helper->viewRenderer('map-list'); + } + } } diff --git a/application/default/views/scripts/data/index.phtml b/application/default/views/scripts/data/index.phtml index a2b9bb3d..33001e17 100755 --- a/application/default/views/scripts/data/index.phtml +++ b/application/default/views/scripts/data/index.phtml @@ -24,6 +24,7 @@ $this->headTitle()->setSeparator(' - '); 在线数据清单 离线数据清单 可视化数据 +在线地图数据