2009-02-05 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/header.php: Added alt tags to images * include/functions_db.php: Fixed get_agent_modules function * include/functions_html.php: Fixed print_image and print_table to conform to standards * index.php: Removed extra closing div that shouldn't be there and conform to standards * godmode/agentes/alert_manager.php: Fixed JavaScript messyness for XHTML git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1430 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
939dc0e2d1
commit
355c7873ee
|
@ -1,3 +1,17 @@
|
|||
2009-02-05 Evi Vanoost <vanooste@rcbi.rochester.edu>
|
||||
|
||||
* general/header.php: Added alt tags to images
|
||||
|
||||
* include/functions_db.php: Fixed get_agent_modules function
|
||||
|
||||
* include/functions_html.php: Fixed print_image and print_table to conform
|
||||
to standards
|
||||
|
||||
* index.php: Removed extra closing div that shouldn't be there and conform
|
||||
to standards
|
||||
|
||||
* godmode/agentes/alert_manager.php: Fixed JavaScript messyness for XHTML
|
||||
|
||||
2009-02-05 Esteban Sanchez <estebans@artica.es>
|
||||
|
||||
* godmode/agentes/alert_manager.php: Hide actions and templates form.
|
||||
|
|
|
@ -33,15 +33,15 @@ echo '<a href="index.php"><img src="images/pandora_logo_head.png" alt="logo" sty
|
|||
echo '</td><td width="20"> </td>';
|
||||
|
||||
// First column (identifier)
|
||||
echo '<td width="20%"><img src="images/user_'.((is_user_admin ($config["id_user"]) == 1) ? 'suit' : 'green' ).'.png" class="bot"> '.'<a class="white">'.__('You are').' [<b>'.$config["id_user"].'</b>]</a>';
|
||||
echo '<td width="20%"><img src="images/user_'.((is_user_admin ($config["id_user"]) == 1) ? 'suit' : 'green' ).'.png" class="bot" alt="user" /> '.'<a class="white">'.__('You are').' [<b>'.$config["id_user"].'</b>]</a>';
|
||||
|
||||
//First column, second row (logout button)
|
||||
echo '<br /><br />';
|
||||
echo '<a class="white_bold" href="index.php?bye=bye"><img src="images/lock.png" class="bot"> '. __('Logout').'</a>';
|
||||
echo '<a class="white_bold" href="index.php?bye=bye"><img src="images/lock.png" alt="logout" class="bot" /> '. __('Logout').'</a>';
|
||||
|
||||
// Second column (link to main page)
|
||||
echo '</td><td width="20%">';
|
||||
echo '<a class="white_bold" href="index.php?sec=main"><img src="images/information.png" class="bot"> '.__('General information').'</a>';
|
||||
echo '<a class="white_bold" href="index.php?sec=main"><img src="images/information.png" alt="info" class="bot" /> '.__('General information').'</a>';
|
||||
|
||||
//Second column, second row (System up/down)
|
||||
echo '<br /><br />';
|
||||
|
@ -51,13 +51,13 @@ $servers["up"] = (int) check_server_status ();
|
|||
$servers["down"] = $servers["all"] - $servers["up"];
|
||||
if ($servers["up"] == 0) {
|
||||
//All Servers down or no servers at all
|
||||
echo '<img src="images/cross.png" class="bot" /> '.__('All systems').': '.__('Down');
|
||||
echo '<img src="images/cross.png" alt="cross" class="bot" /> '.__('All systems').': '.__('Down');
|
||||
} elseif ($servers["down"] != 0) {
|
||||
//Some servers down
|
||||
echo '<img src="images/error.png" class="bot" /> '.$servers["down"].' '.__('servers down');
|
||||
echo '<img src="images/error.png" alt="error" class="bot" /> '.$servers["down"].' '.__('servers down');
|
||||
} else {
|
||||
//All servers up
|
||||
echo '<img src="images/ok.png" class="bot" /> '.__('All systems').': '.__('Ready');
|
||||
echo '<img src="images/ok.png" alt="ok" class="bot" /> '.__('All systems').': '.__('Ready');
|
||||
}
|
||||
unset ($servers); // Since this is the header, we don't like to trickle down variables.
|
||||
echo "</a>";
|
||||
|
@ -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" /> '. __('Autorefresh');
|
||||
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" /> '. __('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" /> '.__('Autorefresh').'</a>';
|
||||
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" /> '.__('Autorefresh').'</a>';
|
||||
$values = array ('5' => '5 '.__('seconds'),
|
||||
'10' => '10 '.__('seconds'),
|
||||
'15' => '15 '.__('seconds'),
|
||||
|
@ -90,7 +90,7 @@ 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" class="bot" /> '.__('Events').'</a>';
|
||||
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" /> '.__('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>';
|
||||
|
@ -98,6 +98,7 @@ echo '</td><td width="20%"><div id="head_r"><span id="logo_text1">Pandora</span>
|
|||
|
||||
<script type="text/javascript" src="include/javascript/jquery.countdown.js"></script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
/* <![CDATA[ */
|
||||
$(document).ready (function () {
|
||||
<?php if ($refr): ?>
|
||||
t = new Date();
|
||||
|
@ -124,4 +125,5 @@ $(document).ready (function () {
|
|||
});
|
||||
<?php endif; ?>
|
||||
});
|
||||
/* ]]> */
|
||||
</script>
|
||||
|
|
|
@ -295,6 +295,7 @@ echo '</div></form>';
|
|||
<script type="text/javascript" src="include/javascript/jquery.cluetip.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* <![CDATA[ */
|
||||
$(document).ready (function () {
|
||||
$("table.modules tr").hover (
|
||||
function () {
|
||||
|
@ -413,4 +414,5 @@ $(document).ready (function () {
|
|||
}
|
||||
);
|
||||
});
|
||||
/* ]]> */
|
||||
</script>
|
||||
|
|
|
@ -352,9 +352,8 @@ $modules = get_agent_modules ($id_agent, '*', 'disabled = 0 AND history_data = 0
|
|||
function get_agent_modules ($id_agent, $details = false, $filter = false) {
|
||||
$id_agent = safe_int ($id_agent, 1);
|
||||
|
||||
$where = '';
|
||||
if (! empty ($id_agent)) {
|
||||
|
||||
if (empty ($id_agent)) {
|
||||
$where = '';
|
||||
} else {
|
||||
$where = sprintf (' WHERE id_agente IN (%s)', implode (",", (array) $id_agent));
|
||||
}
|
||||
|
|
|
@ -436,8 +436,10 @@ function print_table (&$table, $return = false) {
|
|||
$table->border = '0px';
|
||||
}
|
||||
|
||||
if (empty ($table->tablealign)) {
|
||||
$table->tablealign = 'center';
|
||||
if (empty ($table->tablealign) || $table->tablealign != 'left' || $table->tablealign != 'right') {
|
||||
$table->tablealign = '';
|
||||
} else {
|
||||
$table->tablealign = 'float:'.$table->tablealign.';'; //Align is deprecated. Use float instead
|
||||
}
|
||||
|
||||
if (!isset ($table->cellpadding)) {
|
||||
|
@ -454,7 +456,7 @@ function print_table (&$table, $return = false) {
|
|||
|
||||
$tableid = empty ($table->id) ? 'table'.$table_count : $table->id;
|
||||
|
||||
$output .= '<table width="'.$table->width.'" ';
|
||||
$output .= '<table width="'.$table->width.'" style="'.$table->tablealign.'"';
|
||||
$output .= ' cellpadding="'.$table->cellpadding.'" cellspacing="'.$table->cellspacing.'"';
|
||||
$output .= ' border="'.$table->border.'" class="'.$table->class.'" id="'.$tableid.'">';
|
||||
$countcols = 0;
|
||||
|
@ -687,16 +689,19 @@ function print_help_tip ($text, $return = false) {
|
|||
*/
|
||||
function print_image ($src, $return = false, $options = false) {
|
||||
$output = '<img src="'.$src.'" ';
|
||||
$style = '';
|
||||
|
||||
if ($options) {
|
||||
if (isset ($options['alt']))
|
||||
$output .= 'alt="'.$options['alt'].'" ';
|
||||
if (!isset ($options['alt']))
|
||||
$options['alt'] = ''; //Alt is one of those tags that has to be set for w3 compliance
|
||||
|
||||
$output .= 'alt="'.$options['alt'].'" ';
|
||||
|
||||
if (isset ($options['border']))
|
||||
$output .= 'border="'.$options['border'].'" ';
|
||||
$style .= 'border:'.$options['border'].';'; //Border is deprecated. Use styles
|
||||
|
||||
if (isset ($options['style']))
|
||||
$output .= 'style="'.$options['style'].'" ';
|
||||
$style .= $options['style'];
|
||||
|
||||
if (isset ($options['title']))
|
||||
$output .= 'title="'.$options['title'].'" ';
|
||||
|
@ -718,7 +723,7 @@ function print_image ($src, $return = false, $options = false) {
|
|||
}
|
||||
}
|
||||
|
||||
$output .= '/>';
|
||||
$output .= 'style="'.$style.'" />';
|
||||
|
||||
if ($return)
|
||||
return $output;
|
||||
|
|
|
@ -97,7 +97,7 @@ if (!empty ($config["https"]) && empty ($_SERVER['HTTPS'])) {
|
|||
exit; //Always exit after sending location headers
|
||||
}
|
||||
|
||||
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><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>';
|
||||
|
||||
// Pure mode (without menu, header and footer).
|
||||
$config["pure"] = (bool) get_parameter ("pure", 0);
|
||||
|
@ -157,9 +157,9 @@ echo '</head>';
|
|||
|
||||
// Show custom background
|
||||
if ($config["pure"] == 0) {
|
||||
echo '<body bgcolor="#555555">';
|
||||
echo '<body style="background-color:#555555;">';
|
||||
} else {
|
||||
echo '<body bgcolor="#ffffff">';
|
||||
echo '<body>'; //Don't enforce a white background color. Let user style sheet do that
|
||||
}
|
||||
|
||||
$REMOTE_ADDR = $_SERVER['REMOTE_ADDR'];
|
||||
|
@ -288,8 +288,7 @@ if ($config["pure"] == 0) {
|
|||
echo '<div id="foot">';
|
||||
require ("general/footer.php");
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
echo '</body></html>';
|
||||
?>
|
||||
?>
|
Loading…
Reference in New Issue