mdtrooper e9cfd7729f 2010-02-09 Miguel de Dios <miguel.dedios@artica.es>
* 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
2010-02-09 17:06:25 +00:00

75 lines
2.6 KiB
PHP
Executable File

<?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");
check_login ();
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to access Visual Setup Management");
require ("general/noaccess.php");
return;
}
require_once ('include/functions_gis.php');
require_javascript_file('openlayers.pandora');
echo "<h2>".__('Pandora Setup')." &raquo; ";
echo __('Map conections GIS')."</h2>";
$action = get_parameter('action');
if ($action == 'delete_connection') {
$idConnectionMap = get_parameter('id_connection_map');
deleteMapConnection($idConnectionMap);
}
$table->width = '500px';
$table->head[0] = __('Map connection name');
$table->head[1] = __('Group');
$table->head[3] = __('Delete');
$table->align[1] = 'center';
$table->align[2] = 'center';
$table->align[3] = 'center';
$mapsConnections = get_db_all_rows_in_table ('tgis_map_connection','conection_name');
$table->data = array();
if ($mapsConnections !== false) {
foreach ($mapsConnections as $mapsConnection) {
$table->data[] = array('<a href="index.php?sec=gsetup&sec2=godmode/setup/gis_step_2&amp;action=edit_connection_map&amp;id_connection_map=' .
$mapsConnection['id_tmap_connection'] .'">'
. $mapsConnection['conection_name'] . '</a>',
print_group_icon ($mapsConnection['group_id'], true),
'<a href="index.php?sec=gsetup&sec2=godmode/setup/gis&amp;id_connection_map=' .
$mapsConnection['id_tmap_connection'].'&amp;action=delete_connection"
onClick="javascript: if (!confirm(\'' . __('Do you wan delete this connection?') . '\')) return false;">' . print_image ("images/cross.png", true).'</a>');
}
}
print_table($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">';
echo '<form action="index.php?sec=gsetup&sec2=godmode/setup/gis_step_2" method="post">';
print_input_hidden ('action','create_connection_map');
print_submit_button (__('Create'), '', false, 'class="sub next"');
echo '</form>';
echo '</div>';
?>