2010-03-04 Raul Mateos <raulofpandora@gmail.com>

* (lot of files): Updated year and headers.

git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
raulmateos 2010-03-04 16:08:09 +00:00
parent f44ff9c622
commit f52a60ce8c
24 changed files with 287 additions and 281 deletions

View File

@ -1,3 +1,7 @@
2010-03-04 Raúl Mateos <raulofpandora@gmail.com>
* (lot of files): Updated year and headers.
2010-03-04 Miguel de Dios <miguel.dedios@artica.es>
* godmode/gis_maps/configure_gis_map.php: clean the form, now don't show
@ -139,7 +143,8 @@
2010-03-02 Raúl Mateos <raulofpandora@gmail.com>
* godmode/agentes/*.php, godmode/group/*.php, godmode/modules/*.php:
* godmode/agentes/*.php, godmode/group/*.php, godmode/modules/*.php
* godmode/alerts/*.php, godmode/users/*.php, extensions/users_connected.php:
Updated year and headers in several files. Little by little I'll change
the rest...

View File

@ -2,7 +2,7 @@
/**
* Pandora FMS- http://pandorafms.com
* ==================================================
* Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
* Copyright (c) 2005-2010 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

View File

@ -2,7 +2,7 @@
//Pandora FMS- http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2010 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
@ -36,7 +36,7 @@ function view_logfile ($file_name) {
function pandoralogs_extension_main () {
global $config;
print_page_header (__("System logfile viewer"));
print_page_header (__("System logfile viewer"), "images/extensions.png", false, "", true, "" );
echo "<p>This tool is used just to view your Pandora FMS system logfiles directly from console</p>";

View File

@ -2,7 +2,7 @@
//Pandora FMS- http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2010 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
@ -16,7 +16,7 @@
function pluginreg_extension_main () {
global $config;
print_page_header (__('Plugin registration'));
print_page_header (__('Plugin registration'), "images/extensions.png", false, "", true, "" );
echo "<div class=notify>";
echo __("This extension makes registration of server plugins more easy. Here you can upload a server plugin in Pandora FMS 3.x zipped format (.pspz). Please refer to documentation on how to obtain and use Pandora FMS Server Plugins.<br><br>You can get more plugins in our <a href='http://pandorafms.org/index.php?sec=community&sec2=repository&lng=en'>Public Resource Library</A>");

View File

@ -2,7 +2,7 @@
//Pandora FMS- http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2010 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
@ -22,7 +22,7 @@ $db =& um_db_connect ('mysql', $config['dbhost'], $config['dbuser'],
$settings = um_db_load_settings ();
echo '<h2>'.__('Extensions'). " &raquo; ". __('Update manager').'</h2>';
print_page_header (__('Update manager'), "images/extensions.png", false, "", false, "" );
if ($settings->customer_key == FREE_USER) {
echo '<div class="notify" style="width: 80%; text-align:left;" >';

View File

@ -1,7 +1,7 @@
<?php
//Pandora FMS- http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2010 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
@ -27,6 +27,8 @@ $db =& um_db_connect ('mysql', $config['dbhost'], $config['dbuser'],
$update_settings = (bool) get_parameter_post ('update_settings');
print_page_header (__('Update manager').' - '. __('Settings'), "images/extensions.png", false, "", true, "" );
if ($update_settings) {
foreach ($_POST['keys'] as $key => $value) {
um_db_update_setting ($key, $value);
@ -36,7 +38,6 @@ if ($update_settings) {
$settings = um_db_load_settings ();
echo '<h2>'.__('Extensions'). " &raquo; ". __('Update manager').' - '. __('Settings').'</h2>';
echo '<form method="post">';
$table->width = '95%';

View File

@ -2,7 +2,7 @@
//Pandora FMS- http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2010 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
@ -13,7 +13,9 @@
// GNU General Public License for more details.
function users_extension_main () {
print_page_header (__("Users connected"));
// Header
print_page_header (__("Users connected"), "images/extensions.png", false, "", false);
$sql = "SELECT id_usuario, ip_origen, fecha, accion FROM tsesion WHERE descripcion = 'Logged in' AND utimestamp > (UNIX_TIMESTAMP(NOW()) - 3600) GROUP BY id_usuario, ip_origen, accion";
@ -57,8 +59,9 @@ function users_extension_main () {
}
function users_extension_main_god () {
echo "<h2>".__('Extensions'). " &raquo; ".__("Users connected"). "</h2>";
// Header
print_page_header (__("Users connected"), "images/extensions.png", false, "", true);
$sql = "SELECT id_usuario, ip_origen, fecha, accion FROM tsesion WHERE descripcion = 'Logged in' AND utimestamp > (UNIX_TIMESTAMP(NOW()) - 3600) GROUP BY id_usuario, ip_origen, accion";
$rows = get_db_all_rows_sql ($sql);

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -34,6 +34,9 @@ $delete_profile = (bool) get_parameter ('delete_profile');
$update_profile = (bool) get_parameter ('update_profile');
$id_profile = (int) get_parameter ('id');
// Header
print_page_header ($page_title, "", false, "", true);
// Profile deletion
if ($delete_profile) {
// Delete profile
@ -116,8 +119,6 @@ if ($create_profile) {
$id_profile = 0;
}
echo '<h2>'.__('Profile management').' &raquo; '.$page_title.'</h2>';
// Edit profile
if ($id_profile || $new_profile) {

View File

@ -312,9 +312,9 @@ if ($editGraph) {
$chunkdata = implode('|', $tempChunkdata);
}
echo "<h2>".__('Reporting')." &raquo; ";
if (isset ($chunk1)) {
echo __('Graph builder module list')."</h2>";
// Header
print_page_header (__('Graph builder module list'), "", false, "", true);
if ($editGraph) {
echo "<form method='post' action='index.php?sec=greporting&sec2=godmode/reporting/graph_builder&edit_graph=1&delete_module=1&id=" . $id . "'>";
}
@ -388,7 +388,8 @@ if (($render == 1) && (isset($modules))) {
// SOURCE AGENT TABLE/FORM
// -----------------------
echo __('Graph builder')."</h2>";
// Header
print_page_header (__('Graph builder'), "", false, "", true);
echo "<table width='500' cellpadding='4' cellpadding='4' class='databox_color'>";
if ($editGraph) {
echo "<form method='post' action='index.php?sec=greporting&sec2=godmode/reporting/graph_builder&edit_graph=1&add_module=1&id=" . $id . "'>";

View File

@ -1,7 +1,7 @@
<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -31,6 +31,9 @@ $delete_graph = (bool) get_parameter ('delete_graph');
$view_graph = (bool) get_parameter ('view_graph');
$id = (int) get_parameter ('id');
// Header
print_page_header (__('Graphs management'), "", false, "", true);
// Delete module SQL code
if ($delete_graph) {
if (give_acl ($config['id_user'], 0, "AW")) {
@ -53,8 +56,6 @@ if ($delete_graph) {
}
}
echo "<h2>".__('Reporting')." &raquo; " . __('Graphs management').'</h2>';
$graphs = get_user_custom_graphs ();
if (! empty ($graphs)) {

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -69,7 +69,7 @@ $height = 0;
$background = '';
// Header
print_page_header (__('Visual console builder'), "images/god9.png", false, "map_builder", true);
print_page_header (__('Visual console builder'), "", false, "map_builder", true);
if ($create_layout) {
$name = (string) get_parameter ('name');

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -27,6 +27,9 @@ if (! give_acl ($config['id_user'], 0, "AW")) {
$layout_id = (int) get_parameter ('id_layout');
$layout = get_db_row ('tlayout', 'id', $layout_id);
// Header
print_page_header (__('Visual map wizard').' - '.$layout["name"], "", false, "map_builder", true);
if (empty ($layout)) {
print_error_message (__('No layout with this id found'));
return;
@ -115,9 +118,6 @@ function process_wizard_add_modules ($id_modules, $image, $id_layout, $range, $w
print_success_message (__('Modules successfully added to layout'));
}
echo "<h2>".__('Maps')." &raquo; ";
echo __('Visual map wizard').' - '.$layout["name"].'</h2>';
$id_agents = get_parameter ('id_agents', array ());
$id_modules = get_parameter ('module', array ());
$image = get_parameter ('image');

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -42,6 +42,9 @@ $create = (int) get_parameter ("create");
$delete = (int) get_parameter ("delete");
$update = (int) get_parameter ("update");
// Headers
print_page_header (__('Export targets'), "", false, "", true);
// Update
if ($update) {
$sql = sprintf ("UPDATE tserver_export SET name = '%s', id_export_server = %d,
@ -83,9 +86,6 @@ if ($create) {
}
}
// List export servers
echo "<h2>".__('Pandora servers')." &raquo; ".__('Export targets')."</h2>";
$result = get_db_all_rows_in_table ("tserver_export");
if (!$result) {
echo '<div class="nf">'.__('There are no export targets configured').'</div>';

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -55,9 +55,8 @@ else {
$options = '';
}
echo '<h2>'.__('Pandora servers').' &raquo; '.__('Export targets');
//print_help_icon ("exportserver");
echo '</h2>';
// Headers
print_page_header (__('Export targets'), "", false, "", true);
$table->width=700;
$table->cellspacing=4;

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -26,6 +26,9 @@ if (! give_acl ($config['id_user'], 0, "PM")) {
exit;
}
// Headers
print_page_header (__('Manage recontask'), "", false, "", true);
// --------------------------------
// DELETE A RECON TASKs
// --------------------------------
@ -90,9 +93,7 @@ if (isset($_GET["create"])) {
// --------------------------------
// SHOW TABLE WITH ALL RECON TASKs
// --------------------------------
echo "<h2>";
echo __('Pandora servers')." &raquo; ".__('Manage recontask');
echo "</h2>";
$result = get_db_all_rows_in_table ("trecon_task");
$color=1;

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -53,9 +53,10 @@ if (isset ($_GET["update"])) { // Edit mode
$recon_ports = ""; // Any
}
echo '<h2>'.__('Pandora servers').' &raquo; '.__('Manage recontask');
// Headers
print_page_header (__('Manage recontask'), "", false, "", true);
print_help_icon ("recontask");
echo '</h2>';
$table->width=600;
$table->cellspacing=4;

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -27,32 +27,10 @@ if (! give_acl ($config["id_user"], 0, "PM")) {
exit;
}
if (isset ($_GET["delete"])) {
$id_server = get_parameter_get ("server_del");
$sql = sprintf ("DELETE FROM tserver WHERE id_server='%d'",$id_server);
$result = process_sql ($sql);
if ($result !== false) {
echo '<h3 class="suc">'.__('Server deleted successfully').'</h3>';
} else {
echo '<h3 class="error">'.__('There was a problem deleting the server').'</h3>';
}
} elseif (isset($_GET["update"])) {
$name = get_parameter_post ("name");
$address = get_parameter_post ("address");
$description = get_parameter_post ("description");
$id_server = get_parameter_post ("server");
$sql = sprintf ("UPDATE tserver SET name = '%s', ip_address = '%s', description = '%s' WHERE id_server = %d", $name, $address, $description, $id_server);
$result = process_sql ($sql);
if ($result !== false) {
echo '<h3 class="suc">'.__('Server updated successfully').'</h3>';
} else {
echo '<h3 class="error">'.__('There was a problem updating the server').'</h3>';
}
}
if (isset($_GET["server"])) {
$id_server= get_parameter_get ("server");
echo "<h2>".__('Pandora servers')." &raquo; ".__('Update Server')."</h2>";
// Headers
print_page_header (__('Update Server'), "", false, "", true);
$sql = sprintf("SELECT name, ip_address, description FROM tserver WHERE id_server = %d",$id_server);
$row = get_db_row_sql ($sql);
echo '<form name="servers" method="POST" action="index.php?sec=gservers&sec2=godmode/servers/modificar_server&update=1">';
@ -75,7 +53,30 @@ if (isset($_GET["server"])) {
} else {
$servers = get_server_info ();
echo "<h2>".__('Pandora servers')." &raquo; ".__('Manage servers')."</h2>";
print_page_header (__('Manage servers'), "", false, "", true);
if (isset ($_GET["delete"])) {
$id_server = get_parameter_get ("server_del");
$sql = sprintf ("DELETE FROM tserver WHERE id_server='%d'",$id_server);
$result = process_sql ($sql);
if ($result !== false) {
echo '<h3 class="suc">'.__('Server deleted successfully').'</h3>';
} else {
echo '<h3 class="error">'.__('There was a problem deleting the server').'</h3>';
}
} elseif (isset($_GET["update"])) {
$name = get_parameter_post ("name");
$address = get_parameter_post ("address");
$description = get_parameter_post ("description");
$id_server = get_parameter_post ("server");
$sql = sprintf ("UPDATE tserver SET name = '%s', ip_address = '%s', description = '%s' WHERE id_server = %d", $name, $address, $description, $id_server);
$result = process_sql ($sql);
if ($result !== false) {
echo '<h3 class="suc">'.__('Server updated successfully').'</h3>';
} else {
echo '<h3 class="error">'.__('There was a problem updating the server').'</h3>';
}
}
if ($servers !== false) {
$table->width = "90%";

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -27,76 +27,6 @@ if (! give_acl ($config['id_user'], 0, "LM")) {
return;
}
// Update plugin
if (isset($_GET["update_plugin"])){ // if modified any parameter
$plugin_id = get_parameter ("update_plugin", 0);
$plugin_name = get_parameter ("form_name", "");
$plugin_description = get_parameter ("form_description", "");
$plugin_max_timeout = get_parameter ("form_max_timeout", "");
$plugin_execute = get_parameter ("form_execute", "");
$plugin_net_dst_opt = get_parameter ("form_net_dst_opt", "");
$plugin_net_port_opt = get_parameter ("form_net_port_opt", "");
$plugin_user_opt = get_parameter ("form_user_opt", "");
$plugin_pass_opt = get_parameter ("form_pass_opt", "");
$plugin_plugin_type = get_parameter ("form_plugin_type", "0");
$sql_update ="UPDATE tplugin SET
name = '$plugin_name',
description = '$plugin_description',
max_timeout = '$plugin_max_timeout',
execute = '$plugin_execute',
net_dst_opt = '$plugin_net_dst_opt',
net_port_opt = '$plugin_net_port_opt',
user_opt = '$plugin_user_opt',
plugin_type = '$plugin_plugin_type',
pass_opt = '$plugin_pass_opt'
WHERE id = $plugin_id";
$result=mysql_query($sql_update);
if (! $result) {
echo "<h3 class='error'>".__('Problem updating plugin')."</h3>";
} else {
echo "<h3 class='suc'>".__('Plugin updated successfully')."</h3>";
}
}
// Create plugin
if (isset($_GET["create_plugin"])){
$plugin_name = get_parameter ("form_name", "");
$plugin_description = get_parameter ("form_description", "");
$plugin_max_timeout = get_parameter ("form_max_timeout", "");
$plugin_execute = get_parameter ("form_execute", "");
$plugin_net_dst_opt = get_parameter ("form_net_dst_opt", "");
$plugin_net_port_opt = get_parameter ("form_net_port_opt", "");
$plugin_user_opt = get_parameter ("form_user_opt", "");
$plugin_pass_opt = get_parameter ("form_pass_opt", "");
$plugin_plugin_type = get_parameter ("form_plugin_type", "0");
$sql_insert ="INSERT tplugin (name, description, max_timeout, execute, net_dst_opt, net_port_opt, user_opt, pass_opt, plugin_type) VALUES ('$plugin_name', '$plugin_description', '$plugin_max_timeout', '$plugin_execute', '$plugin_net_dst_opt', '$plugin_net_port_opt', '$plugin_user_opt', '$plugin_pass_opt', $plugin_plugin_type)";
$result=mysql_query($sql_insert);
if (! $result){
echo "<h3 class='error'>".__('Problem creating plugin')."</h3>";
echo $sql_insert;
} else {
echo "<h3 class='suc'>".__('Plugin created successfully')."</h3>";
}
}
if (isset($_GET["kill_plugin"])){ // if delete alert
$plugin_id = get_parameter ("kill_plugin", 0);
$sql_delete= "DELETE FROM tplugin WHERE id= ".$plugin_id;
$result=mysql_query($sql_delete);
if (! $result){
echo "<h3 class='error'>".__('Problem deleting plugin')."</h3>";
} else {
echo "<h3 class='suc'>".__('Plugin deleted successfully')."</h3>";
}
if ($plugin_id != 0){
$sql_delete2 ="DELETE FROM tagente_modulo WHERE id_plugin = ".$plugin_id;
$result=mysql_query($sql_delete2);
}
}
$view = get_parameter ("view", "");
$create = get_parameter ("create", "");
@ -130,16 +60,14 @@ if ($create != ""){
if (($create != "") OR ($view != "")){
echo "<h2>";
if ($create != "")
echo __('Pandora servers')." &raquo; ". __('Plugin creation');
print_page_header (__('Plugin creation'), "", false, "", true);
else {
echo __('Pandora servers')." &raquo; ". __('Plugin update');
print_page_header (__('Plugin update'), "", false, "", true);
$plugin_id = get_parameter ("view","");
}
print_help_icon("plugin_definition");
echo "</h2>";
if ($create == "")
echo "<form name=plugin method='post' action='index.php?sec=gservers&sec2=godmode/servers/plugin&update_plugin=$plugin_id'>";
else
@ -200,18 +128,86 @@ if (($create != "") OR ($view != "")){
}
else {
echo "<h2>";
echo __('Pandora servers')." &raquo; ".__('Plugins registered in Pandora FMS');
echo "</h2>";
print_page_header (__('Plugins registered in Pandora FMS'), "", false, "", true);
// Update plugin
if (isset($_GET["update_plugin"])){ // if modified any parameter
$plugin_id = get_parameter ("update_plugin", 0);
$plugin_name = get_parameter ("form_name", "");
$plugin_description = get_parameter ("form_description", "");
$plugin_max_timeout = get_parameter ("form_max_timeout", "");
$plugin_execute = get_parameter ("form_execute", "");
$plugin_net_dst_opt = get_parameter ("form_net_dst_opt", "");
$plugin_net_port_opt = get_parameter ("form_net_port_opt", "");
$plugin_user_opt = get_parameter ("form_user_opt", "");
$plugin_pass_opt = get_parameter ("form_pass_opt", "");
$plugin_plugin_type = get_parameter ("form_plugin_type", "0");
$sql_update ="UPDATE tplugin SET
name = '$plugin_name',
description = '$plugin_description',
max_timeout = '$plugin_max_timeout',
execute = '$plugin_execute',
net_dst_opt = '$plugin_net_dst_opt',
net_port_opt = '$plugin_net_port_opt',
user_opt = '$plugin_user_opt',
plugin_type = '$plugin_plugin_type',
pass_opt = '$plugin_pass_opt'
WHERE id = $plugin_id";
$result=mysql_query($sql_update);
if (! $result) {
echo "<h3 class='error'>".__('Problem updating plugin')."</h3>";
} else {
echo "<h3 class='suc'>".__('Plugin updated successfully')."</h3>";
}
}
// Create plugin
if (isset($_GET["create_plugin"])){
$plugin_name = get_parameter ("form_name", "");
$plugin_description = get_parameter ("form_description", "");
$plugin_max_timeout = get_parameter ("form_max_timeout", "");
$plugin_execute = get_parameter ("form_execute", "");
$plugin_net_dst_opt = get_parameter ("form_net_dst_opt", "");
$plugin_net_port_opt = get_parameter ("form_net_port_opt", "");
$plugin_user_opt = get_parameter ("form_user_opt", "");
$plugin_pass_opt = get_parameter ("form_pass_opt", "");
$plugin_plugin_type = get_parameter ("form_plugin_type", "0");
$sql_insert ="INSERT tplugin (name, description, max_timeout, execute, net_dst_opt, net_port_opt, user_opt, pass_opt, plugin_type) VALUES ('$plugin_name', '$plugin_description', '$plugin_max_timeout', '$plugin_execute', '$plugin_net_dst_opt', '$plugin_net_port_opt', '$plugin_user_opt', '$plugin_pass_opt', $plugin_plugin_type)";
$result=mysql_query($sql_insert);
if (! $result){
echo "<h3 class='error'>".__('Problem creating plugin')."</h3>";
echo $sql_insert;
} else {
echo "<h3 class='suc'>".__('Plugin created successfully')."</h3>";
}
}
if (isset($_GET["kill_plugin"])){ // if delete alert
$plugin_id = get_parameter ("kill_plugin", 0);
$sql_delete= "DELETE FROM tplugin WHERE id= ".$plugin_id;
$result=mysql_query($sql_delete);
if (! $result){
echo "<h3 class='error'>".__('Problem deleting plugin')."</h3>";
} else {
echo "<h3 class='suc'>".__('Plugin deleted successfully')."</h3>";
}
if ($plugin_id != 0){
$sql_delete2 ="DELETE FROM tagente_modulo WHERE id_plugin = ".$plugin_id;
$result=mysql_query($sql_delete2);
}
}
// If not edition or insert, then list available plugins
$sql1='SELECT * FROM tplugin ORDER BY name';
$result=mysql_query($sql1);
if (mysql_num_rows($result) > 0){
echo '<table width="730" cellspacing="4" cellpadding="4" class="databox">';
echo "<th>".__('Name');
echo "<th>".__('Type');
echo "<th>".__('Command');
echo "<th>".__('Delete');
echo "<th>".__('Name')."</th>";
echo "<th>".__('Type')."</th>";
echo "<th>".__('Command')."</th>";
echo "<th>".__('Delete')."</th>";
$color = 0;
while ($row=mysql_fetch_array($result)){
if ($color == 1){
@ -226,16 +222,17 @@ else {
echo "<td class=$tdcolor>";
echo "<b><a href='index.php?sec=gservers&sec2=godmode/servers/plugin&view=".$row["id"]."'>";
echo $row["name"];
echo "</a></b>";
echo "</a></b></td>";
echo "<td class=$tdcolor>";
if ($row["plugin_type"] == 0)
echo __('Standard');
else
echo __('Nagios');
echo "<td class=$tdcolor>";
echo "</td><td class=$tdcolor>";
echo $row["execute"];
echo "<td class=$tdcolor>";
echo "</td><td class=$tdcolor>";
echo "<a href='index.php?sec=gservers&sec2=godmode/servers/plugin&kill_plugin=".$row["id"]."'><img src='images/cross.png' border=0></a>";
echo "</td></tr>";
}
echo "</table>";
} else {
@ -246,7 +243,7 @@ else {
echo "<tr><td align=right>";
echo "<form name=plugin method='post' action='index.php?sec=gservers&sec2=godmode/servers/plugin&create=1'>";
echo "<input name='crtbutton' type='submit' class='sub next' value='".__('Add')."'>";
echo "</table>";
echo "</td></tr></table>";
}
?>

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -30,6 +30,9 @@ $delete_file = (bool) get_parameter ('delete_file');
$upload_file = (bool) get_parameter ('upload_file');
$create_dir = (bool) get_parameter ('create_dir');
// Header
print_page_header (__('File manager'), "", false, "", true);
// Upload file
if ($upload_file) {
if (isset ($_FILES['file']) && $_FILES['file']['name'] != "") {
@ -50,7 +53,6 @@ if ($upload_file) {
}
if ($delete_file) {
echo "<h1>".__('Deleting file')."</h1>";
$filename = (string) get_parameter ('filename');
echo "<h3>".__('Deleting')." ".$filename."</h3>";
if (is_dir ($filename)) {
@ -60,7 +62,6 @@ if ($delete_file) {
}
}
echo "<h2>".__('Pandora Setup')." &raquo; ".__('File manager')."</h2>";
$directory = (string) get_parameter ('directory', "/");

View File

@ -2,7 +2,7 @@
/**
* Pandora FMS- http://pandorafms.com
* ==================================================
* Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
* Copyright (c) 2005-2010 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
@ -28,8 +28,8 @@ require_once ('include/functions_gis.php');
require_javascript_file('openlayers.pandora');
echo "<h2>".__('Pandora Setup')." &raquo; ";
echo __('Map conections GIS')."</h2>";
// Header
print_page_header (__('Map conections GIS'), "", false, "", true);
$action = get_parameter('action');

View File

@ -2,7 +2,7 @@
/**
* Pandora FMS- http://pandorafms.com
* ==================================================
* Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
* Copyright (c) 2005-2010 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
@ -35,8 +35,9 @@ echo '<form action="index.php?sec=gsetup&sec2=godmode/setup/gis_step_2" method="
switch ($action) {
case 'create_connection_map':
echo "<h2>".__('Pandora Setup')." &raquo; ";
echo __('Create new map connection')."</h2>";
// Header
print_page_header (__('Create new map connection'), "", false, "", true);
$mapConnection_name = '';
$mapConnection_group = '';
$mapConnection_numLevelsZoom = '19';
@ -53,8 +54,8 @@ switch ($action) {
print_input_hidden('action', 'save_map_connection');
break;
case 'edit_connection_map':
echo "<h2>".__('Pandora Setup')." &raquo; ";
echo __('Edit map connection')."</h2>";
// Header
print_page_header (__('Edit map connection'), "", false, "", true);
$idConnectionMap = get_parameter('id_connection_map');
$mapConnection = get_db_row_sql('SELECT * FROM tgis_map_connection WHERE id_tmap_connection = ' . $idConnectionMap);
@ -101,8 +102,8 @@ switch ($action) {
$gmap_type= get_parameter('gmap_type');
$gmap_key= get_parameter('gmap_key');
$mapConnectionData = array('type' => 'Gmap',
'gmap_type' => $gmap_type,
'gmap_key' => $gmap_key);
'gmap_type' => $gmap_type,
'gmap_key' => $gmap_key);
break;
case 'Static_Image':
$mapConnection_Image_url= get_parameter('url');
@ -302,7 +303,7 @@ $table->data[4][2] = print_input_text ('default_altitude', $mapConnection_defaul
print_table($table);
echo '<div class="action-buttons" style="clear: left; width: 90%; float: left;">';
print_submit_button (__('Save'), '', false, 'class="sub save"');
print_submit_button (__('Save'), '', false, 'class="sub save wand"');
echo '</div>';
echo "</form>";

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -23,115 +23,110 @@ if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_use
exit;
}
// Header
print_page_header (__('Link management'), "images/extensions.png", false, "", false, "" );
if (isset($_POST["create"])){ // If create
$name = get_parameter_post ("name");
$link = get_parameter_post ("link");
$sql_insert = "INSERT INTO tlink (name,link) VALUES ('$name','$link')";
$result=mysql_query($sql_insert);
if (! $result)
echo "<h3 class='error'>".__('There was a problem creating link')."</h3>";
else {
echo "<h3 class='suc'>".__('Successfully created')."</h3>";
$id_link = mysql_insert_id();
}
}
if (isset($_POST["update"])){ // if update
$id_link = entrada_limpia($_POST["id_link"]);
$name = entrada_limpia($_POST["name"]);
$link = entrada_limpia($_POST["link"]);
$sql_update ="UPDATE tlink SET name = '".$name."', link ='".$link."' WHERE id_link = '".$id_link."'";
$result=mysql_query($sql_update);
if (! $result)
echo "<h3 class='error'>".__('There was a problem modifying link')."</h3>";
else
echo "<h3 class='suc'>".__('Successfully updated')."</h3>";
if (isset($_POST["create"])){ // If create
$name = get_parameter_post ("name");
$link = get_parameter_post ("link");
$sql_insert = "INSERT INTO tlink (name,link) VALUES ('$name','$link')";
$result=mysql_query($sql_insert);
if (! $result)
echo "<h3 class='error'>".__('There was a problem creating link')."</h3>";
else {
echo "<h3 class='suc'>".__('Successfully created')."</h3>";
$id_link = mysql_insert_id();
}
}
if (isset($_POST["update"])){ // if update
$id_link = entrada_limpia($_POST["id_link"]);
$name = entrada_limpia($_POST["name"]);
$link = entrada_limpia($_POST["link"]);
$sql_update ="UPDATE tlink SET name = '".$name."', link ='".$link."' WHERE id_link = '".$id_link."'";
$result=mysql_query($sql_update);
if (! $result)
echo "<h3 class='error'>".__('There was a problem modifying link')."</h3>";
else
echo "<h3 class='suc'>".__('Successfully updated')."</h3>";
}
if (isset($_GET["borrar"])){ // if delete
$id_link = entrada_limpia($_GET["borrar"]);
$sql_delete= "DELETE FROM tlink WHERE id_link = ".$id_link;
$result=mysql_query($sql_delete);
if (! $result)
echo "<h3 class='error'>".__('There was a problem deleting link')."</h3>";
else
echo "<h3 class='suc'>".__('Successfully deleted')."</h3>";
if (isset($_GET["borrar"])){ // if delete
$id_link = entrada_limpia($_GET["borrar"]);
$sql_delete= "DELETE FROM tlink WHERE id_link = ".$id_link;
$result=mysql_query($sql_delete);
if (! $result)
echo "<h3 class='error'>".__('There was a problem deleting link')."</h3>";
else
echo "<h3 class='suc'>".__('Successfully deleted')."</h3>";
}
// Main form view for Links edit
if ((isset($_GET["form_add"])) or (isset($_GET["form_edit"]))){
if (isset($_GET["form_edit"])){
$creation_mode = 0;
$id_link = entrada_limpia($_GET["id_link"]);
$sql1='SELECT * FROM tlink WHERE id_link = '.$id_link;
$result=mysql_query($sql1);
if ($row=mysql_fetch_array($result)){
$nombre = $row["name"];
$link = $row["link"];
}
else echo "<h3 class='error'>".__('Name error')."</h3>";
} else { // form_add
$creation_mode =1;
$nombre = "";
$link = "";
}
// Main form view for Links edit
if ((isset($_GET["form_add"])) or (isset($_GET["form_edit"]))){
if (isset($_GET["form_edit"])){
$creation_mode = 0;
$id_link = entrada_limpia($_GET["id_link"]);
$sql1='SELECT * FROM tlink WHERE id_link = '.$id_link;
$result=mysql_query($sql1);
if ($row=mysql_fetch_array($result)){
$nombre = $row["name"];
$link = $row["link"];
}
else echo "<h3 class='error'>".__('Name error')."</h3>";
} else { // form_add
$creation_mode =1;
$nombre = "";
$link = "";
echo '<table class="databox" cellpadding="4" cellspacing="4" width="500">';
echo '<form name="ilink" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/links">';
if ($creation_mode == 1)
echo "<input type='hidden' name='create' value='1'>";
else
echo "<input type='hidden' name='update' value='1'>";
echo "<input type='hidden' name='id_link' value='";
if (isset($id_link)) {echo $id_link;}
echo "'>";
echo '<tr>
<td class="datos">'.__('Link name').'</td>
<td class="datos"><input type="text" name="name" size="35" value="'.$nombre.'"></td>';
echo '</tr><tr>
<td class="datos2">'.__('Link').'</td>
<td class="datos2">
<input type="text" name="link" size="35" value="'.$link.'"></td>';
echo '</tr>';
echo "</table>";
echo "<table width='500px'>";
echo "<tr><td align='right'>
<input name='crtbutton' type='submit' class='sub upd' value='".__('Update')."'>";
echo '</form></td></tr></table>';
}
else { // Main list view for Links editor
echo "<table cellpadding='4' cellspacing='4' class='databox'>";
echo "<th width='180px'>".__('Link name')."</th>";
echo "<th width='80px'>".__('Delete')."</th>";
$sql1='SELECT * FROM tlink ORDER BY name';
$result=mysql_query($sql1);
$color=1;
while ($row=mysql_fetch_array($result)){
if ($color == 1){
$tdcolor = "datos";
$color = 0;
}
// Create link
echo "<h2>".__('Pandora Setup')." &raquo; ";
echo __('Link management')."</h2>";
echo '<table class="databox" cellpadding="4" cellspacing="4" width="500">';
echo '<form name="ilink" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/links">';
if ($creation_mode == 1)
echo "<input type='hidden' name='create' value='1'>";
else
echo "<input type='hidden' name='update' value='1'>";
echo "<input type='hidden' name='id_link' value='"; ?>
<?php if (isset($id_link)) {echo $id_link;} ?>
<?php
echo "'>";
echo '<tr>
<td class="datos">'.__('Link name').'</td>
<td class="datos"><input type="text" name="name" size="35" value="'.$nombre.'">';
echo '<tr>
<td class="datos2">'.__('Link').'</td>
<td class="datos2">
<input type="text" name="link" size="35" value="'.$link.'"></td>';
echo '</tr>';
echo "</table>";
echo "<table width='500px'>";
echo "<tr><td align='right'>
<input name='crtbutton' type='submit' class='sub upd' value='".__('Update')."'>";
echo '</form></td></tr></table>';
}
else { // Main list view for Links editor
echo "<h2>".__('Pandora Setup')." &raquo; ";
echo __('Link management')."</h3>";
echo "<table cellpadding='4' cellspacing='4' class='databox'>";
echo "<th width='180px'>".__('Link name')."</th>";
echo "<th width='80px'>".__('Delete')."</th>";
$sql1='SELECT * FROM tlink ORDER BY name';
$result=mysql_query($sql1);
$color=1;
while ($row=mysql_fetch_array($result)){
if ($color == 1){
$tdcolor = "datos";
$color = 0;
}
else {
$tdcolor = "datos2";
$color = 1;
}
echo "<tr><td class='$tdcolor'><b><a href='index.php?sec=gsetup&sec2=godmode/setup/links&form_edit=1&id_link=".$row["id_link"]."'>".$row["name"]."</a></b></td>";
echo '<td class="'.$tdcolor.'" align="center"><a href="index.php?sec=gsetup&sec2=godmode/setup/links&id_link='.$row["id_link"].'&borrar='.$row["id_link"].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;"><img border=0 src="images/cross.png"></a></td></tr>';
else {
$tdcolor = "datos2";
$color = 1;
}
echo "</table>";
echo "<table width='290px'>";
echo "<tr><td align='right'>";
echo "<form method='post' action='index.php?sec=gsetup&sec2=godmode/setup/links&form_add=1'>";
echo "<input type='submit' class='sub next' name='form_add' value='".__('Add')."'>";
echo "</form></table>";
echo "<tr><td class='$tdcolor'><b><a href='index.php?sec=gsetup&sec2=godmode/setup/links&form_edit=1&id_link=".$row["id_link"]."'>".$row["name"]."</a></b></td>";
echo '<td class="'.$tdcolor.'" align="center"><a href="index.php?sec=gsetup&sec2=godmode/setup/links&id_link='.$row["id_link"].'&borrar='.$row["id_link"].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;"><img border=0 src="images/cross.png"></a></td></tr>';
}
echo "</table>";
echo "<table width='290px'>";
echo "<tr><td align='right'>";
echo "<form method='post' action='index.php?sec=gsetup&sec2=godmode/setup/links&form_add=1'>";
echo "<input type='submit' class='sub next' name='form_add' value='".__('Add')."'>";
echo "</form></table>";
}
?>

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -41,8 +41,6 @@ require_once ('include/functions_themes.php');
// Header
print_page_header (__('Visual configuration'), "", false, "", true);
$table->width = '90%';
$table->data = array ();

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -22,14 +22,14 @@ if (! give_acl ($config['id_user'], 0, "AR")) {
exit;
}
// Header
print_page_header (__('Extensions'). " &raquo; ". __('Defined extensions'). " - ".$report["name"], "images/extensions.png", false, "", false, "" );
if (sizeof ($config['extensions']) == 0) {
echo '<h3>'.__('There are no extensions defined').'</h3>';
return;
}
// Header
print_page_header (__('Extensions'). " &raquo; ". __('Defined extensions'). " - ".$report["name"], "images/extensions.png", false, "", false, "" );
$delete = get_parameter ("delete", "");
$name = get_parameter ("name", "");