mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Working in the new networkmaps.
This commit is contained in:
parent
71f38f7e02
commit
7931b7f770
31
pandora_console/include/functions_maps.php
Normal file
31
pandora_console/include/functions_maps.php
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// Pandora FMS - http://pandorafms.com
|
||||||
|
// ==================================================
|
||||||
|
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||||
|
// Please see http://pandorafms.org for full contribution list
|
||||||
|
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License
|
||||||
|
// as published by the Free Software Foundation; 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.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Include
|
||||||
|
* @subpackage Maps
|
||||||
|
*/
|
||||||
|
|
||||||
|
function maps_save_map($values) {
|
||||||
|
return db_process_sql_insert('tmap', $values);
|
||||||
|
}
|
||||||
|
|
||||||
|
function maps_get_maps($filter) {
|
||||||
|
return db_get_all_rows_filter('tmap', $filter);
|
||||||
|
}
|
||||||
|
?>
|
@ -38,11 +38,18 @@ if (!$networkmaps_read && !$networkmaps_write && !$networkmaps_manage) {
|
|||||||
|
|
||||||
require_once('include/functions_migration.php');
|
require_once('include/functions_migration.php');
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
// It is dirty but at the moment (minor release is not)
|
||||||
|
// this place is the place for migration
|
||||||
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
$migrate_open_networkmaps = (int)get_parameter('migrate_open_networkmaps');
|
$migrate_open_networkmaps = (int)get_parameter('migrate_open_networkmaps');
|
||||||
|
|
||||||
if ($migrate_open_networkmaps)
|
if ($migrate_open_networkmaps)
|
||||||
migration_open_networkmaps();
|
migration_open_networkmaps();
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
ui_print_page_header(__('Network map'), "images/op_network.png", false, "network_map", false);
|
ui_print_page_header(__('Network map'), "images/op_network.png", false, "network_map", false);
|
||||||
|
|
||||||
$id = (int)get_parameter('id_networkmap', 0);
|
$id = (int)get_parameter('id_networkmap', 0);
|
||||||
@ -53,9 +60,11 @@ if ($delete_networkmap) {
|
|||||||
$result_delete = networkmap_delete_networkmap($id);
|
$result_delete = networkmap_delete_networkmap($id);
|
||||||
|
|
||||||
if ($result_delete)
|
if ($result_delete)
|
||||||
db_pandora_audit( "Networkmap management", "Delete networkmap #$id");
|
db_pandora_audit( "Networkmap management",
|
||||||
|
"Delete networkmap #$id");
|
||||||
else
|
else
|
||||||
db_pandora_audit( "Networkmap management", "Fail try to delete networkmap #$id");
|
db_pandora_audit( "Networkmap management",
|
||||||
|
"Fail try to delete networkmap #$id");
|
||||||
|
|
||||||
ui_print_result_message ($result_delete,
|
ui_print_result_message ($result_delete,
|
||||||
__('Successfully deleted'),
|
__('Successfully deleted'),
|
||||||
@ -119,8 +128,7 @@ $table->head['edit'] = __('Edit');
|
|||||||
$table->head['delete'] = __('Delete');
|
$table->head['delete'] = __('Delete');
|
||||||
|
|
||||||
//FUNCION
|
//FUNCION
|
||||||
//$networkmaps = networkmap_get_networkmaps();
|
$networkmaps = maps_get_maps(array('type' => MAP_TYPE_NETWORKMAP));
|
||||||
$networkmaps = array();
|
|
||||||
|
|
||||||
if (empty($networkmaps)) {
|
if (empty($networkmaps)) {
|
||||||
ui_print_info_message (
|
ui_print_info_message (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user