From 08f54104485684a02fd598a572efb170cdd070f0 Mon Sep 17 00:00:00 2001 From: leosw Date: Mon, 18 May 2020 11:40:07 +0400 Subject: [PATCH] Special maps for Crozet --- controllers/d.poi.php | 28 +++++++--------------------- views/d.poi.edit.html | 8 ++++++-- views/js/d.map.js | 19 +++++++++++-------- views/js/d.poi_map.js | 19 +++++++++++-------- 4 files changed, 35 insertions(+), 39 deletions(-) diff --git a/controllers/d.poi.php b/controllers/d.poi.php index dff1bfa..b088fc1 100755 --- a/controllers/d.poi.php +++ b/controllers/d.poi.php @@ -7,31 +7,17 @@ $head['css'] = "d.index.css;d.poi.css"; $poi = new Kabano\Poi(); -// In case we are in the list of articles, we set url to switch with according parameters -// if (!isset($controller->splitted_url[1]) OR $controller->splitted_url[1]=="" OR is_numeric($controller->splitted_url[1])) { -// $head['title'] = "Blog"; - -// // Get the correct page number -// if (!isset($controller->splitted_url[1]) OR $controller->splitted_url[1]=="") { -// $page = 0; -// } else { -// $page = $controller->splitted_url[1] - 1; -// } - -// $controller->splitted_url[1] = "list"; -// $list = "html"; -// $articles_per_pages = 5; -// } - switch ($controller->splitted_url[1]) { case "new": if($user->rankIsHigher("registered")) { if(isset($_POST['submit'])) { - $blogArticle->content = $_POST['content']; - $blogArticle->locale = $_POST['locale']; - $blogArticle->name = $_POST['name']; - $blogArticle->is_commentable = isset($_POST['is_commentable'])?'t':'f'; - $blogArticle->author = $user->id; + $poi->name = $_POST['name']; + $poi->locale = $_POST['locale']; + $poi->poi_type = $_POST['poi_type']; + $poi->lat = $_POST['lat']; + $poi->lon = $_POST['lon']; + $poi->alt = $_POST['alt']; + $poi->author = $user->id; if(!$blogArticle->checkPermalink($_POST['permalink'],1)) { $blogArticle->permalink = $_POST['permalink']; $blogArticle->insert(); diff --git a/views/d.poi.edit.html b/views/d.poi.edit.html index cc3b072..04523b8 100755 --- a/views/d.poi.edit.html +++ b/views/d.poi.edit.html @@ -12,8 +12,12 @@
-
-

+ + + + +