2013-02-11 Miguel de Dios <miguel.dedios@artica.es>

* godmode/menu.php, godmode/alerts/configure_alert_template.php,
	godmode/alerts/alert_actions.php,
	godmode/agentes/agent_template.php,
	godmode/massive/massive_delete_agents.php: cleaned source code.
	
	* include/functions_html.php: added the weeks in the input for
	times.
	
	* operation/agentes/stat_win.php: fixed the malformated table when
	show extended options in the time widget.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7617 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-02-11 10:26:16 +00:00
parent c78199a6bb
commit b35dd543ce
8 changed files with 82 additions and 55 deletions

View File

@ -1,3 +1,16 @@
2013-02-11 Miguel de Dios <miguel.dedios@artica.es>
* godmode/menu.php, godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_actions.php,
godmode/agentes/agent_template.php,
godmode/massive/massive_delete_agents.php: cleaned source code.
* include/functions_html.php: added the weeks in the input for
times.
* operation/agentes/stat_win.php: fixed the malformated table when
show extended options in the time widget.
2013-02-11 Sergio Martin <sergio.martin@artica.es> 2013-02-11 Sergio Martin <sergio.martin@artica.es>
* operation/gis_maps/index.php * operation/gis_maps/index.php

View File

@ -112,7 +112,8 @@ if (isset ($_POST["template_id"])) {
// Set the initial module status // Set the initial module status
if ($row2["type"] == 21 || $row2["type"] == 22 || $row2["type"] == 23) { if ($row2["type"] == 21 || $row2["type"] == 22 || $row2["type"] == 23) {
$status = 0; $status = 0;
} else { }
else {
$status = 4; $status = 4;
} }
@ -131,7 +132,8 @@ if (isset ($_POST["template_id"])) {
// Update module status count // Update module status count
if ($status == 4) { if ($status == 4) {
db_process_sql ('UPDATE tagente SET total_count=total_count+1, notinit_count=notinit_count+1 WHERE id_agente=' . (int)$id_agente); db_process_sql ('UPDATE tagente SET total_count=total_count+1, notinit_count=notinit_count+1 WHERE id_agente=' . (int)$id_agente);
} else { }
else {
db_process_sql ('UPDATE tagente SET total_count=total_count+1, normal_count=normal_count+1 WHERE id_agente=' . (int)$id_agente); db_process_sql ('UPDATE tagente SET total_count=total_count+1, normal_count=normal_count+1 WHERE id_agente=' . (int)$id_agente);
} }
} }

View File

@ -114,7 +114,8 @@ if ($copy_action) {
exit; exit;
} }
} }
} else { }
else {
// Header // Header
if (defined('METACONSOLE')) { if (defined('METACONSOLE')) {
alerts_meta_print_header (); alerts_meta_print_header ();

View File

@ -274,7 +274,7 @@ if (check_acl ($config['id_user'], 0, "PM")) {
if (array_key_exists('fatherId',$extmenu)) { if (array_key_exists('fatherId',$extmenu)) {
if (strlen($extmenu['fatherId']) > 0) { if (strlen($extmenu['fatherId']) > 0) {
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["text"] = __($extmenu['name']); $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["text"] = __($extmenu['name']);
if ($extmenu["name"] != 'DB interface'){ if ($extmenu["name"] != 'DB interface') {
if (!empty($config['refr'])) { if (!empty($config['refr'])) {
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["refr"] = $config['refr']; $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["refr"] = $config['refr'];
} }

View File

@ -448,6 +448,7 @@ function html_print_extended_select_for_time ($name, $selected = '', $script = '
SECONDS_1MINUTE => __('minutes'), SECONDS_1MINUTE => __('minutes'),
SECONDS_1HOUR => __('hours'), SECONDS_1HOUR => __('hours'),
SECONDS_1DAY => __('days'), SECONDS_1DAY => __('days'),
SECONDS_1WEEK => __('weeks'),
SECONDS_1MONTH => __('months'), SECONDS_1MONTH => __('months'),
SECONDS_1YEAR => __('years')); SECONDS_1YEAR => __('years'));

View File

@ -283,18 +283,18 @@ $label = base64_decode(get_parameter('label', ''));
<?php <?php
echo __('Please, make your changes and apply with the <i>Reload</i> button'); echo __('Please, make your changes and apply with the <i>Reload</i> button');
?> ?>
<div style="float: left; width: 80%;"> <div style="float: left; width: 85%;">
<form method="get" action="stat_win.php"> <form method="get" action="stat_win.php">
<?php <?php
html_print_input_hidden ("id", $id); html_print_input_hidden ("id", $id);
html_print_input_hidden ("label", $label); html_print_input_hidden ("label", $label);
if (isset($hash_connection_data)) { if (isset($hash_connection_data)) {
html_print_input_hidden("loginhash", "auto"); html_print_input_hidden("loginhash", "auto");
html_print_input_hidden("loginhash_data", $loginhash_data); html_print_input_hidden("loginhash_data", $loginhash_data);
html_print_input_hidden("loginhash_user", $loginhash_user); html_print_input_hidden("loginhash_user", $loginhash_user);
} }
html_print_input_hidden ("id", $id); html_print_input_hidden ("id", $id);
@ -305,10 +305,10 @@ $label = base64_decode(get_parameter('label', ''));
html_print_input_hidden ("type", $type); html_print_input_hidden ("type", $type);
} }
?> ?>
<table class="databox_frame" cellspacing="5" width="100%"> <table class="databox_frame" cellspacing="2" width="100%">
<tr> <tr>
<td><?php echo __('Refresh time');?></td> <td><?php echo __('Refresh time');?></td>
<td> <td width="50%">
<?php <?php
html_print_extended_select_for_time( html_print_extended_select_for_time(
"refresh", $refresh, '', '', 0, 7); "refresh", $refresh, '', '', 0, 7);
@ -390,33 +390,43 @@ $label = base64_decode(get_parameter('label', ''));
case 'boolean': case 'boolean':
case 'sparse': case 'sparse':
?> ?>
<tr> <tr>
<td><?php echo __('Time compare').' ('.__('Overlapped').')';?></td> <td>
<td> <?php
<?php echo __('Time compare') . ' (' .
html_print_checkbox ("time_compare_overlapped", __('Overlapped') . ')';
1, (bool) $time_compare_overlapped); ?>
?> </td>
</td> <td>
</tr> <?php
<tr> html_print_checkbox ("time_compare_overlapped",
<td><?php echo __('Time compare').' ('.__('Separated').')';?></td> 1, (bool) $time_compare_overlapped);
<td> ?>
<?php </td>
html_print_checkbox ("time_compare_separated", </tr>
1, (bool) $time_compare_separated); <tr>
?> <td>
</td> <?php
</tr> echo __('Time compare') . ' ('.
<tr> __('Separated').')';
<td><?php echo __('Show unknown graph');?></td> ?>
<td> </td>
<?php <td>
html_print_checkbox ("unknown_graph", <?php
1, (bool) $unknown_graph); html_print_checkbox ("time_compare_separated",
?> 1, (bool) $time_compare_separated);
</td> ?>
</tr> </td>
</tr>
<tr>
<td><?php echo __('Show unknown graph');?></td>
<td>
<?php
html_print_checkbox ("unknown_graph",
1, (bool) $unknown_graph);
?>
</td>
</tr>
<?php <?php
break; break;
} }