mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php, extensions/update_manager/lib/libupdate_manager.php, godmode/agentes/modificar_agente.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_list.list.php, godmode/massive/massive_add_profiles.php, godmode/massive/massive_edit_modules.php, godmode/servers/manage_recontask.php, godmode/setup/setup_visuals.php, include/functions_api.php, include/functions_graph.php, include/functions_messages.php, include/graphs/functions_flot.php, include/graphs/flot/pandora.flot.js, operation/tree.php, operation/agentes/status_events.php, operation/agentes/ver_agente.php, operation/events/events_list.php, operation/events/events_marquee.php, operation/events/events_rss.php: cleaned source code style. * godmode/reporting/reporting_builder.item_editor.php, include/functions_ui.php, include/ajax/agent.php: continue to change to the new function "ui_print_agent_autocomplete_input" to make more easy (and standar) the autocomplete agent input. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
b4e5748f7e
commit
02a119099f
@ -1,3 +1,27 @@
|
|||||||
|
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* extensions/resource_registration.php, extensions/system_info.php,
|
||||||
|
extensions/update_manager/lib/libupdate_manager.php,
|
||||||
|
godmode/agentes/modificar_agente.php,
|
||||||
|
godmode/alerts/alert_actions.php,
|
||||||
|
godmode/alerts/alert_list.list.php,
|
||||||
|
godmode/massive/massive_add_profiles.php,
|
||||||
|
godmode/massive/massive_edit_modules.php,
|
||||||
|
godmode/servers/manage_recontask.php,
|
||||||
|
godmode/setup/setup_visuals.php, include/functions_api.php,
|
||||||
|
include/functions_graph.php, include/functions_messages.php,
|
||||||
|
include/graphs/functions_flot.php,
|
||||||
|
include/graphs/flot/pandora.flot.js, operation/tree.php,
|
||||||
|
operation/agentes/status_events.php,
|
||||||
|
operation/agentes/ver_agente.php, operation/events/events_list.php,
|
||||||
|
operation/events/events_marquee.php,
|
||||||
|
operation/events/events_rss.php: cleaned source code style.
|
||||||
|
|
||||||
|
* godmode/reporting/reporting_builder.item_editor.php,
|
||||||
|
include/functions_ui.php, include/ajax/agent.php: continue to change
|
||||||
|
to the new function "ui_print_agent_autocomplete_input" to make more
|
||||||
|
easy (and standar) the autocomplete agent input.
|
||||||
|
|
||||||
2012-09-19 Vanessa Gil <vanessa.gil@artica.es>
|
2012-09-19 Vanessa Gil <vanessa.gil@artica.es>
|
||||||
|
|
||||||
* gomode/netflow/nf_item_list.php
|
* gomode/netflow/nf_item_list.php
|
||||||
|
@ -823,7 +823,7 @@ function resource_registration_extension_main() {
|
|||||||
require_once($config['homedir'] . '/include/functions_network_components.php');
|
require_once($config['homedir'] . '/include/functions_network_components.php');
|
||||||
require_once($config['homedir'] . '/include/functions_db.php');
|
require_once($config['homedir'] . '/include/functions_db.php');
|
||||||
enterprise_include_once('include/functions_local_components.php');
|
enterprise_include_once('include/functions_local_components.php');
|
||||||
|
|
||||||
ui_print_page_header (__('Resource registration'), "images/extensions.png", false, "", true, "" );
|
ui_print_page_header (__('Resource registration'), "images/extensions.png", false, "", true, "" );
|
||||||
|
|
||||||
if (!extension_loaded("libxml")) {
|
if (!extension_loaded("libxml")) {
|
||||||
|
@ -334,7 +334,7 @@ function mainSystemInfo() {
|
|||||||
else {
|
else {
|
||||||
echo __('No selected');
|
echo __('No selected');
|
||||||
}
|
}
|
||||||
|
|
||||||
$zip = new ZipArchive;
|
$zip = new ZipArchive;
|
||||||
|
|
||||||
if ($zip->open($zipArchive, ZIPARCHIVE::CREATE) === true) {
|
if ($zip->open($zipArchive, ZIPARCHIVE::CREATE) === true) {
|
||||||
|
@ -526,7 +526,7 @@ function um_delete_directory($dirname) {
|
|||||||
if (!is_dir($dirname."/".$file))
|
if (!is_dir($dirname."/".$file))
|
||||||
unlink($dirname."/".$file);
|
unlink($dirname."/".$file);
|
||||||
else
|
else
|
||||||
um_delete_directory($dirname.'/'.$file);
|
um_delete_directory($dirname . '/' . $file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir($dir_handle);
|
closedir($dir_handle);
|
||||||
@ -734,14 +734,14 @@ function um_db_get_all_auths () {
|
|||||||
echo '<strong>Error getting authorizations</strong> <br />';
|
echo '<strong>Error getting authorizations</strong> <br />';
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = db_process_sql('SELECT * FROM '.DB_PREFIX.'tupdate_auth');
|
$result = db_process_sql('SELECT * FROM '.DB_PREFIX.'tupdate_auth');
|
||||||
|
|
||||||
$cont = 0;
|
$cont = 0;
|
||||||
$auths = array();
|
$auths = array();
|
||||||
while(true) {
|
while (true) {
|
||||||
$auth = um_std_from_result($result, $cont);
|
$auth = um_std_from_result($result, $cont);
|
||||||
if($auth === false) {
|
if ($auth === false) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$auths[$auth->id] = $auth;
|
$auths[$auth->id] = $auth;
|
||||||
@ -780,13 +780,13 @@ function um_db_check_auth ($client_key, $subscription_limit) {
|
|||||||
if ($auth->developer == 1 || $auth->subscription_limit >= $subscription_limit) {
|
if ($auth->developer == 1 || $auth->subscription_limit >= $subscription_limit) {
|
||||||
return $auth->id;
|
return $auth->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function um_db_is_auth_developer ($id_auth) {
|
function um_db_is_auth_developer ($id_auth) {
|
||||||
$developer = db_get_value('developer', DB_PREFIX.'tupdate_auth', '`id`', $id_auth);
|
$developer = db_get_value('developer', DB_PREFIX.'tupdate_auth', '`id`', $id_auth);
|
||||||
|
|
||||||
if ($developer === false) {
|
if ($developer === false) {
|
||||||
echo '<strong>Error reading authorization developers bit</strong> <br />';
|
echo '<strong>Error reading authorization developers bit</strong> <br />';
|
||||||
return false;
|
return false;
|
||||||
@ -824,4 +824,4 @@ function um_get_component_types () {
|
|||||||
|
|
||||||
return $types;
|
return $types;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
@ -287,7 +287,7 @@ else {
|
|||||||
WHERE (id_grupo IN (%s)
|
WHERE (id_grupo IN (%s)
|
||||||
%s) %s',
|
%s) %s',
|
||||||
implode (',', array_keys (users_get_groups ())),
|
implode (',', array_keys (users_get_groups ())),
|
||||||
$search_sql, $sql_extra);
|
$search_sql, $sql_extra);
|
||||||
|
|
||||||
$total_agents = db_get_sql ($sql);
|
$total_agents = db_get_sql ($sql);
|
||||||
|
|
||||||
|
@ -115,8 +115,8 @@ if ($create_action) {
|
|||||||
$field3 = (string) get_parameter ('field3');
|
$field3 = (string) get_parameter ('field3');
|
||||||
$group = (string) get_parameter ('group');
|
$group = (string) get_parameter ('group');
|
||||||
$action_threshold = (int) get_parameter ('action_threshold');
|
$action_threshold = (int) get_parameter ('action_threshold');
|
||||||
$name_check = db_get_value ('name', 'talert_actions', 'name', $name);
|
$name_check = db_get_value ('name', 'talert_actions', 'name', $name);
|
||||||
|
|
||||||
if ($name_check) {
|
if ($name_check) {
|
||||||
$result = '';
|
$result = '';
|
||||||
}
|
}
|
||||||
@ -132,7 +132,7 @@ if ($create_action) {
|
|||||||
' Field1: ' . $field1 . ' Field2: ' . $field2 . ' Field3: ' . $field3 . ' Group: ' . $group .
|
' Field1: ' . $field1 . ' Field2: ' . $field2 . ' Field3: ' . $field3 . ' Group: ' . $group .
|
||||||
' Action threshold: ' . $action_threshold;
|
' Action threshold: ' . $action_threshold;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
db_pandora_audit("Command management", "Create alert action #" . $result, false, false, $info);
|
db_pandora_audit("Command management", "Create alert action #" . $result, false, false, $info);
|
||||||
}
|
}
|
||||||
@ -147,9 +147,9 @@ if ($create_action) {
|
|||||||
|
|
||||||
if ($update_action) {
|
if ($update_action) {
|
||||||
$id = (string) get_parameter ('id');
|
$id = (string) get_parameter ('id');
|
||||||
|
|
||||||
$al_action = alerts_get_alert_action ($id);
|
$al_action = alerts_get_alert_action ($id);
|
||||||
|
|
||||||
if ($al_action !== false){
|
if ($al_action !== false){
|
||||||
if ($al_action['id_group'] == 0){
|
if ($al_action['id_group'] == 0){
|
||||||
if (! check_acl ($config['id_user'], 0, "PM")) {
|
if (! check_acl ($config['id_user'], 0, "PM")) {
|
||||||
@ -157,15 +157,16 @@ if ($update_action) {
|
|||||||
"Trying to access Alert Management");
|
"Trying to access Alert Management");
|
||||||
require ("general/noaccess.php");
|
require ("general/noaccess.php");
|
||||||
exit;
|
exit;
|
||||||
}else
|
}
|
||||||
|
else
|
||||||
// Header
|
// Header
|
||||||
ui_print_page_header (__('Alerts').' » '.__('Alert actions'), "images/god2.png", false, "", true);
|
ui_print_page_header (__('Alerts').' » '.__('Alert actions'), "images/god2.png", false, "", true);
|
||||||
}
|
}
|
||||||
}else
|
}else
|
||||||
// Header
|
// Header
|
||||||
ui_print_page_header (__('Alerts').' » '.__('Alert actions'), "images/god2.png", false, "", true);
|
ui_print_page_header (__('Alerts').' » '.__('Alert actions'), "images/god2.png", false, "", true);
|
||||||
|
|
||||||
|
|
||||||
$name = (string) get_parameter ('name');
|
$name = (string) get_parameter ('name');
|
||||||
$id_alert_command = (int) get_parameter ('id_command');
|
$id_alert_command = (int) get_parameter ('id_command');
|
||||||
$field1 = (string) get_parameter ('field1');
|
$field1 = (string) get_parameter ('field1');
|
||||||
@ -173,7 +174,7 @@ if ($update_action) {
|
|||||||
$field3 = (string) get_parameter ('field3');
|
$field3 = (string) get_parameter ('field3');
|
||||||
$group = get_parameter ('group');
|
$group = get_parameter ('group');
|
||||||
$action_threshold = (int) get_parameter ('action_threshold');
|
$action_threshold = (int) get_parameter ('action_threshold');
|
||||||
|
|
||||||
$values = array ();
|
$values = array ();
|
||||||
$values['name'] = $name;
|
$values['name'] = $name;
|
||||||
$values['id_alert_command'] = $id_alert_command;
|
$values['id_alert_command'] = $id_alert_command;
|
||||||
@ -182,18 +183,18 @@ if ($update_action) {
|
|||||||
$values['field3'] = $field3;
|
$values['field3'] = $field3;
|
||||||
$values['id_group'] = $group;
|
$values['id_group'] = $group;
|
||||||
$values['action_threshold'] = $action_threshold;
|
$values['action_threshold'] = $action_threshold;
|
||||||
|
|
||||||
if (!$name) {
|
if (!$name) {
|
||||||
$result = '';
|
$result = '';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$result = alerts_update_alert_action ($id, $values);
|
$result = alerts_update_alert_action ($id, $values);
|
||||||
|
|
||||||
$info = 'Name: ' . $name . ' ID alert Command: ' . $id_alert_command .
|
$info = 'Name: ' . $name . ' ID alert Command: ' . $id_alert_command .
|
||||||
' Field1: ' . $field1 . ' Field2: ' . $field2 . ' Field3: ' . $field3 . ' Group: ' . $group .
|
' Field1: ' . $field1 . ' Field2: ' . $field2 . ' Field3: ' . $field3 . ' Group: ' . $group .
|
||||||
' Action threshold: ' . $action_threshold;
|
' Action threshold: ' . $action_threshold;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
db_pandora_audit("Command management", "Update alert action #" . $id, false, false, json_encode($values));
|
db_pandora_audit("Command management", "Update alert action #" . $id, false, false, json_encode($values));
|
||||||
}
|
}
|
||||||
@ -208,24 +209,25 @@ if ($update_action) {
|
|||||||
|
|
||||||
if ($delete_action) {
|
if ($delete_action) {
|
||||||
$id = get_parameter ('id');
|
$id = get_parameter ('id');
|
||||||
|
|
||||||
$al_action = alerts_get_alert_action ($id);
|
$al_action = alerts_get_alert_action ($id);
|
||||||
|
|
||||||
if ($al_action !== false){
|
if ($al_action !== false) {
|
||||||
// If user tries to delete an action with group=ALL
|
// If user tries to delete an action with group=ALL
|
||||||
if ($al_action['id_group'] == 0){
|
if ($al_action['id_group'] == 0) {
|
||||||
// then must have "PM" access privileges
|
// then must have "PM" access privileges
|
||||||
if (! check_acl ($config['id_user'], 0, "PM")) {
|
if (! check_acl ($config['id_user'], 0, "PM")) {
|
||||||
db_pandora_audit("ACL Violation",
|
db_pandora_audit("ACL Violation",
|
||||||
"Trying to access Alert Management");
|
"Trying to access Alert Management");
|
||||||
require ("general/noaccess.php");
|
require ("general/noaccess.php");
|
||||||
exit;
|
exit;
|
||||||
}else
|
}
|
||||||
|
else
|
||||||
// Header
|
// Header
|
||||||
ui_print_page_header (__('Alerts').' » '.__('Alert actions'), "images/god2.png", false, "", true);
|
ui_print_page_header (__('Alerts').' » '.__('Alert actions'), "images/god2.png", false, "", true);
|
||||||
// If user tries to delete an action of others groups
|
// If user tries to delete an action of others groups
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
$own_info = get_user_info ($config['id_user']);
|
$own_info = get_user_info ($config['id_user']);
|
||||||
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
|
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
|
||||||
$own_groups = array_keys(users_get_groups($config['id_user'], "LM"));
|
$own_groups = array_keys(users_get_groups($config['id_user'], "LM"));
|
||||||
@ -236,19 +238,19 @@ if ($delete_action) {
|
|||||||
if ($is_in_group)
|
if ($is_in_group)
|
||||||
// Header
|
// Header
|
||||||
ui_print_page_header (__('Alerts').' » '.__('Alert actions'), "images/god2.png", false, "", true);
|
ui_print_page_header (__('Alerts').' » '.__('Alert actions'), "images/god2.png", false, "", true);
|
||||||
else{
|
else {
|
||||||
db_pandora_audit("ACL Violation",
|
db_pandora_audit("ACL Violation",
|
||||||
"Trying to access Alert Management");
|
"Trying to access Alert Management");
|
||||||
require ("general/noaccess.php");
|
require ("general/noaccess.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
// Header
|
// Header
|
||||||
ui_print_page_header (__('Alerts').' » '.__('Alert actions'), "images/god2.png", false, "", true);
|
ui_print_page_header (__('Alerts').' » '.__('Alert actions'), "images/god2.png", false, "", true);
|
||||||
|
|
||||||
|
|
||||||
$result = alerts_delete_alert_action ($id);
|
$result = alerts_delete_alert_action ($id);
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
@ -322,4 +324,4 @@ html_print_submit_button (__('Create'), 'create', false, 'class="sub next"');
|
|||||||
html_print_input_hidden ('create_alert', 1);
|
html_print_input_hidden ('create_alert', 1);
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
?>
|
?>
|
@ -84,14 +84,14 @@ if ($groups_user === false) {
|
|||||||
$groups_id = implode(',', array_keys($groups_user));
|
$groups_id = implode(',', array_keys($groups_user));
|
||||||
|
|
||||||
$form_filter .= "<tr>\n";
|
$form_filter .= "<tr>\n";
|
||||||
switch ($config["dbtype"]) {
|
switch ($config["dbtype"]) {
|
||||||
case "mysql":
|
case "mysql":
|
||||||
case "postgresql":
|
case "postgresql":
|
||||||
$temp = db_get_all_rows_sql("SELECT id, name FROM talert_actions WHERE id_group IN ($groups_id);");
|
$temp = db_get_all_rows_sql("SELECT id, name FROM talert_actions WHERE id_group IN ($groups_id);");
|
||||||
break;
|
break;
|
||||||
case "oracle":
|
case "oracle":
|
||||||
$temp = db_get_all_rows_sql("SELECT id, name FROM talert_actions WHERE id_group IN ($groups_id)");
|
$temp = db_get_all_rows_sql("SELECT id, name FROM talert_actions WHERE id_group IN ($groups_id)");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$arrayActions = array();
|
$arrayActions = array();
|
||||||
|
@ -104,7 +104,7 @@ $data[2] .= '</span>';
|
|||||||
$users_profiles = "";
|
$users_profiles = "";
|
||||||
|
|
||||||
$data[2] .= html_print_select (users_get_info(), 'users_id[]', '', '', '',
|
$data[2] .= html_print_select (users_get_info(), 'users_id[]', '', '', '',
|
||||||
'', true, true, true, '', false, 'width: 100%');
|
'', true, true, true, '', false, 'width: 100%');
|
||||||
|
|
||||||
|
|
||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
|
@ -664,4 +664,4 @@ function process_manage_edit ($module_name, $agents_select = null) {
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
@ -58,7 +58,7 @@ $exception_condition_value = 10;
|
|||||||
$modulegroup = 0;
|
$modulegroup = 0;
|
||||||
$period = 86400;
|
$period = 86400;
|
||||||
// Added support for projection graphs
|
// Added support for projection graphs
|
||||||
$period_pg = 432000;
|
$period_pg = 432000;
|
||||||
$projection_period = 432000;
|
$projection_period = 432000;
|
||||||
$only_display_wrong = 0;
|
$only_display_wrong = 0;
|
||||||
// Added support for prediction date report
|
// Added support for prediction date report
|
||||||
@ -93,7 +93,7 @@ switch ($action) {
|
|||||||
$actionParameter = 'update';
|
$actionParameter = 'update';
|
||||||
$item = db_get_row_filter('treport_content', array('id_rc' => $idItem));
|
$item = db_get_row_filter('treport_content', array('id_rc' => $idItem));
|
||||||
$server_name = $item ['server_name'];
|
$server_name = $item ['server_name'];
|
||||||
|
|
||||||
// Metaconsole db connection
|
// Metaconsole db connection
|
||||||
if (($config ['metaconsole'] == 1) && ($server_name != '') && defined('METACONSOLE')) {
|
if (($config ['metaconsole'] == 1) && ($server_name != '') && defined('METACONSOLE')) {
|
||||||
$connection = metaconsole_get_connection($server_name);
|
$connection = metaconsole_get_connection($server_name);
|
||||||
@ -101,12 +101,12 @@ switch ($action) {
|
|||||||
//ui_print_error_message ("Error connecting to ".$server_name);
|
//ui_print_error_message ("Error connecting to ".$server_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$style = json_decode(io_safe_output($item['style']), true);
|
$style = json_decode(io_safe_output($item['style']), true);
|
||||||
$show_in_two_columns = $style['show_in_two_columns'];
|
$show_in_two_columns = $style['show_in_two_columns'];
|
||||||
$show_in_landscape = $style['show_in_landscape'];
|
$show_in_landscape = $style['show_in_landscape'];
|
||||||
$type = $item['type'];
|
$type = $item['type'];
|
||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'avg_value':
|
case 'avg_value':
|
||||||
$period = $item['period'];
|
$period = $item['period'];
|
||||||
@ -517,6 +517,12 @@ html_print_input_hidden('id_item', $idItem);
|
|||||||
$params['hidden_input_idagent_id'] = 'hidden-id_agent';
|
$params['hidden_input_idagent_id'] = 'hidden-id_agent';
|
||||||
$params['use_input_server'] = true;
|
$params['use_input_server'] = true;
|
||||||
$params['input_server_id'] = 'hidden-server_name';
|
$params['input_server_id'] = 'hidden-server_name';
|
||||||
|
if (($config['metaconsole'] == 1) &&
|
||||||
|
(defined('METACONSOLE'))) {
|
||||||
|
//It is a page in the new metaconsole.
|
||||||
|
$params['metaconsole_enabled'] = true;
|
||||||
|
$params['javascript_ajax_page'] = '../../ajax.php';
|
||||||
|
}
|
||||||
ui_print_agent_autocomplete_input($params);
|
ui_print_agent_autocomplete_input($params);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -78,18 +78,18 @@ if ((isset ($_GET["update"])) OR ((isset ($_GET["create"])))) {
|
|||||||
$id_network_profile = get_parameter_post ("id_network_profile");
|
$id_network_profile = get_parameter_post ("id_network_profile");
|
||||||
$recon_ports = get_parameter_post ("recon_ports", "");
|
$recon_ports = get_parameter_post ("recon_ports", "");
|
||||||
$id_os = get_parameter_post ("id_os", 10);
|
$id_os = get_parameter_post ("id_os", 10);
|
||||||
$snmp_community = get_parameter_post ("snmp_community", "public");
|
$snmp_community = get_parameter_post ("snmp_community", "public");
|
||||||
$id_recon_script = get_parameter ("id_recon_script", 'NULL');
|
$id_recon_script = get_parameter ("id_recon_script", 'NULL');
|
||||||
$mode = get_parameter ("mode", "");
|
$mode = get_parameter ("mode", "");
|
||||||
$field1 = get_parameter ("field1", "");
|
$field1 = get_parameter ("field1", "");
|
||||||
$field2 = get_parameter ("field2", "");
|
$field2 = get_parameter ("field2", "");
|
||||||
$field3 = get_parameter ("field3", "");
|
$field3 = get_parameter ("field3", "");
|
||||||
$field4 = get_parameter ("field4", "");
|
$field4 = get_parameter ("field4", "");
|
||||||
if ($mode == "network_sweep")
|
if ($mode == "network_sweep")
|
||||||
$id_recon_script = 'NULL';
|
$id_recon_script = 'NULL';
|
||||||
else
|
else
|
||||||
$id_network_profile = 0;
|
$id_network_profile = 0;
|
||||||
|
|
||||||
$os_detect = (int) get_parameter ("os_detect", 0);
|
$os_detect = (int) get_parameter ("os_detect", 0);
|
||||||
$resolve_names = (int) get_parameter ("resolve_names", 0);
|
$resolve_names = (int) get_parameter ("resolve_names", 0);
|
||||||
$parent_detection = (int) get_parameter ("parent_detection", 0);
|
$parent_detection = (int) get_parameter ("parent_detection", 0);
|
||||||
|
@ -161,21 +161,21 @@ $table->data[23][0] = __('Default icon in GIS') . ui_print_help_tip(__('Agent ic
|
|||||||
$gis_default_icon = $config["gis_default_icon"];
|
$gis_default_icon = $config["gis_default_icon"];
|
||||||
|
|
||||||
if ($gis_default_icon == '') {
|
if ($gis_default_icon == '') {
|
||||||
$display_icons = 'none';
|
$display_icons = 'none';
|
||||||
// Hack to show no icon. Use any given image to fix not found image errors
|
// Hack to show no icon. Use any given image to fix not found image errors
|
||||||
$path_without = "images/spinner.png";
|
$path_without = "images/spinner.png";
|
||||||
$path_default = "images/spinner.png";
|
$path_default = "images/spinner.png";
|
||||||
$path_ok = "images/spinner.png";
|
$path_ok = "images/spinner.png";
|
||||||
$path_bad = "images/spinner.png";
|
$path_bad = "images/spinner.png";
|
||||||
$path_warning = "images/spinner.png";
|
$path_warning = "images/spinner.png";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$display_icons = '';
|
$display_icons = '';
|
||||||
$path_without = $path . $gis_default_icon . ".default.png";
|
$path_without = $path . $gis_default_icon . ".default.png";
|
||||||
$path_default = $path . $gis_default_icon . ".default.png";
|
$path_default = $path . $gis_default_icon . ".default.png";
|
||||||
$path_ok = $path . $gis_default_icon . ".ok.png";
|
$path_ok = $path . $gis_default_icon . ".ok.png";
|
||||||
$path_bad = $path . $gis_default_icon . ".bad.png";
|
$path_bad = $path . $gis_default_icon . ".bad.png";
|
||||||
$path_warning = $path . $gis_default_icon . ".warning.png";
|
$path_warning = $path . $gis_default_icon . ".warning.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->data[23][1] = html_print_select($arraySelectIcon, "gis_default_icon", $gis_default_icon, "changeIcons();", __('None'), '', true) . ' ' . html_print_image($path_ok, true, array("id" => "icon_ok", "style" => "display:".$display_icons.";")) . ' ' . html_print_image($path_bad, true, array("id" => "icon_bad", "style" => "display:".$display_icons.";")) . ' ' . html_print_image($path_warning, true, array("id" => "icon_warning", "style" => "display:".$display_icons.";"));
|
$table->data[23][1] = html_print_select($arraySelectIcon, "gis_default_icon", $gis_default_icon, "changeIcons();", __('None'), '', true) . ' ' . html_print_image($path_ok, true, array("id" => "icon_ok", "style" => "display:".$display_icons.";")) . ' ' . html_print_image($path_bad, true, array("id" => "icon_bad", "style" => "display:".$display_icons.";")) . ' ' . html_print_image($path_warning, true, array("id" => "icon_warning", "style" => "display:".$display_icons.";"));
|
||||||
|
@ -231,7 +231,8 @@ elseif ($search_agents_2 && ($config['metaconsole'] == 1) && defined('METACONSOL
|
|||||||
foreach ($agents as $agent) {
|
foreach ($agents as $agent) {
|
||||||
$data[] = array('id' => $agent['id_agente'],
|
$data[] = array('id' => $agent['id_agente'],
|
||||||
'name' => io_safe_output($agent['nombre']) . " (" . io_safe_output($server['server_name']) . ") ",
|
'name' => io_safe_output($agent['nombre']) . " (" . io_safe_output($server['server_name']) . ") ",
|
||||||
'ip' => io_safe_output($agent['direccion']));
|
'ip' => io_safe_output($agent['direccion']),
|
||||||
|
'server' => io_safe_output($server['server_name']));
|
||||||
}
|
}
|
||||||
//Restore db connection
|
//Restore db connection
|
||||||
metaconsole_restore_db();
|
metaconsole_restore_db();
|
||||||
|
@ -1471,7 +1471,7 @@ function api_set_update_data_module($id_module, $thrash1, $other, $thrash3){
|
|||||||
* example 1 (snmp v: 3, snmp3_priv_method: AES, passw|authNoPriv|MD5|pepito_user|example_priv_passw)
|
* example 1 (snmp v: 3, snmp3_priv_method: AES, passw|authNoPriv|MD5|pepito_user|example_priv_passw)
|
||||||
*
|
*
|
||||||
* api.php?op=set&op2=create_snmp_module&id=pepito&other=prueba|0|15|1|10|15||16|18||15|0|127.0.0.1|60|3|public|.1.3.6.1.2.1.1.1.0|180|0|0|0|0|SNMP%20module%20from%20API|AES|example_priv_passw|authNoPriv|MD5|pepito_user|example_auth_passw&other_mode=url_encode_separator_|
|
* api.php?op=set&op2=create_snmp_module&id=pepito&other=prueba|0|15|1|10|15||16|18||15|0|127.0.0.1|60|3|public|.1.3.6.1.2.1.1.1.0|180|0|0|0|0|SNMP%20module%20from%20API|AES|example_priv_passw|authNoPriv|MD5|pepito_user|example_auth_passw&other_mode=url_encode_separator_|
|
||||||
*
|
*
|
||||||
* example 2 (snmp v: 1)
|
* example 2 (snmp v: 1)
|
||||||
*
|
*
|
||||||
* api.php?op=set&op2=create_snmp_module&id=pepito1&other=prueba2|0|15|1|10|15||16|18||15|0|127.0.0.1|60|1|public|.1.3.6.1.2.1.1.1.0|180|0|0|0|0|SNMP module from API&other_mode=url_encode_separator_|
|
* api.php?op=set&op2=create_snmp_module&id=pepito1&other=prueba2|0|15|1|10|15||16|18||15|0|127.0.0.1|60|1|public|.1.3.6.1.2.1.1.1.0|180|0|0|0|0|SNMP module from API&other_mode=url_encode_separator_|
|
||||||
@ -2325,27 +2325,27 @@ function api_get_alert_template($id_template, $thrash1, $other, $thrash3) {
|
|||||||
* @param $thrash3 Don't use.
|
* @param $thrash3 Don't use.
|
||||||
*/
|
*/
|
||||||
function api_get_module_groups($thrash1, $thrash2, $other, $thrash3) {
|
function api_get_module_groups($thrash1, $thrash2, $other, $thrash3) {
|
||||||
|
|
||||||
if (!isset($other['data'][0]))
|
if (!isset($other['data'][0]))
|
||||||
$separator = ';'; // by default
|
$separator = ';'; // by default
|
||||||
else
|
else
|
||||||
$separator = $other['data'][0];
|
$separator = $other['data'][0];
|
||||||
|
|
||||||
$filter = false;
|
$filter = false;
|
||||||
|
|
||||||
$module_groups = @db_get_all_rows_filter ('tmodule_group', $filter);
|
$module_groups = @db_get_all_rows_filter ('tmodule_group', $filter);
|
||||||
|
|
||||||
if ($module_groups !== false) {
|
if ($module_groups !== false) {
|
||||||
$data['type'] = 'array';
|
$data['type'] = 'array';
|
||||||
$data['data'] = $module_groups;
|
$data['data'] = $module_groups;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$module_groups) {
|
if (!$module_groups) {
|
||||||
returnError('error_get_module_groups', __('Error getting module groups.'));
|
returnError('error_get_module_groups', __('Error getting module groups.'));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
returnData('csv', $data, $separator);
|
returnData('csv', $data, $separator);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2361,27 +2361,27 @@ function api_get_module_groups($thrash1, $thrash2, $other, $thrash3) {
|
|||||||
* @param $thrash3 Don't use.
|
* @param $thrash3 Don't use.
|
||||||
*/
|
*/
|
||||||
function api_get_plugins($thrash1, $thrash2, $other, $thrash3) {
|
function api_get_plugins($thrash1, $thrash2, $other, $thrash3) {
|
||||||
|
|
||||||
if (!isset($other['data'][0]))
|
if (!isset($other['data'][0]))
|
||||||
$separator = ';'; // by default
|
$separator = ';'; // by default
|
||||||
else
|
else
|
||||||
$separator = $other['data'][0];
|
$separator = $other['data'][0];
|
||||||
|
|
||||||
$filter = false;
|
$filter = false;
|
||||||
|
|
||||||
$plugins = @db_get_all_rows_filter ('tplugin', $filter);
|
$plugins = @db_get_all_rows_filter ('tplugin', $filter);
|
||||||
|
|
||||||
if ($plugins !== false) {
|
if ($plugins !== false) {
|
||||||
$data['type'] = 'array';
|
$data['type'] = 'array';
|
||||||
$data['data'] = $plugins;
|
$data['data'] = $plugins;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$plugins) {
|
if (!$plugins) {
|
||||||
returnError('error_get_plugins', __('Error getting plugins.'));
|
returnError('error_get_plugins', __('Error getting plugins.'));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
returnData('csv', $data, $separator);
|
returnData('csv', $data, $separator);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2395,16 +2395,16 @@ function api_get_plugins($thrash1, $thrash2, $other, $thrash3) {
|
|||||||
function api_set_create_network_module_from_component($agent_name, $component_name, $thrash1, $thrash2) {
|
function api_set_create_network_module_from_component($agent_name, $component_name, $thrash1, $thrash2) {
|
||||||
$agent_id = agents_get_agent_id($agent_name);
|
$agent_id = agents_get_agent_id($agent_name);
|
||||||
|
|
||||||
if (!$agent_id){
|
if (!$agent_id) {
|
||||||
returnError('error_network_module_from_component', __('Error creating module from network component. Agent doesn\'t exists.'));
|
returnError('error_network_module_from_component', __('Error creating module from network component. Agent doesn\'t exists.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$component= db_get_row ('tnetwork_component', 'name', $component_name);
|
$component= db_get_row ('tnetwork_component', 'name', $component_name);
|
||||||
|
|
||||||
if (!$component){
|
if (!$component) {
|
||||||
returnError('error_network_module_from_component', __('Error creating module from network component. Network component doesn\'t exists.'));
|
returnError('error_network_module_from_component', __('Error creating module from network component. Network component doesn\'t exists.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adapt fields to module structure
|
// Adapt fields to module structure
|
||||||
@ -2416,13 +2416,13 @@ function api_set_create_network_module_from_component($agent_name, $component_na
|
|||||||
unset($component['description']);
|
unset($component['description']);
|
||||||
unset($component['name']);
|
unset($component['name']);
|
||||||
$component['ip_target'] = agents_get_address($agent_id);
|
$component['ip_target'] = agents_get_address($agent_id);
|
||||||
|
|
||||||
// Create module
|
// Create module
|
||||||
$module_id = modules_create_agent_module ($agent_id, $component_name, $component, true);
|
$module_id = modules_create_agent_module ($agent_id, $component_name, $component, true);
|
||||||
|
|
||||||
if (!$module_id){
|
if (!$module_id) {
|
||||||
returnError('error_network_module_from_component', __('Error creating module from network component. Error creating module.'));
|
returnError('error_network_module_from_component', __('Error creating module from network component. Error creating module.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $module_id;
|
return $module_id;
|
||||||
@ -2932,28 +2932,28 @@ function api_set_update_data_module_policy($id, $thrash1, $other, $thrash3) {
|
|||||||
* @param $thrash3 Don't use
|
* @param $thrash3 Don't use
|
||||||
*/
|
*/
|
||||||
function api_set_add_network_module_policy($id, $thrash1, $other, $thrash3) {
|
function api_set_add_network_module_policy($id, $thrash1, $other, $thrash3) {
|
||||||
if ($id == ""){
|
if ($id == "") {
|
||||||
returnError('error_network_data_module_policy', __('Error adding network module to policy. Id_policy cannot be left blank.'));
|
returnError('error_network_data_module_policy', __('Error adding network module to policy. Id_policy cannot be left blank.'));
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if ($other['data'][0] == ""){
|
|
||||||
returnError('error_network_data_module_policy', __('Error adding network module to policy. Module_name cannot be left blank.'));
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($other['data'][1] < 6 or $other['data'][1] > 18){
|
if ($other['data'][0] == "") {
|
||||||
|
returnError('error_network_data_module_policy', __('Error adding network module to policy. Module_name cannot be left blank.'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($other['data'][1] < 6 or $other['data'][1] > 18) {
|
||||||
returnError('error_network_data_module_policy', __('Error adding network module to policy. Id_module_type is not correct for network modules.'));
|
returnError('error_network_data_module_policy', __('Error adding network module to policy. Id_module_type is not correct for network modules.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the module is already in the policy
|
// Check if the module is already in the policy
|
||||||
$name_module_policy = enterprise_hook('policies_get_modules', array($id, array('name'=>$other['data'][0]), 'name'));
|
$name_module_policy = enterprise_hook('policies_get_modules', array($id, array('name'=>$other['data'][0]), 'name'));
|
||||||
|
|
||||||
if ($name_module_policy === ENTERPRISE_NOT_HOOK) {
|
if ($name_module_policy === ENTERPRISE_NOT_HOOK) {
|
||||||
returnError('error_network_data_module_policy', __('Error adding network module to policy.'));
|
returnError('error_network_data_module_policy', __('Error adding network module to policy.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$values = array();
|
$values = array();
|
||||||
$values['id_tipo_modulo'] = $other['data'][1];
|
$values['id_tipo_modulo'] = $other['data'][1];
|
||||||
@ -2969,21 +2969,21 @@ function api_set_add_network_module_policy($id, $thrash1, $other, $thrash3) {
|
|||||||
$values['min_critical'] = $other['data'][11];
|
$values['min_critical'] = $other['data'][11];
|
||||||
$values['max_critical'] = $other['data'][12];
|
$values['max_critical'] = $other['data'][12];
|
||||||
$values['str_critical'] = $other['data'][13];
|
$values['str_critical'] = $other['data'][13];
|
||||||
$values['history_data'] = $other['data'][14];
|
$values['history_data'] = $other['data'][14];
|
||||||
$values['min_ff_event'] = $other['data'][15];
|
$values['min_ff_event'] = $other['data'][15];
|
||||||
$values['disabled'] = $other['data'][16];
|
$values['disabled'] = $other['data'][16];
|
||||||
$values['tcp_port'] = $other['data'][17];
|
$values['tcp_port'] = $other['data'][17];
|
||||||
$values['snmp_community'] = $other['data'][18];
|
$values['snmp_community'] = $other['data'][18];
|
||||||
$values['snmp_oid'] = $other['data'][19];
|
$values['snmp_oid'] = $other['data'][19];
|
||||||
$values['custom_id'] = $other['data'][20];
|
$values['custom_id'] = $other['data'][20];
|
||||||
|
|
||||||
if ($name_module_policy !== false){
|
if ($name_module_policy !== false) {
|
||||||
if ($name_module_policy[0]['name'] == $other['data'][0]){
|
if ($name_module_policy[0]['name'] == $other['data'][0]){
|
||||||
returnError('error_network_data_module_policy', __('Error adding network module to policy. The module is already in the policy.'));
|
returnError('error_network_data_module_policy', __('Error adding network module to policy. The module is already in the policy.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$success = enterprise_hook('policies_create_module', array($other['data'][0], $id, 2, $values, false));
|
$success = enterprise_hook('policies_create_module', array($other['data'][0], $id, 2, $values, false));
|
||||||
|
|
||||||
if ($success)
|
if ($success)
|
||||||
@ -3074,29 +3074,29 @@ function api_set_update_network_module_policy($id, $thrash1, $other, $thrash3) {
|
|||||||
* @param $thrash3 Don't use
|
* @param $thrash3 Don't use
|
||||||
*/
|
*/
|
||||||
function api_set_add_plugin_module_policy($id, $thrash1, $other, $thrash3) {
|
function api_set_add_plugin_module_policy($id, $thrash1, $other, $thrash3) {
|
||||||
if ($id == ""){
|
if ($id == "") {
|
||||||
returnError('error_add_plugin_module_policy', __('Error adding plugin module to policy. Id_policy cannot be left blank.'));
|
returnError('error_add_plugin_module_policy', __('Error adding plugin module to policy. Id_policy cannot be left blank.'));
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if ($other['data'][0] == ""){
|
|
||||||
returnError('error_add_plugin_module_policy', __('Error adding plugin module to policy. Module_name cannot be left blank.'));
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($other['data'][22] == ""){
|
if ($other['data'][0] == "") {
|
||||||
|
returnError('error_add_plugin_module_policy', __('Error adding plugin module to policy. Module_name cannot be left blank.'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($other['data'][22] == "") {
|
||||||
returnError('error_add_plugin_module_policy', __('Error adding plugin module to policy. Id_plugin cannot be left blank.'));
|
returnError('error_add_plugin_module_policy', __('Error adding plugin module to policy. Id_plugin cannot be left blank.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the module is already in the policy
|
// Check if the module is already in the policy
|
||||||
$name_module_policy = enterprise_hook('policies_get_modules', array($id, array('name'=>$other['data'][0]), 'name'));
|
$name_module_policy = enterprise_hook('policies_get_modules', array($id, array('name'=>$other['data'][0]), 'name'));
|
||||||
|
|
||||||
if ($name_module_policy === ENTERPRISE_NOT_HOOK) {
|
if ($name_module_policy === ENTERPRISE_NOT_HOOK) {
|
||||||
returnError('error_add_plugin_module_policy', __('Error adding plugin module to policy.'));
|
returnError('error_add_plugin_module_policy', __('Error adding plugin module to policy.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$values = array();
|
$values = array();
|
||||||
$values['disabled'] = $other['data'][1];
|
$values['disabled'] = $other['data'][1];
|
||||||
$values['id_tipo_modulo'] = $other['data'][2];
|
$values['id_tipo_modulo'] = $other['data'][2];
|
||||||
@ -3111,32 +3111,31 @@ function api_set_add_plugin_module_policy($id, $thrash1, $other, $thrash3) {
|
|||||||
$values['history_data'] = $other['data'][11];
|
$values['history_data'] = $other['data'][11];
|
||||||
$values['tcp_port'] = $other['data'][12];
|
$values['tcp_port'] = $other['data'][12];
|
||||||
$values['snmp_community'] = $other['data'][13];
|
$values['snmp_community'] = $other['data'][13];
|
||||||
$values['snmp_oid'] = $other['data'][14];
|
$values['snmp_oid'] = $other['data'][14];
|
||||||
$values['module_interval'] = $other['data'][15];
|
$values['module_interval'] = $other['data'][15];
|
||||||
$values['post_process'] = $other['data'][16];
|
$values['post_process'] = $other['data'][16];
|
||||||
$values['min'] = $other['data'][17];
|
$values['min'] = $other['data'][17];
|
||||||
$values['max'] = $other['data'][18];
|
$values['max'] = $other['data'][18];
|
||||||
$values['custom_id'] = $other['data'][19];
|
$values['custom_id'] = $other['data'][19];
|
||||||
$values['description'] = $other['data'][20];
|
$values['description'] = $other['data'][20];
|
||||||
$values['id_plugin'] = $other['data'][21];
|
$values['id_plugin'] = $other['data'][21];
|
||||||
$values['plugin_user'] = $other['data'][22];
|
$values['plugin_user'] = $other['data'][22];
|
||||||
$values['plugin_pass'] = $other['data'][23];
|
$values['plugin_pass'] = $other['data'][23];
|
||||||
$values['plugin_parameter'] = $other['data'][24];
|
$values['plugin_parameter'] = $other['data'][24];
|
||||||
|
|
||||||
if ($name_module_policy !== false){
|
if ($name_module_policy !== false) {
|
||||||
if ($name_module_policy[0]['name'] == $other['data'][0]){
|
if ($name_module_policy[0]['name'] == $other['data'][0]) {
|
||||||
returnError('error_add_plugin_module_policy', __('Error adding plugin module to policy. The module is already in the policy.'));
|
returnError('error_add_plugin_module_policy', __('Error adding plugin module to policy. The module is already in the policy.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$success = enterprise_hook('policies_create_module', array($other['data'][0], $id, 4, $values, false));
|
$success = enterprise_hook('policies_create_module', array($other['data'][0], $id, 4, $values, false));
|
||||||
|
|
||||||
if ($success)
|
if ($success)
|
||||||
returnData('string', array('type' => 'string', 'data' => $success));
|
returnData('string', array('type' => 'string', 'data' => $success));
|
||||||
else
|
else
|
||||||
returnError('error_add_plugin_module_policy', 'Error adding plugin module to policy.');
|
returnError('error_add_plugin_module_policy', 'Error adding plugin module to policy.');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -3353,46 +3352,46 @@ function api_set_update_module_in_conf($id_agent, $module_name, $configuration_d
|
|||||||
* @param $thrash3 Don't use
|
* @param $thrash3 Don't use
|
||||||
*/
|
*/
|
||||||
function api_set_add_snmp_module_policy($id, $thrash1, $other, $thrash3) {
|
function api_set_add_snmp_module_policy($id, $thrash1, $other, $thrash3) {
|
||||||
if ($id == ""){
|
if ($id == "") {
|
||||||
returnError('error_add_snmp_module_policy', __('Error adding SNMP module to policy. Id_policy cannot be left blank.'));
|
returnError('error_add_snmp_module_policy', __('Error adding SNMP module to policy. Id_policy cannot be left blank.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($other['data'][0] == ""){
|
if ($other['data'][0] == "") {
|
||||||
returnError('error_add_snmp_module_policy', __('Error adding SNMP module to policy. Module_name cannot be left blank.'));
|
returnError('error_add_snmp_module_policy', __('Error adding SNMP module to policy. Module_name cannot be left blank.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the module is already in the policy
|
// Check if the module is already in the policy
|
||||||
$name_module_policy = enterprise_hook('policies_get_modules', array($id, array('name'=>$other['data'][0]), 'name'));
|
$name_module_policy = enterprise_hook('policies_get_modules', array($id, array('name'=>$other['data'][0]), 'name'));
|
||||||
|
|
||||||
if ($name_module_policy === ENTERPRISE_NOT_HOOK) {
|
if ($name_module_policy === ENTERPRISE_NOT_HOOK) {
|
||||||
returnError('error_add_snmp_module_policy', __('Error adding SNMP module to policy.'));
|
returnError('error_add_snmp_module_policy', __('Error adding SNMP module to policy.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($other['data'][2] < 15 or $other['data'][2] > 18){
|
if ($other['data'][2] < 15 or $other['data'][2] > 18) {
|
||||||
returnError('error_add_snmp_module_policy', __('Error adding SNMP module to policy. Id_module_type is not correct for SNMP modules.'));
|
returnError('error_add_snmp_module_policy', __('Error adding SNMP module to policy. Id_module_type is not correct for SNMP modules.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
# SNMP version 3
|
# SNMP version 3
|
||||||
if ($other['data'][13] == "3"){
|
if ($other['data'][13] == "3") {
|
||||||
|
|
||||||
if ($other['data'][22] != "AES" and $other['data'][22] != "DES"){
|
if ($other['data'][22] != "AES" and $other['data'][22] != "DES") {
|
||||||
returnError('error_add_snmp_module_policy', __('Error in creation SNMP module. snmp3_priv_method doesn\'t exists. Set it to \'AES\' or \'DES\'. '));
|
returnError('error_add_snmp_module_policy', __('Error in creation SNMP module. snmp3_priv_method doesn\'t exists. Set it to \'AES\' or \'DES\'. '));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($other['data'][24] != "authNoPriv" and $other['data'][24] != "authPriv" and $other['data'][24] != "noAuthNoPriv"){
|
if ($other['data'][24] != "authNoPriv" and $other['data'][24] != "authPriv" and $other['data'][24] != "noAuthNoPriv") {
|
||||||
returnError('error_add_snmp_module_policy', __('Error in creation SNMP module. snmp3_sec_level doesn\'t exists. Set it to \'authNoPriv\' or \'authPriv\' or \'noAuthNoPriv\'. '));
|
returnError('error_add_snmp_module_policy', __('Error in creation SNMP module. snmp3_sec_level doesn\'t exists. Set it to \'authNoPriv\' or \'authPriv\' or \'noAuthNoPriv\'. '));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($other['data'][25] != "MD5" and $other['data'][25] != "SHA"){
|
if ($other['data'][25] != "MD5" and $other['data'][25] != "SHA") {
|
||||||
returnError('error_add_snmp_module_policy', __('Error in creation SNMP module. snmp3_auth_method doesn\'t exists. Set it to \'MD5\' or \'SHA\'. '));
|
returnError('error_add_snmp_module_policy', __('Error in creation SNMP module. snmp3_auth_method doesn\'t exists. Set it to \'MD5\' or \'SHA\'. '));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$values = array(
|
$values = array(
|
||||||
'disabled' => $other['data'][1],
|
'disabled' => $other['data'][1],
|
||||||
@ -3404,16 +3403,16 @@ function api_set_add_snmp_module_policy($id, $thrash1, $other, $thrash3) {
|
|||||||
'min_critical' => $other['data'][7],
|
'min_critical' => $other['data'][7],
|
||||||
'max_critical' => $other['data'][8],
|
'max_critical' => $other['data'][8],
|
||||||
'str_critical' => $other['data'][9],
|
'str_critical' => $other['data'][9],
|
||||||
'min_ff_event' => $other['data'][10],
|
'min_ff_event' => $other['data'][10],
|
||||||
'history_data' => $other['data'][11],
|
'history_data' => $other['data'][11],
|
||||||
'tcp_port' => $other['data'][12],
|
'tcp_port' => $other['data'][12],
|
||||||
'tcp_send' => $other['data'][13],
|
'tcp_send' => $other['data'][13],
|
||||||
'snmp_community' => $other['data'][14],
|
'snmp_community' => $other['data'][14],
|
||||||
'snmp_oid' => $other['data'][15],
|
'snmp_oid' => $other['data'][15],
|
||||||
'module_interval' => $other['data'][16],
|
'module_interval' => $other['data'][16],
|
||||||
'post_process' => $other['data'][17],
|
'post_process' => $other['data'][17],
|
||||||
'min' => $other['data'][18],
|
'min' => $other['data'][18],
|
||||||
'max' => $other['data'][19],
|
'max' => $other['data'][19],
|
||||||
'custom_id' => $other['data'][20],
|
'custom_id' => $other['data'][20],
|
||||||
'description' => $other['data'][21],
|
'description' => $other['data'][21],
|
||||||
'custom_string_1' => $other['data'][22],
|
'custom_string_1' => $other['data'][22],
|
||||||
@ -3422,7 +3421,7 @@ function api_set_add_snmp_module_policy($id, $thrash1, $other, $thrash3) {
|
|||||||
'plugin_parameter' => $other['data'][25],
|
'plugin_parameter' => $other['data'][25],
|
||||||
'plugin_user' => $other['data'][26],
|
'plugin_user' => $other['data'][26],
|
||||||
'plugin_pass' => $other['data'][27]
|
'plugin_pass' => $other['data'][27]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$values = array(
|
$values = array(
|
||||||
@ -3435,11 +3434,11 @@ function api_set_add_snmp_module_policy($id, $thrash1, $other, $thrash3) {
|
|||||||
'min_critical' => $other['data'][7],
|
'min_critical' => $other['data'][7],
|
||||||
'max_critical' => $other['data'][8],
|
'max_critical' => $other['data'][8],
|
||||||
'str_critical' => $other['data'][9],
|
'str_critical' => $other['data'][9],
|
||||||
'min_ff_event' => $other['data'][10],
|
'min_ff_event' => $other['data'][10],
|
||||||
'history_data' => $other['data'][11],
|
'history_data' => $other['data'][11],
|
||||||
'tcp_port' => $other['data'][12],
|
'tcp_port' => $other['data'][12],
|
||||||
'tcp_send' => $other['data'][13],
|
'tcp_send' => $other['data'][13],
|
||||||
'snmp_community' => $other['data'][14],
|
'snmp_community' => $other['data'][14],
|
||||||
'snmp_oid' => $other['data'][15],
|
'snmp_oid' => $other['data'][15],
|
||||||
'module_interval' => $other['data'][16],
|
'module_interval' => $other['data'][16],
|
||||||
'post_process' => $other['data'][17],
|
'post_process' => $other['data'][17],
|
||||||
@ -3447,22 +3446,22 @@ function api_set_add_snmp_module_policy($id, $thrash1, $other, $thrash3) {
|
|||||||
'max' => $other['data'][19],
|
'max' => $other['data'][19],
|
||||||
'custom_id' => $other['data'][20],
|
'custom_id' => $other['data'][20],
|
||||||
'description' => $other['data'][21]
|
'description' => $other['data'][21]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($name_module_policy !== false){
|
if ($name_module_policy !== false) {
|
||||||
if ($name_module_policy[0]['name'] == $other['data'][0]){
|
if ($name_module_policy[0]['name'] == $other['data'][0]) {
|
||||||
returnError('error_add_snmp_module_policy', __('Error adding SNMP module to policy. The module is already in the policy.'));
|
returnError('error_add_snmp_module_policy', __('Error adding SNMP module to policy. The module is already in the policy.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$success = enterprise_hook('policies_create_module', array($other['data'][0], $id, 2, $values, false));
|
$success = enterprise_hook('policies_create_module', array($other['data'][0], $id, 2, $values, false));
|
||||||
|
|
||||||
if ($success)
|
if ($success)
|
||||||
returnData('string', array('type' => 'string', 'data' => $success));
|
returnData('string', array('type' => 'string', 'data' => $success));
|
||||||
else
|
else
|
||||||
returnError('error_add_snmp_module_policy', 'Error adding SNMP module to policy.');
|
returnError('error_add_snmp_module_policy', 'Error adding SNMP module to policy.');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ function grafico_modulo_sparse_data ($agent_module_id, $period, $show_events,
|
|||||||
$chart_extra_data = array();
|
$chart_extra_data = array();
|
||||||
$warning_min = 0;
|
$warning_min = 0;
|
||||||
$critical_min = 0;
|
$critical_min = 0;
|
||||||
|
|
||||||
// Set variables
|
// Set variables
|
||||||
if ($date == 0) $date = get_system_time();
|
if ($date == 0) $date = get_system_time();
|
||||||
$datelimit = $date - $period;
|
$datelimit = $date - $period;
|
||||||
@ -3191,4 +3191,4 @@ function grafico_modulo_log4x_format_y_axis ( $number , $decimals=2, $dec_point=
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
@ -154,11 +154,11 @@ function messages_process_read ($message_id, $read = true) {
|
|||||||
*/
|
*/
|
||||||
function messages_get_message ($message_id) {
|
function messages_get_message ($message_id) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$sql = sprintf("SELECT id_usuario_origen, id_usuario_destino, subject, mensaje, timestamp
|
$sql = sprintf("SELECT id_usuario_origen, id_usuario_destino, subject, mensaje, timestamp
|
||||||
FROM tmensajes
|
FROM tmensajes
|
||||||
WHERE id_usuario_destino='%s' AND id_mensaje=%d" , $config["id_user"], $message_id);
|
WHERE id_usuario_destino='%s' AND id_mensaje=%d" , $config["id_user"], $message_id);
|
||||||
$row = db_get_row_sql ($sql);
|
$row = db_get_row_sql ($sql);
|
||||||
|
|
||||||
if (empty ($row)) {
|
if (empty ($row)) {
|
||||||
return false;
|
return false;
|
||||||
@ -178,11 +178,11 @@ function messages_get_message ($message_id) {
|
|||||||
*/
|
*/
|
||||||
function messages_get_message_sent ($message_id) {
|
function messages_get_message_sent ($message_id) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$sql = sprintf("SELECT id_usuario_origen, id_usuario_destino, subject, mensaje, timestamp
|
$sql = sprintf("SELECT id_usuario_origen, id_usuario_destino, subject, mensaje, timestamp
|
||||||
FROM tmensajes
|
FROM tmensajes
|
||||||
WHERE id_usuario_origen='%s' AND id_mensaje=%d" , $config["id_user"], $message_id);
|
WHERE id_usuario_origen='%s' AND id_mensaje=%d" , $config["id_user"], $message_id);
|
||||||
$row = db_get_row_sql ($sql);
|
$row = db_get_row_sql ($sql);
|
||||||
|
|
||||||
if (empty ($row)) {
|
if (empty ($row)) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -2128,18 +2128,43 @@ function ui_print_agent_autocomplete_input($parameters) {
|
|||||||
$none_module_text = $parameters['none_module_text'];
|
$none_module_text = $parameters['none_module_text'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$print_input_server = false; //Default value
|
||||||
|
if (isset($parameters['print_input_server'])) {
|
||||||
|
$print_input_server = $parameters['print_input_server'];
|
||||||
|
}
|
||||||
|
|
||||||
$use_input_server = false; //Default value
|
$use_input_server = false; //Default value
|
||||||
if (isset($parameters['use_input_server'])) {
|
if (isset($parameters['use_input_server'])) {
|
||||||
$use_input_server = $parameters['use_input_server'];
|
$use_input_server = $parameters['use_input_server'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$input_server_id = false; //Default value
|
$input_server_name = uniqid('server_'); //Default value
|
||||||
if (isset($parameters['input_server_id'])) {
|
if (isset($parameters['input_server_id'])) {
|
||||||
$input_server_id = $parameters['input_server_id'];
|
$input_server_id = $parameters['input_server_id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$input_server_id = 'hidden-' . $input_server_name; //Default value
|
||||||
|
if (isset($parameters['input_server_id'])) {
|
||||||
|
$input_server_id = $parameters['input_server_id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$input_server_value = ''; //Default value
|
||||||
|
if (isset($parameters['input_server_value'])) {
|
||||||
|
$input_server_value = $parameters['input_server_value'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$metaconsole_enabled = false; //Default value
|
||||||
|
if (isset($parameters['metaconsole_enabled'])) {
|
||||||
|
$metaconsole_enabled = $parameters['metaconsole_enabled'];
|
||||||
|
}
|
||||||
|
|
||||||
// Javascript configurations
|
// Javascript configurations
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
$javascript_ajax_page = 'ajax.php'; //Default value
|
||||||
|
if (isset($parameters['javascript_ajax_page'])) {
|
||||||
|
$javascript_ajax_page = $parameters['javascript_ajax_page'];
|
||||||
|
}
|
||||||
|
|
||||||
$javascript_function_action_after_select = ''; //Default value
|
$javascript_function_action_after_select = ''; //Default value
|
||||||
$javascript_function_action_after_select_js_call = ''; //Default value
|
$javascript_function_action_after_select_js_call = ''; //Default value
|
||||||
if (isset($parameters['javascript_function_action_after_select'])) {
|
if (isset($parameters['javascript_function_action_after_select'])) {
|
||||||
@ -2199,10 +2224,20 @@ function ui_print_agent_autocomplete_input($parameters) {
|
|||||||
inputs.push ("get_agent_modules_json=1");
|
inputs.push ("get_agent_modules_json=1");
|
||||||
inputs.push ("page=operation/agentes/ver_agente");
|
inputs.push ("page=operation/agentes/ver_agente");
|
||||||
|
|
||||||
|
if (' . ((int)$metaconsole_enabled) . ') {
|
||||||
|
inputs.push ("server_name=" + $("#' . $input_server_id . '").val());
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((' . ((int)$print_hidden_input_idagent) . ')
|
||||||
|
|| (' . ((int)$use_hidden_input_idagent) . ')) {
|
||||||
|
|
||||||
|
inputs.push ("id_agent=" + $("#' . $hidden_input_idagent_id . '").val());
|
||||||
|
}
|
||||||
|
|
||||||
jQuery.ajax ({
|
jQuery.ajax ({
|
||||||
data: inputs.join ("&"),
|
data: inputs.join ("&"),
|
||||||
type: "GET",
|
type: "POST",
|
||||||
url: action="ajax.php",
|
url: action="' . $javascript_ajax_page . '",
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
@ -2304,7 +2339,7 @@ function ui_print_agent_autocomplete_input($parameters) {
|
|||||||
data: data_params,
|
data: data_params,
|
||||||
async: false,
|
async: false,
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: action="ajax.php",
|
url: action="' . $javascript_ajax_page . '",
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
@ -2319,25 +2354,36 @@ function ui_print_agent_autocomplete_input($parameters) {
|
|||||||
select: function( event, ui ) {
|
select: function( event, ui ) {
|
||||||
var agent_name = ui.item.name;
|
var agent_name = ui.item.name;
|
||||||
var agent_id = ui.item.id;
|
var agent_id = ui.item.id;
|
||||||
var server_name = ui.item.ip;
|
var server_name;
|
||||||
|
|
||||||
|
if (' . ((int)$metaconsole_enabled) . ') {
|
||||||
|
server_name = ui.item.server;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
server_name = ui.item.ip;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Put the name
|
//Put the name
|
||||||
$(this).val(agent_name);
|
$(this).val(agent_name);
|
||||||
|
|
||||||
if (' . ((int)$javascript_is_function_select) . ') {
|
|
||||||
' . $javascript_name_function_select . '(agent_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((' . ((int)$print_hidden_input_idagent) . ')
|
if ((' . ((int)$print_hidden_input_idagent) . ')
|
||||||
|| (' . ((int)$use_hidden_input_idagent) . ')) {
|
|| (' . ((int)$use_hidden_input_idagent) . ')) {
|
||||||
$("#' . $hidden_input_idagent_id . '").val(agent_id);
|
$("#' . $hidden_input_idagent_id . '").val(agent_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Put the server id into the hidden input
|
//Put the server id into the hidden input
|
||||||
if (' . ((int)$use_input_server) . ') {
|
if ((' . ((int)$use_input_server) . ')
|
||||||
|
|| (' . ((int)$print_input_server) . ')) {
|
||||||
$("#' . $input_server_id . '").val(server_name);
|
$("#' . $input_server_id . '").val(server_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Call the function to select (example fill the modules)
|
||||||
|
if (' . ((int)$javascript_is_function_select) . ') {
|
||||||
|
' . $javascript_name_function_select . '(agent_name);
|
||||||
|
}
|
||||||
|
|
||||||
//Function to call after the select
|
//Function to call after the select
|
||||||
if (' . ((int)!empty($javascript_function_action_after_select_js_call)) . ') {
|
if (' . ((int)!empty($javascript_function_action_after_select_js_call)) . ') {
|
||||||
' . $javascript_function_action_after_select_js_call . '
|
' . $javascript_function_action_after_select_js_call . '
|
||||||
@ -2409,6 +2455,11 @@ function ui_print_agent_autocomplete_input($parameters) {
|
|||||||
$hidden_input_idagent_value, $hidden_input_idagent_id, true);
|
$hidden_input_idagent_value, $hidden_input_idagent_id, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($print_input_server) {
|
||||||
|
$html .= html_print_input_hidden_extended($input_server_name,
|
||||||
|
$input_server_value, $input_server_id, true);
|
||||||
|
}
|
||||||
|
|
||||||
//Write the javascript
|
//Write the javascript
|
||||||
if ($javascript) {
|
if ($javascript) {
|
||||||
if ($javascript_tags) {
|
if ($javascript_tags) {
|
||||||
|
@ -743,7 +743,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, colors,
|
|||||||
else {
|
else {
|
||||||
$('#timestamp_'+graph_id).text(labels_long[j]);
|
$('#timestamp_'+graph_id).text(labels_long[j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#timestamp_'+graph_id).css('top', plot.offset().top-$('#timestamp_'+graph_id).height()*1.5);
|
$('#timestamp_'+graph_id).css('top', plot.offset().top-$('#timestamp_'+graph_id).height()*1.5);
|
||||||
|
|
||||||
var timesize = $('#timestamp_'+graph_id).width();
|
var timesize = $('#timestamp_'+graph_id).width();
|
||||||
|
@ -119,7 +119,7 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend, $long_in
|
|||||||
$return .= "<div id='timestamp_$graph_id' style='font-size:".$font_size."pt;display:none; position:absolute; background:#fff; border: solid 1px #aaa; padding: 2px; z-index:1000;'></div>";
|
$return .= "<div id='timestamp_$graph_id' style='font-size:".$font_size."pt;display:none; position:absolute; background:#fff; border: solid 1px #aaa; padding: 2px; z-index:1000;'></div>";
|
||||||
$return .= "<div id='$graph_id' class='graph $adapt_key' style='width: ".$width."px; height: ".$height."px;'></div>";
|
$return .= "<div id='$graph_id' class='graph $adapt_key' style='width: ".$width."px; height: ".$height."px;'></div>";
|
||||||
$return .= "<div id='overview_$graph_id' style='display:none; margin-left:0px; margin-top:20px; width: ".$width."px; height:50px;'></div>";
|
$return .= "<div id='overview_$graph_id' style='display:none; margin-left:0px; margin-top:20px; width: ".$width."px; height:50px;'></div>";
|
||||||
|
|
||||||
if ($water_mark != '') {
|
if ($water_mark != '') {
|
||||||
$return .= "<div id='watermark_$graph_id' style='display:none; position:absolute;'><img id='watermark_image_$graph_id' src='$water_mark'></div>";
|
$return .= "<div id='watermark_$graph_id' style='display:none; position:absolute;'><img id='watermark_image_$graph_id' src='$water_mark'></div>";
|
||||||
$watermark = 'true';
|
$watermark = 'true';
|
||||||
@ -131,7 +131,7 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend, $long_in
|
|||||||
// Set a weird separator to serialize and unserialize passing data from php to javascript
|
// Set a weird separator to serialize and unserialize passing data from php to javascript
|
||||||
$separator = ';;::;;';
|
$separator = ';;::;;';
|
||||||
$separator2 = ':,:,,,:,:';
|
$separator2 = ':,:,,,:,:';
|
||||||
|
|
||||||
// Transform data from our format to library format
|
// Transform data from our format to library format
|
||||||
$legend2 = array();
|
$legend2 = array();
|
||||||
$labels = array();
|
$labels = array();
|
||||||
@ -142,8 +142,8 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend, $long_in
|
|||||||
$colors = array();
|
$colors = array();
|
||||||
|
|
||||||
$index = array_keys(reset($chart_data));
|
$index = array_keys(reset($chart_data));
|
||||||
foreach($index as $serie_key) {
|
foreach ($index as $serie_key) {
|
||||||
if(isset($color[$serie_key])) {
|
if (isset($color[$serie_key])) {
|
||||||
$colors[] = $color[$serie_key]['color'];
|
$colors[] = $color[$serie_key]['color'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -157,21 +157,21 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend, $long_in
|
|||||||
foreach($values as $key => $value) {
|
foreach($values as $key => $value) {
|
||||||
$jsvar = "data_".$graph_id."_".$key;
|
$jsvar = "data_".$graph_id."_".$key;
|
||||||
|
|
||||||
if(!isset($serie_types[$key])) {
|
if (!isset($serie_types[$key])) {
|
||||||
$serie_types2[$jsvar] = 'line';
|
$serie_types2[$jsvar] = 'line';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$serie_types2[$jsvar] = $serie_types[$key];
|
$serie_types2[$jsvar] = $serie_types[$key];
|
||||||
}
|
}
|
||||||
|
|
||||||
if($serie_types2[$jsvar] == 'points' && $value == 0) {
|
if ($serie_types2[$jsvar] == 'points' && $value == 0) {
|
||||||
$data[$jsvar][] = 'null';
|
$data[$jsvar][] = 'null';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$data[$jsvar][] = $value;
|
$data[$jsvar][] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!isset($legend[$key])) {
|
if (!isset($legend[$key])) {
|
||||||
$legend2[$jsvar] = 'null';
|
$legend2[$jsvar] = 'null';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -179,7 +179,7 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend, $long_in
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store data series in javascript format
|
// Store data series in javascript format
|
||||||
$jsvars = '';
|
$jsvars = '';
|
||||||
$jsseries = array();
|
$jsseries = array();
|
||||||
@ -200,23 +200,23 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend, $long_in
|
|||||||
|
|
||||||
// Max is "n-1" because start with 0
|
// Max is "n-1" because start with 0
|
||||||
$max_x--;
|
$max_x--;
|
||||||
|
|
||||||
if($menu) {
|
if ($menu) {
|
||||||
$threshold = false;
|
$threshold = false;
|
||||||
if($yellow_threshold != 0 || $red_threshold != 0) {
|
if ($yellow_threshold != 0 || $red_threshold != 0) {
|
||||||
$threshold = true;
|
$threshold = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$nbuttons = 2;
|
$nbuttons = 2;
|
||||||
|
|
||||||
if($threshold) {
|
if ($threshold) {
|
||||||
$nbuttons++;
|
$nbuttons++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$menu_width = 18 * $nbuttons + 8;
|
$menu_width = 18 * $nbuttons + 8;
|
||||||
$return .= "<div id='menu_$graph_id' style='display:none; text-align:center; width:".$menu_width."px; position:relative; border: solid 1px #666; border-bottom: 0px; padding: 4px 4px 4px 4px'>
|
$return .= "<div id='menu_$graph_id' style='display:none; text-align:center; width:".$menu_width."px; position:relative; border: solid 1px #666; border-bottom: 0px; padding: 4px 4px 4px 4px'>
|
||||||
<a href='javascript:'><img id='menu_cancelzoom_$graph_id' src='".$homeurl."images/zoom_cross.disabled.png' alt='".__('Cancel zoom')."' title='".__('Cancel zoom')."'></a>";
|
<a href='javascript:'><img id='menu_cancelzoom_$graph_id' src='".$homeurl."images/zoom_cross.disabled.png' alt='".__('Cancel zoom')."' title='".__('Cancel zoom')."'></a>";
|
||||||
if($threshold) {
|
if ($threshold) {
|
||||||
$return .= "<a href='javascript:'><img id='menu_threshold_$graph_id' src='".$homeurl."images/chart_curve_threshold.png' alt='".__('Warning and Critical thresholds')."' title='".__('Warning and Critical thresholds')."'></a>";
|
$return .= "<a href='javascript:'><img id='menu_threshold_$graph_id' src='".$homeurl."images/chart_curve_threshold.png' alt='".__('Warning and Critical thresholds')."' title='".__('Warning and Critical thresholds')."'></a>";
|
||||||
}
|
}
|
||||||
$return .= "<a href='javascript:'><img id='menu_overview_$graph_id' src='".$homeurl."images/chart_curve_overview.png' alt='".__('Overview graph')."' title='".__('Overview graph')."'></a>
|
$return .= "<a href='javascript:'><img id='menu_overview_$graph_id' src='".$homeurl."images/chart_curve_overview.png' alt='".__('Overview graph')."' title='".__('Overview graph')."'></a>
|
||||||
@ -224,9 +224,9 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend, $long_in
|
|||||||
}
|
}
|
||||||
$extra_height = $height - 50;
|
$extra_height = $height - 50;
|
||||||
$extra_width = (int)($width / 3);
|
$extra_width = (int)($width / 3);
|
||||||
|
|
||||||
$return .= "<div id='extra_$graph_id' style='font-size: ".$font_size."pt; display:none; position:absolute; overflow: auto; height: ".$extra_height."px; width: ".$extra_width."px; background:#fff; padding: 2px 2px 2px 2px; border: solid #000 1px;'></div>";
|
$return .= "<div id='extra_$graph_id' style='font-size: ".$font_size."pt; display:none; position:absolute; overflow: auto; height: ".$extra_height."px; width: ".$extra_width."px; background:#fff; padding: 2px 2px 2px 2px; border: solid #000 1px;'></div>";
|
||||||
|
|
||||||
// Process extra data
|
// Process extra data
|
||||||
$events = array();
|
$events = array();
|
||||||
$event_ids = array();
|
$event_ids = array();
|
||||||
@ -235,8 +235,8 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend, $long_in
|
|||||||
$legend_events = '';
|
$legend_events = '';
|
||||||
$legend_alerts = '';
|
$legend_alerts = '';
|
||||||
|
|
||||||
foreach($chart_extra_data as $i => $data) {
|
foreach ($chart_extra_data as $i => $data) {
|
||||||
switch($i) {
|
switch ($i) {
|
||||||
case 'legend_alerts':
|
case 'legend_alerts':
|
||||||
$legend_alerts = $data;
|
$legend_alerts = $data;
|
||||||
break;
|
break;
|
||||||
@ -275,7 +275,7 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend, $long_in
|
|||||||
$colors = implode($separator, $colors);
|
$colors = implode($separator, $colors);
|
||||||
|
|
||||||
// transform into string to pass to javascript
|
// transform into string to pass to javascript
|
||||||
if($force_integer) {
|
if ($force_integer) {
|
||||||
$force_integer = 'true';
|
$force_integer = 'true';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -353,7 +353,7 @@ function flot_hcolumn_chart ($graph_data, $width, $height, $water_mark) {
|
|||||||
$return .= "<div id='$graph_id' class='graph' style='width: ".$width."px; height: ".$height."px;'></div>";
|
$return .= "<div id='$graph_id' class='graph' style='width: ".$width."px; height: ".$height."px;'></div>";
|
||||||
$return .= "<div id='value_$graph_id' style='display:none; position:absolute; background:#fff; border: solid 1px #aaa; padding: 2px'></div>";
|
$return .= "<div id='value_$graph_id' style='display:none; position:absolute; background:#fff; border: solid 1px #aaa; padding: 2px'></div>";
|
||||||
|
|
||||||
if($water_mark != '') {
|
if ($water_mark != '') {
|
||||||
$return .= "<div id='watermark_$graph_id' style='display:none; position:absolute;'><img id='watermark_image_$graph_id' src='$water_mark'></div>";
|
$return .= "<div id='watermark_$graph_id' style='display:none; position:absolute;'><img id='watermark_image_$graph_id' src='$water_mark'></div>";
|
||||||
$watermark = 'true';
|
$watermark = 'true';
|
||||||
}
|
}
|
||||||
@ -364,22 +364,22 @@ function flot_hcolumn_chart ($graph_data, $width, $height, $water_mark) {
|
|||||||
// Set a weird separator to serialize and unserialize passing data from php to javascript
|
// Set a weird separator to serialize and unserialize passing data from php to javascript
|
||||||
$separator = ';;::;;';
|
$separator = ';;::;;';
|
||||||
$separator2 = ':,:,,,:,:';
|
$separator2 = ':,:,,,:,:';
|
||||||
|
|
||||||
// Transform data from our format to library format
|
// Transform data from our format to library format
|
||||||
$labels = array();
|
$labels = array();
|
||||||
$a = array();
|
$a = array();
|
||||||
$vars = array();
|
$vars = array();
|
||||||
|
|
||||||
$max = 0;
|
$max = 0;
|
||||||
$i = count($graph_data);
|
$i = count($graph_data);
|
||||||
foreach($graph_data as $label => $values) {
|
foreach ($graph_data as $label => $values) {
|
||||||
$labels[] = io_safe_output($label);
|
$labels[] = io_safe_output($label);
|
||||||
$i--;
|
$i--;
|
||||||
|
|
||||||
foreach($values as $key => $value) {
|
foreach ($values as $key => $value) {
|
||||||
$jsvar = "data_".$graph_id."_".$key;
|
$jsvar = "data_".$graph_id."_".$key;
|
||||||
|
|
||||||
if($multicolor) {
|
if ($multicolor) {
|
||||||
for($j = count($graph_data) - 1; $j>=0; $j--) {
|
for($j = count($graph_data) - 1; $j>=0; $j--) {
|
||||||
if($j == $i) {
|
if($j == $i) {
|
||||||
$data[$jsvar.$i][$j] = $value;
|
$data[$jsvar.$i][$j] = $value;
|
||||||
@ -408,25 +408,25 @@ function flot_hcolumn_chart ($graph_data, $width, $height, $water_mark) {
|
|||||||
$jsseries = array();
|
$jsseries = array();
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
$values2 = array();
|
$values2 = array();
|
||||||
|
|
||||||
foreach($data as $jsvar => $values) {
|
foreach ($data as $jsvar => $values) {
|
||||||
$values2[] = implode($separator,$values);
|
$values2[] = implode($separator,$values);
|
||||||
}
|
}
|
||||||
|
|
||||||
$values = implode($separator2, $values2);
|
$values = implode($separator2, $values2);
|
||||||
|
|
||||||
$jsseries = implode(',', $jsseries);
|
$jsseries = implode(',', $jsseries);
|
||||||
|
|
||||||
|
|
||||||
// Javascript code
|
// Javascript code
|
||||||
$return .= "<script type='text/javascript'>";
|
$return .= "<script type='text/javascript'>";
|
||||||
|
|
||||||
$return .= "pandoraFlotHBars('$graph_id', '$values', '$labels', false, $max, '$water_mark', '$separator', '$separator2')";
|
$return .= "pandoraFlotHBars('$graph_id', '$values', '$labels', false, $max, '$water_mark', '$separator', '$separator2')";
|
||||||
|
|
||||||
$return .= "</script>";
|
$return .= "</script>";
|
||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -447,7 +447,7 @@ function flot_vcolumn_chart ($graph_data, $width, $height, $color, $legend, $lon
|
|||||||
$return .= "<div id='$graph_id' class='graph $adapt_key' style='width: ".$width."px; height: ".$height."px;'></div>";
|
$return .= "<div id='$graph_id' class='graph $adapt_key' style='width: ".$width."px; height: ".$height."px;'></div>";
|
||||||
$return .= "<div id='value_$graph_id' style='display:none; position:absolute; background:#fff; border: solid 1px #aaa; padding: 2px'></div>";
|
$return .= "<div id='value_$graph_id' style='display:none; position:absolute; background:#fff; border: solid 1px #aaa; padding: 2px'></div>";
|
||||||
|
|
||||||
if($water_mark != '') {
|
if ($water_mark != '') {
|
||||||
$return .= "<div id='watermark_$graph_id' style='display:none; position:absolute;'><img id='watermark_image_$graph_id' src='$water_mark'></div>";
|
$return .= "<div id='watermark_$graph_id' style='display:none; position:absolute;'><img id='watermark_image_$graph_id' src='$water_mark'></div>";
|
||||||
$watermark = 'true';
|
$watermark = 'true';
|
||||||
}
|
}
|
||||||
@ -457,32 +457,32 @@ function flot_vcolumn_chart ($graph_data, $width, $height, $color, $legend, $lon
|
|||||||
|
|
||||||
$colors = array();
|
$colors = array();
|
||||||
$index = array_keys(reset($graph_data));
|
$index = array_keys(reset($graph_data));
|
||||||
|
|
||||||
foreach($index as $serie_key) {
|
foreach ($index as $serie_key) {
|
||||||
if(isset($color[$serie_key])) {
|
if (isset($color[$serie_key])) {
|
||||||
$colors[] = $color[$serie_key]['color'];
|
$colors[] = $color[$serie_key]['color'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$colors[] = '';
|
$colors[] = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set a weird separator to serialize and unserialize passing data from php to javascript
|
// Set a weird separator to serialize and unserialize passing data from php to javascript
|
||||||
$separator = ';;::;;';
|
$separator = ';;::;;';
|
||||||
$separator2 = ':,:,,,:,:';
|
$separator2 = ':,:,,,:,:';
|
||||||
|
|
||||||
// Transform data from our format to library format
|
// Transform data from our format to library format
|
||||||
$labels = array();
|
$labels = array();
|
||||||
$a = array();
|
$a = array();
|
||||||
$vars = array();
|
$vars = array();
|
||||||
|
|
||||||
$max = 0;
|
$max = 0;
|
||||||
$i = count($graph_data);
|
$i = count($graph_data);
|
||||||
foreach($graph_data as $label => $values) {
|
foreach ($graph_data as $label => $values) {
|
||||||
$labels[] = io_safe_output($label);
|
$labels[] = io_safe_output($label);
|
||||||
$i--;
|
$i--;
|
||||||
|
|
||||||
foreach($values as $key => $value) {
|
foreach ($values as $key => $value) {
|
||||||
$jsvar = "data_".$graph_id."_".$key;
|
$jsvar = "data_".$graph_id."_".$key;
|
||||||
|
|
||||||
if($multicolor) {
|
if($multicolor) {
|
||||||
@ -500,7 +500,7 @@ function flot_vcolumn_chart ($graph_data, $width, $height, $color, $legend, $lon
|
|||||||
}
|
}
|
||||||
|
|
||||||
//$return .= "<div id='value_".$i."_$graph_id' class='values_$graph_id' style='color: #000; position:absolute;'>$value</div>";
|
//$return .= "<div id='value_".$i."_$graph_id' class='values_$graph_id' style='color: #000; position:absolute;'>$value</div>";
|
||||||
if($value > $max) {
|
if ($value > $max) {
|
||||||
$max = $value;
|
$max = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -509,30 +509,30 @@ function flot_vcolumn_chart ($graph_data, $width, $height, $color, $legend, $lon
|
|||||||
// Store serialized data to use it from javascript
|
// Store serialized data to use it from javascript
|
||||||
$labels = implode($separator,$labels);
|
$labels = implode($separator,$labels);
|
||||||
$colors = implode($separator, $colors);
|
$colors = implode($separator, $colors);
|
||||||
|
|
||||||
// Store data series in javascript format
|
// Store data series in javascript format
|
||||||
$jsvars = '';
|
$jsvars = '';
|
||||||
$jsseries = array();
|
$jsseries = array();
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
$values2 = array();
|
$values2 = array();
|
||||||
|
|
||||||
foreach($data as $jsvar => $values) {
|
foreach($data as $jsvar => $values) {
|
||||||
$values2[] = implode($separator,$values);
|
$values2[] = implode($separator,$values);
|
||||||
}
|
}
|
||||||
|
|
||||||
$values = implode($separator2, $values2);
|
$values = implode($separator2, $values2);
|
||||||
|
|
||||||
$jsseries = implode(',', $jsseries);
|
$jsseries = implode(',', $jsseries);
|
||||||
|
|
||||||
// Javascript code
|
// Javascript code
|
||||||
$return .= "<script type='text/javascript'>";
|
$return .= "<script type='text/javascript'>";
|
||||||
|
|
||||||
$return .= "pandoraFlotVBars('$graph_id', '$values', '$labels', '$labels', '$legend', '$colors', false, $max, '$water_mark', '$separator', '$separator2')";
|
$return .= "pandoraFlotVBars('$graph_id', '$values', '$labels', '$labels', '$legend', '$colors', false, $max, '$water_mark', '$separator', '$separator2')";
|
||||||
|
|
||||||
$return .= "</script>";
|
$return .= "</script>";
|
||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -593,7 +593,7 @@ function flot_slicesbar_graph ($graph_data, $period, $width, $height, $legend, $
|
|||||||
$intervaltick*= 2;
|
$intervaltick*= 2;
|
||||||
|
|
||||||
$i_aux /= 2;
|
$i_aux /= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
$intervaltick = (int) $intervaltick;
|
$intervaltick = (int) $intervaltick;
|
||||||
$acumulate = 0;
|
$acumulate = 0;
|
||||||
@ -648,12 +648,11 @@ function flot_slicesbar_graph ($graph_data, $period, $width, $height, $legend, $
|
|||||||
|
|
||||||
// Javascript code
|
// Javascript code
|
||||||
$return .= "<script type='text/javascript'>";
|
$return .= "<script type='text/javascript'>";
|
||||||
$return .= "//<![CDATA[\n";
|
$return .= "//<![CDATA[\n";
|
||||||
$return .= "pandoraFlotSlicebar('$graph_id', '$values', '$datacolor', '$labels', '$legend', '$acumulate_data', $intervaltick, false, $max, '$separator', '$separator2')";
|
$return .= "pandoraFlotSlicebar('$graph_id', '$values', '$datacolor', '$labels', '$legend', '$acumulate_data', $intervaltick, false, $max, '$separator', '$separator2')";
|
||||||
$return .= "\n//]]>";
|
$return .= "\n//]]>";
|
||||||
$return .= "</script>";
|
$return .= "</script>";
|
||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
?>
|
||||||
?>
|
|
@ -18,8 +18,8 @@
|
|||||||
check_login();
|
check_login();
|
||||||
|
|
||||||
if (!isset($id_agente)){
|
if (!isset($id_agente)){
|
||||||
require ("general/noaccess.php");
|
require ("general/noaccess.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once ("include/functions_events.php");
|
require_once ("include/functions_events.php");
|
||||||
|
@ -316,10 +316,14 @@ if (is_ajax ()) {
|
|||||||
if ($config ['metaconsole'] == 1 and !$force_local_modules and defined('METACONSOLE')) {
|
if ($config ['metaconsole'] == 1 and !$force_local_modules and defined('METACONSOLE')) {
|
||||||
if (enterprise_include_once ('include/functions_metaconsole.php') !== ENTERPRISE_NOT_HOOK) {
|
if (enterprise_include_once ('include/functions_metaconsole.php') !== ENTERPRISE_NOT_HOOK) {
|
||||||
$connection = metaconsole_get_connection($server_name);
|
$connection = metaconsole_get_connection($server_name);
|
||||||
|
|
||||||
if (metaconsole_load_external_db($connection) == NOERR) {
|
if (metaconsole_load_external_db($connection) == NOERR) {
|
||||||
/* Get all agents if no agent was given */
|
/* Get all agents if no agent was given */
|
||||||
if ($id_agent == 0)
|
if ($id_agent == 0)
|
||||||
$id_agent = array_keys (agents_get_group_agents (array_keys (users_get_groups ()), $search, "none"));
|
$id_agent = array_keys (
|
||||||
|
agents_get_group_agents (
|
||||||
|
array_keys (users_get_groups ()), $search, "none"));
|
||||||
|
|
||||||
|
|
||||||
$agent_modules = agents_get_modules ($id_agent,
|
$agent_modules = agents_get_modules ($id_agent,
|
||||||
($fields != '' ? explode (',', $fields) : "*"),
|
($fields != '' ? explode (',', $fields) : "*"),
|
||||||
|
@ -1135,7 +1135,9 @@ foreach ($result as $event) {
|
|||||||
$string .= '<i>- ' . __('Empty') . ' -</i>';
|
$string .= '<i>- ' . __('Empty') . ' -</i>';
|
||||||
}
|
}
|
||||||
$string .= '</td></tr>';
|
$string .= '</td></tr>';
|
||||||
} else if ($event["criticity"] == 3) {
|
}
|
||||||
|
|
||||||
|
if ($event["criticity"] == 3) {
|
||||||
$string .= '<tr class="' . $odd . '"><td align="left" valign="top">' . '<b>' . __('Warning instructions') . '</td><td align="left">';
|
$string .= '<tr class="' . $odd . '"><td align="left" valign="top">' . '<b>' . __('Warning instructions') . '</td><td align="left">';
|
||||||
if ($event["warning_instructions"] != '') {
|
if ($event["warning_instructions"] != '') {
|
||||||
$string .= $event["warning_instructions"];
|
$string .= $event["warning_instructions"];
|
||||||
@ -1146,7 +1148,9 @@ foreach ($result as $event) {
|
|||||||
$string .= '<i>- ' . __('Empty') . ' -</i>';
|
$string .= '<i>- ' . __('Empty') . ' -</i>';
|
||||||
}
|
}
|
||||||
$string .= '</td></tr>';
|
$string .= '</td></tr>';
|
||||||
} else if ($event["criticity"] == 0) {
|
}
|
||||||
|
|
||||||
|
if ($event["criticity"] == 0) {
|
||||||
$string .= '<tr class="' . $odd . '"><td align="left" valign="top">' . '<b>' . __('Unknown instructions') . '</td><td align="left">';
|
$string .= '<tr class="' . $odd . '"><td align="left" valign="top">' . '<b>' . __('Unknown instructions') . '</td><td align="left">';
|
||||||
if ($event["unknown_instructions"] != '') {
|
if ($event["unknown_instructions"] != '') {
|
||||||
$string .= $event["unknown_instructions"];
|
$string .= $event["unknown_instructions"];
|
||||||
@ -1474,4 +1478,4 @@ $(document).ready( function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
/* ]]> */
|
/* ]]> */
|
||||||
</script>
|
</script>
|
@ -60,7 +60,7 @@ else {
|
|||||||
|
|
||||||
// Skip system messages if user is not PM
|
// Skip system messages if user is not PM
|
||||||
if (!check_acl ($config["id_user"], 0, "PM")) {
|
if (!check_acl ($config["id_user"], 0, "PM")) {
|
||||||
$sql_group_filter .= " AND id_grupo != 0";
|
$sql_group_filter .= " AND id_grupo != 0";
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($config["dbtype"]) {
|
switch ($config["dbtype"]) {
|
||||||
|
@ -27,9 +27,9 @@ $ipOrigin = $_SERVER['REMOTE_ADDR'];
|
|||||||
|
|
||||||
// Uncoment this to activate ACL on RSS Events
|
// Uncoment this to activate ACL on RSS Events
|
||||||
if (!isInACL($ipOrigin)) {
|
if (!isInACL($ipOrigin)) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check user credentials
|
// Check user credentials
|
||||||
$user = get_parameter('user');
|
$user = get_parameter('user');
|
||||||
$hashup = get_parameter('hashup');
|
$hashup = get_parameter('hashup');
|
||||||
|
@ -194,8 +194,8 @@ if (is_ajax ())
|
|||||||
case 'module':
|
case 'module':
|
||||||
//Replace separator token "articapandora_32_pandoraartica_" for " "
|
//Replace separator token "articapandora_32_pandoraartica_" for " "
|
||||||
//example:
|
//example:
|
||||||
// "Load_articapandora_32_pandoraartica_Average"
|
//"Load_articapandora_32_pandoraartica_Average"
|
||||||
// result -> "Load Average"
|
//result -> "Load Average"
|
||||||
$name = str_replace(array('_articapandora_'.ord(' ').'_pandoraartica_', '_articapandora_'.ord('#').'_pandoraartica_','_articapandora_'.ord('/').'_pandoraartica_'),array(' ','#','/'),$id);
|
$name = str_replace(array('_articapandora_'.ord(' ').'_pandoraartica_', '_articapandora_'.ord('#').'_pandoraartica_','_articapandora_'.ord('/').'_pandoraartica_'),array(' ','#','/'),$id);
|
||||||
|
|
||||||
$name = io_safe_input($name);
|
$name = io_safe_input($name);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user