2009-02-09 Evi Vanoost <vanooste@rcbi.rochester.edu>

* general/header.php, general/footer.php: Made it comply with standards
	
	* general/main_menu.php: Fixed some typo's.
	
	* include/javascript/jquery.pandora.js: This was loading an extension 
	that has a separate file already
	
	* include/functions.php: Added process_page_head and process_page_body
	these are callback functions for ob_start and add functionality like
	conditional loading and external scripts in the correct places. Also adds
	override functionality to certain items (like refresh) from anywhere
	
	* include/javascript/time_en.js: Added as a placeholder
	
	* extensions/update_manager.php: Fixed some typos
	
	* operation/agentes/exportdata.php, operation/agentes/networkmap.php,
	operation/events/events.php, operation/extensions.php, 
	operation/incidents/incident_detail.php, 
	operation/reporting/reporting_viewer.php, 
	operation/visual_console/render_view.php, 
	godmode/agentes/alert_manager.php,
	godmode/agentes/module_manager_editor.php,
	godmode/agentes/planned_downtime.php,
	godmode/alerts/configure_alert_template.php,
	godmode/alerts/configure_alert_action.php,
	godmode/groups/configure_group.php, godmode/reporting/graph_builder.php,
	godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php
	godmode/snmpconsole/snmp_alert.php: Changed javascript, css and jquery 
	loading to the new buffer callback handlers.

git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1436 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
guruevi 2009-02-09 18:41:54 +00:00
parent 2bc21e1e23
commit 2f9e337ad5
26 changed files with 231 additions and 205 deletions

View File

@ -1,3 +1,36 @@
2009-02-09 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/header.php, general/footer.php: Made it comply with standards
* general/main_menu.php: Fixed some typo's.
* include/javascript/jquery.pandora.js: This was loading an extension
that has a separate file already
* include/functions.php: Added process_page_head and process_page_body
these are callback functions for ob_start and add functionality like
conditional loading and external scripts in the correct places. Also adds
override functionality to certain items (like refresh) from anywhere
* include/javascript/time_en.js: Added as a placeholder
* extensions/update_manager.php: Fixed some typos
* operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/events/events.php, operation/extensions.php,
operation/incidents/incident_detail.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/groups/configure_group.php, godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php
godmode/snmpconsole/snmp_alert.php: Changed javascript, css and jquery
loading to the new buffer callback handlers.
2009-02-09 Raul Mateos <raulofpandora@gmail.com>
* include/config_process.php, general/error_noconfig.php, index.php:

View File

