2009-02-12 Evi Vanoost <vanooste@rcbi.rochester.edu>
* include/footer.php, general/links_menu.php: _new is invalid. Use _blank * include/config_process.php: Updated error texts for better English * include/calendar.php: Removed since nobody uses it anymore * include/functions.php: Modified process_page_header to not load wz_jsgraphics by default (it's too heavy and hardly used). Deprecated no_permission and unmanaged_error (since they're not used) * include/styles/timeentry.css, include/styles/pandora.css, include/styles/ie.css: Merged these styles together so there is no extra query for 2 css classes * operation/reporting/reporting_viewer.php: Removed comparison since time comes from the client and if the clock is a bit off it gives error. Also removed reference to timeentry.css * godmode/alerts/alert_list.php: Uses new method to load css and jquery which prevents error of <link> tags being in body * godmode/agentes/planned_downtime.php: Removed timeentry reference and fixed HTML in between. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1453 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
932a41594a
commit
91b247a557
|
@ -1,3 +1,29 @@
|
|||
2009-02-12 Evi Vanoost <vanooste@rcbi.rochester.edu>
|
||||
|
||||
* include/footer.php, general/links_menu.php: _new is invalid. Use _blank
|
||||
|
||||
* include/config_process.php: Updated error texts for better English
|
||||
|
||||
* include/calendar.php: Removed since nobody uses it anymore
|
||||
|
||||
* include/functions.php: Modified process_page_header to not load
|
||||
wz_jsgraphics by default (it's too heavy and hardly used). Deprecated
|
||||
no_permission and unmanaged_error (since they're not used)
|
||||
|
||||
* include/styles/timeentry.css, include/styles/pandora.css,
|
||||
include/styles/ie.css: Merged these styles together so there is no extra
|
||||
query for 2 css classes
|
||||
|
||||
* operation/reporting/reporting_viewer.php: Removed comparison since
|
||||
time comes from the client and if the clock is a bit off it gives error.
|
||||
Also removed reference to timeentry.css
|
||||
|
||||
* godmode/alerts/alert_list.php: Uses new method to load css and jquery
|
||||
which prevents error of <link> tags being in body
|
||||
|
||||
* godmode/agentes/planned_downtime.php: Removed timeentry reference and
|
||||
fixed HTML in between.
|
||||
|
||||
2009-02-12 Esteban Sanchez <estebans@artica.es>
|
||||
|
||||
* include/javascript/jquery.tablesorter.js,
|
||||
|
|
|
@ -23,7 +23,7 @@ if (isset($_SERVER['REQUEST_TIME'])) {
|
|||
$time = get_system_time ();
|
||||
}
|
||||
|
||||
echo '<a class="white_bold" target="_new" href="general/license/pandora_info_'.$config["language"].'.html">Pandora FMS '.$pandora_version.' - Build '.$build_version.'</a><br />';
|
||||
echo '<a class="white_bold" target="_blank" href="general/license/pandora_info_'.$config["language"].'.html">Pandora FMS '.$pandora_version.' - Build '.$build_version.'</a><br />';
|
||||
echo '<a class="white">'. __('Page generated at') . ' '. print_timestamp ($time, true, array ("prominent" => "timestamp")); //Always use timestamp here
|
||||
|
||||
if ((isset($develop_bypass)) AND ($develop_bypass == 1)) {
|
||||
|
|
|
@ -21,7 +21,7 @@ if ($result !== false) {
|
|||
echo '<div class="tit bg4">:: '.__('Links').' ::</div>';
|
||||
echo '<div class="menu"><ul>';
|
||||
foreach ($result as $link) {
|
||||
echo '<li class="links"><a href="'.$link["link"].'" target="_new">'.$link["name"].'</a></li>';
|
||||
echo '<li class="links"><a href="'.$link["link"].'" target="_blank">'.$link["name"].'</a></li>';
|
||||
}
|
||||
echo '</ul></div>';
|
||||
}
|
||||
|
|
|
@ -152,7 +152,7 @@ if ($create_downtime || $update_downtime) {
|
|||
$table->data[4][1] = print_input_text ('date_to', $date_to, '', 10, 10, true);
|
||||
$table->data[4][1] .= print_input_text ('time_to', $time_to, '', 7, 7, true);
|
||||
|
||||
echo '<form method="POST" action="index.php?sec=gagente&sec2=godmode/agentes/planned_downtime">';
|
||||
echo '<form method="POST" action="index.php?sec=gagente&sec2=godmode/agentes/planned_downtime">';
|
||||
|
||||
if ($id_downtime > 0){
|
||||
echo "<table width=100% border=0 cellpadding=4 >";
|
||||
|
@ -160,7 +160,7 @@ if ($create_downtime || $update_downtime) {
|
|||
}
|
||||
|
||||
//Editor form
|
||||
echo '<h3>'.__('Planned Downtime Form').' <img class="img_help" src="images/help.png" onClick="pandora_help(\'planned_downtime\')" /></h3>';
|
||||
echo '<h3>'.__('Planned Downtime Form').' <img class="img_help" src="images/help.png" onClick="pandora_help(\'planned_downtime\')" alt="help" /></h3>';
|
||||
print_table ($table);
|
||||
|
||||
|
||||
|
@ -201,14 +201,14 @@ if ($create_downtime || $update_downtime) {
|
|||
echo "<form method=post action='index.php?sec=gagente&sec2=godmode/agentes/planned_downtime&first_update=1&id_downtime=$id_downtime'>";
|
||||
|
||||
print_select_from_sql ("SELECT id_grupo, nombre FROM tgrupo WHERE id_grupo > 1", "filter_group", $filter_group, '', __("Any"), -1, false, false);
|
||||
echo "<br><br>";
|
||||
echo "<br /><br />";
|
||||
echo print_submit_button (__('Filter by group'), '', false, 'class="sub next"',false);
|
||||
echo "</form>";
|
||||
|
||||
echo "<form method=post action='index.php?sec=gagente&sec2=godmode/agentes/planned_downtime&first_update=1&insert_downtime_agent=1&id_downtime=$id_downtime'>";
|
||||
|
||||
echo print_select ($data, "id_agent[]", '', '', '', 0, false, true);
|
||||
echo "<br><br><br>";
|
||||
echo "<br /><br /><br />";
|
||||
echo print_submit_button (__('Add'), '', false, 'class="sub next"',false);
|
||||
echo "</form>";
|
||||
echo "</table>";
|
||||
|
@ -246,9 +246,9 @@ if ($create_downtime || $update_downtime) {
|
|||
|
||||
$data[3] = $downtime["ultimo_contacto"];
|
||||
|
||||
$data[4] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/planned_downtime&id_agent='.
|
||||
$id_agent.'&delete_downtime_agent=1&first_update=1&id_downtime_agent='.$downtime["id"].'&id_downtime='.$id_downtime.'">
|
||||
<img src="images/cross.png" border="0" alt="'.__('Delete').'"></a>';
|
||||
$data[4] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/planned_downtime&id_agent='.
|
||||
$id_agent.'&delete_downtime_agent=1&first_update=1&id_downtime_agent='.$downtime["id"].'&id_downtime='.$id_downtime.'">
|
||||
<img src="images/cross.png" border="0" alt="'.__('Delete').'" /></a>';
|
||||
|
||||
|
||||
array_push ($table->data, $data);
|
||||
|
@ -276,8 +276,7 @@ if ($create_downtime || $update_downtime) {
|
|||
$downtimes = get_db_all_rows_sql ($sql);
|
||||
if (!$downtimes) {
|
||||
echo '<div class="nf">'.__('No planned downtime').'</div>';
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
foreach ($downtimes as $downtime) {
|
||||
$data = array();
|
||||
$total = get_db_sql ("SELECT COUNT(id_agent) FROM tplanned_downtime_agents WHERE id_downtime = ".$downtime["id"]);
|
||||
|
@ -287,16 +286,16 @@ if ($create_downtime || $update_downtime) {
|
|||
$data[2] = date ("Y-m-d H:i", $downtime['date_from']);
|
||||
$data[3] = date ("Y-m-d H:i", $downtime['date_to']);
|
||||
if ($downtime["executed"] == 0){
|
||||
$data[4] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/planned_downtime&id_agent='.
|
||||
$id_agent.'&delete_downtime=1&id_downtime='.$downtime['id'].'">
|
||||
<img src="images/cross.png" border="0" alt="'.__('Delete').'"></a>';
|
||||
$data[5] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/planned_downtime&edit_downtime=1&first_update=1&id_downtime='.$downtime['id'].'">
|
||||
<img src="images/config.png" border="0" alt="'.__('Update').'"></a>';
|
||||
$data[4] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/planned_downtime&id_agent='.
|
||||
$id_agent.'&delete_downtime=1&id_downtime='.$downtime['id'].'">
|
||||
<img src="images/cross.png" border="0" alt="'.__('Delete').'" /></a>';
|
||||
$data[5] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/planned_downtime&edit_downtime=1&first_update=1&id_downtime='.$downtime['id'].'">
|
||||
<img src="images/config.png" border="0" alt="'.__('Update').'" /></a>';
|
||||
}
|
||||
if ($downtime["executed"] == 0)
|
||||
$data[6] = "<img src='images/pixel_green.png' width=20 height=20>";
|
||||
$data[6] = print_image ("images/pixel_green.png", true, array ('width' => 20, 'height' => 20, 'alt' => __('Executed')));
|
||||
else
|
||||
$data[6] = "<img src='images/pixel_red.png' width=20 height=20>";
|
||||
$data[6] = print_image ("images/pixel_green.png", true, array ('width' => 20, 'height' => 20, 'alt' => __('Not executed')));
|
||||
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
|
@ -304,14 +303,14 @@ if ($create_downtime || $update_downtime) {
|
|||
}
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
|
||||
echo "<form method=post action='index.php?sec=gagente&sec2=godmode/agentes/planned_downtime'>";
|
||||
echo "<input type=hidden name='first_create' value='1'>";
|
||||
echo "<input type=submit class='sub wand' value='".__('Create')."'>";
|
||||
echo "</form>";
|
||||
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/planned_downtime">';
|
||||
print_input_hidden ("first_create", 1);
|
||||
print_submit_button (__('Create'), 'create', false, 'class="sub wand"');
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
$config['css'][] = 'datepicker';
|
||||
$config['css'][] 'timeentry';
|
||||
$config['jquery'][] = 'ui.core';
|
||||
$config['jquery'][] = 'ui.datepicker';
|
||||
$config['jquery'][] = 'timeentry';
|
||||
|
@ -325,6 +324,6 @@ $(document).ready (function () {
|
|||
spinnerSize: [20, 20, 0]
|
||||
});
|
||||
$("#text-date_from, #text-date_to").datepicker ();
|
||||
$.datepicker.regional["<?= $config['language'] ?>"];
|
||||
$.datepicker.regional["<?php echo $config['language']; ?>"];
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -58,6 +58,7 @@ $agents = get_group_agents (array_keys ($groups), false, "none");
|
|||
|
||||
$simple_alerts = array ();
|
||||
$compound_alerts = array ();
|
||||
|
||||
foreach ($agents as $agent_id => $agent_name) {
|
||||
$agent_alerts = get_agent_alerts_simple ($agent_id);
|
||||
if (! empty ($agent_alerts))
|
||||
|
@ -116,12 +117,12 @@ foreach ($simple_alerts as $agent_id => $alerts) {
|
|||
|
||||
print_table ($table);
|
||||
}
|
||||
|
||||
$config['css'][] = "cluetip"; //link tags can't go in body
|
||||
$config['jquery'][] = "cluetip"; //make sure it doesn't get overwritten
|
||||
$config['jquery'][] = "form";
|
||||
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="include/styles/cluetip.css" type="text/css" />
|
||||
<script type="text/javascript" src="include/javascript/jquery.cluetip.js"></script>
|
||||
<script type="text/javascript" src="include/javascript/jquery.form.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* <![CDATA[ */
|
||||
$(document).ready (function () {
|
||||
|
|
|
@ -505,12 +505,11 @@ echo '</form>';
|
|||
$config['jquery'][] = 'ui.core';
|
||||
$config['jquery'][] = 'timeentry';
|
||||
$config['jquery'][] = 'ui.core';
|
||||
$config['css'][] = 'timeentry';
|
||||
$config['js'][] = 'pandora_alerts';
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
|
||||
/* <![CDATA[ */
|
||||
var matches = "<?php echo __('The alert would fire when the value matches <span id=\"value\"></span>');?>";
|
||||
var matches_not = "<?php echo __('The alert would fire when the value doesn\'t match <span id=\"value\"></span>');?>";
|
||||
var is = "<?php echo __('The alert would fire when the value is <span id=\"value\"></span>');?>";
|
||||
|
@ -709,4 +708,5 @@ $(document).ready (function () {
|
|||
});
|
||||
<?php endif; ?>
|
||||
})
|
||||
/* ]]> */
|
||||
</script>
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
<?php
|
||||
# PHP Calendar (version 2.3), written by Keith Devens
|
||||
# http://keithdevens.com/software/php_calendar
|
||||
# see example at http://keithdevens.com/weblog
|
||||
# License: http://keithdevens.com/software/license
|
||||
# Modified by Raul Mateos <raulofpandora@gmail.com>, 2006
|
||||
|
||||
function generate_calendar($year, $month, $days = array(), $day_name_length = 3, $month_href = NULL, $locale = ''){
|
||||
$first_day = 1; //Monday first day of week.
|
||||
$first_of_month = gmmktime(0,0,0,$month,1,$year);
|
||||
#remember that mktime will automatically correct if invalid dates are entered
|
||||
# for instance, mktime(0,0,0,12,32,1997) will be the date for Jan 1, 1998
|
||||
# this provides a built in "rounding" feature to generate_calendar()
|
||||
setlocale(LC_TIME, $locale);
|
||||
$day_names = array(); #generate all the day names according to the current locale
|
||||
for($n=0,$t=(3+$first_day)*86400; $n<7; $n++,$t+=86400) #January 4, 1970 was a Sunday
|
||||
$day_names[$n] = ucfirst(gmstrftime('%A',$t)); #%A means full textual day name
|
||||
list($month, $year, $month_name, $weekday) = explode(',',gmstrftime('%m,%Y,%B,%w',$first_of_month));
|
||||
$weekday = ($weekday + 7 - $first_day) % 7; #adjust for $first_day
|
||||
$title = htmlentities(ucfirst($month_name)).' '.$year;
|
||||
#note that some locales don't capitalize month and day names
|
||||
|
||||
#Begin calendar. Uses a real <caption>. See http://diveintomark.org/archives/2002/07/03
|
||||
$calendar = '<table class="calendar">'."\n".
|
||||
'<caption class="calendar-month">'.($month_href ? '<a href="'.htmlspecialchars($month_href).'">'.$title.'</a>' : $title)."</caption>\n<tr>";
|
||||
|
||||
if($day_name_length){ #if the day names should be shown ($day_name_length > 0)
|
||||
#if day_name_length is >3, the full name of the day will be printed
|
||||
foreach($day_names as $d)
|
||||
$calendar .= '<th abbr="'.htmlentities($d).'">'.htmlentities($day_name_length < 4 ? substr($d,0,$day_name_length) : $d).'</th>';
|
||||
$calendar .= "</tr>\n<tr>";
|
||||
}
|
||||
|
||||
if($weekday > 0) $calendar .= '<td colspan="'.$weekday.'"> </td>'; #initial 'empty' days
|
||||
for($day=1,$days_in_month=gmdate('t',$first_of_month); $day<=$days_in_month; $day++,$weekday++){
|
||||
|
||||
if($weekday == 7){
|
||||
$weekday = 0; #start a new week
|
||||
$calendar .= "</tr>\n<tr>";
|
||||
}
|
||||
if(isset($days[$day]) and is_array($days[$day])){
|
||||
@list($link, $classes, $content) = $days[$day];
|
||||
if(is_null($content)) $content = $day;
|
||||
if($weekday==6){ $classes='datos2';}
|
||||
$calendar .= '<td'.($classes ? ' class="'.htmlspecialchars($classes).'">' : '>').
|
||||
($link ? '<a href="'.htmlspecialchars($link).'">'.$content.'</a>' : $content).'</td>';
|
||||
}
|
||||
else $calendar .= "<td>$day</td>";
|
||||
}
|
||||
if($weekday != 7) $calendar .= '<td colspan="'.(7-$weekday).'"> </td>'; #remaining "empty" days
|
||||
|
||||
return $calendar."</tr>\n</table>\n";
|
||||
}
|
||||
?>
|
|
@ -35,21 +35,22 @@ $config['style'] = 'pandora';
|
|||
// Read remaining config tokens from DB
|
||||
if (! mysql_connect ($config["dbhost"], $config["dbuser"], $config["dbpass"])) {
|
||||
//Non-persistent connection. If you want persistent conn change it to mysql_pconnect()
|
||||
exit ('<html><head><title>Pandora FMS Error</title>
|
||||
exit ('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Pandora FMS Error</title>
|
||||
<link rel="stylesheet" href="./include/styles/pandora.css" type="text/css">
|
||||
</head><body><div align="center">
|
||||
</head><body><div style="align:center">
|
||||
<div id="db_f">
|
||||
<div>
|
||||
<a href="index.php"><img src="images/pandora_logo.png" border="0"></a>
|
||||
<a href="index.php"><img src="images/pandora_logo.png" border="0" alt="logo" /></a>
|
||||
</div>
|
||||
<div id="db_ftxt">
|
||||
<h1 id="log_f" class="error">Pandora FMS Console Error DB-001</h1>
|
||||
Cannot connect with Database, please check your database setup in the
|
||||
<b>./include/config.php</b> file and read documentation.<i><br><br>
|
||||
Probably any of your user/database/hostname values are incorrect or
|
||||
database is not running.</i><br><br><font class="error">
|
||||
<b>MySQL ERROR:</b> '. mysql_error().'</font>
|
||||
<br>
|
||||
Cannot connect to the database, please check your database setup in the
|
||||
<b>include/config.php</b> file or read the documentation on how to setup Pandora FMS.<i><br /><br />
|
||||
Probably one or more of your user, database or hostname values are incorrect or
|
||||
the database server is not running.</i><br /><br /><span class="error">
|
||||
<b>MySQL ERROR:</b> '. mysql_error().'</span>
|
||||
<br />
|
||||
</div>
|
||||
</div></body></html>');
|
||||
}
|
||||
|
@ -59,19 +60,20 @@ require_once ('functions_db.php');
|
|||
$configs = get_db_all_rows_in_table ('tconfig');
|
||||
|
||||
if (empty ($configs)) {
|
||||
exit ('<html><head><title>Pandora FMS Error</title>
|
||||
exit ('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Pandora FMS Error</title>
|
||||
<link rel="stylesheet" href="./include/styles/pandora.css" type="text/css">
|
||||
</head><body><div align="center">
|
||||
<div id="db_f">
|
||||
<div>
|
||||
<a href="index.php"><img src="images/pandora_logo.png" border="0"></a>
|
||||
<a href="index.php"><img src="images/pandora_logo.png" border="0" alt="logo" /></a>
|
||||
</div>
|
||||
<div id="db_ftxt">
|
||||
<h1 id="log_f" class="error">Pandora FMS Console Error DB-002</h1>
|
||||
Cannot load configuration variables. Please check your database setup in the
|
||||
<b>./include/config.php</b> file and read documentation.<i><br><br>
|
||||
Probably database schema is created but there are no data inside it or you have a problem with DB access credentials.
|
||||
</i><br>
|
||||
Cannot load configuration variables from database. Please check your database setup in the
|
||||
<b>include/config.php</b> file or read the documentation on how to setup Pandora FMS.<i><br /><br />
|
||||
Most likely your database schema has been created but there are is no data in it, you have a problem with the database access credentials or your schema is out of date.
|
||||
</i><br />
|
||||
</div>
|
||||
</div></body></html>');
|
||||
}
|
||||
|
@ -83,20 +85,21 @@ foreach ($configs as $c) {
|
|||
$config['language'] = $c['value'];
|
||||
break;
|
||||
case "auth":
|
||||
exit ('<html><head><title>Pandora FMS Error</title>
|
||||
<link rel="stylesheet" href="./include/styles/pandora.css" type="text/css">
|
||||
</head><body><div align="center">
|
||||
<div id="db_f">
|
||||
<div>
|
||||
<a href="index.php"><img src="images/pandora_logo.png" border="0"></a>
|
||||
</div>
|
||||
<div id="db_ftxt">
|
||||
<h1 id="log_f" class="error">Pandora FMS Console Error DB-003</h1>
|
||||
Cannot override auth variables from database. Remove them from your database by executing:
|
||||
DELETE FROM tconfig WHERE token = "auth";
|
||||
<br />
|
||||
</div>
|
||||
</div></body></html>');
|
||||
exit ('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Pandora FMS Error</title>
|
||||
<link rel="stylesheet" href="./include/styles/pandora.css" type="text/css">
|
||||
</head><body><div align="center">
|
||||
<div id="db_f">
|
||||
<div>
|
||||
<a href="index.php"><img src="images/pandora_logo.png" border="0" alt="logo" /></a>
|
||||
</div>
|
||||
<div id="db_ftxt">
|
||||
<h1 id="log_f" class="error">Pandora FMS Console Error DB-003</h1>
|
||||
Cannot override authorization variables from the config database. Remove them from your database by executing:
|
||||
DELETE FROM tconfig WHERE token = "auth";
|
||||
<br />
|
||||
</div>
|
||||
</div></body></html>');
|
||||
default:
|
||||
$config[$c['token']] = $c['value'];
|
||||
}
|
||||
|
|
|
@ -187,12 +187,13 @@ function popup_help ($help_id, $return = false) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Prints a no permission generic error message.
|
||||
* DEPRECATED: This function is not used anywhere. Remove it?
|
||||
* (use general/noaccess.php followed by exit instead)
|
||||
*/
|
||||
function no_permission () {
|
||||
require("config.php");
|
||||
echo "<h3 class='error'>".__('You don\'t have access')."</h3>";
|
||||
echo "<img src='images/noaccess.png' alt='No access' width='120'><br><br>";
|
||||
echo "<img src='images/noaccess.png' alt='No access' width='120'><br /><br />";
|
||||
echo "<table width=550>";
|
||||
echo "<tr><td>";
|
||||
echo __('You don\'t have enough permission to access this resource');
|
||||
|
@ -203,16 +204,15 @@ function no_permission () {
|
|||
}
|
||||
|
||||
/**
|
||||
* Prints a generic error message for some unhandled error and exits
|
||||
*
|
||||
* TODO: Clean this up so it doesn't use table and insert erroneous td
|
||||
*
|
||||
* DEPRECATED: This function is not used anywhere. Remove it?
|
||||
* (use print_error function instead followed by return or exit)
|
||||
*
|
||||
* @param string $error Aditional error string to be shown. Blank by default
|
||||
*/
|
||||
function unmanaged_error ($error = "") {
|
||||
require_once ("config.php");
|
||||
echo "<h3 class='error'>".__('Unmanaged error')."</h3>";
|
||||
echo "<img src='images/error.png' alt='error'><br><br>";
|
||||
echo "<img src='images/error.png' alt='error'><br /><br />";
|
||||
echo "<table width=550>";
|
||||
echo "<tr><td>";
|
||||
echo __('Unmanaged error');
|
||||
|
@ -1051,6 +1051,7 @@ function process_page_head ($string, $bitfield) {
|
|||
$output .= '<title>Pandora FMS - '.__('the Flexible Monitoring System').'</title>
|
||||
<meta http-equiv="expires" content="0" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Content-Style-Type" content="text/css" />
|
||||
<meta name="resource-type" content="document" />
|
||||
<meta name="distribution" content="global" />
|
||||
<meta name="author" content="Sancho Lerena" />
|
||||
|
@ -1062,7 +1063,6 @@ function process_page_head ($string, $bitfield) {
|
|||
<!--[if gte IE 6]>
|
||||
<link rel="stylesheet" href="include/styles/ie.css" type="text/css"/>
|
||||
<![endif]-->
|
||||
<script type="text/javascript" src="include/javascript/wz_jsgraphics.js"></script>
|
||||
<script type="text/javascript" src="include/javascript/pandora.js"></script>
|
||||
<script type="text/javascript" src="include/javascript/jquery.js"></script>
|
||||
<script type="text/javascript" src="include/javascript/jquery.pandora.js"></script>
|
||||
|
@ -1083,13 +1083,14 @@ function process_page_head ($string, $bitfield) {
|
|||
|
||||
if (!empty ($config['js'])) {
|
||||
//Load other javascript
|
||||
$loaded = array ('', 'wz_jsgraphics', 'pandora', 'date_'.$config['language'], 'time_'.$config['language'], 'countdown_'.$config['language']); //We can't load empty and we loaded wz_jsgraphics and pandora
|
||||
$loaded = array ('', 'pandora', 'date_'.$config['language'], 'time_'.$config['language'], 'countdown_'.$config['language']); //We can't load empty and we loaded wz_jsgraphics and pandora
|
||||
foreach ($config['js'] as $javascript) {
|
||||
if (in_array ($javascript, $loaded)) {
|
||||
continue;
|
||||
}
|
||||
array_push ($loaded, $javascript);
|
||||
$output .= '<script type="text/javascript" src="include/javascript/'.$javascript.'.js"></script>'."\n";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,3 +30,7 @@
|
|||
zoom: 100%;
|
||||
padding: 1;
|
||||
}
|
||||
|
||||
* html .timeEntry_control { /* IE only */
|
||||
margin-top: -4px;
|
||||
}
|
||||
|
|
|
@ -856,3 +856,10 @@ img.right {
|
|||
.text-right {
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
/* timeEntry styles */
|
||||
.timeEntry_control {
|
||||
vertical-align: middle;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
/* timeEntry styles */
|
||||
.timeEntry_control {
|
||||
vertical-align: middle;
|
||||
margin-left: 2px;
|
||||
}
|
||||
* html .timeEntry_control { /* IE only */
|
||||
margin-top: -4px;
|
||||
}
|
|
@ -140,7 +140,8 @@ if ($grupo != 1) {
|
|||
$filter .= sprintf (" AND id_grupo = %d", $grupo);
|
||||
if (give_acl ($config['id_user'], $grupo, "IM") == 0) {
|
||||
audit_db ($config["id_user"],$config["remote_addr"],"ACL Forbidden","User tried to read incidents from group without access");
|
||||
no_permission ();
|
||||
include ("general/noaccess.php");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -84,7 +84,6 @@ echo '</div>';
|
|||
/* We must add javascript here. Otherwise, the date picker won't
|
||||
work if the date is not correct because php is returning. */
|
||||
$config['css'][] = 'datepicker';
|
||||
$config['css'][] = 'timeentry';
|
||||
$config['jquery'][] = 'ui.core';
|
||||
$config['jquery'][] = 'ui.datepicker';
|
||||
$config['jquery'][] = 'ui.timeentry';
|
||||
|
@ -106,11 +105,6 @@ if ($datetime === false || $datetime == -1) {
|
|||
echo '<h3 class="error">'.__('Invalid date selected').'</h3>';
|
||||
return;
|
||||
}
|
||||
/* Date must not be older than now */
|
||||
if ($datetime > get_system_time ()) {
|
||||
echo '<h3 class="error">'.__('Selected date is older than current date').'</h3>';
|
||||
return;
|
||||
}
|
||||
|
||||
$table->size = array ();
|
||||
$table->style = array ();
|
||||
|
|
Loading…
Reference in New Issue