mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-09-26 11:29:12 +02:00
* include/functions_gis.php: clean source code, and extract the javascript code to openlayers.pandora.js. * include/javascript/openlayers.pandora.js: new file, have a source code of gis in javascript. * operation/gis_maps/render_view.php, operation/gis_maps/index.php, operation/agentes/gis_view.php, godmode/agentes/agent_manager.php, godmode/setup/gis.php, godmode/gis_maps/configure_gis_map.php, godmode/gis_maps/index.php: add the require javascript to "openlayers.pandora.js". * godmode/setup/gis_step_2.php: add the source code to improve usability, now can set with the mouse points of center and default position for agents without gis data. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2335 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
69 lines
1.8 KiB
PHP
69 lines
1.8 KiB
PHP
<?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.
|
|
*/
|
|
|
|
// Load global vars
|
|
require_once ("include/config.php");
|
|
|
|
// Login check
|
|
check_login ();
|
|
|
|
require_once ('include/functions_gis.php');
|
|
|
|
require_javascript_file('openlayers.pandora');
|
|
|
|
echo "<h2>".__('GIS Maps')." » ".__('Summary')."</h2>";
|
|
|
|
$maps = getMaps();
|
|
|
|
$table->width = "70%";
|
|
$table->data = array ();
|
|
$table->head = array ();
|
|
$table->head[0] = __('Name');
|
|
$table->head[1] = __('Group');
|
|
$table->align = array ();
|
|
$table->align[1] = 'center';
|
|
|
|
$rowPair = true;
|
|
$iterator = 0;
|
|
|
|
if ($maps !== false) {
|
|
foreach ($maps as $map) {
|
|
if ($rowPair)
|
|
$table->rowclass[$iterator] = 'rowPair';
|
|
else
|
|
$table->rowclass[$iterator] = 'rowOdd';
|
|
$rowPair = !$rowPair;
|
|
$iterator++;
|
|
|
|
if (!give_acl ($config["id_user"], $map["group_id"], "AR")) {
|
|
continue;
|
|
}
|
|
$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] = print_group_icon ($map["group_id"], true);
|
|
|
|
array_push ($table->data, $data);
|
|
}
|
|
}
|
|
|
|
if (!empty ($table->data)) {
|
|
print_table ($table);
|
|
} else {
|
|
echo '<div class="nf">'.__('No maps found').'</div>';
|
|
}
|
|
unset ($table);
|
|
?>
|