@ -105,7 +105,7 @@ function pandora_update_manager_login () {
echo '<div class="notify">';
echo '<img src="images/information.png" /> ';
echo __('There\'s a new update for Pandora');
echo '. <a href="index.php?sec=extensions&sec2=extensions/update_manager">';
echo '. <a href="index.php?sec=extensions&amp;sec2=extensions/update_manager">';
echo __('More info');
echo '</a>';
echo '</div>';

View File

@ -23,12 +23,12 @@ 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.'<br>';
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">'. __('Page generated at') . ' '. print_timestamp ($time, true, array ("prominent" => "timestamp")); //Always use timestamp here
if ((isset($develop_bypass)) AND ($develop_bypass == 1)) {
echo ' - Saved '.format_numeric ($sql_cache["saved"]).' Queries';
}
echo '</a><br />';
echo '<a href="http://www.mozilla-europe.org/en/firefox/"><img src="images/firefox.png" align="middle" title="'.__('Pandora FMS console is best viewed with Firefox web browser').'" /></a>';
echo '<a href="http://www.mozilla-europe.org/en/firefox/"><img src="images/firefox.png" align="middle" title="'.__('Pandora FMS console is best viewed with Firefox web browser').'" alt="'.__('Get Firefox').'" /></a>';
?>

View File

@ -45,7 +45,7 @@ echo '<a class="white_bold" href="index.php?sec=main"><img src="images/informati
//Second column, second row (System up/down)
echo '<br /><br />';
echo '<a class="white_bold" href="index.php?sec=estado_server&sec2=operation/servers/view_server&refr=60">';
echo '<a class="white_bold" href="index.php?sec=estado_server&amp;sec2=operation/servers/view_server&amp;refr=60">';
$servers["all"] = (int) get_db_value ('COUNT(id_server)','tserver');
$servers["up"] = (int) check_server_status ();
$servers["down"] = $servers["all"] - $servers["up"];
@ -68,11 +68,11 @@ echo "</a>";
echo '</td><td width="20%">';
$refr = (int) get_parameter ("refr");
if ($refr) {
echo '<a id="autorefresh" 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" alt="lightning" />&nbsp;'. __('Autorefresh');
echo '<a id="autorefresh" class="white_grey_bold" href="'.((substr ($_SERVER['REQUEST_URI'],-1) != "/") ? safe_input ($_SERVER['REQUEST_URI']) : 'index.php?' ).'&amp;refr=0"><img src="images/page_lightning.png" class="bot" alt="lightning" />&nbsp;'. __('Autorefresh');
echo ' (<span id="refr">'.date ("i:s", $refr).'</span>)';
echo '</a>';
} else {
echo '<a id="autorefresh" class="white_bold" href="'.((substr ($_SERVER['REQUEST_URI'],-1) != "/") ? $_SERVER['REQUEST_URI'] : "index.php?" ).(count($_GET)?"&":"?").'refr="><img src="images/page_lightning.png" class="bot" alt="lightning" />&nbsp;'.__('Autorefresh').'</a>';
echo '<a id="autorefresh" class="white_bold" href="'.((substr ($_SERVER['REQUEST_URI'],-1) != "/") ? safe_input ($_SERVER['REQUEST_URI']) : "index.php?" ).(count($_GET) ? "&amp;" : "?").'refr="><img src="images/page_lightning.png" class="bot" alt="lightning" />&nbsp;'.__('Autorefresh').'</a>';
$values = array ('5' => '5 '.__('seconds'),
'10' => '10 '.__('seconds'),
'15' => '15 '.__('seconds'),
@ -90,13 +90,14 @@ if ($refr) {
//Events
echo '<br /><br />';
echo '<a class="white_bold" href="index.php?sec=eventos&sec2=operation/events/events&refr=5"><img src="images/lightning_go.png" alt="lightning_go" class="bot" />&nbsp;'.__('Events').'</a>';
echo '<a class="white_bold" href="index.php?sec=eventos&amp;sec2=operation/events/events&amp;refr=5"><img src="images/lightning_go.png" alt="lightning_go" class="bot" />&nbsp;'.__('Events').'</a>';
// Styled text
echo '</td><td width="20%"><div id="head_r"><span id="logo_text1">Pandora</span> <span id="logo_text2">FMS</span></div></td></tr></table>';
$config['jquery'][] = 'countdown';
?>
<script type="text/javascript" src="include/javascript/jquery.countdown.js"></script>
<script language="javascript" type="text/javascript">
/* <![CDATA[ */
$(document).ready (function () {

View File

@ -97,8 +97,8 @@ function temp_print_menu ($menu, $classtype) {
$link_add = "";
}
$submenu_output .= '<li'.($class ? ' class="'.$class.'"' : '').'>';
$submenu_output .= '<a href="index.php?sec='.$mainsec.'&amp;sec2='.$subsec2.($main["refr"] ? '&amp;refr='.$main["refr"] : '').$link_add.'"'.($class == 'submenu_selected' ? 'style="font-weight:bold;"' : '').'>'.$sub["text"].'</a>';
$submenu_output .= "</li>";
$submenu_output .= '<a href="index.php?sec='.$mainsec.'&amp;sec2='.$subsec2.($main["refr"] ? '&amp;refr='.$main["refr"] : '').$link_add.'"'.($class == 'submenu_selected' ? ' style="font-weight:bold;"' : '').'>'.$sub["text"].'</a>';
$submenu_output .= '</li>';
}
}

View File

@ -289,11 +289,9 @@ print_submit_button (__('Add'), 'add', false, 'class="sub next"');
print_input_hidden ('id_agent_module', 0);
print_input_hidden ('create_alert', 1);
echo '</div></form>';
$config['jquery'][] = 'cluetip';
$config['css'][] = 'cluetip';
?>
<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">
/* <![CDATA[ */
$(document).ready (function () {

View File

@ -207,11 +207,10 @@ if ($id_agent_module) {
}
echo '</div>';
echo '</form>';
$config['jquery'][] = 'ui';
$config['jquery'][] = 'form';
?>
<script type="text/javascript" src="include/javascript/jquery.ui.js"></script>
<script type="text/javascript" src="include/javascript/jquery.form.js"></script>
<script language="javascript">
/* Modules ids to check types */
var icmp = Array (6, 7);

View File

@ -310,17 +310,13 @@ if ($create_downtime || $update_downtime) {
echo "</form>";
}
$config['css'][] = 'datepicker';
$config['css'][] 'timeentry';
$config['jquery'][] = 'ui.core';
$config['jquery'][] = 'ui.datepicker';
$config['jquery'][] = 'timeentry';
?>
<link rel="stylesheet" href="include/styles/datepicker.css" type="text/css" media="screen">
<link rel="stylesheet" href="include/styles/timeentry.css" type="text/css" media="screen">
<script type="text/javascript" src="include/javascript/jquery.js"></script>
<script src="include/javascript/jquery.ui.core.js"></script>
<script src="include/javascript/jquery.ui.datepicker.js"></script>
<script src="include/languages/date_<?= $config['language'] ?>.js"></script>
<script src="include/languages/time_<?= $config['language'] ?>.js"></script>
<script src="include/javascript/jquery.timeentry.js"></script>
<script language="javascript" type="text/javascript">
$(document).ready (function () {

View File

@ -86,10 +86,9 @@ if ($id) {
}
echo '</div>';
echo '</form>';
$config['js'][] = 'pandora_alerts';
?>
<script type="text/javascript" src="include/javascript/pandora_alerts.js"></script>
<script type="text/javascript">
$(document).ready (function () {
<?php if ($id_command) : ?>

View File

@ -487,14 +487,14 @@ if ($step >= LAST_STEP) {
}
echo '</div>';
echo '</form>';
$config['jquery'][] = 'ui.core';
$config['jquery'][] = 'timeentry';
$config['jquery'][] = 'ui.core';
$config['css'][] = 'timeentry';
$config['js'][] = 'pandora_alerts';
?>
<script type="text/javascript" src="include/javascript/pandora_alerts.js"></script>
<link rel="stylesheet" href="include/styles/timeentry.css" type="text/css" media="screen">
<script src="include/javascript/jquery.ui.core.js"></script>
<script src="include/javascript/jquery.timeentry.js"></script>
<script src="include/languages/time_<?php echo $config['language']; ?>.js"></script>
<script type="text/javascript">
var matches = "<?php echo __('The alert would fire when the value matches <span id=\"value\"></span>');?>";

View File

@ -107,9 +107,6 @@ if ($id_group) {
echo '</div>';
echo '</form>';
?>
<script type="text/javascript" src="include/javascript/jquery.js"></script>
<script language="javascript" type="text/javascript">
function icon_changed () {
var inputs = [];

View File

@ -498,10 +498,6 @@ if (isset($module_array)){
}
?>
<script type="text/javascript" src="include/javascript/jquery.js"></script>
<script language="javascript" type="text/javascript">
function agent_changed () {

View File

@ -432,18 +432,15 @@ if (! $edit_layout && ! $id_layout) {
echo '</div>';
}
}
$config['css'][] = 'color-picker';
$config['jquery'][] = 'ui.core';
$config['jquery'][] = 'ui.draggable';
$config['jquery'][] = 'ui.droppable';
$config['jquery'][] = 'colorpicker';
$config['js'][] = 'pandora_visual_console';
?>
<link rel="stylesheet" href="include/styles/color-picker.css" type="text/css" />
<script type="text/javascript" src="include/javascript/jquery.js"></script>
<script type="text/javascript" src="include/javascript/pandora_visual_console.js"></script>
<script type="text/javascript" src="include/javascript/jquery.ui.core.js"></script>
<script type="text/javascript" src="include/javascript/jquery.ui.draggable.js"></script>
<script type="text/javascript" src="include/javascript/jquery.ui.droppable.js"></script>
<script type="text/javascript" src="include/javascript/jquery.colorpicker.js"></script>
<script language="javascript" type="text/javascript">
function agent_changed (event, id_agent, selected) {
if (id_agent == undefined)
id_agent = this.value;

View File

@ -533,9 +533,6 @@ if ($edit_sla_report_content) {
echo "</form>";
}
?>
<script type="text/javascript" src="include/javascript/jquery.js"></script>
<script language="javascript" type="text/javascript">
function refresh_table () {

View File

@ -356,8 +356,6 @@ if (isset ($_GET["update_alert"])) {
echo '</div>';
}
?>
<script type="text/javascript" src="include/javascript/jquery.js"></script>
<script language="javascript" type="text/javascript">
function time_changed () {
var time = this.value;

View File

@ -1004,4 +1004,136 @@ function safe_sql_string ($string) {
return $string;
return mysql_escape_string ($string);
}
/**
* Callback function to add stuff to the head. This allows us to add scripts to the header after the fact as well as extensive validation
* DO NOT CALL print_f, echo, ob_start, ob_flush, ob_end functions here.
*
* To add jquery scripts just put them in include/javascript and then add them to the $config['jquery'] array (eg. $config['jquery'][] = ui.datepicker)
* To add javascript scripts just put them in include/javascript and then add them to the $config['js'] array
* To add css just put them in include/styles and then add them to the $config['css'] array
*
* @param string Callback will fill this with the current buffer.
* @param bitfield Callback will fill this with a bitfield (see ob_start)
*
* @return string String to return to the browser
*/
function process_page_head ($string, $bitfield) {
global $config;
$output = '';
if ($config["refr"] > 0) {
// Agent selection filters and refresh
$query = 'http' . (isset ($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == TRUE ? 's': '') . '://' . $_SERVER['SERVER_NAME'];
if ($_SERVER['SERVER_PORT'] != 80 && (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == TRUE && $_SERVER['SERVER_PORT'] != 443)) {
$query .= ":" . $_SERVER['SERVER_PORT'];
}
$query .= $_SERVER['SCRIPT_NAME'];
if (sizeof ($_REQUEST))
//Some (old) browsers don't like the ?&key=var
$query .= '?1=1';
//We don't clean these variables up as they're only being passed along
foreach ($_GET as $key => $value) {
/* Avoid the 1=1 */
if ($key == 1)
continue;
$query .= '&'.$key.'='.$value;
}
foreach ($_POST as $key => $value) {
$query .= '&'.$key.'='.$value;
}
$output .= '<meta http-equiv="refresh" content="'.$config["refr"].'; URL='.$query.'" />';
}
$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 name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="author" content="Sancho Lerena" />
<meta name="copyright" content="This is GPL software. Created by Sancho Lerena and others" />
<meta name="keywords" content="pandora, monitoring, system, GPL, software" />
<meta name="robots" content="index, follow" />
<link rel="icon" href="images/pandora.ico" type="image/ico" />
<link rel="stylesheet" href="include/styles/'.$config["style"].'.css" type="text/css" />
<!--[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>
<script type="text/javascript" src="include/languages/time_'.$config['language'].'.js"></script>
<script type="text/javascript" src="include/languages/date_'.$config['language'].'.js"></script>
<script type="text/javascript" src="include/languages/countdown_'.$config['language'].'.js"></script>';
if (!empty ($config['css'])) {
$loaded = array ('', $config["style"], 'ie'); //We can't load empty and we loaded current style and ie
foreach ($config['css'] as $style) {
if (in_array ($style, $loaded)) {
continue;
}
array_push ($loaded, $style);
$output .= '<link rel="stylesheet" href="include/styles/'.$style.'.css" type="text/css" />';
}
}
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
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>';
}
}
if (!empty ($config['jquery'])) {
//Load jQuery
$loaded = array ('', 'pandora'); //We automagically load pandora and jquery
//Then add each script as necessary
foreach ($config['jquery'] as $script) {
if (in_array ($script, $loaded)) {
continue;
}
array_push ($loaded, $script);
$output .= '<script type="text/javascript" src="include/javascript/jquery.'.$script.'.js"></script>';
}
}
$output .= $string;
return $output;
}
/**
* Callback function to add stuff to the body
*
* @param string Callback will fill this with the current buffer.
* @param bitfield Callback will fill this with a bitfield (see ob_start)
*
* @return string String to return to the browser
*/
function process_page_body ($string, $bitfield) {
global $config;
// Show custom background
if ($config["pure"] == 0) {
$output = '<body style="background-color:#555555;">';
} else {
$output = '<body>'; //Don't enforce a white background color. Let user style sheet do that
}
$output .= $string;
$output .= '</body>';
return $output;
}
?>

View File

@ -22,12 +22,15 @@ $(document).ready (function () {
return this.each (function () {
this.checked = false;
})};
$.fn.enable = function () {
return $(this).removeAttr ("disabled");
};
$.fn.disable = function () {
return $(this).attr ("disabled", "disabled");
};
$.fn.pulsate = function () {
return $(this).fadeIn ("normal", function () {
$(this).fadeOut ("normal", function () {
@ -39,70 +42,5 @@ $(document).ready (function () {
});
});
};
/**
* Cookie plugin
*
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
/**
* Get the value of a cookie with the given name.
*
* @example $.cookie('the_cookie');
* @desc Get the value of a cookie.
*
* @param String name The name of the cookie.
* @return The value of the cookie.
* @type String
*
* @name $.cookie
* @cat Plugins/Cookie
* @author Klaus Hartl/klaus.hartl@stilbuero.de
*/
$.cookie = function(name, value, options) {
if (typeof value != 'undefined') { // name and value given, set cookie
options = options || {};
if (value === null) {
value = '';
options = $.extend({}, options); // clone object since it's unexpected behavior if the expired property were changed
options.expires = -1;
}
var expires = '';
if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
var date;
if (typeof options.expires == 'number') {
date = new Date();
date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
} else {
date = options.expires;
}
expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
}
// NOTE Needed to parenthesize options.path and options.domain
// in the following expressions, otherwise they evaluate to undefined
// in the packed version for some reason...
var path = options.path ? '; path=' + (options.path) : '';
var domain = options.domain ? '; domain=' + (options.domain) : '';
var secure = options.secure ? '; secure' : '';
document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
} else { // only name given, get cookie
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we want?
if (cookie.substring(0, name.length + 1) == (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
break;
}
}
}
return cookieValue;
}
};
});

View File

@ -0,0 +1 @@
/* Placeholder. Original strings in English already */

View File

@ -97,70 +97,21 @@ if (!empty ($config["https"]) && empty ($_SERVER['HTTPS'])) {
exit; //Always exit after sending location headers
}
echo '<!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>';
echo '<!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>';
ob_start ('process_page_head'); //This starts the page head. In the call back function, things from $page['head'] array will be processed into the head
// Pure mode (without menu, header and footer).
$config["pure"] = (bool) get_parameter ("pure", 0);
// Auto Refresh page
// Auto Refresh page (can now be disabled anywhere in the script)
$config["refr"] = (int) get_parameter ("refr", 0);
if ($config["refr"] > 0) {
// Agent selection filters and refresh
$query = 'http' . (isset ($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == TRUE ? 's': '') . '://' . $_SERVER['SERVER_NAME'];
if ($_SERVER['SERVER_PORT'] != 80 && (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == TRUE && $_SERVER['SERVER_PORT'] != 443)) {
$query .= ":" . $_SERVER['SERVER_PORT'];
}
$query .= $_SERVER['SCRIPT_NAME'];
if (sizeof ($_REQUEST))
//Some (old) browsers don't like the ?&key=var
$query .= '?1=1';
//We don't clean these variables up as they're only being passed along
foreach ($_GET as $key => $value) {
/* Avoid the 1=1 */
if ($key == 1)
continue;
$query .= '&'.$key.'='.$value;
}
foreach ($_POST as $key => $value) {
$query .= '&'.$key.'='.$value;
}
echo '<meta http-equiv="refresh" content="'.$config["refr"].'; URL='.$query.'">';
}
enterprise_include ('index.php');
echo '<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 name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="author" content="Sancho Lerena" />
<meta name="copyright" content="This is GPL software. Created by Sancho Lerena and others" />
<meta name="keywords" content="pandora, monitoring, system, GPL, software" />
<meta name="robots" content="index, follow" />
<link rel="icon" href="images/pandora.ico" type="image/ico" />
<link rel="stylesheet" href="include/styles/'.$config["style"].'.css" type="text/css" />
<!--[if gte IE 6]>
<link rel="stylesheet" href="include/styles/ie.css" type="text/css"/>
<![endif]-->
<script type="text/javascript" src="include/javascript/jquery.js"></script>
<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.pandora.js"></script>';
enterprise_hook ('load_html_header');
echo '</head>';
echo '</head>'; //This tag is included in the buffer passed to process_page_head so technically it can be stripped
// Show custom background
if ($config["pure"] == 0) {
echo '<body style="background-color:#555555;">';
} else {
echo '<body>'; //Don't enforce a white background color. Let user style sheet do that
}
ob_start ('process_page_body');
$REMOTE_ADDR = $_SERVER['REMOTE_ADDR'];
$config["remote_addr"] = $_SERVER['REMOTE_ADDR'];
@ -289,6 +240,7 @@ if ($config["pure"] == 0) {
require ("general/footer.php");
echo '</div>';
}
echo '</body></html>';
echo '</div>'; //container div
while (@ob_end_flush());
echo '</html>';
?>

View File

@ -229,8 +229,9 @@ if ((isset($_POST["export"])) AND (! isset($_POST["update_agent"]))){
$date_to = $_POST["to_date"];
else
$date_to = $ahora;
echo "<script type='text/javaScript' src='include/javascript/calendar.js'></script>";
$config['js'][] = 'calendar';
echo "<h2>".__('Pandora Agents')." &gt; ";
echo __('Export data')."</h2>";

View File

@ -383,12 +383,10 @@ if ($result !== false) {
return;
}
$config['css'][] = 'cluetip';
$config['jquery'][] = 'cluetip';
?>
<link rel="stylesheet" href="include/styles/cluetip.css" type="text/css" />
<script type="text/javascript" src="include/javascript/jquery.js"></script>
<script type="text/javascript" src="include/javascript/jquery.cluetip.js"></script>
<script language="javascript" type="text/javascript">
$(document).ready (function () {
$("area[title!='<?php echo $pandora_name; ?>']").cluetip ({

View File

@ -438,7 +438,6 @@ if ($config["pure"]== 0) {
echo '</div><div style="clear:both;">&nbsp;</div>';
}
?>
<script type="text/javascript" src="include/javascript/jquery.js"></script>
<script language="JavaScript" type="text/javascript">
$(document).ready( function() {
$("INPUT[name='allbox']").click( function() {

View File

@ -40,7 +40,7 @@ foreach ($config['extensions'] as $extension) {
if ($extension['main_function'] == '')
continue;
$data = array ();
$data[0] = '<a href="index.php?sec=extensions&sec2='.$extension['operation_menu']['sec2'].'" class="mn">'.$extension['operation_menu']['name'];
$data[0] = '<a href="index.php?sec=extensions&amp;sec2='.$extension['operation_menu']['sec2'].'" class="mn">'.$extension['operation_menu']['name'];
array_push ($table->data, $data);
}

View File

@ -179,7 +179,6 @@ elseif (isset ($_GET["insert_form"])) {
// ********************************************************************************************************
//This is for the pretty slide down attachment form
echo '<script type="text/javascript" src="include/javascript/jquery.js"></script>';
echo "<script type=\"text/javascript\">
$(document).ready(function() {
$('#file_control').hide();

View File

@ -83,17 +83,12 @@ 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';
?>
<link rel="stylesheet" href="include/styles/datepicker.css" type="text/css" media="screen">
<link rel="stylesheet" href="include/styles/timeentry.css" type="text/css" media="screen">
<script type="text/javascript" src="include/javascript/jquery.js"></script>
<script src="include/javascript/jquery.ui.core.js"></script>
<script src="include/javascript/jquery.ui.datepicker.js"></script>
<script src="include/javascript/jquery.timeentry.js"></script>
<script src="include/languages/date_<?php echo $config['language']; ?>.js"></script>
<script src="include/languages/time_<?php echo $config['language']; ?>.js"></script>
<script language="javascript" type="text/javascript">
$(document).ready (function () {

View File

@ -104,12 +104,12 @@ print_input_hidden ('id', $id_layout);
print_table ($table);
echo "</form>";
if ($config["pure"] && $refr != 0) {
$config['jquery'][] = 'countdown';
$config['css'][] = 'countdown';
}
$config['js'][] = 'pandora_visual_console';
?>
<?php if ($config["pure"] && $refr != 0): ?>
<script type="text/javascript" src="include/javascript/jquery.countdown.js"></script>
<link rel="stylesheet" href="include/styles/countdown.css" type="text/css" />
<?php endif; ?>
<script type="text/javascript" src="include/javascript/pandora_visual_console.js"></script>
<script language="javascript" type="text/javascript">
$(document).ready (function () {
<?php if ($config["pure"] && $refr != 0): ?>