mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +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');
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// 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');
|
||||
|
||||
if ($migrate_open_networkmaps)
|
||||
migration_open_networkmaps();
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ui_print_page_header(__('Network map'), "images/op_network.png", false, "network_map", false);
|
||||
|
||||
$id = (int)get_parameter('id_networkmap', 0);
|
||||
@ -51,12 +58,14 @@ $duplicate_networkmap = (bool)get_parameter('duplicate_networkmap', 0);
|
||||
|
||||
if ($delete_networkmap) {
|
||||
$result_delete = networkmap_delete_networkmap($id);
|
||||
|
||||
|
||||
if ($result_delete)
|
||||
db_pandora_audit( "Networkmap management", "Delete networkmap #$id");
|
||||
db_pandora_audit( "Networkmap management",
|
||||
"Delete networkmap #$id");
|
||||
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,
|
||||
__('Successfully deleted'),
|
||||
__('Could not be deleted'));
|
||||
@ -66,7 +75,7 @@ if ($duplicate_networkmap) {
|
||||
//FUNCION
|
||||
//$result_duplicate = networkmap_duplicate($id);
|
||||
$result_duplicate = array();
|
||||
|
||||
|
||||
ui_print_result_message ($result,
|
||||
__('Successfully duplicate'),
|
||||
__('Could not be duplicate'));
|
||||
@ -119,8 +128,7 @@ $table->head['edit'] = __('Edit');
|
||||
$table->head['delete'] = __('Delete');
|
||||
|
||||
//FUNCION
|
||||
//$networkmaps = networkmap_get_networkmaps();
|
||||
$networkmaps = array();
|
||||
$networkmaps = maps_get_maps(array('type' => MAP_TYPE_NETWORKMAP));
|
||||
|
||||
if (empty($networkmaps)) {
|
||||
ui_print_info_message (
|
||||
|
Loading…
x
Reference in New Issue
Block a user