mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
2012-07-10 Miguel de Dios <miguel.dedios@artica.es>
* install.php, operation/reporting/reporting_xml.php, operation/netflow/nf_live_view.php, operation/netflow/nf_view.php, operation/tree.php, operation/agentes/gis_view.php, operation/agentes/estado_monitores.php, operation/agentes/networkmap.php, operation/agentes/datos_agente.php, operation/agentes/alerts_status.php, operation/menu.php, operation/snmpconsole/snmp_view.php, operation/users/user_edit.php, godmode/groups/configure_group.php, godmode/groups/configure_modu_group.php, godmode/agentes/module_manager_editor_prediction.php, godmode/servers/manage_recontask.php, godmode/alerts/alert_compounds.php, godmode/alerts/configure_alert_template.php, godmode/alerts/alert_special_days.php, godmode/setup/links.php, godmode/setup/os.php, godmode/users/configure_profile.php, godmode/events/events.php, godmode/massive/massive_delete_modules.php, godmode/massive/massive_edit_modules.php, godmode/massive/massive_standby_alerts.php, godmode/massive/massive_add_action_alerts.php, godmode/massive/massive_enable_disable_alerts.php, godmode/massive/massive_operations.php, godmode/massive/massive_delete_profiles.php, godmode/modules/manage_network_components.php, godmode/modules/manage_nc_groups.php, godmode/reporting/graph_builder.php, godmode/reporting/reporting_builder.item_editor.php, include/functions_menu.php, include/functions_visual_map.php, include/functions_db.php: cleaned source code style. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6759 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
ae4a12872c
commit
f2c0c0762f
@ -1,3 +1,36 @@
|
||||
2012-07-10 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* install.php, operation/reporting/reporting_xml.php,
|
||||
operation/netflow/nf_live_view.php, operation/netflow/nf_view.php,
|
||||
operation/tree.php, operation/agentes/gis_view.php,
|
||||
operation/agentes/estado_monitores.php,
|
||||
operation/agentes/networkmap.php,
|
||||
operation/agentes/datos_agente.php,
|
||||
operation/agentes/alerts_status.php, operation/menu.php,
|
||||
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
|
||||
godmode/groups/configure_group.php,
|
||||
godmode/groups/configure_modu_group.php,
|
||||
godmode/agentes/module_manager_editor_prediction.php,
|
||||
godmode/servers/manage_recontask.php,
|
||||
godmode/alerts/alert_compounds.php,
|
||||
godmode/alerts/configure_alert_template.php,
|
||||
godmode/alerts/alert_special_days.php, godmode/setup/links.php,
|
||||
godmode/setup/os.php, godmode/users/configure_profile.php,
|
||||
godmode/events/events.php,
|
||||
godmode/massive/massive_delete_modules.php,
|
||||
godmode/massive/massive_edit_modules.php,
|
||||
godmode/massive/massive_standby_alerts.php,
|
||||
godmode/massive/massive_add_action_alerts.php,
|
||||
godmode/massive/massive_enable_disable_alerts.php,
|
||||
godmode/massive/massive_operations.php,
|
||||
godmode/massive/massive_delete_profiles.php,
|
||||
godmode/modules/manage_network_components.php,
|
||||
godmode/modules/manage_nc_groups.php,
|
||||
godmode/reporting/graph_builder.php,
|
||||
godmode/reporting/reporting_builder.item_editor.php,
|
||||
include/functions_menu.php, include/functions_visual_map.php,
|
||||
include/functions_db.php: cleaned source code style.
|
||||
|
||||
2012-07-10 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* extensions/agents_alerts.php, extensions/net_tools.php,
|
||||
|
@ -47,7 +47,7 @@ if ($row !== false && is_array($row)) {
|
||||
|
||||
$first_op = explode('_', reset(array_keys($ops)));
|
||||
|
||||
if(isset($first_op[1]) && $first_op[1] == 'avg') {
|
||||
if (isset($first_op[1]) && $first_op[1] == 'avg') {
|
||||
$is_synthetic_avg = true;
|
||||
}
|
||||
else {
|
||||
@ -63,6 +63,7 @@ if ($row !== false && is_array($row)) {
|
||||
break;
|
||||
default:
|
||||
$prediction_module = $custom_integer_1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -173,5 +174,4 @@ $(document).ready(function() {
|
||||
enterprise_hook('setup_services_synth', array($is_service, $is_synthetic, $is_synthetic_avg, $is_netflow, $ops));
|
||||
?>
|
||||
});
|
||||
|
||||
</script>
|
@ -223,7 +223,8 @@ foreach ($id_alerts as $alert) {
|
||||
if ($alert['disabled']) {
|
||||
$data[0] .= html_print_input_image ('enable', 'images/lightbulb_off.png', 1, '', true);
|
||||
$data[0] .= html_print_input_hidden ('enable_alert', 1, true);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$data[0] .= html_print_input_image ('disable', 'images/lightbulb.png', 1, '', true);
|
||||
$data[0] .= html_print_input_hidden ('disable_alert', 1, true);
|
||||
}
|
||||
@ -244,7 +245,8 @@ foreach ($id_alerts as $alert) {
|
||||
|
||||
if (isset($data)){
|
||||
html_print_table ($table);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
echo "<div class='nf'>".__('No alerts found')."</div>";
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ if ($create_special_day) {
|
||||
}
|
||||
else {
|
||||
$date_check = db_get_value ('date', 'talert_special_days', 'date
|
||||
', $date);
|
||||
', $date);
|
||||
if ($date_check == $date) {
|
||||
$result = '';
|
||||
}
|
||||
|
@ -338,7 +338,7 @@ if ($create_template) {
|
||||
$id_group = get_parameter ("id_group");
|
||||
$name_check = db_get_value ('name', 'talert_templates', 'name', $name);
|
||||
|
||||
switch ($config['dbtype']){
|
||||
switch ($config['dbtype']) {
|
||||
case "mysql":
|
||||
case "postgresql":
|
||||
$values = array ('description' => $description,
|
||||
@ -511,7 +511,8 @@ if ($step == 2) {
|
||||
$table->data[4][1] = html_print_select_from_sql ($sql_query,
|
||||
'default_action', $default_action, '', __('None'), 0,
|
||||
true, false, false).ui_print_help_tip (__('In case you fill any Field 1, Field 2 or Field 3 above, those will replace the corresponding fields of this associated "Default action".'), true);
|
||||
} else if ($step == 3) {
|
||||
}
|
||||
else if ($step == 3) {
|
||||
/* Alert recover */
|
||||
if (! $recovery_notify) {
|
||||
$table->rowstyle = array ();
|
||||
@ -531,7 +532,8 @@ if ($step == 2) {
|
||||
$table->data['field3'][0] = __('Field 3');
|
||||
$table->data['field3'][1] = html_print_textarea ('field3_recovery', 10, 30,
|
||||
$field3_recovery, '', true);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
/* Step 1 by default */
|
||||
$table->size = array ();
|
||||
$table->size[0] = '20%';
|
||||
@ -621,7 +623,8 @@ if ($step == 2) {
|
||||
/* If it's the last step it will redirect to template lists */
|
||||
if ($step >= LAST_STEP) {
|
||||
echo '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/alert_templates">';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
echo '<form method="post">';
|
||||
}
|
||||
html_print_table ($table);
|
||||
@ -630,13 +633,15 @@ echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
if ($id) {
|
||||
html_print_input_hidden ('id', $id);
|
||||
html_print_input_hidden ('update_template', 1);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
html_print_input_hidden ('create_template', 1);
|
||||
}
|
||||
|
||||
if ($step >= LAST_STEP) {
|
||||
html_print_submit_button (__('Finish'), 'finish', false, 'class="sub upd"');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
html_print_input_hidden ('step', $step + 1);
|
||||
html_print_submit_button (__('Next'), 'next', false, 'class="sub next"');
|
||||
}
|
||||
@ -685,7 +690,8 @@ function render_example () {
|
||||
vmax = parseInt ($("input#text-max").attr ("value"));
|
||||
if (isNaN (vmax) || vmax == "") {
|
||||
$("span#max").empty ().append ("0");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$("span#max").empty ().append (vmax);
|
||||
}
|
||||
|
||||
@ -693,7 +699,8 @@ function render_example () {
|
||||
vmin = parseInt ($("input#text-min").attr ("value"));
|
||||
if (isNaN (vmin) || vmin == "") {
|
||||
$("span#min").empty ().append ("0");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$("span#min").empty ().append (vmin);
|
||||
}
|
||||
|
||||
@ -701,7 +708,8 @@ function render_example () {
|
||||
vvalue = $("input#text-value").attr ("value");
|
||||
if (vvalue == "") {
|
||||
$("span#value").empty ().append ("<em><?php echo __('Empty');?></em>");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$("span#value").empty ().append (vvalue);
|
||||
}
|
||||
}
|
||||
|
@ -42,16 +42,20 @@ $buttons = array(
|
||||
html_print_image("images/god6.png", true, array ("title" => __('Custom fields'))) . '</a>'),
|
||||
);
|
||||
|
||||
switch ($section){
|
||||
case 'filter': $buttons['filter']['active'] = true;
|
||||
switch ($section) {
|
||||
case 'filter':
|
||||
$buttons['filter']['active'] = true;
|
||||
$subpage = ' - ' . __('Filters');
|
||||
break;
|
||||
case 'fields': $buttons['fields']['active'] = true;
|
||||
case 'fields':
|
||||
$buttons['fields']['active'] = true;
|
||||
$subpage = ' - ' . __('Custom fields');
|
||||
break;
|
||||
case 'view': $buttons['view']['active'] = true;
|
||||
case 'view':
|
||||
$buttons['view']['active'] = true;
|
||||
break;
|
||||
default: $buttons['filter']['active'] = true;
|
||||
default:
|
||||
$buttons['filter']['active'] = true;
|
||||
$subpage = ' - ' . __('Filters');
|
||||
break;
|
||||
}
|
||||
|
@ -42,7 +42,8 @@ if ($id_group) {
|
||||
$group = db_get_row ('tmodule_group', 'id_mg', $id_group);
|
||||
if ($group) {
|
||||
$name = $group["name"];
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
echo "<h3 class='error'>".__('There was a problem loading group')."</h3>";
|
||||
echo "</table>";
|
||||
echo '</div>';
|
||||
@ -71,11 +72,11 @@ if ($id_group) {
|
||||
html_print_input_hidden ('update_group', 1);
|
||||
html_print_input_hidden ('id_group', $id_group);
|
||||
html_print_submit_button (__('Update'), 'updbutton', false, 'class="sub upd"');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
html_print_input_hidden ('create_group', 1);
|
||||
html_print_submit_button (__('Create'), 'crtbutton', false, 'class="sub wand"');
|
||||
}
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
?>
|
||||
|
||||
|
@ -220,7 +220,8 @@ $(document).ready (function () {
|
||||
$("option", $select_template).remove ();
|
||||
|
||||
jQuery.post ("ajax.php",
|
||||
{"page" : "godmode/massive/massive_add_action_alerts",
|
||||
{
|
||||
"page" : "godmode/massive/massive_add_action_alerts",
|
||||
"get_alerts" : 1,
|
||||
"id_agents[]" : idAgents
|
||||
},
|
||||
@ -230,7 +231,7 @@ $(document).ready (function () {
|
||||
options += "<option value=\""+id+"\">"+value+"</option>";
|
||||
});
|
||||
|
||||
if(options == "") {
|
||||
if (options == "") {
|
||||
options += "<option><?php echo __('None'); ?></option>";
|
||||
}
|
||||
|
||||
@ -249,6 +250,7 @@ $(document).ready (function () {
|
||||
actions = $(this).parents ("div").children ("span.advanced_actions")
|
||||
$("#advanced_actions").removeClass("advanced_actions invisible");
|
||||
$(this).remove ();
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
@ -242,7 +242,7 @@ $groups[0] = __('All');
|
||||
$table->colspan[2][1] = 2;
|
||||
$table->data[2][1] = html_print_select ($groups, 'groups_select',
|
||||
'', true, __('Select'), -1, true, false, true, '', false, 'width:100%').
|
||||
' '.__('Group recursion').' '.html_print_checkbox ("recursion", 1, false, true, false);
|
||||
' ' . __('Group recursion') . ' ' . html_print_checkbox ("recursion", 1, false, true, false);
|
||||
$table->data[2][3] = __('Select all modules of this group').' '.html_print_checkbox_extended ("force_group", 'group', '', '', false, '', 'style="margin-right: 40px;"', true);
|
||||
|
||||
$table->rowstyle[3] = 'vertical-align: top;';
|
||||
|
@ -57,11 +57,11 @@ if ($delete_profiles) {
|
||||
foreach($profiles_id as $profile) {
|
||||
foreach($groups_id as $group) {
|
||||
foreach($users_id as $id_up) {
|
||||
if ($id_up == 0){
|
||||
if ($id_up == 0) {
|
||||
echo '<h3 class="error">'.__('Not deleted. You must select an existing user').'</h3>';
|
||||
$result="";
|
||||
}
|
||||
else{
|
||||
else {
|
||||
$user = (string) db_get_value_filter ('id_usuario', 'tusuario_perfil', array('id_up' => $id_up));
|
||||
|
||||
db_pandora_audit("User management",
|
||||
@ -69,7 +69,6 @@ if ($delete_profiles) {
|
||||
|
||||
$result = profile_delete_user_profile ($user, $id_up);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -205,7 +205,8 @@ $(document).ready (function () {
|
||||
if (this.value != 0) {
|
||||
$("#id_enabled_alerts").enable ();
|
||||
$("#id_disabled_alerts").enable ();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$("#id_enabled_alerts").disable ();
|
||||
$("#id_disabled_alerts").disable ();
|
||||
}
|
||||
@ -307,7 +308,6 @@ $(document).ready (function () {
|
||||
$("option", $select_enabled).remove ();
|
||||
$("option", $select_disabled).remove ();
|
||||
}
|
||||
|
||||
});
|
||||
/* ]]> */
|
||||
</script>
|
@ -45,7 +45,8 @@ else {
|
||||
$options_users = array();
|
||||
}
|
||||
|
||||
$options_modules = array('delete_modules' => __('Massive modules deletion'), 'edit_modules' => __('Massive modules edition'),
|
||||
$options_modules = array('delete_modules' => __('Massive modules deletion'),
|
||||
'edit_modules' => __('Massive modules edition'),
|
||||
'copy_modules' => __('Massive modules copy'));
|
||||
|
||||
$options_policies = array();
|
||||
@ -159,9 +160,8 @@ echo '</div>';
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
|
||||
$(document).ready (function (){
|
||||
|
||||
$('#manage_config_form').submit( function(){
|
||||
$(document).ready (function () {
|
||||
$('#manage_config_form').submit( function() {
|
||||
confirm = confirm(" <?php echo __('Are you sure?'); ?> ");
|
||||
if (confirm)
|
||||
$("#loading").css("display", "");
|
||||
@ -169,7 +169,7 @@ $(document).ready (function (){
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#form_edit').submit( function(){
|
||||
$('#form_edit').submit( function() {
|
||||
confirm = confirm(" <?php echo __('Are you sure?'); ?> ");
|
||||
if (confirm)
|
||||
$("#loading").css("display", "");
|
||||
@ -177,7 +177,7 @@ $(document).ready (function (){
|
||||
return false;
|
||||
});
|
||||
|
||||
$('[id^=form]').submit( function(){
|
||||
$('[id^=form]').submit( function() {
|
||||
confirm = confirm(" <?php echo __('Are you sure?'); ?> ");
|
||||
if (confirm)
|
||||
$("#loading").css("display", "");
|
||||
|
@ -309,7 +309,6 @@ $(document).ready (function () {
|
||||
$("option", $select_not_standby).remove ();
|
||||
$("option", $select_standby).remove ();
|
||||
}
|
||||
|
||||
});
|
||||
/* ]]> */
|
||||
</script>
|
@ -67,7 +67,8 @@ if ($update) {
|
||||
|
||||
if ($name == '') {
|
||||
ui_print_error_message (__('Not updated. Blank name'));
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$result = db_process_sql_update ('tnetwork_component_group',
|
||||
array ('name' => $name,
|
||||
'parent' => $parent),
|
||||
@ -96,7 +97,8 @@ if ($delete) {
|
||||
|
||||
if ($result) {
|
||||
db_pandora_audit( "Module management", "Delete component group #$id");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
db_pandora_audit( "Module management", "Fail try to delete component group #$id");
|
||||
}
|
||||
|
||||
@ -132,7 +134,8 @@ if ($multiple_delete) {
|
||||
$str_ids = implode (',', $ids);
|
||||
if ($result) {
|
||||
db_pandora_audit( "Module management", "Multiple delete component group: $str_ids");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
db_pandora_audit( "Module management", "Fail try to delete component group: $str_ids");
|
||||
}
|
||||
ui_print_result_message ($result,
|
||||
|
@ -166,6 +166,7 @@ if ($update_component) {
|
||||
$custom_string_1 = '';
|
||||
$custom_string_2 = '';
|
||||
$custom_string_3 = '';
|
||||
|
||||
//$name_check = db_get_value ('name', 'tnetwork_component', 'name', $name);
|
||||
if ($type >= 15 && $type <= 18) {
|
||||
// New support for snmp v3
|
||||
@ -238,7 +239,8 @@ if ($delete_component) {
|
||||
|
||||
if ($result) {
|
||||
db_pandora_audit( "Module management", "Delete network component #$id");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
db_pandora_audit( "Module management", "Fail try to delete network component #$id");
|
||||
}
|
||||
|
||||
@ -265,7 +267,8 @@ if ($multiple_delete) {
|
||||
$str_ids = implode (',', $ids);
|
||||
if ($result) {
|
||||
db_pandora_audit( "Module management", "Multiple delete network component: $str_ids");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
db_pandora_audit( "Module management", "Fail try to delete network component: $str_ids");
|
||||
}
|
||||
|
||||
@ -407,7 +410,7 @@ foreach ($components as $component) {
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
|
||||
if(isset($data)) {
|
||||
if (isset($data)) {
|
||||
echo "<form method='post' action='index.php?sec=gmodules&sec2=godmode/modules/manage_network_components&search_id_group=0search_string='>";
|
||||
html_print_input_hidden('multiple_delete', 1);
|
||||
html_print_table ($table);
|
||||
|
@ -187,7 +187,7 @@ if (isset($name))
|
||||
|
||||
// Header
|
||||
$tab = get_parameter("tab", "");
|
||||
switch ($tab){
|
||||
switch ($tab) {
|
||||
case "main":
|
||||
ui_print_page_header ($head, "", false, "graph_builder", true, $buttons);
|
||||
break;
|
||||
|
@ -205,12 +205,15 @@ if (isset($_GET["create"])) {
|
||||
// --------------------------------
|
||||
//Pandora Admin must see all columns
|
||||
if (! check_acl ($config['id_user'], 0, "PM")) {
|
||||
$sql = sprintf('SELECT * FROM trecon_task RT, tusuario_perfil UP WHERE
|
||||
$sql = sprintf('SELECT *
|
||||
FROM trecon_task RT, tusuario_perfil UP
|
||||
WHERE
|
||||
UP.id_usuario = "%s" AND UP.id_grupo = RT.id_group',
|
||||
$config['id_user']);
|
||||
|
||||
$result = db_get_all_rows_sql ($sql);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$result = db_get_all_rows_in_table('trecon_task');
|
||||
}
|
||||
$color=1;
|
||||
@ -226,7 +229,6 @@ if ($result !== false) {
|
||||
$table->style[8] = 'text-align: center;';
|
||||
|
||||
foreach ($result as $row) {
|
||||
|
||||
$data = array();
|
||||
$data[0] = '<a href="index.php?sec=gservers&sec2=godmode/servers/manage_recontask_form&crt=update&update='.$row["id_rt"].'&upd='.$row["id_rt"].'"><b>'.$row["name"].'</b></a>';
|
||||
|
||||
@ -236,11 +238,12 @@ if ($result !== false) {
|
||||
$data[1] =__("N/A");
|
||||
|
||||
|
||||
if ($row["id_recon_script"] == 0){
|
||||
if ($row["id_recon_script"] == 0) {
|
||||
// Network recon task
|
||||
$data[2] = html_print_image ("images/network.png", true, array ("title" => __('Network recon task')))." ";
|
||||
$data[2] .= network_profiles_get_name ($row["id_network_profile"]);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// APP recon task
|
||||
$data[2] = html_print_image ("images/plugin.png", true). " ";
|
||||
$data[2] .= db_get_sql (sprintf("SELECT name FROM trecon_script WHERE id_recon_script = %d", $row["id_recon_script"]));
|
||||
@ -248,9 +251,10 @@ if ($result !== false) {
|
||||
|
||||
|
||||
// GROUP
|
||||
if ($row["id_recon_script"] == 0){
|
||||
if ($row["id_recon_script"] == 0) {
|
||||
$data[3] = ui_print_group_icon ($row["id_group"], true);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$data[3] = "-";
|
||||
}
|
||||
|
||||
@ -258,9 +262,10 @@ if ($result !== false) {
|
||||
$data[4] = (($row["create_incident"] == 1) ? __('Yes') : __('No'));
|
||||
|
||||
// OS
|
||||
if ($row["id_recon_script"] == 0){
|
||||
if ($row["id_recon_script"] == 0) {
|
||||
$data[5] =(($row["id_os"] > 0) ? ui_print_os_icon ($row["id_os"], false, true) : __('Any'));
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$data[5] = "-";
|
||||
}
|
||||
// INTERVAL
|
||||
@ -270,9 +275,10 @@ if ($result !== false) {
|
||||
$data[6] =human_time_description_raw($row["interval_sweep"]);
|
||||
|
||||
// PORTS
|
||||
if ($row["id_recon_script"] == 0){
|
||||
if ($row["id_recon_script"] == 0) {
|
||||
$data[7] = substr($row["recon_ports"],0,15);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$data[7] = "-";
|
||||
}
|
||||
|
||||
@ -292,7 +298,8 @@ if ($result !== false) {
|
||||
|
||||
html_print_table ($table);
|
||||
unset ($table);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
echo '<div class="nf">'.__('There are no recon task configured').'</div>';
|
||||
}
|
||||
|
||||
@ -301,5 +308,4 @@ echo '<form method="post" action="index.php?sec=gservers&sec2=godmode/servers/ma
|
||||
echo html_print_submit_button (__('Create'),"crt",false,'class="sub next"',true);
|
||||
echo '</form>';
|
||||
echo "</div>";
|
||||
|
||||
?>
|
@ -27,7 +27,7 @@ if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_us
|
||||
ui_print_page_header (__('Link management'), "images/extensions.png", false, "", false, "" );
|
||||
|
||||
|
||||
if (isset($_POST["create"])){ // If create
|
||||
if (isset($_POST["create"])) { // If create
|
||||
$name = get_parameter_post ("name");
|
||||
$link = get_parameter_post ("link");
|
||||
|
||||
@ -43,7 +43,7 @@ if (isset($_POST["create"])){ // If create
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_POST["update"])){ // if update
|
||||
if (isset($_POST["update"])) { // if update
|
||||
$id_link = io_safe_input($_POST["id_link"]);
|
||||
$name = io_safe_input($_POST["name"]);
|
||||
$link = io_safe_input($_POST["link"]);
|
||||
@ -58,7 +58,7 @@ if (isset($_POST["update"])){ // if update
|
||||
echo "<h3 class='suc'>".__('Successfully updated')."</h3>";
|
||||
}
|
||||
|
||||
if (isset($_GET["borrar"])){ // if delete
|
||||
if (isset($_GET["borrar"])) { // if delete
|
||||
$id_link = io_safe_input($_GET["borrar"]);
|
||||
|
||||
$result = db_process_sql_delete("tlink", array("id_link" => $id_link));
|
||||
@ -71,8 +71,8 @@ if (isset($_GET["borrar"])){ // if delete
|
||||
}
|
||||
|
||||
// Main form view for Links edit
|
||||
if ((isset($_GET["form_add"])) or (isset($_GET["form_edit"]))){
|
||||
if (isset($_GET["form_edit"])){
|
||||
if ((isset($_GET["form_add"])) or (isset($_GET["form_edit"]))) {
|
||||
if (isset($_GET["form_edit"])) {
|
||||
$creation_mode = 0;
|
||||
$id_link = io_safe_input($_GET["id_link"]);
|
||||
|
||||
@ -128,8 +128,8 @@ else { // Main list view for Links editor
|
||||
|
||||
if (empty($rows)) {
|
||||
echo '<div class="nf">'.__("There isn't links").'</div>';
|
||||
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
echo "<table cellpadding='4' cellspacing='4' class='databox' style='width:98%'>";
|
||||
echo "<th width='180px'>".__('Link name')."</th>";
|
||||
echo "<th width='80px'>".__('Delete')."</th>";
|
||||
|
@ -133,7 +133,6 @@ $buttons = array(
|
||||
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/setup/os&tab=builder">' .
|
||||
html_print_image ("images/config.png", true, array ("title" => __('Builder OS'))) .'</a>'));
|
||||
|
||||
|
||||
$buttons[$tab]['active'] = true;
|
||||
|
||||
// Header
|
||||
|
@ -75,6 +75,7 @@ if ($id_profile || $new_profile) {
|
||||
require ("general/footer.php");
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -143,12 +144,12 @@ if ($id_profile || $new_profile) {
|
||||
if ($new_profile) {
|
||||
html_print_submit_button (__('Add'), "crt", false, 'class="sub wand"');
|
||||
html_print_input_hidden ('create_profile', 1);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
html_print_input_hidden ('id', $id_profile);
|
||||
html_print_input_hidden ('update_profile', 1);
|
||||
html_print_submit_button (__('Update'), "upd", false, 'class="sub upd"');
|
||||
}
|
||||
echo "</div></form>";
|
||||
|
||||
}
|
||||
?>
|
@ -398,7 +398,7 @@ function db_get_row_filter($table, $filter, $fields = false, $where_join = 'AND'
|
||||
function db_get_sql ($sql, $field = 0, $search_history_db = false) {
|
||||
$result = db_get_all_rows_sql ($sql, $search_history_db);
|
||||
|
||||
if($result === false)
|
||||
if ($result === false)
|
||||
return false;
|
||||
|
||||
$ax = 0;
|
||||
|
@ -393,6 +393,7 @@ function menu_get_sec_pages($sec,$menu_hash = false) {
|
||||
else {
|
||||
$menu = json_decode(base64_decode($menu_hash),true);
|
||||
}
|
||||
|
||||
// Get the sec2 of the main section
|
||||
$sec2_array[$menu[$sec]['sec2']] = $menu[$sec]['text'];
|
||||
|
||||
|
@ -943,7 +943,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
||||
}
|
||||
|
||||
$borderStyle = '';
|
||||
if(substr($img,0,1) == '4') {
|
||||
if (substr($img,0,1) == '4') {
|
||||
$img_style['border'] ='2px solid #ffa300;';
|
||||
$img = substr_replace($img, '', 0,1);
|
||||
}
|
||||
@ -1314,7 +1314,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
||||
break;
|
||||
default:
|
||||
enterprise_hook("enterprise_visual_map_print_item",
|
||||
array($layout_data, $status, $colorStatus));
|
||||
array($layout_data, $status, $colorStatus, 'operation'));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1385,14 +1385,14 @@ function visual_map_get_user_layouts ($id_user = 0, $only_names = false, $filter
|
||||
else
|
||||
$groups = users_get_groups ($id_user, 'IR', false);
|
||||
|
||||
if(!empty($groups)) {
|
||||
if (!empty($groups)) {
|
||||
if ($where != '') {
|
||||
$where .= ' AND ';
|
||||
}
|
||||
$where .= sprintf ('id_group IN (%s)', implode (",", array_keys ($groups)));
|
||||
}
|
||||
|
||||
if($where == '') {
|
||||
if ($where == '') {
|
||||
$where = array();
|
||||
}
|
||||
|
||||
|
@ -317,7 +317,6 @@ function parse_oracle_dump($connection, $url, $debug = false) {
|
||||
}
|
||||
|
||||
function oracle_drop_all_objects ($connection) {
|
||||
|
||||
//Drop all objects of the current installation
|
||||
$stmt = oci_parse($connection,
|
||||
"BEGIN " .
|
||||
@ -623,12 +622,11 @@ function install_step3() {
|
||||
";
|
||||
|
||||
if (!$error) {
|
||||
echo " <div align='right'><br>
|
||||
echo "<div align='right'><br>
|
||||
<input type='image' src='images/arrow_next.png' value='Step #4' id='step4'>
|
||||
</div>
|
||||
";
|
||||
</div>";
|
||||
}
|
||||
echo " </form>
|
||||
echo "</form>
|
||||
</div>";
|
||||
|
||||
print_logo_status (4,6);
|
||||
@ -704,7 +702,7 @@ function install_step4() {
|
||||
$step1 = mysql_query ("CREATE DATABASE $dbname");
|
||||
check_generic ($step1, "Creating database '$dbname'");
|
||||
}
|
||||
else{
|
||||
else {
|
||||
$step = 1;
|
||||
}
|
||||
if ($step1 == 1) {
|
||||
@ -847,7 +845,7 @@ function install_step4() {
|
||||
|
||||
check_generic ($step1, "Creating database '$dbname'");
|
||||
}
|
||||
else{
|
||||
else {
|
||||
$step1 = 1;
|
||||
}
|
||||
|
||||
|
@ -18,12 +18,12 @@ global $config;
|
||||
// Login check
|
||||
check_login ();
|
||||
|
||||
if (is_ajax()){
|
||||
if (is_ajax()) {
|
||||
require_once("include/functions_reporting.php");
|
||||
|
||||
$get_alert_fired = get_parameter("get_alert_fired", 0);
|
||||
|
||||
if ($get_alert_fired){
|
||||
if ($get_alert_fired) {
|
||||
// Calculate alerts fired
|
||||
$data_reporting = reporting_get_group_stats();
|
||||
echo $data_reporting['monitor_alerts_fired'];
|
||||
@ -85,7 +85,6 @@ if ($idAgent != 0) {
|
||||
$idGroup = false;
|
||||
|
||||
$print_agent = false;
|
||||
|
||||
}
|
||||
else {
|
||||
if (!check_acl ($config["id_user"], 0, "AR")) {
|
||||
|
@ -77,23 +77,24 @@ if ($moduletype_name == "log4x") {
|
||||
|
||||
if ($selection_mode == "fromnow") {
|
||||
$sql_body = sprintf ("FROM tagente_datos_log4x WHERE id_agente_modulo = %d AND message like '%s' AND utimestamp > %d ORDER BY utimestamp DESC", $module_id, $sql_freestring, get_system_time () - $period);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$sql_body = sprintf ("FROM tagente_datos_log4x WHERE id_agente_modulo = %d AND message like '%s' AND utimestamp >= %d AND utimestamp <= %d ORDER BY utimestamp DESC", $module_id, $sql_freestring, $datetime_from, $datetime_to);
|
||||
}
|
||||
|
||||
$columns = array(
|
||||
|
||||
"Timestamp" => array("utimestamp", "modules_format_timestamp", "align" => "center" ),
|
||||
"Sev" => array("severity", "modules_format_data", "align" => "center", "width" => "70px"),
|
||||
"Message" => array("message", "modules_format_verbatim", "align" => "left", "width" => "45%"),
|
||||
"Message"=> array("message", "modules_format_verbatim", "align" => "left", "width" => "45%"),
|
||||
"StackTrace" => array("stacktrace", "modules_format_verbatim", "align" => "left", "width" => "50%")
|
||||
);
|
||||
|
||||
} else if (preg_match ("/string/", $moduletype_name)) {
|
||||
}
|
||||
else if (preg_match ("/string/", $moduletype_name)) {
|
||||
$sql_freestring = '%' . $freestring . '%';
|
||||
if ($selection_mode == "fromnow") {
|
||||
$sql_body = sprintf (" FROM tagente_datos_string WHERE id_agente_modulo = %d AND datos like '%s' AND utimestamp > %d ORDER BY utimestamp DESC", $module_id, $sql_freestring, get_system_time () - $period);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$sql_body = sprintf (" FROM tagente_datos_string WHERE id_agente_modulo = %d AND datos like '%s' AND utimestamp >= %d AND utimestamp <= %d ORDER BY utimestamp DESC", $module_id, $sql_freestring, $datetime_from, $datetime_to);
|
||||
}
|
||||
|
||||
@ -102,10 +103,12 @@ if ($moduletype_name == "log4x") {
|
||||
"Data" => array("datos", "modules_format_data", "align" => "left"),
|
||||
"Time" => array("utimestamp", "modules_format_time", "align" => "center")
|
||||
);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if ($selection_mode == "fromnow") {
|
||||
$sql_body = sprintf (" FROM tagente_datos WHERE id_agente_modulo = %d AND utimestamp > %d ORDER BY utimestamp DESC", $module_id, get_system_time () - $period);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$sql_body = sprintf (" FROM tagente_datos WHERE id_agente_modulo = %d AND utimestamp >= %d AND utimestamp <= %d ORDER BY utimestamp DESC", $module_id, $datetime_from, $datetime_to);
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ $update_networkmap = get_parameter ('update_networkmap', 0);
|
||||
$recenter_networkmap = get_parameter ('recenter_networkmap', 0);
|
||||
$hidden_options = get_parameter ('hidden_options', 1);
|
||||
|
||||
if($delete_networkmap) {
|
||||
if ($delete_networkmap) {
|
||||
$result = networkmap_delete_networkmap($id_networkmap);
|
||||
$message = ui_print_result_message ($result,
|
||||
__('Network map deleted successfully'),
|
||||
@ -50,7 +50,7 @@ if($delete_networkmap) {
|
||||
$id_networkmap = 0;
|
||||
}
|
||||
|
||||
if($add_networkmap) {
|
||||
if ($add_networkmap) {
|
||||
// Load variables
|
||||
$layout = 'radial';
|
||||
$depth = 'all';
|
||||
@ -103,7 +103,7 @@ if($save_networkmap || $update_networkmap) {
|
||||
$check = db_get_value('name', 'tnetwork_map', 'name', $name);
|
||||
$subcheck = db_get_value('name', 'tnetwork_map', 'id_networkmap', $id_networkmap);
|
||||
|
||||
if($save_networkmap){
|
||||
if($save_networkmap) {
|
||||
if (!$check || $subcheck == $name) {
|
||||
$result = networkmap_update_networkmap($id_networkmap, array('name' => $name, 'type' => $activeTab, 'layout' => $layout,
|
||||
'nooverlap' => $nooverlap, 'simple' => $simple, 'regenerate' => $regen, 'font_size' => $font_size,
|
||||
@ -206,7 +206,7 @@ $buttons['addmap'] = array('active' => $activeTab == false,
|
||||
'text' => '<a href="index.php?sec=network&sec2=operation/agentes/networkmap&add_networkmap=1&tab='.$activeTab.'&pure='.$pure.'">' .
|
||||
html_print_image("images/add.png", true, array ("title" => __('Add map'))) .'</a>');
|
||||
|
||||
if(!$nomaps && $id_networkmap != 0) {
|
||||
if (!$nomaps && $id_networkmap != 0) {
|
||||
$buttons['deletemap'] = array('active' => $activeTab == false,
|
||||
'text' => '<a href="index.php?sec=network&sec2=operation/agentes/networkmap&id_networkmap='.$id_networkmap.'&delete_networkmap=1&tab='.$activeTab.'&pure='.$pure.'">' .
|
||||
html_print_image("images/cross.png", true, array ("title" => __('Delete map'))) .'</a>');
|
||||
|
@ -127,13 +127,13 @@ if (check_acl ($config['id_user'], 0, "AR")) {
|
||||
"godmode/reporting/map_builder",
|
||||
"godmode/reporting/visual_console_builder");
|
||||
|
||||
if (!empty($config['vc_refr'])){
|
||||
if (!empty($config['vc_refr'])) {
|
||||
$sub["godmode/reporting/map_builder"]["refr"] = $config['vc_refr'];
|
||||
}
|
||||
else if (!empty($config['refr'])){
|
||||
else if (!empty($config['refr'])) {
|
||||
$sub["godmode/reporting/map_builder"]["refr"] = $config['refr'];
|
||||
}
|
||||
else{
|
||||
else {
|
||||
$sub["godmode/reporting/map_builder"]["refr"] = 60;
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,8 @@ if ($save != '' && check_acl ($config["id_user"], 0, "AW")) {
|
||||
if ($filter_id === false) {
|
||||
$filter_id = 0;
|
||||
echo '<h3 class="error">'.__ ('Error creating filter').'</h3>';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
echo '<h3 class="suc">'.__ ('Filter created successfully').'</h3>';
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,8 @@ if($update_date){
|
||||
$date = get_parameter_post ('date');
|
||||
$time = get_parameter_post ('time');
|
||||
$interval = get_parameter('period','86400');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$date = date ("Y/m/d", get_system_time ());
|
||||
$time = date ("H:i:s", get_system_time ());
|
||||
$interval ='86400';
|
||||
|
@ -109,10 +109,11 @@ check_login ();
|
||||
|
||||
$id_report = (int) get_parameter ('id');
|
||||
|
||||
if (! $id_report) {
|
||||
if (!$id_report) {
|
||||
db_pandora_audit("HACK Attempt",
|
||||
"Trying to access graph viewer without valid ID");
|
||||
require ("general/noaccess.php");
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -273,7 +274,8 @@ foreach ($contents as $content) {
|
||||
$sla_value = reporting_get_agentmodule_sla ($sla['id_agent_module'], $content['period'], $sla['sla_min'], $sla['sla_max'], $datetime, $content, $content['time_from'], $content['time_to']);
|
||||
if ($sla_value === false) {
|
||||
$sla_data["error"] = __('Unknown');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if ($sla_value < $sla['sla_limit']) {
|
||||
$sla_data["failed"] = true;
|
||||
}
|
||||
@ -288,7 +290,8 @@ foreach ($contents as $content) {
|
||||
$monitor_value = reporting_get_agentmodule_sla ($content['id_agent_module'], $content['period'], 1, false, $datetime);
|
||||
if ($monitor_value === false) {
|
||||
$monitor_value = __('Unknown');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$monitor_value = format_numeric ($monitor_value);
|
||||
}
|
||||
$data["objdata"]["good"] = $monitor_value;
|
||||
@ -303,7 +306,8 @@ foreach ($contents as $content) {
|
||||
$data["objdata"] = reporting_get_agentmodule_data_average ($content['id_agent_module'], $content['period'], $datetime);
|
||||
if ($data["objdata"] === false) {
|
||||
$data["objdata"] = __('Unknown');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$data["objdata"] = format_numeric ($data["objdata"]);
|
||||
}
|
||||
break;
|
||||
@ -313,7 +317,8 @@ foreach ($contents as $content) {
|
||||
$data["objdata"] = reporting_get_agentmodule_data_max ($content['id_agent_module'], $content['period'], $datetime);
|
||||
if ($data["objdata"] === false) {
|
||||
$data["objdata"] = __('Unknown');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$data["objdata"] = format_numeric ($data["objdata"]);
|
||||
}
|
||||
break;
|
||||
@ -323,7 +328,8 @@ foreach ($contents as $content) {
|
||||
$data["objdata"] = reporting_get_agentmodule_data_min ($content['id_agent_module'], $content['period'], $datetime);
|
||||
if ($data["objdata"] === false) {
|
||||
$data["objdata"] = __('Unknown');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$data["objdata"] = format_numeric ($data["objdata"]);
|
||||
}
|
||||
break;
|
||||
@ -333,7 +339,8 @@ foreach ($contents as $content) {
|
||||
$data["objdata"] = reporting_get_agentmodule_data_sum ($content['id_agent_module'], $content['period'], $datetime);
|
||||
if ($data["objdata"] === false) {
|
||||
$data["objdata"] = __('Unknown');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$data["objdata"] = format_numeric ($data["objdata"]);
|
||||
}
|
||||
break;
|
||||
@ -580,7 +587,8 @@ foreach ($contents as $content) {
|
||||
$ttr = reporting_get_agentmodule_ttr ($content['id_agent_module'], $content['period'], $report["datetime"]);
|
||||
if ($ttr === false) {
|
||||
$ttr = __('Unknown');
|
||||
} else if ($ttr != 0) {
|
||||
}
|
||||
else if ($ttr != 0) {
|
||||
$ttr = human_time_description_raw ($ttr);
|
||||
}
|
||||
|
||||
@ -591,7 +599,8 @@ foreach ($contents as $content) {
|
||||
$tto = reporting_get_agentmodule_tto ($content['id_agent_module'], $content['period'], $report["datetime"]);
|
||||
if ($tto === false) {
|
||||
$tto = __('Unknown');
|
||||
} else if ($tto != 0) {
|
||||
}
|
||||
else if ($tto != 0) {
|
||||
$tto = human_time_description_raw ($tto);
|
||||
}
|
||||
|
||||
@ -602,7 +611,8 @@ foreach ($contents as $content) {
|
||||
$mtbf = reporting_get_agentmodule_mtbf ($content['id_agent_module'], $content['period'], $report["datetime"]);
|
||||
if ($mtbf === false) {
|
||||
$mtbf = __('Unknown');
|
||||
} else if ($mtbf != 0) {
|
||||
}
|
||||
else if ($mtbf != 0) {
|
||||
$mtbf = human_time_description_raw ($mtbf);
|
||||
}
|
||||
|
||||
@ -613,7 +623,8 @@ foreach ($contents as $content) {
|
||||
$mttr = reporting_get_agentmodule_mttr ($content['id_agent_module'], $content['period'], $report["datetime"]);
|
||||
if ($mttr === false) {
|
||||
$mttr = __('Unknown');
|
||||
} else if ($mttr != 0) {
|
||||
}
|
||||
else if ($mttr != 0) {
|
||||
$mttr = human_time_description_raw ($mttr);
|
||||
}
|
||||
|
||||
|
@ -441,7 +441,8 @@ if ($traps !== false) {
|
||||
//Status
|
||||
if ($trap["status"] == 0) {
|
||||
$data[0] = html_print_image("images/pixel_red.png", true, array("title" => __('Not validated'), "width" => "20", "height" => "20"));
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$data[0] = html_print_image("images/pixel_green.png", true, array("title" => __('Validated'), "width" => "20", "height" => "20"));
|
||||
}
|
||||
|
||||
@ -452,7 +453,8 @@ if ($traps !== false) {
|
||||
continue;
|
||||
}
|
||||
$data[1] = '<a href="index.php?sec=estado&sec2=godmode/agentes/configurar_agente&new_agent=1&direccion='.$trap["source"].'" title="'.__('Create agent').'">'.$trap["source"].'</a>';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if (! check_acl ($config["id_user"], $agent["id_grupo"], "AR")) {
|
||||
continue;
|
||||
}
|
||||
@ -533,27 +535,34 @@ if ($traps !== false) {
|
||||
<tr><td align="left" valign="top" width="15%" ><b>' . __('Custom data:') . '</b></td><td align="left" >' . $trap['oid_custom'] . '</td></tr>'
|
||||
. '<tr><td align="left" valign="top">' . '<b>' . __('OID:') . '</td><td align="left"> ' . $trap['oid'] . '</td></tr>';
|
||||
|
||||
if ($trap["description"] != ""){
|
||||
if ($trap["description"] != "") {
|
||||
$string .= '<tr><td align="left" valign="top">' . '<b>' . __('Description:') . '</td><td align="left">' . $trap['description'] . '</td></tr>';
|
||||
}
|
||||
|
||||
if ($trap["type"] != ""){
|
||||
$trap_types = array(-1 => __('None'), 0 => __('Cold start (0)'), 1 => __('Warm start (1)'), 2 => __('Link down (2)'), 3 => __('Link up (3)'), 4 => __('Authentication failure (4)'), 5 => __('Other'));
|
||||
if ($trap["type"] != "") {
|
||||
$trap_types = array(-1 => __('None'), 0 => __('Cold start (0)'), 1 => __('Warm start (1)'), 2 => __('Link down (2)'), 3 => __('Link up (3)'), 4 => __('Authentication failure (4)'), 5 => __('Other'));
|
||||
|
||||
switch ($trap["type"]){
|
||||
case -1: $desc_trap_type = __('None');
|
||||
switch ($trap["type"]) {
|
||||
case -1:
|
||||
$desc_trap_type = __('None');
|
||||
break;
|
||||
case 0: $desc_trap_type = __('Cold start (0)');
|
||||
case 0:
|
||||
$desc_trap_type = __('Cold start (0)');
|
||||
break;
|
||||
case 1: $desc_trap_type = __('Warm start (1)');
|
||||
case 1:
|
||||
$desc_trap_type = __('Warm start (1)');
|
||||
break;
|
||||
case 2: $desc_trap_type = __('Link down (2)');
|
||||
case 2:
|
||||
$desc_trap_type = __('Link down (2)');
|
||||
break;
|
||||
case 3: $desc_trap_type = __('Link up (3)');
|
||||
case 3:
|
||||
$desc_trap_type = __('Link up (3)');
|
||||
break;
|
||||
case 4: $desc_trap_type = __('Authentication failure (4)');
|
||||
case 4:
|
||||
$desc_trap_type = __('Authentication failure (4)');
|
||||
break;
|
||||
default: $desc_trap_type = __('Other');
|
||||
default:
|
||||
$desc_trap_type = __('Other');
|
||||
break;
|
||||
}
|
||||
$string .= '<tr><td align="left" valign="top">' . '<b>' . __('Type:') . '</td><td align="left">' . $desc_trap_type . '</td></tr>';
|
||||
@ -575,7 +584,8 @@ $trap_types = array(-1 => __('None'), 0 => __('Cold start (0)'), 1 => __('Warm s
|
||||
// No matching traps
|
||||
if ($idx == 0) {
|
||||
echo '<div class="nf">'.__('No matching traps found').'</div>';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
html_print_table ($table);
|
||||
}
|
||||
|
||||
|
@ -646,7 +646,6 @@ if (is_ajax ())
|
||||
if ($row["estado"] == 0 AND $row["utimestamp"] == 0 AND ($row["id_tipo_modulo"] >= 21 AND $row["id_tipo_modulo"] <= 23)){
|
||||
$status = STATUS_MODULE_NO_DATA;
|
||||
$title = __('UNKNOWN');
|
||||
|
||||
} // Else checks module status
|
||||
elseif ($row["estado"] == 1) {
|
||||
$status = STATUS_MODULE_CRITICAL;
|
||||
|
@ -113,7 +113,8 @@ if (isset ($_GET["modified"]) && !$view_mode) {
|
||||
$pass_ok = login_validate_pass($password_new, $id, true);
|
||||
if ($pass_ok != 1) {
|
||||
ui_print_error_message($pass_ok);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$return = update_user_password ($id, $password_new);
|
||||
if ($return) {
|
||||
$return2 = save_pass_history($id, $password_new);
|
||||
@ -122,14 +123,16 @@ if (isset ($_GET["modified"]) && !$view_mode) {
|
||||
__('Password successfully updated'),
|
||||
__('Error updating passwords: %s', $config['auth_error']));
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$return = update_user_password ($id, $password_new);
|
||||
ui_print_result_message ($return,
|
||||
__('Password successfully updated'),
|
||||
__('Error updating passwords: %s', $config['auth_error']));
|
||||
}
|
||||
|
||||
} elseif ($password_new !== "NON-INIT") {
|
||||
}
|
||||
elseif ($password_new !== "NON-INIT") {
|
||||
ui_print_error_message (__('Passwords didn\'t match or other problem encountered while updating passwords'));
|
||||
}
|
||||
}
|
||||
@ -145,19 +148,11 @@ if (isset ($_GET["modified"]) && !$view_mode) {
|
||||
__('Error updating user info'));
|
||||
}
|
||||
|
||||
// Reload page to update skin
|
||||
/* if ($return){
|
||||
header ('location:' . $config['homeurl'] . '/index.php?sec=workspace&sec2=operation/users/user_edit&status=1');
|
||||
}
|
||||
else{
|
||||
header ('location:' . $config['homeurl'] . '/index.php?sec=workspace&sec2=operation/users/user_edit&status=0');
|
||||
}*/
|
||||
|
||||
$user_info = $upd_info;
|
||||
}
|
||||
|
||||
// Prints action status for current message
|
||||
if ($status != -1){
|
||||
if ($status != -1) {
|
||||
ui_print_result_message ($status,
|
||||
__('User info successfully updated'),
|
||||
__('Error updating user info'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user