From edd6a99ebb1400ee997b2bb1bc3611eae70b1ea9 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Thu, 4 Feb 2016 09:22:13 +0100 Subject: [PATCH] New maps in progress... (generation y visualization mode) --- pandora_console/include/functions_maps.php | 21 ++++++++++++++++--- .../include/functions_networkmaps.php | 12 +++++++++-- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/functions_maps.php b/pandora_console/include/functions_maps.php index 3b528444b3..f03467080b 100644 --- a/pandora_console/include/functions_maps.php +++ b/pandora_console/include/functions_maps.php @@ -93,20 +93,35 @@ function maps_update_map ($id, $values) { function maps_is_networkmap($id) { $return = db_get_value('type', 'tmap', 'id', $id); - + if ($return === false) return false; - + if ($return == MAP_TYPE_NETWORKMAP) return true; else return false; } +function maps_is_visualmap($id) { + $return = db_get_value('type', 'tmap', 'id', $id); + + if ($return === false) { + return false; + } + + if ($return == MAP_TYPE_VISUALMAP) { + return true; + } + else { + return false; + } +} + function maps_show($id) { if (maps_is_networkmap($id)) { require_once("include/functions_networkmaps.php"); - + networkmaps_show($id); } else { diff --git a/pandora_console/include/functions_networkmaps.php b/pandora_console/include/functions_networkmaps.php index 63450fa04c..0fba6cbab8 100644 --- a/pandora_console/include/functions_networkmaps.php +++ b/pandora_console/include/functions_networkmaps.php @@ -22,6 +22,14 @@ */ function networkmaps_show($id) { - -} + $networkmap_items = db_get_all_rows_sql("SELECT * FROM titem WHERE id_map = " . $id); + $networkmap = db_get_all_rows_sql("SELECT * FROM tmap WHERE id = " . $id); + + if ($networkmap === false) { + ui_print_error_message(__('Not found networkmap')); + } + else { + + } +} ?> \ No newline at end of file