summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorColin Fleming <cj_fleming@sky.com>2013-09-26 12:35:19 +0100
committerColin Fleming <cj_fleming@sky.com>2013-09-26 12:35:19 +0100
commitc2cc17212e02625097d32322c01e06c4d64539cb (patch)
tree37a6a1a122f9de3496b465f9630c7c282c1c616f /usr/local
parent9c43a910afe77d425d73073d5ed14878b32d9dd1 (diff)
downloadpfsense-c2cc17212e02625097d32322c01e06c4d64539cb.zip
pfsense-c2cc17212e02625097d32322c01e06c4d64539cb.tar.gz
Update "status_rrd_graph.php" XHTML
Update SCRIPT statements with CDATA Move the close HEAD statement Move the FORM statement outside the main table Close INPUT tag Update HTML Boolean operators Add closing table cell (TD) and table row (TR) tags so that the rows are closed properly before the IMG (RRD graph) tags Tidy up the IMG (RRD graph) tag Close HR tag
Diffstat (limited to 'usr/local')
-rwxr-xr-xusr/local/www/status_rrd_graph.php63
1 files changed, 33 insertions, 30 deletions
diff --git a/usr/local/www/status_rrd_graph.php b/usr/local/www/status_rrd_graph.php
index 16150cc..e920535 100755
--- a/usr/local/www/status_rrd_graph.php
+++ b/usr/local/www/status_rrd_graph.php
@@ -281,6 +281,7 @@ include("head.inc");
<?php } ?>
<script type="text/javascript" src="/javascript/jquery-ui-timepicker-addon/js/jquery-ui-timepicker-addon.js"></script>
<script type="text/javascript">
+ //<![CDATA[
jQuery(function ($) {
var options = {
dateFormat: 'mm/dd/yy',
@@ -290,8 +291,8 @@ include("head.inc");
$("#startDateTime").datetimepicker(options);
$("#endDateTime").datetimepicker(options);
});
+ //]]>
</script>
- </head>
<?php } ?>
<?php
@@ -388,14 +389,15 @@ function get_dates($curperiod, $graph) {
}
?>
+</head>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php include("fbegin.inc"); ?>
<?php if ($input_errors && count($input_errors)) { print_input_errors($input_errors); } ?>
-<table width="100%" border="0" cellpadding="0" cellspacing="0">
+<form name="form1" action="status_rrd_graph.php" method="get">
+<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="rrd graphs">
<tr>
<td>
- <form name="form1" action="status_rrd_graph.php" method="get">
- <input type="hidden" name="cat" value="<?php echo "$curcat"; ?>">
+ <input type="hidden" name="cat" value="<?php echo "$curcat"; ?>" />
<?php
$tab_array = array();
if($curcat == "system") { $tabactive = True; } else { $tabactive = False; }
@@ -446,7 +448,7 @@ function get_dates($curperiod, $graph) {
<tr>
<td>
<div id="mainarea">
- <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
+ <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0" summary="main area">
<tr>
<td colspan="2" class="list"><p><b><?=gettext("Note: Change of color and/or style may not take effect until the next refresh");?></b></p></td>
</tr>
@@ -454,7 +456,7 @@ function get_dates($curperiod, $graph) {
<td colspan="2" class="list">
<?=gettext("Graphs:");?>
<?php if (!empty($curzone)): ?>
- <input type="hidden" name="zone" value="<?= htmlspecialchars($curzone) ?>">
+ <input type="hidden" name="zone" value="<?= htmlspecialchars($curzone) ?>" />
<?php endif; ?>
<select name="option" class="formselect" style="z-index: -10;" onchange="document.form1.submit()">
<?php
@@ -467,7 +469,7 @@ function get_dates($curperiod, $graph) {
echo "<option value=\"{$database}\"";
$prettyprint = ucwords(str_replace($search, $replace, $database));
if($curoption == $database) {
- echo " selected";
+ echo " selected=\"selected\"";
}
echo ">" . htmlspecialchars($prettyprint) . "</option>\n";
}
@@ -507,7 +509,7 @@ function get_dates($curperiod, $graph) {
$prettyprint = ucwords(str_replace($search, $replace, $friendly));
}
if($curoption == $optionc) {
- echo " selected";
+ echo " selected=\"selected\"";
}
echo ">" . htmlspecialchars($prettyprint) . "</option>\n";
}
@@ -520,7 +522,7 @@ function get_dates($curperiod, $graph) {
<?php
foreach ($styles as $style => $styled) {
echo "<option value=\"$style\"";
- if ($style == $curstyle) echo " selected";
+ if ($style == $curstyle) echo " selected=\"selected\"";
echo ">" . htmlspecialchars($styled) . "</option>\n";
}
?>
@@ -534,12 +536,13 @@ function get_dates($curperiod, $graph) {
<?php
foreach ($periods as $period => $value) {
echo "<option value=\"$period\"";
- if ($period == $curperiod) echo " selected";
+ if ($period == $curperiod) echo " selected=\"selected\"";
echo ">" . htmlspecialchars($value) . "</option>\n";
}
+ echo "</select>\n";
+ echo "</td></tr>\n";
}
?>
- </select>
<?php
if($curcat == "custom") {
@@ -549,10 +552,11 @@ function get_dates($curperiod, $graph) {
$end_fmt = strftime("%m/%d/%Y %H:%M:%S", $end);
?>
<?=gettext("Start:");?>
- <input id="startDateTime" title="<?= htmlentities($tz_msg); ?>." type="text" name="start" class="formfldunknown" size="24" length="32" value="<?= htmlentities($start_fmt); ?>">
+ <input id="startDateTime" title="<?= htmlentities($tz_msg); ?>." type="text" name="start" class="formfldunknown" size="24" value="<?= htmlentities($start_fmt); ?>" />
<?=gettext("End:");?>
- <input id="endDateTime" title="<?= htmlentities($tz_msg); ?>." type="text" name="end" class="formfldunknown" size="24" length="32" value="<?= htmlentities($end_fmt); ?>">
- <input type="submit" name="Submit" value="<?=gettext("Go"); ?>">
+ <input id="endDateTime" title="<?= htmlentities($tz_msg); ?>." type="text" name="end" class="formfldunknown" size="24" value="<?= htmlentities($end_fmt); ?>" />
+ <input type="submit" name="Submit" value="<?=gettext("Go"); ?>" />
+ </td></tr>
<?php
$curdatabase = $curoption;
$graph = "custom-$curdatabase";
@@ -560,11 +564,11 @@ function get_dates($curperiod, $graph) {
$id = "{$graph}-{$curoption}-{$curdatabase}";
$id = preg_replace('/\./', '_', $id);
- echo "<tr><td colspan=2 class=\"list\">\n";
- echo "<IMG BORDER='0' name='{$id}' ";
- echo "id='{$id}' ALT=\"$prettydb Graph\" ";
- echo "SRC=\"status_rrd_graph_img.php?start={$start}&amp;end={$end}&amp;database={$curdatabase}&amp;style={$curstyle}&amp;graph={$graph}\" />\n";
- echo "<br /><hr><br />\n";
+ echo "<tr><td colspan=\"2\" class=\"list\">\n";
+ echo "<img border=\"0\" name=\"{$id}\" ";
+ echo "id=\"{$id}\" alt=\"$prettydb Graph\" ";
+ echo "src=\"status_rrd_graph_img.php?start={$start}&amp;end={$end}&amp;database={$curdatabase}&amp;style={$curstyle}&amp;graph={$graph}\" />\n";
+ echo "<br /><hr /><br />\n";
echo "</td></tr>\n";
}
} else {
@@ -629,22 +633,21 @@ function get_dates($curperiod, $graph) {
$dates = get_dates($curperiod, $graph);
$start = $dates['start'];
$end = $dates['end'];
- echo "<tr><td colspan=2 class=\"list\">\n";
- echo "<IMG BORDER='0' name='{$id}' ";
- echo "id='{$id}' ALT=\"$prettydb Graph\" ";
- echo "SRC=\"status_rrd_graph_img.php?start={$start}&amp;end={$end}&amp;database={$curdatabase}&amp;style={$curstyle}&amp;graph={$graph}\" />\n";
- echo "<br /><hr><br />\n";
+ echo "<tr><td colspan=\"2\" class=\"list\">\n";
+ echo "<img border=\"0\" name=\"{$id}\" ";
+ echo "id=\"{$id}\" alt=\"$prettydb Graph\" ";
+ echo "src=\"status_rrd_graph_img.php?start={$start}&amp;end={$end}&amp;database={$curdatabase}&amp;style={$curstyle}&amp;graph={$graph}\" />\n";
+ echo "<br /><hr /><br />\n";
echo "</td></tr>\n";
}
}
}
}
?>
- </td>
- </tr>
<tr>
- <td colspan=2 class="list">
- <script language="javascript">
+ <td colspan="2" class="list">
+ <script type="text/javascript">
+ //<![CDATA[
function update_graph_images() {
//alert('updating');
var randomid = Math.floor(Math.random()*11);
@@ -716,8 +719,8 @@ function get_dates($curperiod, $graph) {
window.setTimeout('update_graph_images()', 355000);
}
window.setTimeout('update_graph_images()', 355000);
+ //]]>
</script>
- </form>
</td>
</tr>
</table>
@@ -725,7 +728,7 @@ function get_dates($curperiod, $graph) {
</td>
</tr>
</table>
-
+</form>
<?php include("fend.inc"); ?>
</body>
</html>
OpenPOWER on IntegriCloud