2008-08-22 Sancho Lerena <slerena@gmail.com>
* pandoradb_data.sql: Removed data for locale, added for new date string format. * include/functions_html.php: Deletion of table properties after calling it makes a bad render on several pages that uses some properties for other things (width). * include/functions_reporting.php: Added several checks to avoid notices. * include/config_process.php: Removed locale code. Added code for new datetime string format. * include/locale.class.php: Removed. * include/functions.php: pandora_help() was not returning correct output. Added format_datetime() function to render date / time strings in user defined format. * include/functions_db.php: Added check in get_monitors_down() to avoid notice in void foreach. * operation/incidents/incident_detail.php: Solved problem with attachments. * operation/users/user.php: Solved problem with old help_lang[] array. * operation/messages/message.php: Sime minor fixes and style improvements. * operation/servers/view_server.php: Remove description. * operation/servers/view_server_detail.php: Removed bad field retrieval from database and added format_datetime(). * reporting/fgraph.php: Fixed small problem in monitors_health_pipe(). (changed parameters). * general/footer.php: Updated use of new functions. * general/header.php: Added blank spaces between icons and texts. * godmode/setup/setup.php: Management of new string format for datetime. * godmode/profiles/profile_list.php: Submit button now uses div instead tables. * godmode/reporting/reporting_builder.php: Added check before foreach() to avoid notice warnings. Changed div for buttons. * godmode/reporting/map_builder.php: Fixed div for submit button. * godmode/servers/modificar_server.php: Fixed typo in SQL sentence. Removed usage of not-used-now locale format functions. Alter legend to use a plain-formatted table to avoid background color in legend. * /en/help_date_format.php: Added help for date format string. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1023 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
d3f93f9408
commit
404e43c9fc
|
@ -1,3 +1,61 @@
|
|||
2008-08-22 Sancho Lerena <slerena@gmail.com>
|
||||
|
||||
* pandoradb_data.sql: Removed data for locale, added for new
|
||||
date string format.
|
||||
|
||||
* include/functions_html.php: Deletion of table properties
|
||||
after calling it makes a bad render on several pages that uses
|
||||
some properties for other things (width).
|
||||
|
||||
* include/functions_reporting.php: Added several checks to avoid
|
||||
notices.
|
||||
|
||||
* include/config_process.php: Removed locale code. Added code for
|
||||
new datetime string format.
|
||||
|
||||
* include/locale.class.php: Removed.
|
||||
|
||||
* include/functions.php: pandora_help() was not returning correct output.
|
||||
Added format_datetime() function to render date / time strings in user
|
||||
defined format.
|
||||
|
||||
* include/functions_db.php: Added check in get_monitors_down() to avoid
|
||||
notice in void foreach.
|
||||
|
||||
* operation/incidents/incident_detail.php: Solved problem with attachments.
|
||||
|
||||
* operation/users/user.php: Solved problem with old help_lang[] array.
|
||||
|
||||
* operation/messages/message.php: Sime minor fixes and style improvements.
|
||||
|
||||
* operation/servers/view_server.php: Remove description.
|
||||
|
||||
* operation/servers/view_server_detail.php: Removed bad field retrieval
|
||||
from database and added format_datetime().
|
||||
|
||||
* reporting/fgraph.php: Fixed small problem in monitors_health_pipe().
|
||||
(changed parameters).
|
||||
|
||||
* general/footer.php: Updated use of new functions.
|
||||
|
||||
* general/header.php: Added blank spaces between icons and texts.
|
||||
|
||||
* godmode/setup/setup.php: Management of new string format for datetime.
|
||||
|
||||
* godmode/profiles/profile_list.php: Submit button now uses div instead
|
||||
tables.
|
||||
|
||||
* godmode/reporting/reporting_builder.php: Added check before foreach() to
|
||||
avoid notice warnings. Changed div for buttons.
|
||||
|
||||
* godmode/reporting/map_builder.php: Fixed div for submit button.
|
||||
|
||||
* godmode/servers/modificar_server.php: Fixed typo in SQL sentence.
|
||||
Removed usage of not-used-now locale format functions. Alter legend to use
|
||||
a plain-formatted table to avoid background color in legend.
|
||||
|
||||
* /en/help_date_format.php: Added help for date format string.
|
||||
|
||||
2008-08-21 Esteban Sanchez <estebans@artica.es>
|
||||
|
||||
* include/functions_html.php: Added an optional parameter to
|
||||
|
|
|
@ -21,11 +21,12 @@ if (isset($_SERVER['REQUEST_TIME'])) {
|
|||
$time = time();
|
||||
}
|
||||
|
||||
echo '<a class="white_bold" target="_new" href="general/license/pandora_info_'.$config["language"].'.html">Pandora FMS '.$pandora_version.' - Build '.$build_version.'<br>'.
|
||||
__('is an OpenSource Software Project, licensed under GPL terms').'</a><br />
|
||||
<a class="white">'.__('Page generated at').' '.$LOCALE->fmt_time($time);
|
||||
if ($develop_bypass == 1) {
|
||||
echo ' - Saved '.$LOCALE->fmt_number($sql_cache["saved"]).' Queries';
|
||||
echo '<a class="white_bold" target="_new" href="general/license/pandora_info_'.$config["language"].'.html">Pandora FMS '.$pandora_version.' - Build '.$build_version.'<br>';
|
||||
echo __('is an OpenSource Software Project, licensed under GPL terms').'</a><br/>';
|
||||
echo '<a class="white">'. __('Page generated at') . ' '. format_datetime ($time);
|
||||
|
||||
if ((isset($develop_bypass)) AND ($develop_bypass == 1)) {
|
||||
echo ' - Saved '.format_numeric ($sql_cache["saved"]).' Queries';
|
||||
}
|
||||
echo '</a><br>';
|
||||
?>
|
||||
|
|
|
@ -31,30 +31,31 @@ $table->rowclass=array("inherit","inherit");
|
|||
|
||||
$table->data[] = array (
|
||||
// First column
|
||||
'<img src="images/user_'.((dame_admin ($_SESSION["id_usuario"]) == 1) ? 'suit' : 'green' ).'.png" class="bot">'.'<a class="white">'.__('You are ').'[<b>'.$_SESSION["id_usuario"].'</b>]</a>',
|
||||
'<img src="images/user_'.((dame_admin ($_SESSION["id_usuario"]) == 1) ? 'suit' : 'green' ).'.png" class="bot"> '.'<a class="white">'.__('You are ').'[<b>'.$_SESSION["id_usuario"].'</b>]</a>',
|
||||
// Second column
|
||||
'<a class="white_bold" href="index.php?sec=main"><img src="images/information.png" class="bot">'.__('General information').'</a>',
|
||||
'<a class="white_bold" href="index.php?sec=main"><img src="images/information.png" class="bot"> '.__('General information').'</a>',
|
||||
// Third column
|
||||
// Autorefresh
|
||||
((get_parameter ("refr") != 0) ?
|
||||
'<a class="white_grey_bold" href="'.((substr($_SERVER['REQUEST_URI'],-1) != "/") ? $_SERVER['REQUEST_URI'] : 'index.php?' ).'&refr=0"><img src="images/page_lightning.png" class="bot" />'. __('Autorefresh').'</a>'
|
||||
'<a class="white_grey_bold" href="'.((substr($_SERVER['REQUEST_URI'],-1) != "/") ? $_SERVER['REQUEST_URI'] : 'index.php?' ).'&refr=0"><img src="images/page_lightning.png" class="bot" /> '. __('Autorefresh').'</a>'
|
||||
:
|
||||
'<a class="white_bold" href="'.((substr($_SERVER['REQUEST_URI'],-1) != "/") ? $_SERVER['REQUEST_URI'] : "index.php?" ).'&refr=5"><img src="images/page_lightning.png" class="bot" />'.__('Autorefresh').'</a>'
|
||||
'<a class="white_bold" href="'.((substr($_SERVER['REQUEST_URI'],-1) != "/") ? $_SERVER['REQUEST_URI'] : "index.php?" ).'&refr=5"><img src="images/page_lightning.png" class="bot" /> '.__('Autorefresh').'</a>'
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[] = array (
|
||||
'<a class="white_bold" href="index.php?bye=bye"><img src="images/lock.png" class="bot">'. __('Logout').'</a>',
|
||||
'<a class="white_bold" href="index.php?bye=bye"><img src="images/lock.png" class="bot"> '. __('Logout').'</a>',
|
||||
'<a class="white_bold" href="index.php?sec=estado_server&sec2=operation/servers/view_server&refr=60">'.
|
||||
((check_server_status () == 0) ?
|
||||
'<img src="images/error.png" class="bot" />'.__('Server status: DOWN')
|
||||
'<img src="images/error.png" class="bot" /> '.__('Server status: DOWN')
|
||||
:
|
||||
'<img src="images/ok.png" class="bot" />'.__('System ready')
|
||||
'<img src="images/ok.png" class="bot" /> '.__('System ready')
|
||||
).'</a>',
|
||||
// Event - refresh
|
||||
'<a class="white_bold" href="index.php?sec=eventos&sec2=operation/events/events&refr=5"><img src="images/lightning_go.png" class="bot" />'.__('Events').'</a>'
|
||||
'<a class="white_bold" href="index.php?sec=eventos&sec2=operation/events/events&refr=5"><img src="images/lightning_go.png" class="bot" /> '.__('Events').'</a>'
|
||||
);
|
||||
print_table ($table);
|
||||
unset ($table);
|
||||
echo "</div>";
|
||||
|
||||
?>
|
||||
|
|
|
@ -192,13 +192,16 @@ if (isset ($id_perfil)){ // There are values defined, let's show form with data
|
|||
</tr>
|
||||
</form>
|
||||
</table>';
|
||||
echo '<table width="400"><tr><td align="right">';
|
||||
|
||||
echo '<div class="action-buttons" style="width: 400px">';
|
||||
|
||||
if (isset ($_GET["new_profile"])) {
|
||||
echo '<input name="crtbutton" type="submit" class="sub wand" value="'.__('Create').'" />';
|
||||
} elseif (isset ($_GET["edit_profile"])) {
|
||||
echo '<input name="uptbutton" type="submit" class="sub upd" value="'.__('Update').'" />';
|
||||
}
|
||||
echo '</td></tr></table>';
|
||||
echo "</div>";
|
||||
|
||||
} else { // View list data
|
||||
$result = get_db_all_rows_in_table ("tperfil");
|
||||
$table->cellpadding = 4;
|
||||
|
@ -238,11 +241,8 @@ if (isset ($id_perfil)){ // There are values defined, let's show form with data
|
|||
);
|
||||
}
|
||||
print_table ($table);
|
||||
unset ($table);
|
||||
$table->width = 750;
|
||||
$table->align = array ("right");
|
||||
$table->data[] = array ('<form method="POST" action="index.php?sec=gperfiles&sec2=godmode/profiles/profile_list&new_profile=1">'.print_submit_button(__('Create profile'),"crt",false,'class="sub next"',true).'</form>' );
|
||||
print_table ($table);
|
||||
unset ($table);
|
||||
echo '<div class="action-buttons" style="width: 750px">';
|
||||
echo '<form method="POST" action="index.php?sec=gperfiles&sec2=godmode/profiles/profile_list&new_profile=1">'.print_submit_button(__('Create profile'),"crt",false,'class="sub next"',true).'</form>';
|
||||
echo "</div>";
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -279,7 +279,7 @@ if (! $edit_layout && ! $id_layout) {
|
|||
}
|
||||
print_table ($table);
|
||||
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
echo '<div class="action-buttons" style="width: 500px">';
|
||||
echo '<form action="index.php?sec=greporting&sec2=godmode/reporting/map_builder" method="post">';
|
||||
print_input_hidden ('edit_layout', 1);
|
||||
print_submit_button (__('Create'), '', false, 'class="sub wand"');
|
||||
|
@ -313,7 +313,7 @@ if (! $edit_layout && ! $id_layout) {
|
|||
echo '<form action="index.php?sec=greporting&sec2=godmode/reporting/map_builder" method="post">';
|
||||
print_table ($table);
|
||||
|
||||
echo '<div style="width: '.$table->width.'" class="action-buttons">';
|
||||
echo '<div style="width: 340px" class="action-buttons">';
|
||||
if ($id_layout) {
|
||||
print_submit_button (__('Update'), 'update_layout', false, 'class="sub upd"');
|
||||
print_input_hidden ('update_layout', 1);
|
||||
|
|
|
@ -255,19 +255,21 @@ if ($edit_sla_report_content) {
|
|||
$table->head[5] = __('Delete');
|
||||
|
||||
$slas = get_db_all_rows_field_filter ('treport_content_sla_combined', 'id_report_content', $id_report_content);
|
||||
foreach ($slas as $sla) {
|
||||
$data = array ();
|
||||
|
||||
$data[0] = dame_nombre_agente_agentemodulo ($sla['id_agent_module']);
|
||||
$data[1] = dame_nombre_modulo_agentemodulo ($sla['id_agent_module']);
|
||||
$data[2] = $sla['sla_min'];
|
||||
$data[3] = $sla['sla_max'];
|
||||
$data[4] = $sla['sla_limit'].'%';
|
||||
$data[5] = '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&id_report='.
|
||||
$id_report.'&edit_sla_report_content=1&delete_sla=1&id_report_content='.
|
||||
$id_report_content.'&id_sla='.$sla['id'].'"><img src="images/cross.png"></a>';
|
||||
|
||||
array_push ($table->data, $data);
|
||||
if ($slas){
|
||||
foreach ($slas as $sla) {
|
||||
$data = array ();
|
||||
|
||||
$data[0] = dame_nombre_agente_agentemodulo ($sla['id_agent_module']);
|
||||
$data[1] = dame_nombre_modulo_agentemodulo ($sla['id_agent_module']);
|
||||
$data[2] = $sla['sla_min'];
|
||||
$data[3] = $sla['sla_max'];
|
||||
$data[4] = $sla['sla_limit'].'%';
|
||||
$data[5] = '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&id_report='.
|
||||
$id_report.'&edit_sla_report_content=1&delete_sla=1&id_report_content='.
|
||||
$id_report_content.'&id_sla='.$sla['id'].'"><img src="images/cross.png"></a>';
|
||||
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof ($slas)) {
|
||||
|
@ -297,12 +299,15 @@ if ($edit_sla_report_content) {
|
|||
echo '<form method="post" action="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&id_report='.
|
||||
$id_report.'&edit_sla_report_content=1&id_report_content='.$id_report_content.'">';
|
||||
print_table ($table);
|
||||
|
||||
print_input_hidden ('add_sla', 1);
|
||||
print_input_hidden ('edit_sla_report_content', 1);
|
||||
print_input_hidden ('id_report_content', $id_report_content);
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
|
||||
echo '<div class="action-buttons" style="width: 500px;">';
|
||||
print_submit_button (__('Create'), 'add', false, 'class="sub wand"');
|
||||
echo '</div>';
|
||||
|
||||
echo '</form>';
|
||||
} else if ($edit_report || $id_report) {
|
||||
/* Edit and creation report form */
|
||||
|
@ -342,7 +347,7 @@ if ($edit_sla_report_content) {
|
|||
echo "<form method='post' action='index.php?sec=greporting&sec2=godmode/reporting/reporting_builder'>";
|
||||
print_table ($table);
|
||||
// Button
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
echo '<div class="action-buttons" style="width: 500px;">';
|
||||
print_input_hidden ('edit_report', 1);
|
||||
if ($id_report) {
|
||||
print_input_hidden ('id_report', $id_report);
|
||||
|
@ -405,7 +410,7 @@ if ($edit_sla_report_content) {
|
|||
|
||||
echo "<form method='post' action='index.php?sec=greporting&sec2=godmode/reporting/reporting_builder'>";
|
||||
print_table ($table);
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
echo '<div class="action-buttons" style="width: 500px;">';
|
||||
print_input_hidden ('add_content', 1);
|
||||
print_input_hidden ('id_report', $id_report);
|
||||
print_submit_button (__('Add'), 'add', false, 'class="sub wand"');
|
||||
|
@ -512,7 +517,7 @@ if ($edit_sla_report_content) {
|
|||
}
|
||||
|
||||
echo '<form method="post" action="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder">';
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
echo '<div class="action-buttons" style="width: 600px;">';
|
||||
print_input_hidden ('edit_report', 1);
|
||||
print_submit_button (__('Create report'), 'create', false, 'class="sub next"');
|
||||
echo "</div>";
|
||||
|
|
|
@ -41,7 +41,7 @@ if (isset ($_GET["delete"])) {
|
|||
$address = get_parameter_post ("address");
|
||||
$description = get_parameter_post ("description");
|
||||
$id_server = get_parameter_post ("server");
|
||||
$sql = sprintf ("UPDATE tserver SET name = '%s', ip_address = '%s', description = '%s' WHERE id_server = %d",$name,$address,$description,$server);
|
||||
$sql = sprintf ("UPDATE tserver SET name = '%s', ip_address = '%s', description = '%s' WHERE id_server = %d", $name, $address, $description, $id_server);
|
||||
$result = process_sql ($sql);
|
||||
if ($result !== false) {
|
||||
echo '<h3 class="suc">'.__('Server updated successfully').'</h3>';
|
||||
|
@ -66,15 +66,13 @@ if (isset($_GET["server"])) {
|
|||
$table->data[] = array (__('Name'),print_input_text ('name',$row["name"],'',50,0,true));
|
||||
$table->data[] = array (__('IP Address'),print_input_text ('address',$row["ip_address"],'',50,0,true));
|
||||
$table->data[] = array (__('Description'),print_input_text ('description',$row["description"],'',50,0,true));
|
||||
|
||||
print_table ($table);
|
||||
|
||||
$table->cellpadding=4;
|
||||
$table->cellspacing=4;
|
||||
$table->width=450;
|
||||
$table->align=array ("right");
|
||||
$table->data[] = array ('<input type="submit" class="sub upd" value="'.__('Update').'">');
|
||||
print_table ($table2);
|
||||
|
||||
echo '<div class="action-buttons" style="width: 450px">';
|
||||
echo '<input type="submit" class="sub upd" value="'.__('Update').'">';
|
||||
echo "</div>";
|
||||
|
||||
} else {
|
||||
$result = get_db_all_rows_in_table ("tserver");
|
||||
echo "<h2>".__('Pandora servers')." > ".__('Manage servers')."</h2>";
|
||||
|
@ -107,29 +105,28 @@ if (isset($_GET["server"])) {
|
|||
|
||||
$table->data[] = array (
|
||||
'<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server='.$row["id_server"].'"><b>'.$row["name"].'</b></a>',
|
||||
'<img src="images/dot_'.(($row["status"] == 0) ? 'red' : 'green').'">',
|
||||
'<img src="images/dot_'.(($row["status"] == 0) ? 'red' : 'green').'.png">',
|
||||
$row["ip_address"],
|
||||
substr($row["description"],0,25),
|
||||
$server,
|
||||
$LOCALE->fmt_time($row["laststart"],"MYSQL","DATE").' '.$LOCALE->fmt_time($row["laststart"],"MYSQL","TIME"),
|
||||
$LOCALE->fmt_time($row["keepalive"],"MYSQL","DATE").' '.$LOCALE->fmt_time($row["keepalive"],"MYSQL","TIME"),
|
||||
human_time_comparation ($row["laststart"]),
|
||||
human_time_comparation ($row["keepalive"]),
|
||||
'<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_del='.$row["id_server"].'&delete"><img src="images/cross.png" border="0">'
|
||||
);
|
||||
|
||||
}
|
||||
print_table ($table);
|
||||
|
||||
//Lagend
|
||||
$table->cellpadding = 2;
|
||||
$table->cellspacing = 0;
|
||||
$table->data[] = array (
|
||||
'<span class="net">'.__('Network Server').'</span>',
|
||||
'<span class="master">'.__('Master').'</span>',
|
||||
'<span class="data">'.__('Data Server').'</span>',
|
||||
'<span class="binary">'.__('MD5 Check').'</span>',
|
||||
'<span class="snmp">'.__('SNMP Console').'</span>'
|
||||
);
|
||||
print_table ($table);
|
||||
//Legend
|
||||
echo "<table>";
|
||||
echo "<tr>";
|
||||
echo '<td><span class="net">'.__('Network Server').'</span></td>';
|
||||
echo '<td><span class="master">'.__('Master').'</span></td>';
|
||||
echo '<td><span class="data">'.__('Data Server').'</span></td>';
|
||||
echo '<td><span class="binary">'.__('MD5 Check').'</span></td>';
|
||||
echo '<td><span class="snmp">'.__('SNMP Console').'</span></td>';
|
||||
echo "</tr></table>";
|
||||
|
||||
} else {
|
||||
echo "<div class='nf'>".__('There are no servers configured into the database')."</div>";
|
||||
}
|
||||
|
|
|
@ -45,9 +45,9 @@ if ($update_settings) {
|
|||
$config["graph_color2"] = (string) get_parameter ('graph_color2');
|
||||
$config["graph_color3"] = (string) get_parameter ('graph_color3');
|
||||
$config["sla_period"] = (int) get_parameter ("sla_period");
|
||||
$config["locale"] = (string) get_parameter ("locale");
|
||||
|
||||
$config["date_format"] = (string) get_parameter ("date_format");
|
||||
$config["style"] = substr ($config["style"], 0, strlen ($config["style"]) - 4);
|
||||
|
||||
process_sql ("UPDATE tconfig SET VALUE='".$config["remote_config"]."' WHERE token = 'remote_config'");
|
||||
process_sql ("UPDATE tconfig SET VALUE='".$config["block_size"]."' WHERE token = 'block_size'");
|
||||
process_sql ("UPDATE tconfig SET VALUE='".$config["language"]."' WHERE token = 'language_code'");
|
||||
|
@ -62,7 +62,7 @@ if ($update_settings) {
|
|||
process_sql ("UPDATE tconfig SET VALUE='".$config["graph_color2"]."' WHERE token = 'graph_color2'");
|
||||
process_sql ("UPDATE tconfig SET VALUE='".$config["graph_color3"]."' WHERE token = 'graph_color3'");
|
||||
process_sql ("UPDATE tconfig SET VALUE='".$config["sla_period"]."' WHERE token = 'sla_period'");
|
||||
process_sql ("UPDATE tconfig SET VALUE='".$config["locale"]."' WHERE token = 'locale'");
|
||||
process_sql ("UPDATE tconfig SET VALUE='".$config["date_format"]."' WHERE token = 'date_format'");
|
||||
}
|
||||
|
||||
echo "<h2>".__('Pandora Setup')." > ";
|
||||
|
@ -74,38 +74,46 @@ $table->width = '500px';
|
|||
$table->data = array ();
|
||||
$table->data[0][0] = __('Language Code for Pandora');
|
||||
$table->data[0][1] = print_select_from_sql ('SELECT id_language, name FROM tlanguage', 'language_code', $config["language"], '', '', '', true);
|
||||
if (isset ($LOCALE)) {
|
||||
$locales = array ();
|
||||
foreach ($LOCALE->Get_Locales_Array () as $locale) {
|
||||
$locales[$locale] = $LOCALE->Translate_Locale ($locale);
|
||||
}
|
||||
$table->data[1][0] = __('Locale');
|
||||
$table->data[1][1] = print_select ($locales, 'locale', $config["locale"], '', '', '', true);
|
||||
}
|
||||
|
||||
$table->data[1][0] = __('Date format string') . pandora_help("date_format", true);
|
||||
$table->data[1][1] = print_input_text ('date_format', $config["date_format"], '', 30, 100, true);
|
||||
|
||||
$table->data[2][0] = __('Remote config directory');
|
||||
$table->data[2][1] = print_input_text ('remote_config', $config["remote_config"], '', 30, 100, true);
|
||||
|
||||
$table->data[3][0] = __('Graph color (min)');
|
||||
$table->data[3][1] = print_input_text ('graph_color1', $config["graph_color1"], '', 8, 8, true);
|
||||
|
||||
$table->data[4][0] = __('Graph color (avg)');
|
||||
$table->data[4][1] = print_input_text ('graph_color2', $config["graph_color2"], '', 8, 8, true);
|
||||
|
||||
$table->data[5][0] = __('Graph color (max)');
|
||||
$table->data[5][1] = print_input_text ('graph_color3', $config["graph_color3"], '', 8, 8, true);
|
||||
|
||||
$table->data[6][0] = __('SLA period');
|
||||
$table->data[6][1] = print_input_text ('sla_period', $config["sla_period"], '', 5, 5, true);
|
||||
|
||||
$table->data[6][0] = __('Max. days before compact data');
|
||||
$table->data[6][1] = print_input_text ('days_compact', $config["days_compact"], '', 5, 5, true);
|
||||
|
||||
$table->data[7][0] = __('Max. days before purge');
|
||||
$table->data[7][1] = print_input_text ('days_purge', $config["days_purge"], '', 5, 5, true);
|
||||
|
||||
$table->data[8][0] = __('Graphic resolution (1-low, 5-high)');
|
||||
$table->data[8][1] = print_input_text ('graph_res', $config["graph_res"], '', 5, 5, true);
|
||||
|
||||
$table->data[9][0] = __('Compact interpolation in hours (1 Fine-20 bad)');
|
||||
$table->data[9][1] = print_input_text ('step_compact', $config["step_compact"], '', 5, 5, true);
|
||||
|
||||
$table->data[10][0] = __('Show unknown modules in global view');
|
||||
$table->data[10][1] = print_checkbox ('show_unknown', 1, $config["show_unknown"], true);
|
||||
|
||||
$table->data[11][0] = __('Show last fired alerts in global view');
|
||||
$table->data[11][1] = print_checkbox ('show_lastalerts', 1, $config["show_lastalerts"], true);
|
||||
|
||||
$table->data[12][0] = __('Style template');
|
||||
$table->data[12][1] = print_select ($file_styles, 'style', $config["style"], '', '', '', true);
|
||||
|
||||
$table->data[13][0] = __('Block size for pagination');
|
||||
$table->data[13][1] = print_input_text ('block_size', $config["block_size"], '', 5, 5, true);
|
||||
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
|
||||
//Pandora Version
|
||||
if (!isset ($build_version))
|
||||
$build_version = "PC080805";
|
||||
$build_version = "PC080821";
|
||||
if (!isset ($pandora_version))
|
||||
$pandora_version = "v2.0-dev";
|
||||
$pandora_version = "v2.0-beta1";
|
||||
|
||||
// This is directory where placed "/attachment" directory, to upload files stores.
|
||||
// This MUST be writtable by http server user, and should be in pandora root.
|
||||
|
@ -114,10 +114,9 @@ if (file_exists ('./include/languages/'.$config["language"].'.mo')) {
|
|||
$l10n->load_tables();
|
||||
}
|
||||
|
||||
require_once ('locale.class.php');
|
||||
if (empty ($config["locale"])) {
|
||||
$config["locale"] = "en_US";
|
||||
if (!isset($config["date_format"])) {
|
||||
$config["date_format"] = "F j, Y, g:i a";
|
||||
}
|
||||
$LOCALE = new Set_Locale ($config["locale"]);
|
||||
|
||||
|
||||
?>
|
||||
|
|
|
@ -30,7 +30,7 @@ function pandora_help ($help_id, $return = false) {
|
|||
global $config;
|
||||
$output = ' <img class="img_help" src="images/help.png" onClick="pandora_help(\''.$help_id.'\')">';
|
||||
if ($return)
|
||||
return $return;
|
||||
return $output;
|
||||
echo $output;
|
||||
}
|
||||
|
||||
|
@ -380,6 +380,29 @@ function pagination ($count, $url, $offset) {
|
|||
echo "</div>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Format a unix timestamp to render a datetime string with specific format
|
||||
*
|
||||
* format comes with $config["date_format"]
|
||||
*
|
||||
* @param utimestamp Unixtimestamp integer format
|
||||
* @param alt_format Alternative format, for use insted configþ[]
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
function format_datetime ($timestamp, $alt_format = "") {
|
||||
|
||||
global $config;
|
||||
|
||||
if ($alt_format == "")
|
||||
$alt_format = $config["date_format"];
|
||||
|
||||
return date($alt_format, $timestamp);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Format a number with decimals and thousands separator.
|
||||
*
|
||||
|
|
|
@ -573,6 +573,9 @@ function get_monitors_in_agent ($id_agent) {
|
|||
*/
|
||||
function get_monitors_down ($monitors, $period = 0, $date = 0) {
|
||||
$monitors_down = array ();
|
||||
if (! $monitors)
|
||||
return $monitors_down;
|
||||
|
||||
foreach ($monitors as $monitor) {
|
||||
$down = get_monitor_downs_in_period ($monitor['id_agente_modulo'], $period, $date);
|
||||
if ($down)
|
||||
|
|
|
@ -416,12 +416,6 @@ function print_table (&$table, $return = false) {
|
|||
}
|
||||
$output .= '</table>'."\n";
|
||||
|
||||
//if(isset($GLOBALS["table"]))
|
||||
// unset($GLOBALS["table"]);
|
||||
|
||||
$table->head = $table->align = $table->valign = $table->size = $table->wrap = $table->style = $table->rowstyle = $table->rowclass = $table->colspan = $table->data = array();
|
||||
$table->width = $table->border = $table->tablealign = $table->cellpadding = $table->cellspacing = $table->class = false;
|
||||
|
||||
if ($return)
|
||||
return $output;
|
||||
|
||||
|
|
|
@ -423,32 +423,33 @@ function get_monitors_down_reporting_table ($monitors_down) {
|
|||
$table->head[1] = __('Monitor');
|
||||
|
||||
$agents = array ();
|
||||
foreach ($monitors_down as $monitor) {
|
||||
/* Add monitors fired to $agents_fired_alerts indexed by id_agent */
|
||||
$id_agent = $monitor['id_agente'];
|
||||
if (!isset ($agents[$id_agent])) {
|
||||
$agents[$id_agent] = array ();
|
||||
}
|
||||
array_push ($agents[$id_agent], $monitor);
|
||||
|
||||
$monitors_down++;
|
||||
}
|
||||
foreach ($agents as $id_agent => $monitors) {
|
||||
$data = array ();
|
||||
foreach ($monitors as $monitor) {
|
||||
if (! isset ($data[0]))
|
||||
$data[0] = dame_nombre_agente ($id_agent);
|
||||
else
|
||||
$data[0] = '';
|
||||
if ($monitor['descripcion'] != '') {
|
||||
$data[1] = $monitor['descripcion'];
|
||||
} else {
|
||||
$data[1] = $monitor['nombre'];
|
||||
if ($monitors_down){
|
||||
foreach ($monitors_down as $monitor) {
|
||||
/* Add monitors fired to $agents_fired_alerts indexed by id_agent */
|
||||
$id_agent = $monitor['id_agente'];
|
||||
if (!isset ($agents[$id_agent])) {
|
||||
$agents[$id_agent] = array ();
|
||||
}
|
||||
array_push ($agents[$id_agent], $monitor);
|
||||
|
||||
$monitors_down++;
|
||||
}
|
||||
foreach ($agents as $id_agent => $monitors) {
|
||||
$data = array ();
|
||||
foreach ($monitors as $monitor) {
|
||||
if (! isset ($data[0]))
|
||||
$data[0] = dame_nombre_agente ($id_agent);
|
||||
else
|
||||
$data[0] = '';
|
||||
if ($monitor['descripcion'] != '') {
|
||||
$data[1] = $monitor['descripcion'];
|
||||
} else {
|
||||
$data[1] = $monitor['nombre'];
|
||||
}
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
}
|
||||
|
||||
return $table;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,362 @@
|
|||
<p class="para">
|
||||
The format of the outputted date string. See the formatting
|
||||
options below.
|
||||
</p>
|
||||
<p class="para">
|
||||
|
||||
</p><table border="5">
|
||||
<caption><b>The following characters are recognized in the
|
||||
<i><tt class="parameter">format</tt></i>
|
||||
parameter string</b></caption>
|
||||
<colgroup>
|
||||
|
||||
</colgroup><thead valign="middle">
|
||||
<tr valign="middle">
|
||||
<th colspan="1"><i><tt class="parameter">format</tt></i>
|
||||
|
||||
character</th>
|
||||
<th colspan="1">Description</th>
|
||||
<th colspan="1">Example returned values</th>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
|
||||
<tbody class="tbody" valign="middle">
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="center"><em class="emphasis">Day</em></td>
|
||||
<td colspan="1" rowspan="1" align="left">---</td>
|
||||
<td colspan="1" rowspan="1" align="left">---</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>d</i></td>
|
||||
|
||||
<td colspan="1" rowspan="1" align="left">Day of the month, 2 digits with leading zeros</td>
|
||||
<td colspan="1" rowspan="1" align="left"><i>01</i> to <i>31</i></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>D</i></td>
|
||||
|
||||
<td colspan="1" rowspan="1" align="left">A textual representation of a day, three letters</td>
|
||||
<td colspan="1" rowspan="1" align="left"><i>Mon</i> through <i>Sun</i></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>j</i></td>
|
||||
|
||||
<td colspan="1" rowspan="1" align="left">Day of the month without leading zeros</td>
|
||||
<td colspan="1" rowspan="1" align="left"><i>1</i> to <i>31</i></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>l</i> (lowercase 'L')</td>
|
||||
|
||||
<td colspan="1" rowspan="1" align="left">A full textual representation of the day of the week</td>
|
||||
<td colspan="1" rowspan="1" align="left"><i>Sunday</i> through <i>Saturday</i></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>N</i></td>
|
||||
|
||||
<td colspan="1" rowspan="1" align="left">ISO-8601 numeric representation of the day of the week (added in
|
||||
PHP 5.1.0)</td>
|
||||
<td colspan="1" rowspan="1" align="left"><i>1</i> (for Monday) through <i>7</i> (for Sunday)</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>S</i></td>
|
||||
|
||||
<td colspan="1" rowspan="1" align="left">English ordinal suffix for the day of the month, 2 characters</td>
|
||||
<td colspan="1" rowspan="1" align="left">
|
||||
<i>st</i>, <i>nd</i>, <i>rd</i> or
|
||||
<i>th</i>. Works well with <i>j</i>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>w</i></td>
|
||||
<td colspan="1" rowspan="1" align="left">Numeric representation of the day of the week</td>
|
||||
<td colspan="1" rowspan="1" align="left"><i>0</i> (for Sunday) through <i>6</i> (for Saturday)</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>z</i></td>
|
||||
<td colspan="1" rowspan="1" align="left">The day of the year (starting from 0)</td>
|
||||
<td colspan="1" rowspan="1" align="left"><i>0</i> through <i>365</i></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="center"><em class="emphasis">Week</em></td>
|
||||
<td colspan="1" rowspan="1" align="left">---</td>
|
||||
<td colspan="1" rowspan="1" align="left">---</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>W</i></td>
|
||||
<td colspan="1" rowspan="1" align="left">ISO-8601 week number of year, weeks starting on Monday (added in PHP 4.1.0)</td>
|
||||
<td colspan="1" rowspan="1" align="left">Example: <i>42</i> (the 42nd week in the year)</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="center"><em class="emphasis">Month</em></td>
|
||||
<td colspan="1" rowspan="1" align="left">---</td>
|
||||
<td colspan="1" rowspan="1" align="left">---</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>F</i></td>
|
||||
|
||||
<td colspan="1" rowspan="1" align="left">A full textual representation of a month, such as January or March</td>
|
||||
<td colspan="1" rowspan="1" align="left"><i>January</i> through <i>December</i></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>m</i></td>
|
||||
|
||||
<td colspan="1" rowspan="1" align="left">Numeric representation of a month, with leading zeros</td>
|
||||
<td colspan="1" rowspan="1" align="left"><i>01</i> through <i>12</i></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>M</i></td>
|
||||
|
||||
<td colspan="1" rowspan="1" align="left">A short textual representation of a month, three letters</td>
|
||||
<td colspan="1" rowspan="1" align="left"><i>Jan</i> through <i>Dec</i></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>n</i></td>
|
||||
|
||||
<td colspan="1" rowspan="1" align="left">Numeric representation of a month, without leading zeros</td>
|
||||
<td colspan="1" rowspan="1" align="left"><i>1</i> through <i>12</i></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>t</i></td>
|
||||
|
||||
<td colspan="1" rowspan="1" align="left">Number of days in the given month</td>
|
||||
<td colspan="1" rowspan="1" align="left"><i>28</i> through <i>31</i></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="center"><em class="emphasis">Year</em></td>
|
||||
|
||||
<td colspan="1" rowspan="1" align="left">---</td>
|
||||
<td colspan="1" rowspan="1" align="left">---</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>L</i></td>
|
||||
<td colspan="1" rowspan="1" align="left">Whether it's a leap year</td>
|
||||
|
||||
<td colspan="1" rowspan="1" align="left"><i>1</i> if it is a leap year, <i>0</i> otherwise.</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>o</i></td>
|
||||
<td colspan="1" rowspan="1" align="left">ISO-8601 year number. This has the same value as
|
||||
<i>Y</i>, except that if the ISO week number
|
||||
(<i>W</i>) belongs to the previous or next year, that year
|
||||
is used instead. (added in PHP 5.1.0)</td>
|
||||
|
||||
<td colspan="1" rowspan="1" align="left">Examples: <i>1999</i> or <i>2003</i></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>Y</i></td>
|
||||
<td colspan="1" rowspan="1" align="left">A full numeric representation of a year, 4 digits</td>
|
||||
|
||||
<td colspan="1" rowspan="1" align="left">Examples: <i>1999</i> or <i>2003</i></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>y</i></td>
|
||||
<td colspan="1" rowspan="1" align="left">A two digit representation of a year</td>
|
||||
|
||||
<td colspan="1" rowspan="1" align="left">Examples: <i>99</i> or <i>03</i></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="center"><em class="emphasis">Time</em></td>
|
||||
<td colspan="1" rowspan="1" align="left">---</td>
|
||||
|
||||
<td colspan="1" rowspan="1" align="left">---</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>a</i></td>
|
||||
<td colspan="1" rowspan="1" align="left">Lowercase Ante meridiem and Post meridiem</td>
|
||||
<td colspan="1" rowspan="1" align="left"><i>am</i> or <i>pm</i></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>A</i></td>
|
||||
<td colspan="1" rowspan="1" align="left">Uppercase Ante meridiem and Post meridiem</td>
|
||||
<td colspan="1" rowspan="1" align="left"><i>AM</i> or <i>PM</i></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>B</i></td>
|
||||
<td colspan="1" rowspan="1" align="left">Swatch Internet time</td>
|
||||
<td colspan="1" rowspan="1" align="left"><i>000</i> through <i>999</i></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>g</i></td>
|
||||
<td colspan="1" rowspan="1" align="left">12-hour format of an hour without leading zeros</td>
|
||||
<td colspan="1" rowspan="1" align="left"><i>1</i> through <i>12</i></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>G</i></td>
|
||||
<td colspan="1" rowspan="1" align="left">24-hour format of an hour without leading zeros</td>
|
||||
<td colspan="1" rowspan="1" align="left"><i>0</i> through <i>23</i></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>h</i></td>
|
||||
<td colspan="1" rowspan="1" align="left">12-hour format of an hour with leading zeros</td>
|
||||
<td colspan="1" rowspan="1" align="left"><i>01</i> through <i>12</i></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>H</i></td>
|
||||
<td colspan="1" rowspan="1" align="left">24-hour format of an hour with leading zeros</td>
|
||||
<td colspan="1" rowspan="1" align="left"><i>00</i> through <i>23</i></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>i</i></td>
|
||||
<td colspan="1" rowspan="1" align="left">Minutes with leading zeros</td>
|
||||
<td colspan="1" rowspan="1" align="left"><i>00</i> to <i>59</i></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>s</i></td>
|
||||
<td colspan="1" rowspan="1" align="left">Seconds, with leading zeros</td>
|
||||
<td colspan="1" rowspan="1" align="left"><i>00</i> through <i>59</i></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>u</i></td>
|
||||
<td colspan="1" rowspan="1" align="left">Milliseconds (added in PHP 5.2.2)</td>
|
||||
<td colspan="1" rowspan="1" align="left">Example: <i>54321</i></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="center"><em class="emphasis">Timezone</em></td>
|
||||
<td colspan="1" rowspan="1" align="left">---</td>
|
||||
<td colspan="1" rowspan="1" align="left">---</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
|
||||
<td colspan="1" rowspan="1" align="left"><i>e</i></td>
|
||||
<td colspan="1" rowspan="1" align="left">Timezone identifier (added in PHP 5.1.0)</td>
|
||||
<td colspan="1" rowspan="1" align="left">Examples: <i>UTC</i>, <i>GMT</i>, <i>Atlantic/Azores</i></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>I</i> (capital i)</td>
|
||||
<td colspan="1" rowspan="1" align="left">Whether or not the date is in daylight saving time</td>
|
||||
<td colspan="1" rowspan="1" align="left"><i>1</i> if Daylight Saving Time, <i>0</i> otherwise.</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>O</i></td>
|
||||
<td colspan="1" rowspan="1" align="left">Difference to Greenwich time (GMT) in hours</td>
|
||||
<td colspan="1" rowspan="1" align="left">Example: <i>+0200</i></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>P</i></td>
|
||||
<td colspan="1" rowspan="1" align="left">Difference to Greenwich time (GMT) with colon between hours and minutes (added in PHP 5.1.3)</td>
|
||||
<td colspan="1" rowspan="1" align="left">Example: <i>+02:00</i></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
|
||||
<td colspan="1" rowspan="1" align="left"><i>T</i></td>
|
||||
<td colspan="1" rowspan="1" align="left">Timezone abbreviation</td>
|
||||
<td colspan="1" rowspan="1" align="left">Examples: <i>EST</i>, <i>MDT</i> ...</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>Z</i></td>
|
||||
<td colspan="1" rowspan="1" align="left">Timezone offset in seconds. The offset for timezones west of UTC is always
|
||||
negative, and for those east of UTC is always positive.</td>
|
||||
<td colspan="1" rowspan="1" align="left"><i>-43200</i> through <i>50400</i></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="center"><em class="emphasis">Full Date/Time</em></td>
|
||||
<td colspan="1" rowspan="1" align="left">---</td>
|
||||
<td colspan="1" rowspan="1" align="left">---</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>c</i></td>
|
||||
|
||||
<td colspan="1" rowspan="1" align="left">ISO 8601 date (added in PHP 5)</td>
|
||||
<td colspan="1" rowspan="1" align="left">2004-02-12T15:19:21+00:00</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>r</i></td>
|
||||
<td colspan="1" rowspan="1" align="left"><a href="http://www.faqs.org/rfcs/rfc2822" class="link external">» RFC 2822</a> formatted date</td>
|
||||
|
||||
<td colspan="1" rowspan="1" align="left">Example: <i>Thu, 21 Dec 2000 16:01:07 +0200</i></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="middle">
|
||||
<td colspan="1" rowspan="1" align="left"><i>U</i></td>
|
||||
<td colspan="1" rowspan="1" align="left">Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)</td>
|
||||
<td colspan="1" rowspan="1" align="left">See also <a href="function.time.php" class="function">time()</a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
<h3 class="title">Examples</h3>
|
||||
|
||||
<table cellpadding=4 cellspacing=4 class=datos>
|
||||
<th>Format String <th>Output sample
|
||||
<tr>
|
||||
<td>F j, Y, g:i a <td> March 10, 2001, 5:16 pm
|
||||
<tr>
|
||||
<td>m.d.y <td> 03.10.01
|
||||
<tr>
|
||||
<td>j, n, Y <td> 10, 3, 2001
|
||||
<tr>
|
||||
<td>Ymd <td>20010310
|
||||
<tr>
|
||||
<td>h-i-s, j-m-y, it is w Day z <td>05-16-17, 10-03-01, 1631 1618 6 Fripm01
|
||||
<tr>
|
||||
<td>\i\t \i\s \t\h\e jS \d\a\y. <td>It is the 10th day.
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
D M j G:i:s T Y <td>Sat Mar 10 15:16:08 MST 2001
|
||||
|
||||
<tr>
|
||||
<td>H:i:s <td>17:16:17
|
||||
</table>
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -122,7 +122,7 @@ if (isset ($_GET["id"])) {
|
|||
$filename = $row2["filename"];
|
||||
$sql2 = "DELETE FROM tattachment WHERE id_attachment = ".$file_id;
|
||||
$res2=mysql_query($sql2);
|
||||
unlink ($config["attachment_store"]."attachment/pand".$file_id."_".$filename);
|
||||
unlink ($config["attachment_store"]."/pand".$file_id."_".$filename);
|
||||
}
|
||||
|
||||
// Upload file
|
||||
|
@ -143,7 +143,7 @@ if (isset ($_GET["id"])) {
|
|||
$id_attachment=mysql_insert_id();
|
||||
|
||||
// Copy file to directory and change name
|
||||
$nombre_archivo = $config["attachment_store"]."attachment/pand".$id_attachment."_".$filename;
|
||||
$nombre_archivo = $config["attachment_store"]."/pand".$id_attachment."_".$filename;
|
||||
|
||||
if (!(copy($_FILES['userfile']['tmp_name'], $nombre_archivo ))){
|
||||
echo "<h3 class=error>".__('File cannot be saved. Please contact Pandora administrator about this error <br>')."</h3>";
|
||||
|
|
|
@ -57,7 +57,7 @@ if (isset ($_GET["nuevo_mensaje_g"])){
|
|||
}
|
||||
}
|
||||
}
|
||||
echo "<h2>".__('Messages')." > ";
|
||||
echo "<h2>".__('Messages')." - ";
|
||||
|
||||
if (isset ($_GET["nuevo"])) { //create message
|
||||
echo __('New message').'</h2>';
|
||||
|
@ -130,10 +130,12 @@ if (isset ($_GET["nuevo"])) { //create message
|
|||
</tr><tr><td></td><td colspan="3">
|
||||
<input type="submit" class="sub wand" name="send_mes" value="'.__('Send message').'"></form></td></tr></table>';
|
||||
} elseif (isset($_GET["leer"])) {
|
||||
|
||||
$id_mensaje = get_parameter_get("id_mensaje");
|
||||
$sql = sprintf("SELECT id_usuario_origen, subject, mensaje FROM tmensajes WHERE id_usuario_destino='%s' AND id_mensaje=%d",$iduser,$id_mensaje);
|
||||
$row = get_db_row_sql ($sql);
|
||||
process_sql ("UPDATE tmensajes SET estado=1 WHERE id_mensaje".$result["id_mensaje"]);
|
||||
$sql = sprintf("SELECT id_usuario_origen, subject, mensaje FROM tmensajes WHERE id_usuario_destino='%s' AND id_mensaje=%d" , $iduser, $id_mensaje);
|
||||
$row = get_db_row_sql ($sql);
|
||||
process_sql ("UPDATE tmensajes SET estado=1 WHERE id_mensaje = ".$id_mensaje);
|
||||
|
||||
echo '<table class="databox_color" width=650 cellpadding=4 cellspacing=4>
|
||||
<form method="post" name="reply_mes" action="index.php?sec=messages&sec2=operation/messages/message&nuevo">
|
||||
<tr><td class="datos">'.__('From').':</td>
|
||||
|
@ -200,28 +202,29 @@ if (isset ($_GET["leer"]) || (!isset ($_GET["nuevo"]) && !isset ($_GET["nuevo_g"
|
|||
$color = 1;
|
||||
}
|
||||
echo '<tr><td align="center" class="'.$tdcolor.'">';
|
||||
echo '<a href="index.php?sec=messages&sec2=operation/messages/message&leer=1&id_mensaje='.$row["id_mensaje"].'">';
|
||||
if ($row["estado"]==1) {
|
||||
$img = "email_open.png";
|
||||
} else {
|
||||
$img = "email.png";
|
||||
}
|
||||
echo '<img src="images/'.$img.'" border="0"></td>
|
||||
<td class="'.$tdcolor.'"><a href="index.php?sec=usuarios&sec2=operation/users/user_edit&ver='.$row["id_usuario_origen"].'">'.$row["id_usuario_origen"].'</td>
|
||||
<td class="'.$tdcolor.'"><a href="index.php?sec=messages&sec2=operation/messages/message&leer=1&id_mensaje='.$row["id_mensaje"].'"><b>';
|
||||
echo '<img src="images/'.$img.'" border="0"></a></td>';
|
||||
echo '<td class="'.$tdcolor.'">'. $row["id_usuario_origen"].'</td>';
|
||||
echo '<td class="'.$tdcolor.'"><a href="index.php?sec=messages&sec2=operation/messages/message&leer=1&id_mensaje='.$row["id_mensaje"].'"><b>';
|
||||
if ($row["subject"]) {
|
||||
echo $row["subject"];
|
||||
} else {
|
||||
echo __('No subject');
|
||||
}
|
||||
echo '</b></a></td><td class="'.$tdcolor.'">'.$row["timestamp"].'</td>
|
||||
echo '</b></a></td><td class="'.$tdcolor.'">'.format_datetime(strtotime($row["timestamp"])).'</td>
|
||||
<td class="'.$tdcolor.'" align="center"><a href="index.php?sec=messages&sec2=operation/messages/message&borrar=1&id_mensaje='.$row["id_mensaje"].'">
|
||||
<img src="images/cross.png" border="0"></a></td></tr>';
|
||||
}
|
||||
echo "</table>";
|
||||
}
|
||||
echo '<table width=650 cellpadding=4 cellspacing=4><tr>';
|
||||
echo '<td>';
|
||||
echo '<div class="action-buttons" style="width: 650px">';
|
||||
echo '<form method="post" name="new_mes" action="index.php?sec=messages&sec2=operation/messages/message&nuevo">
|
||||
<input type="submit" class="sub next" name="send_mes" value="'.__('New message').'"></form></td></tr></table>';
|
||||
<input type="submit" class="sub next" name="send_mes" value="'.__('New message').'"></form>';
|
||||
echo "</div>";
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -55,10 +55,9 @@ $table->head[1] = __('Status');
|
|||
$table->head[2] = __('Load');
|
||||
$table->head[3] = __('Modules');
|
||||
$table->head[4] = __('LAG');
|
||||
$table->head[5] = __('Description');
|
||||
$table->head[6] = __('Type');
|
||||
$table->head[7] = __('Version');
|
||||
$table->head[8] = __('Updated at');
|
||||
$table->head[5] = __('Type');
|
||||
$table->head[6] = __('Version');
|
||||
$table->head[7] = __('Updated at');
|
||||
$table->data = array ();
|
||||
|
||||
foreach ($servers as $server) {
|
||||
|
@ -84,40 +83,39 @@ foreach ($servers as $server) {
|
|||
$data[2] = '<img src="reporting/fgraph.php?tipo=progress&percent='.$load_percent.'&height=18&width=80">';
|
||||
$data[3] = $serverinfo["modules"] . " ".__('of')." ". $total_modules;
|
||||
$data[4] = human_time_description_raw ($serverinfo["lag"]) . " / ". $serverinfo["module_lag"];
|
||||
$data[5] = '<span title="'.$server['description'].'">'.substr ($server['description'], 0, 25).'</span>';
|
||||
$data[6] = '';
|
||||
$data[5] = '';
|
||||
if ($server['network_server'] == 1) {
|
||||
$data[6] .= ' <img src="images/network.png" title="'.__('Network Server').'">';
|
||||
$data[5] .= ' <img src="images/network.png" title="'.__('Network Server').'">';
|
||||
}
|
||||
if ($server['data_server'] == 1) {
|
||||
$data[6] .= ' <img src="images/data.png" title="'.__('Data Server').'">';
|
||||
$data[5] .= ' <img src="images/data.png" title="'.__('Data Server').'">';
|
||||
}
|
||||
if ($server['snmp_server'] == 1) {
|
||||
$data[6] .= ' <img src="images/snmp.png" title="'.__('SNMP server').'">';
|
||||
$data[5] .= ' <img src="images/snmp.png" title="'.__('SNMP server').'">';
|
||||
}
|
||||
if ($server['recon_server'] == 1) {
|
||||
$data[6] .= ' <img src="images/recon.png" title="'.__('Recon Server').'">';
|
||||
$data[5] .= ' <img src="images/recon.png" title="'.__('Recon Server').'">';
|
||||
}
|
||||
if ($server['export_server'] == 1) {
|
||||
$data[6] .= ' <img src="images/database_refresh.png" title="'.__('Export server').'">';
|
||||
$data[5] .= ' <img src="images/database_refresh.png" title="'.__('Export server').'">';
|
||||
}
|
||||
if ($server['wmi_server'] == 1) {
|
||||
$data[6] .= ' <img src="images/wmi.png" title="'.__('WMI Server').'">';
|
||||
$data[5] .= ' <img src="images/wmi.png" title="'.__('WMI Server').'">';
|
||||
}
|
||||
if ($server['prediction_server'] == 1) {
|
||||
$data[6] .= ' <img src="images/chart_bar.png" title="'.__('Prediction Server').'">';
|
||||
$data[5] .= ' <img src="images/chart_bar.png" title="'.__('Prediction Server').'">';
|
||||
}
|
||||
if ($server['plugin_server'] == 1) {
|
||||
$data[6] .= ' <img src="images/plugin.png" title="'.__('Plugin Server').'">';
|
||||
$data[5] .= ' <img src="images/plugin.png" title="'.__('Plugin Server').'">';
|
||||
}
|
||||
if ($server['master'] == 1) {
|
||||
$data[6] .= ' <img src="images/master.png" title="'.__('Master server').'">';
|
||||
$data[5] .= ' <img src="images/master.png" title="'.__('Master server').'">';
|
||||
}
|
||||
if ($server['checksum'] == 1){
|
||||
$data[6] .= ' <img src="images/binary.png" title="'.__('Check').'">';
|
||||
$data[5] .= ' <img src="images/binary.png" title="'.__('Check').'">';
|
||||
}
|
||||
$data[7] = $server['version'];
|
||||
$data[8] = human_time_comparation ($server['keepalive']) . "</td>";
|
||||
$data[6] = $server['version'];
|
||||
$data[7] = human_time_comparation ($server['keepalive']) . "</td>";
|
||||
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ if ($row["recon_server"]) {
|
|||
echo "<th class='datos'>".__('OS') ."</th>";
|
||||
echo "<th class='datos'>".__('Progress')."</th>";
|
||||
echo "<th class='datos'>".__('Updated at')."</th>";
|
||||
echo "<th class='datos'></th>";
|
||||
echo "<th class='datos'>".__('Op')."</th>";
|
||||
$color=1;
|
||||
while ($row=mysql_fetch_array($result)){
|
||||
if ($color == 1){
|
||||
|
@ -95,7 +95,7 @@ if ($row["recon_server"]) {
|
|||
$id_os = $row["id_os"];
|
||||
$id_group = $row["id_group"];
|
||||
$id_network_profile = $row["id_network_profile"];
|
||||
$type = $row["type"];
|
||||
|
||||
echo "<tr>";
|
||||
// Name
|
||||
echo "<td class='$tdcolor'>";
|
||||
|
@ -147,7 +147,7 @@ if ($row["recon_server"]) {
|
|||
|
||||
// Last execution
|
||||
echo "<td class='".$tdcolor."f9'>";
|
||||
$keepalive = strftime ( "%m/%d/%y %H:%M:%S" , $utimestamp );
|
||||
$keepalive = format_datetime ( $utimestamp );
|
||||
echo substr($keepalive,0,25)."</td>";
|
||||
|
||||
echo "<td class='$tdcolor'>";
|
||||
|
|
|
@ -99,34 +99,34 @@ echo "</table><br>";
|
|||
echo "<th width='180px'>
|
||||
<font size=1>".__('Profiles')."</th>";
|
||||
echo "<th width='40px'>
|
||||
<font size=1>IR<a href='#' class='tipp'> <span>".$help_label["IR"]."</span></a>
|
||||
<font size=1>IR<a href='#' class='tipp'> <span>".__("IR")."</span></a>
|
||||
</font></th>";
|
||||
echo "<th width='40px'>
|
||||
<font size=1>IW<a href='#' class='tipp'> <span>".$help_label["IW"]."</span></a>
|
||||
<font size=1>IW<a href='#' class='tipp'> <span>".__("IW")."</span></a>
|
||||
</font></th>";
|
||||
echo "<th width='40px'>
|
||||
<font size=1>IM<a href='#' class='tipp'> <span>".$help_label["IM"]."</span></a>
|
||||
<font size=1>IM<a href='#' class='tipp'> <span>".__("IM")."</span></a>
|
||||
</font></th>";
|
||||
echo "<th width='40px'>
|
||||
<font size=1>AR<a href='#' class='tipp'> <span>".$help_label["AR"]."</span></a>
|
||||
<font size=1>AR<a href='#' class='tipp'> <span>".__("AR")."</span></a>
|
||||
</font></th>";
|
||||
echo "<th width='40px'>
|
||||
<font size=1>AW<a href='#' class='tipp'> <span>".$help_label["AW"]."</span></a>
|
||||
<font size=1>AW<a href='#' class='tipp'> <span>".__("AW")."</span></a>
|
||||
</font></th>";
|
||||
echo "<th width='40px'>
|
||||
<font size=1>LW<a href='#' class='tipp'> <span>".$help_label["LW"]."</span></a>
|
||||
<font size=1>LW<a href='#' class='tipp'> <span>".("LW")."</span></a>
|
||||
</font></th>";
|
||||
echo "<th width='40px'>
|
||||
<font size=1>UM<a href='#' class='tipp'> <span>".$help_label["UM"]."</span></a>
|
||||
<font size=1>UM<a href='#' class='tipp'> <span>".__("UM")."</span></a>
|
||||
</font></th>";
|
||||
echo "<th width='40px'>
|
||||
<font size=1>DM<a href='#' class='tipp'> <span>".$help_label["DM"]."</span></a>
|
||||
<font size=1>DM<a href='#' class='tipp'> <span>".__("DM")."</span></a>
|
||||
</font></th>";
|
||||
echo "<th width='40px'>
|
||||
<font size=1>LM<a href='#' class='tipp'> <span>".$help_label["LM"]."</span></a>
|
||||
<font size=1>LM<a href='#' class='tipp'> <span>".__("LM")."</span></a>
|
||||
</font></th>";
|
||||
echo "<th width='40px'>
|
||||
<font size=1>PM<a href='#' class='tipp'> <span>".$help_label["PM"]."</span></a>
|
||||
<font size=1>PM<a href='#' class='tipp'> <span>".__("PM")."</span></a>
|
||||
</font></th>";
|
||||
$color = 1;
|
||||
while ($rowdup=mysql_fetch_array($resq1)){
|
||||
|
|
|
@ -60,7 +60,7 @@ INSERT INTO `tconfig` VALUES
|
|||
(18, 'graph_color2', '#42D100'),
|
||||
(19, 'graph_color3', '#89FF09'),
|
||||
(20, 'sla_period', '604800'),
|
||||
(21, 'locale', 'C');
|
||||
(22, 'date_format', 'F j, Y, g:i a');
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
|
|
|
@ -2190,8 +2190,8 @@ if ($graphic_type) {
|
|||
$data[0] = (float) get_parameter ('down');
|
||||
$data[1] = (float) get_parameter ('not_down');
|
||||
$legends = array ();
|
||||
$legends[0] = __('Monitors OK');
|
||||
$legends[1] = __('Monitors BAD');
|
||||
$legends[0] = __('Monitors BAD');
|
||||
$legends[1] = __('Monitors OK');
|
||||
generic_pie_graph ($width, $height, $data, $legends);
|
||||
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue