Fixed problems with includes javascript when enter in list of gis map. Tiquet: #2935
This commit is contained in:
parent
ee65c58210
commit
ecd5e92184
|
@ -0,0 +1,73 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Pandora FMS- http://pandorafms.com
|
||||||
|
* ==================================================
|
||||||
|
* Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation for version 2.
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Login check
|
||||||
|
check_login ();
|
||||||
|
|
||||||
|
// Load global vars
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
require_once ('include/functions_gis.php');
|
||||||
|
|
||||||
|
//ui_require_javascript_file('openlayers.pandora');
|
||||||
|
|
||||||
|
ui_print_page_header(__('GIS Maps')." » ".__('Summary'), "images/op_gis.png", false, "");
|
||||||
|
|
||||||
|
$maps = gis_get_maps();
|
||||||
|
|
||||||
|
$table = new stdClass();
|
||||||
|
$table->width = "100%";
|
||||||
|
$table->class = "databox data";
|
||||||
|
$table->data = array ();
|
||||||
|
$table->head = array ();
|
||||||
|
$table->head[0] = __('Name');
|
||||||
|
$table->head[1] = __('Group');
|
||||||
|
$table->align = array ();
|
||||||
|
$table->align[1] = 'left';
|
||||||
|
|
||||||
|
$rowPair = true;
|
||||||
|
$iterator = 0;
|
||||||
|
|
||||||
|
if ($maps !== false) {
|
||||||
|
foreach ($maps as $map) {
|
||||||
|
if (!check_acl ($config["id_user"], $map["group_id"], "IR", 0, true)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($rowPair)
|
||||||
|
$table->rowclass[$iterator] = 'rowPair';
|
||||||
|
else
|
||||||
|
$table->rowclass[$iterator] = 'rowOdd';
|
||||||
|
$rowPair = !$rowPair;
|
||||||
|
$iterator++;
|
||||||
|
|
||||||
|
$data = array ();
|
||||||
|
|
||||||
|
$data[0] = '<a href="index.php?sec=gismaps&sec2=operation/gis_maps/render_view&map_id='.
|
||||||
|
$map['id_tgis_map'] . '">' . $map['map_name'].'</a> ';
|
||||||
|
$data[1] = ui_print_group_icon ($map["group_id"], true);
|
||||||
|
|
||||||
|
array_push ($table->data, $data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty ($table->data)) {
|
||||||
|
html_print_table ($table);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo '<div class="nf">' . __('No maps found') . '</div>';
|
||||||
|
}
|
||||||
|
unset ($table);
|
||||||
|
?>
|
|
@ -192,8 +192,8 @@ if (check_acl ($config['id_user'], 0, "AR")) {
|
||||||
$sub["gismaps"]["type"] = "direct";
|
$sub["gismaps"]["type"] = "direct";
|
||||||
$sub["gismaps"]["subtype"] = "nolink";
|
$sub["gismaps"]["subtype"] = "nolink";
|
||||||
$sub2 = array ();
|
$sub2 = array ();
|
||||||
$sub2["operation/gis_maps/index"]["text"] = __("List of Gis maps");
|
$sub2["operation/gis_maps/gis_map"]["text"] = __("List of Gis maps");
|
||||||
$sub2["operation/gis_maps/index"]["id"] = "List of Gis maps";
|
$sub2["operation/gis_maps/gis_map"]["id"] = "List of Gis maps";
|
||||||
$gisMaps = db_get_all_rows_in_table ('tgis_map', 'map_name');
|
$gisMaps = db_get_all_rows_in_table ('tgis_map', 'map_name');
|
||||||
if ($gisMaps === false) {
|
if ($gisMaps === false) {
|
||||||
$gisMaps = array ();
|
$gisMaps = array ();
|
||||||
|
|
Loading…
Reference in New Issue