mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 17:25:26 +02:00
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php, godmode/users/configure_user.php, godmode/users/user_list.php, godmode/massive/massive_copy_modules.php, godmode/massive/massive_enable_disable_alerts.php, godmode/massive/massive_delete_action_alerts.php, godmode/massive/massive_delete_alerts.php, godmode/modules/manage_network_templates_form.php, godmode/modules/manage_nc_groups.php, godmode/modules/manage_nc_groups_form.php, godmode/modules/manage_network_templates.php, godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php, godmode/netflow/nf_item_list.php, godmode/netflow/nf_report_item.php, godmode/netflow/nf.php, operation/incidents/incident.php, operation/incidents/incident_detail.php, operation/agentes/estado_agente.php, operation/agentes/sla_view.php, operation/agentes/tactical.php, operation/agentes/estado_generalagente.php, operation/snmpconsole/snmp_view.php, operation/users/user_edit.php, operation/integria_incidents/incident_detail.php, operation/gis_maps/index.php, operation/events/events_list.php, operation/events/events.php, operation/messages/message_edit.php, operation/messages/message_list.php, operation/reporting/graph_viewer.php, operation/search_reports.php, operation/netflow/nf_view.php: cleaned source code. * godmode/massive/massive_operations.php, godmode/massive/massive_edit_modules.php: fixed the massive edition of "any" module in agents. Fixes: #3543484 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
16827d10cc
commit
b11e18e18d
@ -1,3 +1,37 @@
|
|||||||
|
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* godmode/setup/file_manager.php, godmode/setup/news.php,
|
||||||
|
godmode/users/configure_user.php, godmode/users/user_list.php,
|
||||||
|
godmode/massive/massive_copy_modules.php,
|
||||||
|
godmode/massive/massive_enable_disable_alerts.php,
|
||||||
|
godmode/massive/massive_delete_action_alerts.php,
|
||||||
|
godmode/massive/massive_delete_alerts.php,
|
||||||
|
godmode/modules/manage_network_templates_form.php,
|
||||||
|
godmode/modules/manage_nc_groups.php,
|
||||||
|
godmode/modules/manage_nc_groups_form.php,
|
||||||
|
godmode/modules/manage_network_templates.php,
|
||||||
|
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
|
||||||
|
godmode/netflow/nf_item_list.php,
|
||||||
|
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
|
||||||
|
operation/incidents/incident.php,
|
||||||
|
operation/incidents/incident_detail.php,
|
||||||
|
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
|
||||||
|
operation/agentes/tactical.php,
|
||||||
|
operation/agentes/estado_generalagente.php,
|
||||||
|
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
|
||||||
|
operation/integria_incidents/incident_detail.php,
|
||||||
|
operation/gis_maps/index.php, operation/events/events_list.php,
|
||||||
|
operation/events/events.php, operation/messages/message_edit.php,
|
||||||
|
operation/messages/message_list.php,
|
||||||
|
operation/reporting/graph_viewer.php, operation/search_reports.php,
|
||||||
|
operation/netflow/nf_view.php: cleaned source code.
|
||||||
|
|
||||||
|
* godmode/massive/massive_operations.php,
|
||||||
|
godmode/massive/massive_edit_modules.php: fixed the massive edition
|
||||||
|
of "any" module in agents.
|
||||||
|
|
||||||
|
Fixes: #3543484
|
||||||
|
|
||||||
2012-07-24 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
2012-07-24 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
* include/functions_agents.php
|
* include/functions_agents.php
|
||||||
|
@ -243,7 +243,8 @@ $(document).ready (function () {
|
|||||||
function (data, status) {
|
function (data, status) {
|
||||||
if (data.length == 0) {
|
if (data.length == 0) {
|
||||||
no_modules = true;
|
no_modules = true;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
jQuery.each (data, function (i, val) {
|
jQuery.each (data, function (i, val) {
|
||||||
option = $("<option></option>")
|
option = $("<option></option>")
|
||||||
.attr ("value", val["id_agente_modulo"])
|
.attr ("value", val["id_agente_modulo"])
|
||||||
|
@ -68,7 +68,8 @@ if ($delete) {
|
|||||||
|
|
||||||
if (empty($alerts_agent_modules)) {
|
if (empty($alerts_agent_modules)) {
|
||||||
ui_print_result_message (false, '', __('Could not be deleted').". ".__('No alerts selected'));
|
ui_print_result_message (false, '', __('Could not be deleted').". ".__('No alerts selected'));
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$results = true;
|
$results = true;
|
||||||
$agent_module_actions = array();
|
$agent_module_actions = array();
|
||||||
|
|
||||||
@ -137,7 +138,8 @@ $table->data[1][1] = html_print_select (array(),'id_agents[]', 0, false, '', '',
|
|||||||
|
|
||||||
if (empty($id_agents)) {
|
if (empty($id_agents)) {
|
||||||
$alert_templates = '';
|
$alert_templates = '';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$alert_templates = agents_get_alerts_simple ($id_agents);
|
$alert_templates = agents_get_alerts_simple ($id_agents);
|
||||||
}
|
}
|
||||||
$table->data[2][0] = __('Alert templates');
|
$table->data[2][0] = __('Alert templates');
|
||||||
|
@ -192,7 +192,8 @@ $(document).ready (function () {
|
|||||||
if (this.value != 0) {
|
if (this.value != 0) {
|
||||||
$("#id_agents").enable ();
|
$("#id_agents").enable ();
|
||||||
$("#id_group").enable ().change ();
|
$("#id_group").enable ().change ();
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$("#id_group, #id_agents").disable ();
|
$("#id_group, #id_agents").disable ();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -28,78 +28,6 @@ require_once($config['homedir'] . "/include/functions_agents.php");
|
|||||||
require_once($config['homedir'] . "/include/functions_groups.php");
|
require_once($config['homedir'] . "/include/functions_groups.php");
|
||||||
require_once($config['homedir'] . '/include/functions_users.php');
|
require_once($config['homedir'] . '/include/functions_users.php');
|
||||||
|
|
||||||
function process_manage_edit ($module_name, $agents_select = null) {
|
|
||||||
if (is_int ($module_name) && $module_name <= 0) {
|
|
||||||
echo '<h3 class="error">'.__('No modules selected').'</h3>';
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* List of fields which can be updated */
|
|
||||||
$fields = array ('min_warning', 'max_warning', 'str_warning', 'min_critical', 'max_critical', 'str_critical', 'min_ff_event', 'module_interval',
|
|
||||||
'disabled', 'post_process', 'unit', 'snmp_community', 'tcp_send', 'custom_string_1', 'plugin_parameter',
|
|
||||||
'custom_string_2', 'custom_string_3', 'min', 'max', 'id_module_group', 'plugin_user', 'plugin_pass', 'id_export', 'history_data');
|
|
||||||
$values = array ();
|
|
||||||
|
|
||||||
// Specific snmp reused fields
|
|
||||||
if(get_parameter ('tcp_send', '') == 3) {
|
|
||||||
$plugin_user_snmp = get_parameter ('plugin_user_snmp', '');
|
|
||||||
if($plugin_user_snmp != '') {
|
|
||||||
$values['plugin_user'] = $plugin_user_snmp;
|
|
||||||
}
|
|
||||||
$plugin_pass_snmp = get_parameter ('plugin_pass_snmp', '');
|
|
||||||
if($plugin_pass_snmp != '') {
|
|
||||||
$values['plugin_pass'] = $plugin_pass_snmp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($fields as $field) {
|
|
||||||
$value = get_parameter ($field, '');
|
|
||||||
if ($value != '') {
|
|
||||||
$values[$field] = $value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strlen(get_parameter('history_data')) > 0) {
|
|
||||||
$values['history_data'] = get_parameter('history_data');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Whether to update module tag info
|
|
||||||
$update_tags = get_parameter('id_tag', false);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (array_search(0, $agents_select) !== false) {
|
|
||||||
$modules = db_get_all_rows_filter ('tagente_modulo',
|
|
||||||
array ('nombre' => $module_name),
|
|
||||||
array ('id_agente_modulo'));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$modules = db_get_all_rows_filter ('tagente_modulo',
|
|
||||||
array ('id_agente' => $agents_select,
|
|
||||||
'nombre' => $module_name),
|
|
||||||
array ('id_agente_modulo'));
|
|
||||||
}
|
|
||||||
|
|
||||||
db_process_sql_begin ();
|
|
||||||
|
|
||||||
if ($modules === false)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
foreach ($modules as $module) {
|
|
||||||
$result = modules_update_agent_module ($module['id_agente_modulo'], $values, true, $update_tags);
|
|
||||||
|
|
||||||
if (is_error($result)) {
|
|
||||||
db_process_sql_rollback ();
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
db_process_sql_commit ();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
$module_type = (int) get_parameter ('module_type');
|
$module_type = (int) get_parameter ('module_type');
|
||||||
$idGroupMassive = (int) get_parameter('id_group_massive');
|
$idGroupMassive = (int) get_parameter('id_group_massive');
|
||||||
$idAgentMassive = (int) get_parameter('id_agent_massive');
|
$idAgentMassive = (int) get_parameter('id_agent_massive');
|
||||||
@ -116,20 +44,20 @@ $update = (bool) get_parameter_post ('update');
|
|||||||
|
|
||||||
if ($update) {
|
if ($update) {
|
||||||
$agents_ = '';
|
$agents_ = '';
|
||||||
if($selection_mode == 'modules') {
|
if ($selection_mode == 'modules') {
|
||||||
$force = get_parameter('force_type', false);
|
$force = get_parameter('force_type', false);
|
||||||
|
|
||||||
if($agents_select == false) {
|
if ($agents_select == false) {
|
||||||
$agents_select = array();
|
$agents_select = array();
|
||||||
$agents_ = array();
|
$agents_ = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($agents_select as $agent_name) {
|
foreach ($agents_select as $agent_name) {
|
||||||
$agents_[] = agents_get_agent_id($agent_name);
|
$agents_[] = agents_get_agent_id($agent_name);
|
||||||
}
|
}
|
||||||
$modules_ = $module_name;
|
$modules_ = $module_name;
|
||||||
}
|
}
|
||||||
else if($selection_mode == 'agents') {
|
else if ($selection_mode == 'agents') {
|
||||||
$force = get_parameter('force_group', false);
|
$force = get_parameter('force_group', false);
|
||||||
|
|
||||||
$agents_ = $agents_id;
|
$agents_ = $agents_id;
|
||||||
@ -139,13 +67,13 @@ if ($update) {
|
|||||||
$success = 0;
|
$success = 0;
|
||||||
$count = 0;
|
$count = 0;
|
||||||
|
|
||||||
if($agents_ == false) {
|
if ($agents_ == false) {
|
||||||
$agents_ = array();
|
$agents_ = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the option to select all of one group or module type is checked
|
// If the option to select all of one group or module type is checked
|
||||||
if($force) {
|
if ($force) {
|
||||||
if($force == 'type') {
|
if ($force == 'type') {
|
||||||
$condition = '';
|
$condition = '';
|
||||||
if($module_type != 0)
|
if($module_type != 0)
|
||||||
$condition = ' AND t2.id_tipo_modulo = '.$module_type;
|
$condition = ' AND t2.id_tipo_modulo = '.$module_type;
|
||||||
@ -153,24 +81,24 @@ if ($update) {
|
|||||||
$agents_ = db_get_all_rows_sql('SELECT DISTINCT(t1.id_agente)
|
$agents_ = db_get_all_rows_sql('SELECT DISTINCT(t1.id_agente)
|
||||||
FROM tagente t1, tagente_modulo t2
|
FROM tagente t1, tagente_modulo t2
|
||||||
WHERE t1.id_agente = t2.id_agente');
|
WHERE t1.id_agente = t2.id_agente');
|
||||||
foreach($agents_ as $id_agent) {
|
foreach ($agents_ as $id_agent) {
|
||||||
$module_name = db_get_all_rows_filter('tagente_modulo', array('id_agente' => $id_agent, 'id_tipo_modulo' => $module_type),'nombre');
|
$module_name = db_get_all_rows_filter('tagente_modulo', array('id_agente' => $id_agent, 'id_tipo_modulo' => $module_type),'nombre');
|
||||||
|
|
||||||
if($module_name == false) {
|
if ($module_name == false) {
|
||||||
$module_name = array();
|
$module_name = array();
|
||||||
}
|
}
|
||||||
foreach($module_name as $mod_name) {
|
foreach ($module_name as $mod_name) {
|
||||||
$result = process_manage_edit ($mod_name['nombre'], $id_agent['id_agente']);
|
$result = process_manage_edit ($mod_name['nombre'], $id_agent['id_agente']);
|
||||||
$count ++;
|
$count ++;
|
||||||
$success += (int)$result;
|
$success += (int)$result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if($force == 'group') {
|
else if ($force == 'group') {
|
||||||
$agents_ = array_keys (agents_get_group_agents ($group_select, false, "none"));
|
$agents_ = array_keys (agents_get_group_agents ($group_select, false, "none"));
|
||||||
foreach($agents_ as $id_agent) {
|
foreach ($agents_ as $id_agent) {
|
||||||
$module_name = db_get_all_rows_filter('tagente_modulo', array('id_agente' => $id_agent),'nombre');
|
$module_name = db_get_all_rows_filter('tagente_modulo', array('id_agente' => $id_agent),'nombre');
|
||||||
if($module_name == false) {
|
if ($module_name == false) {
|
||||||
$module_name = array();
|
$module_name = array();
|
||||||
}
|
}
|
||||||
foreach($module_name as $mod_name) {
|
foreach($module_name as $mod_name) {
|
||||||
@ -423,7 +351,7 @@ $table->data['edit8'][3] = html_print_select_from_sql ('SELECT id_tag, name FROM
|
|||||||
echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=edit_modules" id="form_edit">';
|
echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=edit_modules" id="form_edit">';
|
||||||
html_print_table ($table);
|
html_print_table ($table);
|
||||||
|
|
||||||
echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||||
html_print_input_hidden ('update', 1);
|
html_print_input_hidden ('update', 1);
|
||||||
html_print_submit_button (__('Update'), 'go', false, 'class="sub upd"');
|
html_print_submit_button (__('Update'), 'go', false, 'class="sub upd"');
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
@ -629,3 +557,84 @@ $(document).ready (function () {
|
|||||||
});
|
});
|
||||||
/* ]]> */
|
/* ]]> */
|
||||||
</script>
|
</script>
|
||||||
|
<?php
|
||||||
|
function process_manage_edit ($module_name, $agents_select = null) {
|
||||||
|
if (is_int ($module_name) && $module_name < 0) {
|
||||||
|
echo '<h3 class="error">'.__('No modules selected').'</h3>';
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* List of fields which can be updated */
|
||||||
|
$fields = array ('min_warning', 'max_warning', 'str_warning', 'min_critical', 'max_critical', 'str_critical', 'min_ff_event', 'module_interval',
|
||||||
|
'disabled', 'post_process', 'unit', 'snmp_community', 'tcp_send', 'custom_string_1', 'plugin_parameter',
|
||||||
|
'custom_string_2', 'custom_string_3', 'min', 'max', 'id_module_group', 'plugin_user', 'plugin_pass', 'id_export', 'history_data');
|
||||||
|
$values = array ();
|
||||||
|
|
||||||
|
// Specific snmp reused fields
|
||||||
|
if(get_parameter ('tcp_send', '') == 3) {
|
||||||
|
$plugin_user_snmp = get_parameter ('plugin_user_snmp', '');
|
||||||
|
if($plugin_user_snmp != '') {
|
||||||
|
$values['plugin_user'] = $plugin_user_snmp;
|
||||||
|
}
|
||||||
|
$plugin_pass_snmp = get_parameter ('plugin_pass_snmp', '');
|
||||||
|
if($plugin_pass_snmp != '') {
|
||||||
|
$values['plugin_pass'] = $plugin_pass_snmp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($fields as $field) {
|
||||||
|
$value = get_parameter ($field, '');
|
||||||
|
if ($value != '') {
|
||||||
|
$values[$field] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strlen(get_parameter('history_data')) > 0) {
|
||||||
|
$values['history_data'] = get_parameter('history_data');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Whether to update module tag info
|
||||||
|
$update_tags = get_parameter('id_tag', false);
|
||||||
|
|
||||||
|
if (array_search(0, $agents_select) !== false) {
|
||||||
|
//Apply at All agents.
|
||||||
|
$modules = db_get_all_rows_filter ('tagente_modulo',
|
||||||
|
array ('nombre' => $module_name),
|
||||||
|
array ('id_agente_modulo'));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if ($module_name == 0) {
|
||||||
|
//Any module
|
||||||
|
$modules = db_get_all_rows_filter ('tagente_modulo',
|
||||||
|
array ('id_agente' => $agents_select),
|
||||||
|
array ('id_agente_modulo'));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$modules = db_get_all_rows_filter ('tagente_modulo',
|
||||||
|
array ('id_agente' => $agents_select,
|
||||||
|
'nombre' => $module_name),
|
||||||
|
array ('id_agente_modulo'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
db_process_sql_begin ();
|
||||||
|
|
||||||
|
if ($modules === false)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
foreach ($modules as $module) {
|
||||||
|
$result = modules_update_agent_module ($module['id_agente_modulo'], $values, true, $update_tags);
|
||||||
|
|
||||||
|
if (is_error($result)) {
|
||||||
|
db_process_sql_rollback ();
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
db_process_sql_commit ();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
?>
|
@ -43,7 +43,8 @@ if (is_ajax ()) {
|
|||||||
$alert_templates = agents_get_alerts_simple ($id_agents);
|
$alert_templates = agents_get_alerts_simple ($id_agents);
|
||||||
echo json_encode (index_array ($alert_templates, 'id_alert_template', 'template_name'));
|
echo json_encode (index_array ($alert_templates, 'id_alert_template', 'template_name'));
|
||||||
return;
|
return;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$id_alert_templates = (array) get_parameter ('id_alert_templates');
|
$id_alert_templates = (array) get_parameter ('id_alert_templates');
|
||||||
$disabled = (int) get_parameter ('disabled');
|
$disabled = (int) get_parameter ('disabled');
|
||||||
|
|
||||||
|
@ -39,7 +39,8 @@ $options_alerts = array('add_alerts' => __('Massive alerts addition'), 'delete_a
|
|||||||
$options_agents = array('edit_agents' => __('Massive agents edition'), 'delete_agents' => __('Massive agents deletion'));
|
$options_agents = array('edit_agents' => __('Massive agents edition'), 'delete_agents' => __('Massive agents deletion'));
|
||||||
|
|
||||||
if (check_acl ($config['id_user'], 0, "PM")) {
|
if (check_acl ($config['id_user'], 0, "PM")) {
|
||||||
$options_users = array('add_profiles' => __('Massive profiles addition'), 'delete_profiles' => __('Massive profiles deletion'));
|
$options_users = array('add_profiles' => __('Massive profiles addition'),
|
||||||
|
'delete_profiles' => __('Massive profiles deletion'));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$options_users = array();
|
$options_users = array();
|
||||||
@ -151,43 +152,38 @@ $submit_add = get_parameter('crtbutton');
|
|||||||
|
|
||||||
echo '<div id="loading" display="none">';
|
echo '<div id="loading" display="none">';
|
||||||
echo html_print_image("images/wait.gif", true, array("border" => '0')) . '<br />';
|
echo html_print_image("images/wait.gif", true, array("border" => '0')) . '<br />';
|
||||||
echo '<strong>'.__('Please wait').'...</strong>';
|
echo '<strong>' . __('Please wait...') . '</strong>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
|
$(document).ready (function () {
|
||||||
|
$('#manage_config_form').submit( function() {
|
||||||
|
confirm_status = confirm(" <?php echo __('Are you sure?'); ?> ");
|
||||||
|
if (confirm_status)
|
||||||
|
$("#loading").css("display", "");
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#form_edit').submit( function() {
|
||||||
|
confirm_status = confirm(" <?php echo __('Are you sure?'); ?> ");
|
||||||
|
if (confirm_status)
|
||||||
|
$("#loading").css("display", "");
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
$(document).ready (function () {
|
$('[id^=form]').submit( function() {
|
||||||
$('#manage_config_form').submit( function() {
|
confirm_status = confirm(" <?php echo __('Are you sure?'); ?> ");
|
||||||
confirm = confirm(" <?php echo __('Are you sure?'); ?> ");
|
if (confirm_status)
|
||||||
if (confirm)
|
$("#loading").css("display", "");
|
||||||
$("#loading").css("display", "");
|
else
|
||||||
else
|
return false;
|
||||||
return false;
|
});
|
||||||
|
|
||||||
|
$("#loading").css("display", "none");
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#form_edit').submit( function() {
|
|
||||||
confirm = confirm(" <?php echo __('Are you sure?'); ?> ");
|
|
||||||
if (confirm)
|
|
||||||
$("#loading").css("display", "");
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
$('[id^=form]').submit( function() {
|
|
||||||
confirm = confirm(" <?php echo __('Are you sure?'); ?> ");
|
|
||||||
if (confirm)
|
|
||||||
$("#loading").css("display", "");
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#loading").css("display", "none");
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
@ -46,13 +46,15 @@ if ($create) {
|
|||||||
ui_print_error_message (__('Could not be created. Blank name'));
|
ui_print_error_message (__('Could not be created. Blank name'));
|
||||||
require_once ('manage_nc_groups_form.php');
|
require_once ('manage_nc_groups_form.php');
|
||||||
return;
|
return;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$result = db_process_sql_insert ('tnetwork_component_group',
|
$result = db_process_sql_insert ('tnetwork_component_group',
|
||||||
array ('name' => $name,
|
array ('name' => $name,
|
||||||
'parent' => $parent));
|
'parent' => $parent));
|
||||||
if ($result) {
|
if ($result) {
|
||||||
db_pandora_audit( "Module management", "Create component group #$result");
|
db_pandora_audit( "Module management", "Create component group #$result");
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
db_pandora_audit( "Module management", "Fail try to create component group");
|
db_pandora_audit( "Module management", "Fail try to create component group");
|
||||||
}
|
}
|
||||||
ui_print_result_message ($result,
|
ui_print_result_message ($result,
|
||||||
@ -75,7 +77,8 @@ if ($update) {
|
|||||||
array ('id_sg' => $id));
|
array ('id_sg' => $id));
|
||||||
if ($result) {
|
if ($result) {
|
||||||
db_pandora_audit( "Module management", "Update component group #$id");
|
db_pandora_audit( "Module management", "Update component group #$id");
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
db_pandora_audit( "Module management", "Fail try to update component group #$id");
|
db_pandora_audit( "Module management", "Fail try to update component group #$id");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,8 @@ if ($id) {
|
|||||||
$group = network_components_get_group ($id);
|
$group = network_components_get_group ($id);
|
||||||
$name = $group['name'];
|
$name = $group['name'];
|
||||||
$parent = $group['parent'];
|
$parent = $group['parent'];
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$name = '';
|
$name = '';
|
||||||
$parent = '';
|
$parent = '';
|
||||||
}
|
}
|
||||||
@ -57,7 +58,8 @@ if ($id) {
|
|||||||
html_print_input_hidden ('update', 1);
|
html_print_input_hidden ('update', 1);
|
||||||
html_print_input_hidden ('id', $id);
|
html_print_input_hidden ('id', $id);
|
||||||
html_print_submit_button (__('Update'), 'crt', false, 'class="sub upd"');
|
html_print_submit_button (__('Update'), 'crt', false, 'class="sub upd"');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
html_print_input_hidden ('create', 1);
|
html_print_input_hidden ('create', 1);
|
||||||
html_print_submit_button (__('Create'), 'crt', false, 'class="sub wand"');
|
html_print_submit_button (__('Create'), 'crt', false, 'class="sub wand"');
|
||||||
}
|
}
|
||||||
|
@ -141,7 +141,8 @@ if ($export_profile) {
|
|||||||
foreach ($components[0] as $row_name => $detail) {
|
foreach ($components[0] as $row_name => $detail) {
|
||||||
if (is_numeric ($row_name)) {
|
if (is_numeric ($row_name)) {
|
||||||
$inv_names[] = $row_name;
|
$inv_names[] = $row_name;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$row_names[] = $row_name;
|
$row_names[] = $row_name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,8 @@ if (isset ($_GET["create"]) || isset ($_GET["update"])) {
|
|||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
db_pandora_audit("Module management", "Update module template #$id_np");
|
db_pandora_audit("Module management", "Update module template #$id_np");
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
db_pandora_audit("Module management", "Fail try to update module template #$id_np");
|
db_pandora_audit("Module management", "Fail try to update module template #$id_np");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,7 +101,8 @@ if (isset ($_GET["create"]) || isset ($_GET["update"])) {
|
|||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
db_pandora_audit("Module management", "Create module template #$result");
|
db_pandora_audit("Module management", "Create module template #$result");
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
db_pandora_audit("Module management", "Fail try to create module template");
|
db_pandora_audit("Module management", "Fail try to create module template");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -109,7 +111,8 @@ if (isset ($_GET["create"]) || isset ($_GET["update"])) {
|
|||||||
__('Error adding network profile'));
|
__('Error adding network profile'));
|
||||||
$id_np = (int) $result; //Will return either 0 (in case of error) or an int
|
$id_np = (int) $result; //Will return either 0 (in case of error) or an int
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
ui_print_result_message(false, "", _("Cannot create a template without name"));
|
ui_print_result_message(false, "", _("Cannot create a template without name"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,10 +53,11 @@ if ($update) {
|
|||||||
|
|
||||||
if (db_get_value('token', 'tconfig', 'token', 'netflow_path') === false) {
|
if (db_get_value('token', 'tconfig', 'token', 'netflow_path') === false) {
|
||||||
config_create_value('netflow_path', $config['netflow_path']);
|
config_create_value('netflow_path', $config['netflow_path']);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
db_process_sql_update ('tconfig',
|
db_process_sql_update ('tconfig',
|
||||||
array ('value' => $config['netflow_path']),
|
array ('value' => $config['netflow_path']),
|
||||||
array ('token' => 'netflow_path'));
|
array ('token' => 'netflow_path'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,8 @@ if ($delete) {
|
|||||||
|
|
||||||
if ($result !== false) {
|
if ($result !== false) {
|
||||||
$result = true;
|
$result = true;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$result = false;
|
$result = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,8 +66,8 @@ if ($id) {
|
|||||||
$aggregate = $filter['aggregate'];
|
$aggregate = $filter['aggregate'];
|
||||||
$output = $filter['output'];
|
$output = $filter['output'];
|
||||||
$advanced_filter = $filter['advanced_filter'];
|
$advanced_filter = $filter['advanced_filter'];
|
||||||
|
}
|
||||||
} else {
|
else {
|
||||||
$name = '';
|
$name = '';
|
||||||
$assign_group = '';
|
$assign_group = '';
|
||||||
$ip_dst = '';
|
$ip_dst = '';
|
||||||
|
@ -171,17 +171,20 @@ $sql = "SELECT id_rc FROM tnetflow_report_content where `order`= (select max(`or
|
|||||||
$item_max = db_get_row_sql($sql);
|
$item_max = db_get_row_sql($sql);
|
||||||
$last_item = $item_max['id_rc'];
|
$last_item = $item_max['id_rc'];
|
||||||
|
|
||||||
foreach ($reports_item as $item) {
|
foreach ($reports_item as $item) {
|
||||||
|
|
||||||
$data = array ();
|
$data = array ();
|
||||||
if (($item['id_rc'] == $first_item) && ($item['id_rc'] == $last_item)){
|
if (($item['id_rc'] == $first_item) && ($item['id_rc'] == $last_item)){
|
||||||
$data[0] = '<span style="display: block; float: left; width: 16px;"> </span>';
|
$data[0] = '<span style="display: block; float: left; width: 16px;"> </span>';
|
||||||
} else if (($item['id_rc'] == $first_item) && ($item['id_rc'] != $last_item)){
|
}
|
||||||
|
else if (($item['id_rc'] == $first_item) && ($item['id_rc'] != $last_item)){
|
||||||
$data[0] = '<span style="display: block; float: left; width: 16px;"> </span>';
|
$data[0] = '<span style="display: block; float: left; width: 16px;"> </span>';
|
||||||
$data[0] .= '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_item_list&id='.$item['id_report'].'&order=1&dir=down&id_rc='.$item['id_rc'].'">' . html_print_image("images/down.png", true, array("title" => __('Move to down'))) . '</a>';
|
$data[0] .= '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_item_list&id='.$item['id_report'].'&order=1&dir=down&id_rc='.$item['id_rc'].'">' . html_print_image("images/down.png", true, array("title" => __('Move to down'))) . '</a>';
|
||||||
} else if (($item['id_rc'] == $last_item) && ($item['id_rc'] != $first_item)){
|
}
|
||||||
|
else if (($item['id_rc'] == $last_item) && ($item['id_rc'] != $first_item)){
|
||||||
$data[0] = '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_item_list&id='.$item['id_report'].'&order=1&dir=up&id_rc='.$item['id_rc'].'">' . html_print_image("images/up.png", true, array("title" => __('Move to up'))) . '</a>';
|
$data[0] = '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_item_list&id='.$item['id_report'].'&order=1&dir=up&id_rc='.$item['id_rc'].'">' . html_print_image("images/up.png", true, array("title" => __('Move to up'))) . '</a>';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$data[0] = '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_item_list&id='.$item['id_report'].'&order=1&dir=up&id_rc='.$item['id_rc'].'">' . html_print_image("images/up.png", true, array("title" => __('Move to up'))) . '</a>';
|
$data[0] = '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_item_list&id='.$item['id_report'].'&order=1&dir=up&id_rc='.$item['id_rc'].'">' . html_print_image("images/up.png", true, array("title" => __('Move to up'))) . '</a>';
|
||||||
$data[0] .= '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_item_list&id='.$item['id_report'].'&order=1&dir=down&id_rc='.$item['id_rc'].'">' . html_print_image("images/down.png", true, array("title" => __('Move to down'))) . '</a>';
|
$data[0] .= '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_item_list&id='.$item['id_report'].'&order=1&dir=down&id_rc='.$item['id_rc'].'">' . html_print_image("images/down.png", true, array("title" => __('Move to down'))) . '</a>';
|
||||||
}
|
}
|
||||||
@ -214,7 +217,7 @@ $last_item = $item_max['id_rc'];
|
|||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($data)) {
|
if (isset($data)) {
|
||||||
echo '<form method="post" action="index.php?sec=netf&sec2=godmode/netflow/nf_item_list&id='.$id.'">';
|
echo '<form method="post" action="index.php?sec=netf&sec2=godmode/netflow/nf_item_list&id='.$id.'">';
|
||||||
html_print_input_hidden('multiple_delete', 1);
|
html_print_input_hidden('multiple_delete', 1);
|
||||||
html_print_table ($table);
|
html_print_table ($table);
|
||||||
@ -222,7 +225,8 @@ if(isset($data)) {
|
|||||||
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"');
|
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"');
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
}else {
|
}
|
||||||
|
else {
|
||||||
echo "<div class='nf'>".__('There are no defined items')."</div>";
|
echo "<div class='nf'>".__('There are no defined items')."</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,8 @@ if ($id_rc) {
|
|||||||
$max_val = $item['max'];
|
$max_val = $item['max'];
|
||||||
$show_graph = $item['show_graph'];
|
$show_graph = $item['show_graph'];
|
||||||
|
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$name_filter = '';
|
$name_filter = '';
|
||||||
$max_val = '';
|
$max_val = '';
|
||||||
$show_graph = '';
|
$show_graph = '';
|
||||||
@ -99,7 +100,8 @@ if ($create){
|
|||||||
$order = $result['max_order'];
|
$order = $result['max_order'];
|
||||||
if ($order == '') {
|
if ($order == '') {
|
||||||
$order = 0;
|
$order = 0;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$order++;
|
$order++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,7 +115,8 @@ if ($create){
|
|||||||
$id_rc = db_process_sql_insert('tnetflow_report_content', $values);
|
$id_rc = db_process_sql_insert('tnetflow_report_content', $values);
|
||||||
if ($id_rc === false) {
|
if ($id_rc === false) {
|
||||||
echo '<h3 class="error">'.__ ('Error creating item').'</h3>';
|
echo '<h3 class="error">'.__ ('Error creating item').'</h3>';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
echo '<h3 class="suc">'.__ ('Item created successfully').'</h3>';
|
echo '<h3 class="suc">'.__ ('Item created successfully').'</h3>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -168,11 +171,11 @@ if ($id_rc) {
|
|||||||
html_print_input_hidden ('update', 1);
|
html_print_input_hidden ('update', 1);
|
||||||
html_print_input_hidden ('id_rc', $id_rc);
|
html_print_input_hidden ('id_rc', $id_rc);
|
||||||
html_print_submit_button (__('Update'), 'crt', false, 'class="sub upd"');
|
html_print_submit_button (__('Update'), 'crt', false, 'class="sub upd"');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
html_print_input_hidden ('create', 1);
|
html_print_input_hidden ('create', 1);
|
||||||
html_print_submit_button (__('Create item'), 'crt', false, 'class="sub wand"');
|
html_print_submit_button (__('Create item'), 'crt', false, 'class="sub wand"');
|
||||||
}
|
}
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
|
|
||||||
?>
|
?>
|
@ -26,10 +26,6 @@ if (! check_acl ($config['id_user'], 0, "PM")) {
|
|||||||
|
|
||||||
require_once ("include/functions_filemanager.php");
|
require_once ("include/functions_filemanager.php");
|
||||||
|
|
||||||
//$delete_file = (bool) get_parameter ('delete_file');
|
|
||||||
//$upload_file = (bool) get_parameter ('upload_file');
|
|
||||||
//$create_dir = (bool) get_parameter ('create_dir');
|
|
||||||
|
|
||||||
// Header
|
// Header
|
||||||
ui_print_page_header (__('File manager'), "", false, "", true);
|
ui_print_page_header (__('File manager'), "", false, "", true);
|
||||||
|
|
||||||
@ -38,47 +34,8 @@ if (isset($config['filemanager']['message'])) {
|
|||||||
$config['filemanager']['message'] = null;
|
$config['filemanager']['message'] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
//// Upload file
|
|
||||||
//if ($upload_file) {
|
|
||||||
// if (isset ($_FILES['file']) && $_FILES['file']['name'] != "") {
|
|
||||||
// $filename = $_FILES['file']['name'];
|
|
||||||
// $filesize = $_FILES['file']['size'];
|
|
||||||
// $directory = (string) get_parameter ('directory');
|
|
||||||
//
|
|
||||||
// // Copy file to directory and change name
|
|
||||||
// $nombre_archivo = $config['homedir'].'/'.$directory.'/'.$filename;
|
|
||||||
// if (! @copy ($_FILES['file']['tmp_name'], $nombre_archivo )) {
|
|
||||||
// echo "<h3 class=error>".__('attach_error')."</h3>";
|
|
||||||
// } else {
|
|
||||||
// // Delete temporal file
|
|
||||||
// unlink ($_FILES['file']['tmp_name']);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
//if ($delete_file) {
|
|
||||||
// $filename = (string) get_parameter ('filename');
|
|
||||||
// echo "<h3>".__('Deleting')." ".$filename."</h3>";
|
|
||||||
// if (is_dir ($filename)) {
|
|
||||||
// rmdir ($filename);
|
|
||||||
// } else {
|
|
||||||
// unlink ($filename);
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
$directory = (string) get_parameter ('directory', "/");
|
$directory = (string) get_parameter ('directory', "/");
|
||||||
|
|
||||||
//// CREATE DIR
|
|
||||||
//if ($create_dir) {
|
|
||||||
// $dirname = (string) get_parameter ('dirname');
|
|
||||||
// if ($dirname) {
|
|
||||||
// @mkdir ($directory.'/'.$dirname);
|
|
||||||
// echo '<h3>'.__('Created directory %s', $dirname).'</h3>';
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
// A miminal security check to avoid directory traversal
|
// A miminal security check to avoid directory traversal
|
||||||
if (preg_match ("/\.\./", $directory))
|
if (preg_match ("/\.\./", $directory))
|
||||||
$directory = "images";
|
$directory = "images";
|
||||||
@ -105,10 +62,7 @@ $available_directories[$directory] = $directory;
|
|||||||
|
|
||||||
$real_directory = realpath ($config['homedir'].'/'.$directory);
|
$real_directory = realpath ($config['homedir'].'/'.$directory);
|
||||||
|
|
||||||
//filemanager_box_upload_file_explorer($real_directory, $directory);
|
echo '<h4>' . __('Index of %s', $directory) . '</h4>';
|
||||||
|
|
||||||
|
|
||||||
echo '<h4>'.__('Index of %s', $directory).'</h4>';
|
|
||||||
|
|
||||||
filemanager_file_explorer($real_directory, $directory, 'index.php?sec=gsetup&sec2=godmode/setup/file_manager');
|
filemanager_file_explorer($real_directory, $directory, 'index.php?sec=gsetup&sec2=godmode/setup/file_manager');
|
||||||
?>
|
?>
|
||||||
|
@ -85,10 +85,12 @@ if ((isset ($_GET["form_add"])) || (isset ($_GET["form_edit"]))) {
|
|||||||
$text = $result["text"];
|
$text = $result["text"];
|
||||||
$author = $result["author"];
|
$author = $result["author"];
|
||||||
$timestamp = $result["timestamp"];
|
$timestamp = $result["timestamp"];
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
echo "<h3 class='error'>".__('Name error')."</h3>";
|
echo "<h3 class='error'>".__('Name error')."</h3>";
|
||||||
}
|
}
|
||||||
} else { // form_add
|
}
|
||||||
|
else { // form_add
|
||||||
$creation_mode = 1;
|
$creation_mode = 1;
|
||||||
$text = "";
|
$text = "";
|
||||||
$subject = "";
|
$subject = "";
|
||||||
|
@ -71,7 +71,8 @@ ui_print_page_header (__('User detail editor'), "images/god3.png", false, "", tr
|
|||||||
|
|
||||||
if ($config['user_can_update_info']) {
|
if ($config['user_can_update_info']) {
|
||||||
$view_mode = false;
|
$view_mode = false;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$view_mode = true;
|
$view_mode = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -240,7 +241,8 @@ if ($update_user) {
|
|||||||
$pass_ok = login_validate_pass($password_new, $id, true);
|
$pass_ok = login_validate_pass($password_new, $id, true);
|
||||||
if ($pass_ok != 1) {
|
if ($pass_ok != 1) {
|
||||||
ui_print_error_message($pass_ok);
|
ui_print_error_message($pass_ok);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$res2 = update_user_password ($id, $password_new);
|
$res2 = update_user_password ($id, $password_new);
|
||||||
if ($res2) {
|
if ($res2) {
|
||||||
$res3 = save_pass_history($id, $password_new);
|
$res3 = save_pass_history($id, $password_new);
|
||||||
@ -249,7 +251,8 @@ if ($update_user) {
|
|||||||
__('User info successfully updated'),
|
__('User info successfully updated'),
|
||||||
__('Error updating user info (no change?)'));
|
__('Error updating user info (no change?)'));
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$res2 = update_user_password ($id, $password_new);
|
$res2 = update_user_password ($id, $password_new);
|
||||||
if ($res2) {
|
if ($res2) {
|
||||||
$res3 = save_pass_history($id, $password_new);
|
$res3 = save_pass_history($id, $password_new);
|
||||||
|
@ -235,7 +235,8 @@ foreach ($info as $user_id => $user_info) {
|
|||||||
$data[3] = html_print_image ("images/user_suit.png", true,
|
$data[3] = html_print_image ("images/user_suit.png", true,
|
||||||
array ("alt" => __('Admin'),
|
array ("alt" => __('Admin'),
|
||||||
"title" => __('Administrator'))).' ';
|
"title" => __('Administrator'))).' ';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$data[3] = html_print_image ("images/user_green.png", true,
|
$data[3] = html_print_image ("images/user_green.png", true,
|
||||||
array ("alt" => __('User'),
|
array ("alt" => __('User'),
|
||||||
"title" => __('Standard User'))).' ';
|
"title" => __('Standard User'))).' ';
|
||||||
@ -250,7 +251,8 @@ foreach ($info as $user_id => $user_info) {
|
|||||||
$data[3] .= groups_get_name ($row["id_grupo"]);
|
$data[3] .= groups_get_name ($row["id_grupo"]);
|
||||||
$data[3] .= "<br />";
|
$data[3] .= "<br />";
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$data[3] .= __('The user doesn\'t have any assigned profile/group');
|
$data[3] .= __('The user doesn\'t have any assigned profile/group');
|
||||||
}
|
}
|
||||||
$data[3] .= "</span></a>";
|
$data[3] .= "</span></a>";
|
||||||
@ -266,7 +268,8 @@ foreach ($info as $user_id => $user_info) {
|
|||||||
$data[5] .= '<a href="index.php?sec=gusuarios&sec2=godmode/users/configure_user&id='.$user_id.'">'.html_print_image('images/config.png', true, array('title' => __('Edit'))).'</a>';
|
$data[5] .= '<a href="index.php?sec=gusuarios&sec2=godmode/users/configure_user&id='.$user_id.'">'.html_print_image('images/config.png', true, array('title' => __('Edit'))).'</a>';
|
||||||
if ($config["admin_can_delete_user"] && $user_info['id_user'] != $config['id_user']) {
|
if ($config["admin_can_delete_user"] && $user_info['id_user'] != $config['id_user']) {
|
||||||
$data[5] .= " <a href='index.php?sec=gusuarios&sec2=godmode/users/user_list&user_del=1&delete_user=".$user_info['id_user']."'>".html_print_image('images/cross.png', true, array ('title' => __('Delete'), 'onclick' => "if (! confirm ('" .__('Deleting User'). " ". $user_info['id_user'] . ". " . __('Are you sure?') ."')) return false"))."</a>";
|
$data[5] .= " <a href='index.php?sec=gusuarios&sec2=godmode/users/user_list&user_del=1&delete_user=".$user_info['id_user']."'>".html_print_image('images/cross.png', true, array ('title' => __('Delete'), 'onclick' => "if (! confirm ('" .__('Deleting User'). " ". $user_info['id_user'] . ". " . __('Are you sure?') ."')) return false"))."</a>";
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$data[5] .= ''; //Delete button not in this mode
|
$data[5] .= ''; //Delete button not in this mode
|
||||||
}
|
}
|
||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
|
@ -473,13 +473,6 @@ foreach ($agents as $agent) {
|
|||||||
|
|
||||||
$data[2] = ui_print_os_icon ($agent["id_os"], false, true);
|
$data[2] = ui_print_os_icon ($agent["id_os"], false, true);
|
||||||
|
|
||||||
//The interval we are thinking that it must be the agent interval in this
|
|
||||||
//cell and it'snt the interval of modules.
|
|
||||||
// if ($agent_info["interval"] > $agent["intervalo"]) {
|
|
||||||
// $data[2] = '<span class="green">'.$agent_info["interval"].'</span>';
|
|
||||||
// } else {
|
|
||||||
// $data[2] = $agent["intervalo"];
|
|
||||||
// }
|
|
||||||
$data[3] = human_time_description_raw($agent["intervalo"]);
|
$data[3] = human_time_description_raw($agent["intervalo"]);
|
||||||
|
|
||||||
$data[4] = ui_print_group_icon ($agent["id_grupo"], true);
|
$data[4] = ui_print_group_icon ($agent["id_grupo"], true);
|
||||||
@ -541,7 +534,8 @@ if (!empty ($table->data)) {
|
|||||||
html_print_table ($table);
|
html_print_table ($table);
|
||||||
ui_pagination ($total_agents, ui_get_url_refresh (array ('group_id' => $group_id, 'search' => $search, 'sort_field' => $sortField, 'sort' => $sort, 'status' => $status)));
|
ui_pagination ($total_agents, ui_get_url_refresh (array ('group_id' => $group_id, 'search' => $search, 'sort_field' => $sortField, 'sort' => $sort, 'status' => $status)));
|
||||||
unset ($table);
|
unset ($table);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
echo '<div class="nf">'.__('There are no defined agents').'</div>';
|
echo '<div class="nf">'.__('There are no defined agents').'</div>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -180,20 +180,21 @@ echo " / ";
|
|||||||
|
|
||||||
if ($agent["ultimo_contacto_remoto"] == "01-01-1970 00:00:00") {
|
if ($agent["ultimo_contacto_remoto"] == "01-01-1970 00:00:00") {
|
||||||
echo __('Never');
|
echo __('Never');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
echo $agent["ultimo_contacto_remoto"];
|
echo $agent["ultimo_contacto_remoto"];
|
||||||
}
|
}
|
||||||
echo '</td></tr>';
|
echo '</td></tr>';
|
||||||
|
|
||||||
// Timezone Offset
|
// Timezone Offset
|
||||||
if ($agent['timezone_offset'] != 0) {
|
if ($agent['timezone_offset'] != 0) {
|
||||||
echo '<tr><td class="datos2"><b>'.__('Timezone Offset'). '</b></td>';
|
echo '<tr><td class="datos2"><b>' . __('Timezone Offset') . '</b></td>';
|
||||||
echo '<td class="datos2" colspan="2">'.$agent["timezone_offset"].'</td></tr>';
|
echo '<td class="datos2" colspan="2">' . $agent["timezone_offset"] . '</td></tr>';
|
||||||
}
|
}
|
||||||
// Next contact (agent)
|
// Next contact (agent)
|
||||||
$progress = agents_get_next_contact($id_agente);
|
$progress = agents_get_next_contact($id_agente);
|
||||||
|
|
||||||
echo '<tr><td class="datos"><b>'.__('Next agent contact').'</b></td>';
|
echo '<tr><td class="datos"><b>' . __('Next agent contact') . '</b></td>';
|
||||||
echo '<td class="datos f9" colspan="2">' . progress_bar($progress, 200, 20) . '</td></tr>';
|
echo '<td class="datos f9" colspan="2">' . progress_bar($progress, 200, 20) . '</td></tr>';
|
||||||
|
|
||||||
// Custom fields
|
// Custom fields
|
||||||
|
@ -134,9 +134,10 @@ if ($result !== false) {
|
|||||||
$data[1] .= "(".$sla_data["sla_min"]." / ".$sla_data["sla_max"]." / ".$sla_data["sla_limit"].")";
|
$data[1] .= "(".$sla_data["sla_min"]." / ".$sla_data["sla_max"]." / ".$sla_data["sla_limit"].")";
|
||||||
$data[2] = format_numeric (reporting_get_agentmodule_sla ($sla_data["id_agent_module"], $config["sla_period"], 1)).'%';
|
$data[2] = format_numeric (reporting_get_agentmodule_sla ($sla_data["id_agent_module"], $config["sla_period"], 1)).'%';
|
||||||
$status = modules_get_agentmodule_status ($sla_data["id_agent_module"]);
|
$status = modules_get_agentmodule_status ($sla_data["id_agent_module"]);
|
||||||
if ($status == 1){
|
if ($status == 1) {
|
||||||
$data[3] = html_print_image ("images/pixel_red.png", true, array ("width" => 40, "height" => 18, "title" => __('Module Down')));
|
$data[3] = html_print_image ("images/pixel_red.png", true, array ("width" => 40, "height" => 18, "title" => __('Module Down')));
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$data[3] = html_print_image ("images/pixel_green.png", true, array ("width" => 40, "height" => 18, "title" => __('Module Up')));
|
$data[3] = html_print_image ("images/pixel_green.png", true, array ("width" => 40, "height" => 18, "title" => __('Module Up')));
|
||||||
}
|
}
|
||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
|
@ -274,7 +274,8 @@ if($is_admin) {
|
|||||||
|
|
||||||
if ($server["status"] == 0){
|
if ($server["status"] == 0){
|
||||||
$data[2] = ui_print_status_image (STATUS_SERVER_DOWN, '', true);
|
$data[2] = ui_print_status_image (STATUS_SERVER_DOWN, '', true);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$data[2] = ui_print_status_image (STATUS_SERVER_OK, '', true);
|
$data[2] = ui_print_status_image (STATUS_SERVER_OK, '', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -283,10 +284,12 @@ if($is_admin) {
|
|||||||
|
|
||||||
if ($server["type"] != "recon"){
|
if ($server["type"] != "recon"){
|
||||||
$data[4] = $server["lag_txt"];
|
$data[4] = $server["lag_txt"];
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$data[4] = __("N/A");
|
$data[4] = __("N/A");
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$data[3] = "";
|
$data[3] = "";
|
||||||
$data[4] = __("N/A");
|
$data[4] = __("N/A");
|
||||||
}
|
}
|
||||||
@ -296,8 +299,11 @@ if($is_admin) {
|
|||||||
|
|
||||||
if (!empty ($table->data)) {
|
if (!empty ($table->data)) {
|
||||||
html_print_table ($table);
|
html_print_table ($table);
|
||||||
} else {
|
}
|
||||||
echo '<div class="nf">'.__('There are no servers configured in the database').'</div>';
|
else {
|
||||||
|
echo '<div class="nf">' .
|
||||||
|
__('There are no servers configured in the database') .
|
||||||
|
'</div>';
|
||||||
}
|
}
|
||||||
unset ($table);
|
unset ($table);
|
||||||
}
|
}
|
||||||
|
@ -445,7 +445,8 @@ $(document).ready( function() {
|
|||||||
$option = $('#select_validate').val();
|
$option = $('#select_validate').val();
|
||||||
if ($option == 2) {
|
if ($option == 2) {
|
||||||
$(".standby_alert_checkbox").css('display', '');
|
$(".standby_alert_checkbox").css('display', '');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$(".standby_alert_checkbox").css('display', 'none');
|
$(".standby_alert_checkbox").css('display', 'none');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -453,10 +454,10 @@ $(document).ready( function() {
|
|||||||
$("#tgl_event_control").click (function () {
|
$("#tgl_event_control").click (function () {
|
||||||
$("#event_control").toggle ();
|
$("#event_control").toggle ();
|
||||||
// Trick to don't collapse filter if autorefresh button has been pushed
|
// Trick to don't collapse filter if autorefresh button has been pushed
|
||||||
if ($("#hidden-toogle_filter").val() == 'true'){
|
if ($("#hidden-toogle_filter").val() == 'true') {
|
||||||
$("#hidden-toogle_filter").val('false');
|
$("#hidden-toogle_filter").val('false');
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
$("#hidden-toogle_filter").val('true');
|
$("#hidden-toogle_filter").val('true');
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -471,11 +472,11 @@ $(document).ready( function() {
|
|||||||
var checkbox_standby_alert = $('#checkbox-standby-alert-'+id).attr('checked');
|
var checkbox_standby_alert = $('#checkbox-standby-alert-'+id).attr('checked');
|
||||||
var similars = $('#group_rep').val();
|
var similars = $('#group_rep').val();
|
||||||
|
|
||||||
if(!select_validate) {
|
if (!select_validate) {
|
||||||
select_validate = 1;
|
select_validate = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(checkbox_standby_alert) {
|
if (checkbox_standby_alert) {
|
||||||
jQuery.post ("ajax.php",
|
jQuery.post ("ajax.php",
|
||||||
{"page" : "operation/events/events",
|
{"page" : "operation/events/events",
|
||||||
"standby_alert" : 1,
|
"standby_alert" : 1,
|
||||||
@ -587,12 +588,12 @@ $(document).ready( function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Remove delete link (if event is not grouped and there is more than one event)
|
// Remove delete link (if event is not grouped and there is more than one event)
|
||||||
if ($("#group_rep").val() == 1){
|
if ($("#group_rep").val() == 1) {
|
||||||
if (parseInt($("#count_event_group_"+id).text()) <= 1){
|
if (parseInt($("#count_event_group_"+id).text()) <= 1) {
|
||||||
$("#delete-"+id).replaceWith('<img alt="' + <?php echo "'" . __('Is not allowed delete events in process') . "'"; ?> + '" title="' + <?php echo "'" . __('Is not allowed delete events in process') . "'"; ?> + '" src="images/cross.disabled.png">');
|
$("#delete-"+id).replaceWith('<img alt="' + <?php echo "'" . __('Is not allowed delete events in process') . "'"; ?> + '" title="' + <?php echo "'" . __('Is not allowed delete events in process') . "'"; ?> + '" src="images/cross.disabled.png">');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{ // Remove delete link (if event is not grouped)
|
else { // Remove delete link (if event is not grouped)
|
||||||
$("#delete-"+id).replaceWith('<img alt="' + <?php echo "'" . __('Is not allowed delete events in process') . "'"; ?> + '" title="' + <?php echo "'" . __('Is not allowed delete events in process') . "'"; ?> + '" src="images/cross.disabled.png">');
|
$("#delete-"+id).replaceWith('<img alt="' + <?php echo "'" . __('Is not allowed delete events in process') . "'"; ?> + '" title="' + <?php echo "'" . __('Is not allowed delete events in process') . "'"; ?> + '" src="images/cross.disabled.png">');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -649,7 +650,8 @@ $(document).ready( function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//location.reload();
|
//location.reload();
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$("#result")
|
$("#result")
|
||||||
.showMessage ("<?php echo __('Could not be validated')?>")
|
.showMessage ("<?php echo __('Could not be validated')?>")
|
||||||
.addClass ("error");
|
.addClass ("error");
|
||||||
@ -689,7 +691,8 @@ $(document).ready( function() {
|
|||||||
function toggleDiv (divid){
|
function toggleDiv (divid){
|
||||||
if (document.getElementById(divid).style.display == 'none'){
|
if (document.getElementById(divid).style.display == 'none'){
|
||||||
document.getElementById(divid).style.display = 'block';
|
document.getElementById(divid).style.display = 'block';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
document.getElementById(divid).style.display = 'none';
|
document.getElementById(divid).style.display = 'none';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -704,7 +707,8 @@ $(document).ready( function() {
|
|||||||
$option = $('#select_validate_' + id_event).val();
|
$option = $('#select_validate_' + id_event).val();
|
||||||
if ($option == 2) {
|
if ($option == 2) {
|
||||||
$("#standby_alert_checkbox_" + id_event).css('display', '');
|
$("#standby_alert_checkbox_" + id_event).css('display', '');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$("#standby_alert_checkbox_" + id_event).css('display', 'none');
|
$("#standby_alert_checkbox_" + id_event).css('display', 'none');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -401,15 +401,16 @@ if ($autorefresh_toogle == 'false'){
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
// Keeps state with pagination
|
// Keeps state with pagination
|
||||||
if ($autorefresh_toogle == 'no'){
|
if ($autorefresh_toogle == 'no') {
|
||||||
html_print_input_hidden('toogle_filter', 'false');
|
html_print_input_hidden('toogle_filter', 'false');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
// If update button has been pushed then don't collapse filter
|
// If update button has been pushed then don't collapse filter
|
||||||
if ($update_pressed == 'false'){
|
if ($update_pressed == 'false') {
|
||||||
html_print_input_hidden('toogle_filter', 'false');
|
html_print_input_hidden('toogle_filter', 'false');
|
||||||
} // Else collapse filter
|
} // Else collapse filter
|
||||||
else{
|
else {
|
||||||
html_print_input_hidden('toogle_filter', 'true');
|
html_print_input_hidden('toogle_filter', 'true');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -629,9 +630,11 @@ foreach ($result as $event) {
|
|||||||
if ($group_rep != 0) {
|
if ($group_rep != 0) {
|
||||||
if ($event["max_estado"] == 2) {
|
if ($event["max_estado"] == 2) {
|
||||||
$estado = 2;
|
$estado = 2;
|
||||||
} else if ($event["min_estado"] == 0) {
|
}
|
||||||
|
else if ($event["min_estado"] == 0) {
|
||||||
$estado = 0;
|
$estado = 0;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$estado = 1;
|
$estado = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -945,7 +948,8 @@ foreach ($result as $event) {
|
|||||||
$string .= '<b>' . __('Agent name') . '</b></td><td align="left">';
|
$string .= '<b>' . __('Agent name') . '</b></td><td align="left">';
|
||||||
if ($event["id_agente"] != 0) {
|
if ($event["id_agente"] != 0) {
|
||||||
$string .= ui_print_agent_name ($event["id_agente"], true);
|
$string .= ui_print_agent_name ($event["id_agente"], true);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$string .= '<i>- ' . __('Empty') . ' -</i>';
|
$string .= '<i>- ' . __('Empty') . ' -</i>';
|
||||||
}
|
}
|
||||||
$string .= '</td></tr><tr class="'. $odd .'">';
|
$string .= '</td></tr><tr class="'. $odd .'">';
|
||||||
@ -1013,7 +1017,8 @@ foreach ($result as $event) {
|
|||||||
|
|
||||||
$odd = ($odd == '')? 'rowOdd' : '';
|
$odd = ($odd == '')? 'rowOdd' : '';
|
||||||
|
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$string .= '<i>- ' . __('Empty') . ' -</i>';
|
$string .= '<i>- ' . __('Empty') . ' -</i>';
|
||||||
$string .= '</a></td></tr><tr class="' . $odd . '">';
|
$string .= '</a></td></tr><tr class="' . $odd . '">';
|
||||||
$odd = ($odd == '')? 'rowOdd' : '';
|
$odd = ($odd == '')? 'rowOdd' : '';
|
||||||
@ -1042,7 +1047,8 @@ foreach ($result as $event) {
|
|||||||
$string .= '<tr class="' . $odd . '"><td align="left" valign="top">' . '<b>' . __('Comments') . '</td><td id="comment_row_' . $event['id_evento'] . '" align="left">';
|
$string .= '<tr class="' . $odd . '"><td align="left" valign="top">' . '<b>' . __('Comments') . '</td><td id="comment_row_' . $event['id_evento'] . '" align="left">';
|
||||||
if($event["user_comment"] != '') {
|
if($event["user_comment"] != '') {
|
||||||
$string .= $event["user_comment"];
|
$string .= $event["user_comment"];
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$string .= '<i>- ' . __('Empty') . ' -</i>';
|
$string .= '<i>- ' . __('Empty') . ' -</i>';
|
||||||
}
|
}
|
||||||
$string .= '</td></tr>';
|
$string .= '</td></tr>';
|
||||||
@ -1073,7 +1079,8 @@ foreach ($result as $event) {
|
|||||||
$string .= $event["source"];
|
$string .= $event["source"];
|
||||||
$string .= '</td></tr><tr>';
|
$string .= '</td></tr><tr>';
|
||||||
$odd = ($odd == '')? 'rowOdd' : '';
|
$odd = ($odd == '')? 'rowOdd' : '';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$string .= '<i>- ' . __('Empty') . ' -</i>';
|
$string .= '<i>- ' . __('Empty') . ' -</i>';
|
||||||
$odd = ($odd == '')? 'rowOdd' : '';
|
$odd = ($odd == '')? 'rowOdd' : '';
|
||||||
}
|
}
|
||||||
@ -1083,7 +1090,8 @@ foreach ($result as $event) {
|
|||||||
$string .= $event["id_extra"];
|
$string .= $event["id_extra"];
|
||||||
$string .= '</td></tr><tr>';
|
$string .= '</td></tr><tr>';
|
||||||
$odd = ($odd == '')? 'rowOdd' : '';
|
$odd = ($odd == '')? 'rowOdd' : '';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$string .= '<i>- ' . __('Empty') . ' -</i>';
|
$string .= '<i>- ' . __('Empty') . ' -</i>';
|
||||||
}
|
}
|
||||||
$string .= '</td></tr>';
|
$string .= '</td></tr>';
|
||||||
|
@ -72,8 +72,9 @@ if ($maps !== false) {
|
|||||||
|
|
||||||
if (!empty ($table->data)) {
|
if (!empty ($table->data)) {
|
||||||
html_print_table ($table);
|
html_print_table ($table);
|
||||||
} else {
|
}
|
||||||
echo '<div class="nf">'.__('No maps found').'</div>';
|
else {
|
||||||
|
echo '<div class="nf">' . __('No maps found') . '</div>';
|
||||||
}
|
}
|
||||||
unset ($table);
|
unset ($table);
|
||||||
?>
|
?>
|
||||||
|
@ -263,7 +263,8 @@ echo '</form>';
|
|||||||
|
|
||||||
if ($count < 1) {
|
if ($count < 1) {
|
||||||
echo '<div class="nf">'.__('No incidents match your search filter').'</div><br />';
|
echo '<div class="nf">'.__('No incidents match your search filter').'</div><br />';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
// TOTAL incidents
|
// TOTAL incidents
|
||||||
$url = "index.php?sec=workspace&sec2=operation/incidents/incident";
|
$url = "index.php?sec=workspace&sec2=operation/incidents/incident";
|
||||||
|
|
||||||
@ -342,7 +343,8 @@ if ($count < 1) {
|
|||||||
|
|
||||||
if (check_acl ($config["id_user"], $row["id_grupo"], "IM") || $config["id_user"] == $row["id_usuario"] || $config["id_user"] == $row["id_creator"]) {
|
if (check_acl ($config["id_user"], $row["id_grupo"], "IM") || $config["id_user"] == $row["id_usuario"] || $config["id_user"] == $row["id_creator"]) {
|
||||||
$data[8] = html_print_checkbox ("id_inc[]", $row["id_incidencia"], false, true);
|
$data[8] = html_print_checkbox ("id_inc[]", $row["id_incidencia"], false, true);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$data[8] = '';
|
$data[8] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,7 +237,8 @@ echo '<tr><td class="datos"><b>'.__('Incident').'</b></td><td colspan="3" class=
|
|||||||
|
|
||||||
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
|
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
|
||||||
html_print_input_text ("titulo", $titulo,'', 70);
|
html_print_input_text ("titulo", $titulo,'', 70);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
html_print_input_text_extended ("titulo", $titulo, "", "", 70, "", false, "", "readonly");
|
html_print_input_text_extended ("titulo", $titulo, "", "", 70, "", false, "", "readonly");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -250,14 +251,16 @@ echo '<tr><td class="datos"><b>'.__('Owner').'</b></td><td class="datos">';
|
|||||||
|
|
||||||
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
|
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
|
||||||
html_print_select (users_get_info (), "usuario_form", $usuario, '', 'SYSTEM', '', false, false, true, "w135");
|
html_print_select (users_get_info (), "usuario_form", $usuario, '', 'SYSTEM', '', false, false, true, "w135");
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
html_print_select (users_get_info (), "usuario_form", $usuario, '', 'SYSTEM', '', false, false, true, "w135", true);
|
html_print_select (users_get_info (), "usuario_form", $usuario, '', 'SYSTEM', '', false, false, true, "w135", true);
|
||||||
}
|
}
|
||||||
echo '</td><td class="datos"><b>'.__('Status').'</b></td><td class="datos">';
|
echo '</td><td class="datos"><b>'.__('Status').'</b></td><td class="datos">';
|
||||||
|
|
||||||
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
|
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
|
||||||
html_print_select (incidents_get_status (), "estado_form", $estado, '', '', '', false, false, false, 'w135');
|
html_print_select (incidents_get_status (), "estado_form", $estado, '', '', '', false, false, false, 'w135');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
html_print_select (incidents_get_status (), "estado_form", $estado, '', '', '', false, false, false, 'w135', true);
|
html_print_select (incidents_get_status (), "estado_form", $estado, '', '', '', false, false, false, 'w135', true);
|
||||||
}
|
}
|
||||||
echo '</td></tr>';
|
echo '</td></tr>';
|
||||||
@ -276,7 +279,8 @@ foreach ($return as $row) {
|
|||||||
// Only owner could change source or user with Incident management privileges
|
// Only owner could change source or user with Incident management privileges
|
||||||
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
|
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
|
||||||
html_print_select ($fields, "origen_form", $origen, '', '', '', false, false, false, 'w135');
|
html_print_select ($fields, "origen_form", $origen, '', '', '', false, false, false, 'w135');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
html_print_select ($fields, "origen_form", $origen, '', '', '', false, false, false, 'w135', true);
|
html_print_select ($fields, "origen_form", $origen, '', '', '', false, false, false, 'w135', true);
|
||||||
}
|
}
|
||||||
echo '</td><td class="datos2"><b>'.__('Group').'</b></td><td class="datos2">';
|
echo '</td><td class="datos2"><b>'.__('Group').'</b></td><td class="datos2">';
|
||||||
@ -284,7 +288,8 @@ echo '</td><td class="datos2"><b>'.__('Group').'</b></td><td class="datos2">';
|
|||||||
// Group combo
|
// Group combo
|
||||||
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
|
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
|
||||||
html_print_select_groups($config["id_user"], "IR", true, "grupo_form", $id_grupo, '', '', '', false, false, false, 'w135');
|
html_print_select_groups($config["id_user"], "IR", true, "grupo_form", $id_grupo, '', '', '', false, false, false, 'w135');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
html_print_select_groups($config["id_user"], "IR", true, "grupo_form", $id_grupo, '', '', '', false, false, true, 'w135', true);
|
html_print_select_groups($config["id_user"], "IR", true, "grupo_form", $id_grupo, '', '', '', false, false, true, 'w135', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -300,7 +305,8 @@ else {
|
|||||||
echo '</td><td class="datos"><b>'.__('Creator').'</b></td><td class="datos">';
|
echo '</td><td class="datos"><b>'.__('Creator').'</b></td><td class="datos">';
|
||||||
if (empty ($id_creator)) {
|
if (empty ($id_creator)) {
|
||||||
echo 'SYSTEM';
|
echo 'SYSTEM';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
echo $id_creator.' (<i>'.get_user_fullname($id_creator).'</i>)';
|
echo $id_creator.' (<i>'.get_user_fullname($id_creator).'</i>)';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -336,9 +342,11 @@ echo '</td></tr></table><div style="width: 98%; text-align:right;">';
|
|||||||
// Only if user is the used who opened incident or (s)he is admin
|
// Only if user is the used who opened incident or (s)he is admin
|
||||||
if (isset ($id_inc) AND ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"]))) {
|
if (isset ($id_inc) AND ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"]))) {
|
||||||
html_print_submit_button (__('Update incident'), "accion", false, 'class="sub upd"');
|
html_print_submit_button (__('Update incident'), "accion", false, 'class="sub upd"');
|
||||||
} elseif (check_acl ($config["id_user"], $id_grupo, "IW")) {
|
}
|
||||||
|
elseif (check_acl ($config["id_user"], $id_grupo, "IW")) {
|
||||||
html_print_submit_button (__('Create'), "accion", false, 'class="sub wand"');
|
html_print_submit_button (__('Create'), "accion", false, 'class="sub wand"');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
html_print_submit_button (__('Submit'), "accion", true, 'class="sub upd"');
|
html_print_submit_button (__('Submit'), "accion", true, 'class="sub upd"');
|
||||||
}
|
}
|
||||||
echo "</div></form>";
|
echo "</div></form>";
|
||||||
@ -467,7 +475,6 @@ if (isset ($id_inc)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready (function () {
|
$(document).ready (function () {
|
||||||
agent_autocomplete('#text-agent', '#hidden-server_name', '#hidden-id_agent');
|
agent_autocomplete('#text-agent', '#hidden-server_name', '#hidden-id_agent');
|
||||||
|
@ -178,7 +178,8 @@ elseif (isset ($_GET["insert_form"])) {
|
|||||||
}
|
}
|
||||||
$prioridad = 0;
|
$prioridad = 0;
|
||||||
$id_grupo = 0;
|
$id_grupo = 0;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
db_pandora_audit("HACK","Trying to get to incident details in an unusual way");
|
db_pandora_audit("HACK","Trying to get to incident details in an unusual way");
|
||||||
require ("general/noaccess.php");
|
require ("general/noaccess.php");
|
||||||
exit;
|
exit;
|
||||||
@ -212,7 +213,8 @@ if (isset ($id_inc)) { //If $id_inc is set (when $_GET["id"] is set, not $_GET["
|
|||||||
ui_print_page_header (__('Incident details'). ' #'.$id_inc, "images/book_edit.png", false, "", false, "");
|
ui_print_page_header (__('Incident details'). ' #'.$id_inc, "images/book_edit.png", false, "", false, "");
|
||||||
echo '<form name="accion_form" method="POST" action="index.php?sec=incidencias&sec2=operation/incidents/incident&action=update">';
|
echo '<form name="accion_form" method="POST" action="index.php?sec=incidencias&sec2=operation/incidents/incident&action=update">';
|
||||||
echo '<input type="hidden" name="id_inc" value="'.$id_inc.'">';
|
echo '<input type="hidden" name="id_inc" value="'.$id_inc.'">';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
ui_print_page_header (__('Create incident'), "images/book_edit.png", false, "", false, "");
|
ui_print_page_header (__('Create incident'), "images/book_edit.png", false, "", false, "");
|
||||||
echo '<form name="accion_form" method="POST" action="index.php?sec=incidencias&sec2=operation/incidents/incident&action=insert">';
|
echo '<form name="accion_form" method="POST" action="index.php?sec=incidencias&sec2=operation/incidents/incident&action=insert">';
|
||||||
}
|
}
|
||||||
@ -222,7 +224,8 @@ echo '<tr><td class="datos"><b>'.__('Incident').'</b></td><td colspan="3" class=
|
|||||||
|
|
||||||
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
|
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
|
||||||
html_print_input_text ("titulo", $titulo,'', 70);
|
html_print_input_text ("titulo", $titulo,'', 70);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
html_print_input_text_extended ("titulo", $titulo, "", "", 70, "", false, "", "readonly");
|
html_print_input_text_extended ("titulo", $titulo, "", "", 70, "", false, "", "readonly");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -235,7 +238,8 @@ echo '<tr><td class="datos"><b>'.__('Owner').'</b></td><td class="datos">';
|
|||||||
|
|
||||||
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
|
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
|
||||||
html_print_select (users_get_info (), "usuario_form", $usuario, '', 'SYSTEM', '', false, false, true, "w135");
|
html_print_select (users_get_info (), "usuario_form", $usuario, '', 'SYSTEM', '', false, false, true, "w135");
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
html_print_select (users_get_info (), "usuario_form", $usuario, '', 'SYSTEM', '', false, false, true, "w135", true);
|
html_print_select (users_get_info (), "usuario_form", $usuario, '', 'SYSTEM', '', false, false, true, "w135", true);
|
||||||
}
|
}
|
||||||
echo '</td><td class="datos"><b>'.__('Status').'</b></td><td class="datos">';
|
echo '</td><td class="datos"><b>'.__('Status').'</b></td><td class="datos">';
|
||||||
@ -271,7 +275,8 @@ echo '</td><td class="datos2"><b>'.__('Group').'</b></td><td class="datos2">';
|
|||||||
// Group combo
|
// Group combo
|
||||||
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
|
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
|
||||||
html_print_select_groups($config["id_user"], "IR", true, "grupo_form", $id_grupo, '', '', '', false, false, false, 'w135');
|
html_print_select_groups($config["id_user"], "IR", true, "grupo_form", $id_grupo, '', '', '', false, false, false, 'w135');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
html_print_select_groups($config["id_user"], "IR", true, "grupo_form", $id_grupo, '', '', '', false, false, true, 'w135', true);
|
html_print_select_groups($config["id_user"], "IR", true, "grupo_form", $id_grupo, '', '', '', false, false, true, 'w135', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -279,14 +284,16 @@ echo '</td></tr><tr><td class="datos"><b>'.__('Priority').'</b></td><td class="d
|
|||||||
|
|
||||||
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
|
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
|
||||||
html_print_select (incidents_get_priorities (), "prioridad_form", $prioridad, '', '', '', false, false, false, 'w135');
|
html_print_select (incidents_get_priorities (), "prioridad_form", $prioridad, '', '', '', false, false, false, 'w135');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
html_print_select (incidents_get_priorities (), "prioridad_form", $prioridad, '', '', '', false, false, false, 'w135', true);
|
html_print_select (incidents_get_priorities (), "prioridad_form", $prioridad, '', '', '', false, false, false, 'w135', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '</td><td class="datos"><b>'.__('Creator').'</b></td><td class="datos">';
|
echo '</td><td class="datos"><b>'.__('Creator').'</b></td><td class="datos">';
|
||||||
if (empty ($id_creator)) {
|
if (empty ($id_creator)) {
|
||||||
echo 'SYSTEM';
|
echo 'SYSTEM';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
echo $id_creator.' (<i>'.get_user_fullname($id_creator).'</i>)';
|
echo $id_creator.' (<i>'.get_user_fullname($id_creator).'</i>)';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -294,7 +301,8 @@ echo '</td></tr><tr><td class="datos2" colspan="4">';
|
|||||||
|
|
||||||
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
|
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
|
||||||
html_print_textarea ("descripcion", 15, 80, $texto, 'style="height:200px;"');
|
html_print_textarea ("descripcion", 15, 80, $texto, 'style="height:200px;"');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
html_print_textarea ("descripcion", 15, 80, $texto, 'style="height:200px;" disabled');
|
html_print_textarea ("descripcion", 15, 80, $texto, 'style="height:200px;" disabled');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -303,9 +311,11 @@ echo '</td></tr></table><div style="width: 650px; text-align:right;">';
|
|||||||
// Only if user is the used who opened incident or (s)he is admin
|
// Only if user is the used who opened incident or (s)he is admin
|
||||||
if (isset ($id_inc) AND ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"]))) {
|
if (isset ($id_inc) AND ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"]))) {
|
||||||
html_print_submit_button (__('Update incident'), "accion", false, 'class="sub upd"');
|
html_print_submit_button (__('Update incident'), "accion", false, 'class="sub upd"');
|
||||||
} elseif (check_acl ($config["id_user"], $id_grupo, "IW")) {
|
}
|
||||||
|
elseif (check_acl ($config["id_user"], $id_grupo, "IW")) {
|
||||||
html_print_submit_button (__('Create'), "accion", false, 'class="sub wand"');
|
html_print_submit_button (__('Create'), "accion", false, 'class="sub wand"');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
html_print_submit_button (__('Submit'), "accion", true, 'class="sub upd"');
|
html_print_submit_button (__('Submit'), "accion", true, 'class="sub upd"');
|
||||||
}
|
}
|
||||||
echo "</div></form>";
|
echo "</div></form>";
|
||||||
@ -389,7 +399,8 @@ if (isset ($id_inc)) {
|
|||||||
$data[2] = format_for_graph ($row["size"])."B";
|
$data[2] = format_for_graph ($row["size"])."B";
|
||||||
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
|
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
|
||||||
$data[3] = html_print_input_image ("delete_file", "images/cross.png", $row["id_attachment"], 'border:0px;" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;', true);
|
$data[3] = html_print_input_image ("delete_file", "images/cross.png", $row["id_attachment"], 'border:0px;" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;', true);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$data[3] = '';
|
$data[3] = '';
|
||||||
}
|
}
|
||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
|
@ -50,7 +50,8 @@ if ($read_message) {
|
|||||||
$message_id = (int) get_parameter ("id_message");
|
$message_id = (int) get_parameter ("id_message");
|
||||||
if ($show_sent) {
|
if ($show_sent) {
|
||||||
$message = messages_get_message_sent ($message_id);
|
$message = messages_get_message_sent ($message_id);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$message = messages_get_message ($message_id);
|
$message = messages_get_message ($message_id);
|
||||||
messages_process_read ($message_id);
|
messages_process_read ($message_id);
|
||||||
}
|
}
|
||||||
@ -92,7 +93,8 @@ if ($read_message) {
|
|||||||
//Prevent RE: RE: RE:
|
//Prevent RE: RE: RE:
|
||||||
if (strstr ($message["subject"], "RE:")) {
|
if (strstr ($message["subject"], "RE:")) {
|
||||||
$new_subj = $message["subject"];
|
$new_subj = $message["subject"];
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$new_subj = "RE: ".$message["subject"];
|
$new_subj = "RE: ".$message["subject"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,7 +87,8 @@ if ($show_sent) { //sent view
|
|||||||
echo '<p>'.__('You have').' <b>'.$num_messages.'</b> '.' '.__('sent message(s)').'.</p>';
|
echo '<p>'.__('You have').' <b>'.$num_messages.'</b> '.' '.__('sent message(s)').'.</p>';
|
||||||
}
|
}
|
||||||
$messages = messages_get_overview_sent ('', 'DESC');
|
$messages = messages_get_overview_sent ('', 'DESC');
|
||||||
} else { //messages received
|
}
|
||||||
|
else { //messages received
|
||||||
$num_messages = messages_get_count ($config["id_user"]);
|
$num_messages = messages_get_count ($config["id_user"]);
|
||||||
if ($num_messages > 0 && !is_ajax()) {
|
if ($num_messages > 0 && !is_ajax()) {
|
||||||
echo '<p>'.__('You have').' <b>'.$num_messages.'</b> '.' '.__('unread message(s)').'.</p>';
|
echo '<p>'.__('You have').' <b>'.$num_messages.'</b> '.' '.__('unread message(s)').'.</p>';
|
||||||
@ -97,7 +98,8 @@ if ($show_sent) { //sent view
|
|||||||
|
|
||||||
if (empty ($messages)) {
|
if (empty ($messages)) {
|
||||||
echo '<div class="nf">'.__('There are no messages').'</div>';
|
echo '<div class="nf">'.__('There are no messages').'</div>';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$table->width = "98%";
|
$table->width = "98%";
|
||||||
$table->class = "databox";
|
$table->class = "databox";
|
||||||
$table->cellpadding = 4;
|
$table->cellpadding = 4;
|
||||||
@ -135,17 +137,20 @@ if (empty ($messages)) {
|
|||||||
$data[0] .= '<a href="index.php?sec=workspace&sec2=operation/messages/message_edit&read_message=1&show_sent=1&id_message='.$message_id.'">';
|
$data[0] .= '<a href="index.php?sec=workspace&sec2=operation/messages/message_edit&read_message=1&show_sent=1&id_message='.$message_id.'">';
|
||||||
$data[0] .= html_print_image ("images/email_open.png", true, array ("border" => 0, "title" => __('Click to read')));
|
$data[0] .= html_print_image ("images/email_open.png", true, array ("border" => 0, "title" => __('Click to read')));
|
||||||
$data[0] .= '</a>';
|
$data[0] .= '</a>';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$data[0] .= '<a href="index.php?sec=workspace&sec2=operation/messages/message_list&mark_unread=1&id_message='.$message_id.'">';
|
$data[0] .= '<a href="index.php?sec=workspace&sec2=operation/messages/message_list&mark_unread=1&id_message='.$message_id.'">';
|
||||||
$data[0] .= html_print_image ("images/email_open.png", true, array ("border" => 0, "title" => __('Mark as unread')));
|
$data[0] .= html_print_image ("images/email_open.png", true, array ("border" => 0, "title" => __('Mark as unread')));
|
||||||
$data[0] .= '</a>';
|
$data[0] .= '</a>';
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
if ($show_sent) {
|
if ($show_sent) {
|
||||||
$data[0] .= '<a href="index.php?sec=workspace&sec2=operation/messages/message_edit&read_message=1&show_sent=1&id_message='.$message_id.'">';
|
$data[0] .= '<a href="index.php?sec=workspace&sec2=operation/messages/message_edit&read_message=1&show_sent=1&id_message='.$message_id.'">';
|
||||||
$data[0] .= html_print_image ("images/email.png", true, array ("border" => 0, "title" => __('Message unread - click to read')));
|
$data[0] .= html_print_image ("images/email.png", true, array ("border" => 0, "title" => __('Message unread - click to read')));
|
||||||
$data[0] .= '</a>';
|
$data[0] .= '</a>';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$data[0] .= '<a href="index.php?sec=workspace&sec2=operation/messages/message_edit&read_message=1&id_message='.$message_id.'">';
|
$data[0] .= '<a href="index.php?sec=workspace&sec2=operation/messages/message_edit&read_message=1&id_message='.$message_id.'">';
|
||||||
$data[0] .= html_print_image ("images/email.png", true, array ("border" => 0, "title" => __('Message unread - click to read')));
|
$data[0] .= html_print_image ("images/email.png", true, array ("border" => 0, "title" => __('Message unread - click to read')));
|
||||||
$data[0] .= '</a>';
|
$data[0] .= '</a>';
|
||||||
@ -158,7 +163,8 @@ if (empty ($messages)) {
|
|||||||
$dest_user = $message["dest"];
|
$dest_user = $message["dest"];
|
||||||
}
|
}
|
||||||
$data[1] = $dest_user;
|
$data[1] = $dest_user;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$orig_user = get_user_fullname ($message["sender"]);
|
$orig_user = get_user_fullname ($message["sender"]);
|
||||||
if (!$orig_user) {
|
if (!$orig_user) {
|
||||||
$orig_user = $message["sender"];
|
$orig_user = $message["sender"];
|
||||||
@ -168,12 +174,14 @@ if (empty ($messages)) {
|
|||||||
|
|
||||||
if ($show_sent) {
|
if ($show_sent) {
|
||||||
$data[2] = '<a href="index.php?sec=workspace&sec2=operation/messages/message_edit&read_message=1&show_sent=1&id_message='.$message_id.'">';
|
$data[2] = '<a href="index.php?sec=workspace&sec2=operation/messages/message_edit&read_message=1&show_sent=1&id_message='.$message_id.'">';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$data[2] = '<a href="index.php?sec=workspace&sec2=operation/messages/message_edit&read_message=1&id_message='.$message_id.'">';
|
$data[2] = '<a href="index.php?sec=workspace&sec2=operation/messages/message_edit&read_message=1&id_message='.$message_id.'">';
|
||||||
}
|
}
|
||||||
if ($message["subject"] == "") {
|
if ($message["subject"] == "") {
|
||||||
$data[2] .= __('No Subject');
|
$data[2] .= __('No Subject');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$data[2] .= $message["subject"];
|
$data[2] .= $message["subject"];
|
||||||
}
|
}
|
||||||
$data[2] .= '</a>';
|
$data[2] .= '</a>';
|
||||||
@ -185,7 +193,8 @@ if (empty ($messages)) {
|
|||||||
onClick="javascript:if (!confirm(\''.__('Are you sure?').'\')) return false;">' .
|
onClick="javascript:if (!confirm(\''.__('Are you sure?').'\')) return false;">' .
|
||||||
html_print_image ('images/cross.png', true, array("title" => __('Delete'))) . '</a>'.
|
html_print_image ('images/cross.png', true, array("title" => __('Delete'))) . '</a>'.
|
||||||
html_print_checkbox_extended ('delete_multiple[]', $message_id, false, false, '', 'class="check_delete"', true);
|
html_print_checkbox_extended ('delete_multiple[]', $message_id, false, false, '', 'class="check_delete"', true);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$data[4] = '<a href="index.php?sec=workspace&sec2=operation/messages/message_list&delete_message=1&id='.$message_id.'"
|
$data[4] = '<a href="index.php?sec=workspace&sec2=operation/messages/message_list&delete_message=1&id='.$message_id.'"
|
||||||
onClick="javascript:if (!confirm(\''.__('Are you sure?').'\')) return false;">' .
|
onClick="javascript:if (!confirm(\''.__('Are you sure?').'\')) return false;">' .
|
||||||
html_print_image ('images/cross.png', true, array("title" => __('Delete'))) . '</a>'.
|
html_print_image ('images/cross.png', true, array("title" => __('Delete'))) . '</a>'.
|
||||||
|
@ -42,7 +42,7 @@ if ($id) {
|
|||||||
|
|
||||||
$period = get_parameter('period', '86400');
|
$period = get_parameter('period', '86400');
|
||||||
$update_date = get_parameter('update_date', 0);
|
$update_date = get_parameter('update_date', 0);
|
||||||
if($update_date){
|
if ($update_date) {
|
||||||
$date = get_parameter_post ('date');
|
$date = get_parameter_post ('date');
|
||||||
$time = get_parameter_post ('time');
|
$time = get_parameter_post ('time');
|
||||||
$interval = get_parameter('period','86400');
|
$interval = get_parameter('period','86400');
|
||||||
@ -123,7 +123,8 @@ for ($x = 0; isset($all_rcs[$x]['id_rc']); $x++) {
|
|||||||
|
|
||||||
if ($filter['aggregate'] != 'none') {
|
if ($filter['aggregate'] != 'none') {
|
||||||
echo '<h4>' . $filter['id_name'] . ' (' . __($filter['aggregate']) . '/' . __($filter['output']) . ')</h4>';
|
echo '<h4>' . $filter['id_name'] . ' (' . __($filter['aggregate']) . '/' . __($filter['output']) . ')</h4>';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
echo '<h4>' . $filter['id_name'] . ' (' . __($filter['output']) . ')</h4>';
|
echo '<h4>' . $filter['id_name'] . ' (' . __($filter['output']) . ')</h4>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,9 +133,5 @@ for ($x = 0; isset($all_rcs[$x]['id_rc']); $x++) {
|
|||||||
|
|
||||||
// Draw
|
// Draw
|
||||||
netflow_draw_item ($start_date, $end_date, $type, $filter, $command, $filter, $max_aggregates, $unique_id);
|
netflow_draw_item ($start_date, $end_date, $type, $filter, $command, $filter, $max_aggregates, $unique_id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
@ -115,7 +115,8 @@ if ($view_graph) {
|
|||||||
$options['screen'] = "<a href='$url&pure=1'>"
|
$options['screen'] = "<a href='$url&pure=1'>"
|
||||||
. html_print_image ("images/fullscreen.png", true, array ("title" => __('Full screen mode')))
|
. html_print_image ("images/fullscreen.png", true, array ("title" => __('Full screen mode')))
|
||||||
. "</a>";
|
. "</a>";
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$options['screen'] = "<a href='$url&pure=0'>"
|
$options['screen'] = "<a href='$url&pure=0'>"
|
||||||
. html_print_image ("images/normalscreen.png", true, array ("title" => __('Back to normal mode')))
|
. html_print_image ("images/normalscreen.png", true, array ("title" => __('Back to normal mode')))
|
||||||
. "</a>";
|
. "</a>";
|
||||||
|
@ -83,7 +83,8 @@ else {
|
|||||||
foreach ($reports as $report) {
|
foreach ($reports as $report) {
|
||||||
if($linkReport) {
|
if($linkReport) {
|
||||||
$reportstring = "<a href='?sec=reporting&sec2=godmode/reporting/reporting_builder&action=edit&id_report=" . $report['id_report'] . "' title='" . __("Edit") . "'>" . $report['name'] . "</a>";
|
$reportstring = "<a href='?sec=reporting&sec2=godmode/reporting/reporting_builder&action=edit&id_report=" . $report['id_report'] . "' title='" . __("Edit") . "'>" . $report['name'] . "</a>";
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$reportstring = $report['name'];
|
$reportstring = $report['name'];
|
||||||
}
|
}
|
||||||
$data = array(
|
$data = array(
|
||||||
|
@ -644,7 +644,8 @@ function CheckAll() {
|
|||||||
function toggleDiv (divid){
|
function toggleDiv (divid){
|
||||||
if (document.getElementById(divid).style.display == 'none'){
|
if (document.getElementById(divid).style.display == 'none'){
|
||||||
document.getElementById(divid).style.display = 'block';
|
document.getElementById(divid).style.display = 'block';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
document.getElementById(divid).style.display = 'none';
|
document.getElementById(divid).style.display = 'none';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,13 +49,13 @@ if (is_ajax ()){
|
|||||||
$shortcut_update = get_parameter("shortcut_update", 0);
|
$shortcut_update = get_parameter("shortcut_update", 0);
|
||||||
|
|
||||||
// Update of user to show/don't show shortcut bar
|
// Update of user to show/don't show shortcut bar
|
||||||
if ($shortcut_update){
|
if ($shortcut_update) {
|
||||||
|
|
||||||
// First we get the actual state
|
// First we get the actual state
|
||||||
$shortcut_value = db_get_value_filter('shortcut', 'tusuario', array('id_user' => $id));
|
$shortcut_value = db_get_value_filter('shortcut', 'tusuario', array('id_user' => $id));
|
||||||
|
|
||||||
//Deactivate shorcut var
|
//Deactivate shorcut var
|
||||||
if ($shortcut_value == 1){
|
if ($shortcut_value == 1) {
|
||||||
db_process_sql_update('tusuario', array('shortcut' => 0), array('id_user' => $id));
|
db_process_sql_update('tusuario', array('shortcut' => 0), array('id_user' => $id));
|
||||||
}
|
}
|
||||||
// Activate shortcut var
|
// Activate shortcut var
|
||||||
@ -198,7 +198,8 @@ if ($view_mode === false) {
|
|||||||
html_print_input_text_extended ("password_new", "", '', '', '15', '25', $view_mode, '', 'class="input"', false, true);
|
html_print_input_text_extended ("password_new", "", '', '', '15', '25', $view_mode, '', 'class="input"', false, true);
|
||||||
echo '</td></tr><tr><td class="datos">'.__('Password confirmation').'</td><td class="datos">';
|
echo '</td></tr><tr><td class="datos">'.__('Password confirmation').'</td><td class="datos">';
|
||||||
html_print_input_text_extended ("password_conf", "", '', '', '15', '25', $view_mode, '', 'class="input"', false, true);
|
html_print_input_text_extended ("password_conf", "", '', '', '15', '25', $view_mode, '', 'class="input"', false, true);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
echo '<i>'.__('You can not change your password from Pandora FMS under the current authentication scheme').'</i>';
|
echo '<i>'.__('You can not change your password from Pandora FMS under the current authentication scheme').'</i>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -265,7 +266,8 @@ $dashboards = get_user_dashboards ($config['id_user']);
|
|||||||
$dashboards_aux = array();
|
$dashboards_aux = array();
|
||||||
if ($dashboards === false) {
|
if ($dashboards === false) {
|
||||||
$dashboards = array('None'=>'None');
|
$dashboards = array('None'=>'None');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
foreach ($dashboards as $key=>$dashboard) {
|
foreach ($dashboards as $key=>$dashboard) {
|
||||||
$dashboards_aux[$dashboard['name']] = $dashboard['name'];
|
$dashboards_aux[$dashboard['name']] = $dashboard['name'];
|
||||||
}
|
}
|
||||||
@ -276,7 +278,8 @@ $layouts = visual_map_get_user_layouts ($config['id_user'], true);
|
|||||||
$layouts_aux = array();
|
$layouts_aux = array();
|
||||||
if ($layouts === false) {
|
if ($layouts === false) {
|
||||||
$layouts_aux = array('None'=>'None');
|
$layouts_aux = array('None'=>'None');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
foreach ($layouts as $layout) {
|
foreach ($layouts as $layout) {
|
||||||
$layouts_aux[$layout] = $layout;
|
$layouts_aux[$layout] = $layout;
|
||||||
}
|
}
|
||||||
@ -290,7 +293,8 @@ echo '</td></tr></table>';
|
|||||||
echo '<div style="width:90%; text-align:right;">';
|
echo '<div style="width:90%; text-align:right;">';
|
||||||
if (!$config["user_can_update_info"]) {
|
if (!$config["user_can_update_info"]) {
|
||||||
echo '<i>'.__('You can not change your user info from Pandora FMS under the current authentication scheme').'</i>';
|
echo '<i>'.__('You can not change your user info from Pandora FMS under the current authentication scheme').'</i>';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
html_print_submit_button (__('Update'), 'uptbutton', $view_mode, 'class="sub upd"');
|
html_print_submit_button (__('Update'), 'uptbutton', $view_mode, 'class="sub upd"');
|
||||||
}
|
}
|
||||||
echo '</div></form>';
|
echo '</div></form>';
|
||||||
@ -324,7 +328,8 @@ foreach ($result as $profile) {
|
|||||||
|
|
||||||
if (!empty ($table->data)) {
|
if (!empty ($table->data)) {
|
||||||
html_print_table ($table);
|
html_print_table ($table);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
echo '<div class="nf">'.__('This user doesn\'t have any assigned profile/group').'</div>';
|
echo '<div class="nf">'.__('This user doesn\'t have any assigned profile/group').'</div>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user