Projet

Général

Profil

« Précédent | Suivant » 

Révision 286996b4

Ajouté par Colin Fleming il y a presque 10 ans

Tidy up "status_graph" XHTML

Move "fbegin.inc" between BODY and SCRIPT
Add CDATA sections to SCRTIPS
Update HTML Boolean operators
Remove EMBED, propriietary tag, replace with OBJECT
Add SUMMARY to TABLES
Add missing closing P tag
Close INPUT tags

Voir les différences:

usr/local/www/status_graph.php
115 115
?>
116 116

  
117 117
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
118
<?php include("fbegin.inc"); ?>
118 119

  
119 120
<script type="text/javascript">
120

  
121
//<![CDATA[
121 122
function updateBandwidth(){
122 123
    var hostinterface = jQuery("#if").val();
123 124
	var sorting = jQuery("#sort").val();
......
190 191
    
191 192
    setTimeout('updateBandwidth()', 1000);
192 193
}
193

  
194

  
194
//]]>
195 195
</script>
196 196

  
197
<?php include("fbegin.inc"); ?>
198 197
<?php
199 198

  
200 199
/* link the ipsec interface magically */
......
208 207
<?php
209 208
foreach ($ifdescrs as $ifn => $ifd) {
210 209
	echo "<option value=\"$ifn\"";
211
	if ($ifn == $curif) echo " selected";
210
	if ($ifn == $curif) echo " selected=\"selected\"";
212 211
	echo ">" . htmlspecialchars($ifd) . "</option>\n";
213 212
}
214 213
?>
......
216 215
, Sort by: 
217 216
<select id="sort" name="sort" class="formselect" style="z-index: -10;" onchange="document.form1.submit()">
218 217
	<option value="">Bw In</option>
219
	<option value="out"<?php if ($cursort == "out") echo " selected";?>>Bw Out</option>
218
	<option value="out"<?php if ($cursort == "out") echo " selected=\"selected\"";?>>Bw Out</option>
220 219
</select>
221 220
, Filter: 
222 221
<select id="filter" name="filter" class="formselect" style="z-index: -10;" onchange="document.form1.submit()">
223
	<option value="local"<?php if ($curfilter == "local") echo " selected";?>>Local</option>
224
	<option value="remote"<?php if ($curfilter == "remote") echo " selected";?>>Remote</option>
225
	<option value="all"<?php if ($curfilter == "all") echo " selected";?>>All</option>
222
	<option value="local"<?php if ($curfilter == "local") echo " selected=\"selected\"";?>>Local</option>
223
	<option value="remote"<?php if ($curfilter == "remote") echo " selected=\"selected\"";?>>Remote</option>
224
	<option value="all"<?php if ($curfilter == "all") echo " selected=\"selected\"";?>>All</option>
226 225
</select>
227 226
, Display: 
228 227
<select id="hostipformat" name="hostipformat" class="formselect" style="z-index: -10;" onchange="document.form1.submit()">
229 228
	<option value="">IP Address</option>
230 229
	<option value="hostname"<?php if ($curhostipformat == "hostname") echo " selected";?>>Host Name</option>
231
	<option value="fqdn"<?php if ($curhostipformat == "fqdn") echo " selected";?>>FQDN</option>
230
	<option value="fqdn"<?php if ($curhostipformat == "fqdn") echo " selected=\"selected\"";?>>FQDN</option>
232 231
</select>
233 232
</form>
234
<p>
233
<p>&nbsp;</p>
235 234
<div id="niftyOutter">
236 235
    <div id="col1" style="float: left; width: 46%; padding: 5px; position: relative;">
237
        <embed src="graph.php?ifnum=<?=htmlspecialchars($curif);?>&ifname=<?=rawurlencode($ifdescrs[htmlspecialchars($curif)]);?>" type="image/svg+xml" width="<?=$width;?>" height="<?=$height;?>" pluginspage="http://www.adobe.com/svg/viewer/install/auto" />
236
        <object	data="graph.php?ifnum=<?=htmlspecialchars($curif);?>&amp;ifname=<?=rawurlencode($ifdescrs[htmlspecialchars($curif)]);?>">
237
          <param name="id" value="graph" />
238
          <param name="type" value="image/svg+xml" />
239
          <param name="width" value="<? echo $width; ?>" />
240
          <param name="height" value="<? echo $height; ?>" />
241
          <param name="pluginspage" value="http://www.adobe.com/svg/viewer/install/auto" />
242
        </object>
238 243
    </div>
239 244
    <div id="col2" style="float: right; width: 48%; padding: 5px; position: relative;">
240
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
245
        <table width="100%" border="0" cellspacing="0" cellpadding="0" summary="status">
241 246
            <tr>
242 247
                <td class="listtopic" valign="top"><?=(($curhostipformat=="") ? gettext("Host IP") : gettext("Host Name or IP")); ?></td>
243 248
                <td class="listtopic" valign="top"><?=gettext("Bandwidth In"); ?></td>
......
327 332
	</div>
328 333
	<div style="clear: both;"></div>
329 334
</div>
330
<p><span class="red"><strong><?=gettext("Note"); ?>:</strong></span> <?=gettext("the"); ?> <a href="http://www.adobe.com/svg/viewer/install/" target="_blank"><?=gettext("Adobe SVG Viewer"); ?></a>, <?=gettext("Firefox 1.5 or later or other browser supporting SVG is required to view the graph"); ?>.
335
<p><span class="red"><strong><?=gettext("Note"); ?>:</strong></span> <?=gettext("the"); ?> <a href="http://www.adobe.com/svg/viewer/install/" target="_blank"><?=gettext("Adobe SVG Viewer"); ?></a>, <?=gettext("Firefox 1.5 or later or other browser supporting SVG is required to view the graph"); ?>.</p>
331 336

  
332 337
<?php include("fend.inc"); ?>
333 338

  
334 339
<script type="text/javascript">
340
//<![CDATA[
335 341
jQuery(document).ready(updateBandwidth);
342
//]]>
336 343
</script>
337 344
</body>
338 345
</html>

Formats disponibles : Unified diff