diff options
Diffstat (limited to 'usr/local/www')
44 files changed, 682 insertions, 556 deletions
diff --git a/usr/local/www/carp_status.php b/usr/local/www/carp_status.php index 769f76e..a5223ae 100644 --- a/usr/local/www/carp_status.php +++ b/usr/local/www/carp_status.php @@ -106,7 +106,7 @@ include("head.inc"); <div id="mainlevel"> - <table width="100%" border="0" cellpadding="0" cellspacing="0"> + <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="carp status"> <tr> <td> <?php @@ -122,29 +122,29 @@ include("head.inc"); if($carpcount > 0) { if($status == false) { $carp_enabled = false; - echo "<input type=\"submit\" name=\"disablecarp\" id=\"disablecarp\" value=\"" . gettext("Enable CARP") . "\">"; + echo "<input type=\"submit\" name=\"disablecarp\" id=\"disablecarp\" value=\"" . gettext("Enable CARP") . "\" />"; } else { $carp_enabled = true; - echo "<input type=\"submit\" name=\"disablecarp\" id=\"disablecarp\" value=\"" . gettext("Temporarily Disable CARP") . "\">"; + echo "<input type=\"submit\" name=\"disablecarp\" id=\"disablecarp\" value=\"" . gettext("Temporarily Disable CARP") . "\" />"; } if(isset($config["virtualip_carp_maintenancemode"])) { - echo "<input type=\"submit\" name=\"carp_maintenancemode\" id=\"carp_maintenancemode\" value=\"" . gettext("Leave Persistent CARP Maintenance Mode") . "\">"; + echo "<input type=\"submit\" name=\"carp_maintenancemode\" id=\"carp_maintenancemode\" value=\"" . gettext("Leave Persistent CARP Maintenance Mode") . "\" />"; } else { - echo "<input type=\"submit\" name=\"carp_maintenancemode\" id=\"carp_maintenancemode\" value=\"" . gettext("Enter Persistent CARP Maintenance Mode") . "\">"; + echo "<input type=\"submit\" name=\"carp_maintenancemode\" id=\"carp_maintenancemode\" value=\"" . gettext("Enter Persistent CARP Maintenance Mode") . "\" />"; } } ?> - <p> - <table class="tabcont sortable" width="100%" border="0" cellpadding="6" cellspacing="0"> + <br/><br/> + <table class="tabcont sortable" width="100%" border="0" cellpadding="6" cellspacing="0" summary="results"> <tr> - <td class="listhdrr"><b><center><?=gettext("CARP Interface"); ?></center></b></td> - <td class="listhdrr"><b><center><?=gettext("Virtual IP"); ?></center></b></td> - <td class="listhdrr"><b><center><?=gettext("Status"); ?></center></b></td> + <td class="listhdrr" align="center"><?=gettext("CARP Interface"); ?></td> + <td class="listhdrr" align="center"><?=gettext("Virtual IP"); ?></td> + <td class="listhdrr" align="center"><?=gettext("Status"); ?></td> </tr> <?php if ($carpcount == 0) { - echo "</td></tr></table></table></div><center><br />" . gettext("Could not locate any defined CARP interfaces."); + echo "</table></td></tr></table></div></form><center><br />" . gettext("Could not locate any defined CARP interfaces."); echo "</center>"; include("fend.inc"); @@ -163,22 +163,22 @@ include("head.inc"); $advbase = $carp['advbase']; $status = get_carp_interface_status("{$carp['interface']}_vip{$carp['vhid']}"); echo "<tr>"; - $align = "valign='middle'"; + $align = "style=\"vertical-align:middle\""; if($carp_enabled == false) { - $icon = "<img {$align} src='/themes/".$g['theme']."/images/icons/icon_block.gif'>"; + $icon = "<img {$align} src=\"/themes/".$g['theme']."/images/icons/icon_block.gif\" alt=\"disbled\" />"; $status = "DISABLED"; } else { if($status == "MASTER") { - $icon = "<img {$align} src='/themes/".$g['theme']."/images/icons/icon_pass.gif'>"; + $icon = "<img {$align} src=\"/themes/".$g['theme']."/images/icons/icon_pass.gif\" alt=\"master\" />"; } else if($status == "BACKUP") { - $icon = "<img {$align} src='/themes/".$g['theme']."/images/icons/icon_pass_d.gif'>"; + $icon = "<img {$align} src=\"/themes/".$g['theme']."/images/icons/icon_pass_d.gif\" alt=\"backup\" />"; } else if($status == "INIT") { - $icon = "<img {$align} src='/themes/".$g['theme']."/images/icons/icon_log.gif'>"; + $icon = "<img {$align} src=\"/themes/".$g['theme']."/images/icons/icon_log.gif\" alt=\"init\" />"; } } - echo "<td class=\"listlr\"><center>" . convert_friendly_interface_to_friendly_descr($carp['interface']) . "@{$vhid} </td>"; - echo "<td class=\"listlr\"><center>" . $ipaddress . " </td>"; - echo "<td class=\"listlr\"><center>{$icon} " . $status . " </td>"; + echo "<td class=\"listlr\" align=\"center\">" . convert_friendly_interface_to_friendly_descr($carp['interface']) . "@{$vhid} </td>"; + echo "<td class=\"listlr\" align=\"center\">" . $ipaddress . " </td>"; + echo "<td class=\"listlr\" align=\"center\">{$icon} " . $status . " </td>"; echo "</tr>"; } } @@ -188,16 +188,13 @@ include("head.inc"); </tr> </table> </div> +</form> -<p/> - -<span class="vexpl"> +<p class="vexpl"> <span class="red"><strong><?=gettext("Note"); ?>:</strong></span> <br /> <?=gettext("You can configure high availability sync settings"); ?> <a href="system_hasync.php"><?=gettext("here"); ?></a>. -</span> - -<p/> +</p> <?php echo "<br />" . gettext("pfSync nodes") . ":<br />"; diff --git a/usr/local/www/diag_arp.php b/usr/local/www/diag_arp.php index 41ca486..a319542 100644 --- a/usr/local/www/diag_arp.php +++ b/usr/local/www/diag_arp.php @@ -268,8 +268,8 @@ include("head.inc"); <?php include("fbegin.inc"); ?> <div id="loading"> - <img src="/themes/<?=$g['theme'];?>/images/misc/loader.gif"><?= gettext("Loading, please wait..."); ?> - <p/> + <img src="/themes/<?=$g['theme'];?>/images/misc/loader.gif" alt="loader" /><?= gettext("Loading, please wait..."); ?> + <p> </p> </div> <?php @@ -305,10 +305,10 @@ $data = msort($data, "dnsresolve"); // Load MAC-Manufacturer table $mac_man = load_mac_manufacturer_table(); ?> -<table width="100%" border="0" cellpadding="0" cellspacing="0"> +<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="diag arp"> <tr> <td> - <table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0"> + <table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0" summary="tabcont"> <tr> <td class="listhdrr"><?= gettext("IP address"); ?></td> <td class="listhdrr"><?= gettext("MAC address"); ?></td> @@ -346,5 +346,9 @@ $mac_man = load_mac_manufacturer_table(); <?php include("fend.inc"); ?> <script type="text/javascript"> +//<![CDATA[ jQuery('#loading').html(''); +//]]> </script> +</body> +</html> diff --git a/usr/local/www/diag_authentication.php b/usr/local/www/diag_authentication.php index 697f5b0..5fd0abd 100644 --- a/usr/local/www/diag_authentication.php +++ b/usr/local/www/diag_authentication.php @@ -78,7 +78,7 @@ include("head.inc"); <?php if ($input_errors) print_input_errors($input_errors);?> <?php if ($savemsg) print_info_box($savemsg);?> -<table width="100%" border="0" cellpadding="0" cellspacing="0"> +<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="diag authentication"> <tr> <td class="tabnavtbl"></td> </tr> @@ -86,17 +86,17 @@ include("head.inc"); <td> <div id="mainarea"> <form id="iform" name="iform" action="diag_authentication.php" method="post"> - <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="6"> + <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="6" summary="test"> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("Authentication Server"); ?></td> <td width="78%" class="vtable"> - <select name='authmode' id='authmode' class="formselect" > + <select name="authmode" id="authmode" class="formselect" > <?php $auth_servers = auth_get_authserver_list(); foreach ($auth_servers as $auth_server): $selected = ""; if ($auth_server['name'] == $pconfig['authmode']) - $selected = "selected"; + $selected = "selected=\"selected\""; ?> <option value="<?=$auth_server['name'];?>" <?=$selected;?>><?=$auth_server['name'];?></option> <?php endforeach; ?> @@ -106,13 +106,13 @@ include("head.inc"); <tr> <td width="22%" valign="top" class="vncell"><?=gettext("Username"); ?></td> <td width="78%" class="vtable"> - <input class="formfld unknown" size='20' id='username' name='username' value="<?=htmlspecialchars($pconfig['username']);?>" /> + <input class="formfld unknown" size="20" id="username" name="username" value="<?=htmlspecialchars($pconfig['username']);?>" /> </td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("Password"); ?></td> <td width="78%" class="vtable"> - <input class="formfld pwd" type='password' size='20' id='password' name='password' value="<?=htmlspecialchars($pconfig['password']);?>" /> + <input class="formfld pwd" type="password" size="20" id="password" name="password" value="<?=htmlspecialchars($pconfig['password']);?>" /> </td> </tr> <tr> @@ -122,7 +122,11 @@ include("head.inc"); </td> </tr> </table> + </form> + </div> </td></tr> </table> <?php include("fend.inc"); ?> +</body> +</html> diff --git a/usr/local/www/diag_backup.php b/usr/local/www/diag_backup.php index 114089d..1b67fee 100644 --- a/usr/local/www/diag_backup.php +++ b/usr/local/www/diag_backup.php @@ -203,26 +203,28 @@ function spit_out_select_items($name, $showall) { ); $select = "<select name=\"{$name}\" id=\"{$name}\">"; - $select .= "<option VALUE=\"\">" . gettext("ALL") . "</option>"; + $select .= "<option value=\"\">" . gettext("ALL") . "</option>"; if($showall == true) foreach($areas as $area => $areaname) - $select .= "<option value='{$area}'>{$areaname}</option>\n"; + $select .= "<option value=\"{$area}\">{$areaname}</option>\n"; else foreach($areas as $area => $areaname) if($area === "rrddata" || check_and_returnif_section_exists($area) == true) - $select .= "<option value='{$area}'>{$areaname}</option>\n"; + $select .= "<option value=\"{$area}\">{$areaname}</option>\n"; $select .= "</select>\n"; if ($name === "backuparea") { $select .= <<<END_SCRIPT_BLOCK - <script type='text/javascript'> + <script type="text/javascript"> + //<![CDATA[ jQuery(function (\$) { $("#{$name}").change(function () { backuparea_change(this); }).trigger("change"); }); + //]]> </script> END_SCRIPT_BLOCK; } @@ -587,7 +589,7 @@ include("head.inc"); <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <?php include("fbegin.inc"); ?> <script type="text/javascript"> -<!-- +//<![CDATA[ function encrypt_change() { @@ -614,19 +616,19 @@ function backuparea_change(obj) { document.getElementById("dotnotbackuprrd").disabled = false; } } -//--> +//]]> </script> <?php if ($input_errors) print_input_errors($input_errors); ?> <?php if ($savemsg) print_info_box($savemsg); ?> -<?php if (is_subsystem_dirty('restore')): ?><p> +<?php if (is_subsystem_dirty('restore')): ?><br/> <form action="reboot.php" method="post"> -<input name="Submit" type="hidden" value=" Yes "> +<input name="Submit" type="hidden" value="Yes" /> <?php print_info_box(gettext("The firewall configuration has been changed.") . "<br />" . gettext("The firewall is now rebooting."));?><br /> </form> <?php endif; ?> <form action="diag_backup.php" method="post" name="iform" enctype="multipart/form-data"> -<table width="100%" border="0" cellspacing="0" cellpadding="0"> +<table width="100%" border="0" cellspacing="0" cellpadding="0" summary="diag backup"> <tr> <td> <?php @@ -640,7 +642,7 @@ function backuparea_change(obj) { <tr> <td> <div id="mainarea"> - <table class="tabcont" align="center" width="100%" border="0" cellpadding="6" cellspacing="0"> + <table class="tabcont" align="center" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area"> <tr> <td colspan="2" class="listtopic"><?=gettext("Backup configuration"); ?></td> </tr> @@ -651,7 +653,7 @@ function backuparea_change(obj) { <table> <tr> <td> - <input name="nopackages" type="checkbox" class="formcheckbox" id="nopackages"> + <input name="nopackages" type="checkbox" class="formcheckbox" id="nopackages" /> </td> <td> <span class="vexpl"><?=gettext("Do not backup package information."); ?></span> @@ -661,7 +663,7 @@ function backuparea_change(obj) { <table> <tr> <td> - <input name="encrypt" type="checkbox" class="formcheckbox" id="nopackages" onClick="encrypt_change()"> + <input name="encrypt" type="checkbox" class="formcheckbox" id="nopackages" onclick="encrypt_change()" /> </td> <td> <span class="vexpl"><?=gettext("Encrypt this configuration file."); ?></span> @@ -669,7 +671,7 @@ function backuparea_change(obj) { </tr> <tr> <td> - <input name="donotbackuprrd" type="checkbox" class="formcheckbox" id="dotnotbackuprrd" checked> + <input name="donotbackuprrd" type="checkbox" class="formcheckbox" id="dotnotbackuprrd" checked="checked" /> </td> <td> <span class="vexpl"><?=gettext("Do not backup RRD data (NOTE: RRD Data can consume 4+ megabytes of config.xml space!)"); ?></span> @@ -694,7 +696,7 @@ function backuparea_change(obj) { </td> </tr> </table> - <p><input name="Submit" type="submit" class="formbtn" id="download" value="<?=gettext("Download configuration"); ?>"></p> + <p><input name="Submit" type="submit" class="formbtn" id="download" value="<?=gettext("Download configuration"); ?>" /></p> </td> </tr> <tr> @@ -709,11 +711,11 @@ function backuparea_change(obj) { <?=gettext("Open a"); ?> <?=$g['[product_name']?> <?=gettext("configuration XML file and click the button below to restore the configuration."); ?> <br /><br /> <?=gettext("Restore area:"); ?> <?php spit_out_select_items("restorearea", true); ?> - <p><input name="conffile" type="file" class="formbtn" id="conffile" size="40"></p> + <p><input name="conffile" type="file" class="formbtn" id="conffile" size="40" /></p> <table> <tr> <td> - <input name="decrypt" type="checkbox" class="formcheckbox" id="nopackages" onClick="decrypt_change()"> + <input name="decrypt" type="checkbox" class="formcheckbox" id="nopackages" onclick="decrypt_change()" /> </td> <td> <span class="vexpl"><?=gettext("Configuration file is encrypted."); ?></span> @@ -738,7 +740,7 @@ function backuparea_change(obj) { </td> </tr> </table> - <p><input name="Submit" type="submit" class="formbtn" id="restore" value="<?=gettext("Restore configuration"); ?>"></p> + <p><input name="Submit" type="submit" class="formbtn" id="restore" value="<?=gettext("Restore configuration"); ?>" /></p> <p><strong><span class="red"><?=gettext("Note:"); ?></span></strong><br /><?=gettext("The firewall will reboot after restoring the configuration."); ?><br /></p> </td> </tr> @@ -754,14 +756,15 @@ function backuparea_change(obj) { <td width="78%" class="vtable"> <?php if ($config['installedpackages']['package'] != "") { ?> <p><?=gettext("Click this button to reinstall all system packages. This may take a while."); ?> <br /><br /> - <input name="Submit" type="submit" class="formbtn" id="reinstallpackages" value="<?=gettext("Reinstall packages"); ?>"> + <input name="Submit" type="submit" class="formbtn" id="reinstallpackages" value="<?=gettext("Reinstall packages"); ?>" /> <br /> <br /> <?php } ?> <?php if (is_subsystem_dirty("packagelock")) { ?> <p><?=gettext("Click this button to clear the package lock if a package fails to reinstall properly after an upgrade."); ?> <br /><br /> - <input name="Submit" type="submit" class="formbtn" id="clearpackagelock" value="<?=gettext("Clear Package Lock"); ?>"> + <input name="Submit" type="submit" class="formbtn" id="clearpackagelock" value="<?=gettext("Clear Package Lock"); ?>" /> <?php } ?> + </p> </td> </tr> <?php } ?> @@ -773,10 +776,10 @@ function backuparea_change(obj) { </form> <script type="text/javascript"> -<!-- +//<![CDATA[ encrypt_change(); decrypt_change(); -//--> +//]]> </script> <?php include("fend.inc"); ?> diff --git a/usr/local/www/diag_confbak.php b/usr/local/www/diag_confbak.php index 3cfae37..dbe2bf7 100644 --- a/usr/local/www/diag_confbak.php +++ b/usr/local/www/diag_confbak.php @@ -118,7 +118,7 @@ include("head.inc"); print_info_box($savemsg); ?> <?php if ($diff) { ?> - <table align="center" valign="middle" width="100%" border="0" cellspacing="0" style="padding-top: 4px; padding-bottom: 4px;"> + <table align="center" width="100%" border="0" cellspacing="0" style="padding-top: 4px; padding-bottom: 4px; vertical-align:middle;" summary="diag confbak"> <tr><td><?=gettext("Configuration diff from");?> <?php echo date(gettext("n/j/y H:i:s"), $oldtime); ?> <?=gettext("to");?> <?php echo date(gettext("n/j/y H:i:s"), $newtime); ?></td></tr> <?php foreach ($diff as $line) { switch (substr($line, 0, 1)) { @@ -132,7 +132,7 @@ include("head.inc"); $color = "#a0a0a0"; break; default: - $color = ""; + $color = "#ffffff"; } ?> <tr> @@ -142,7 +142,7 @@ include("head.inc"); </table> <br /> <?php } ?> - <table width="100%" border="0" cellpadding="0" cellspacing="0"> + <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="stats"> <tr> <td> <?php @@ -157,17 +157,17 @@ include("head.inc"); <td> <div id="mainarea"> <form action="diag_confbak.php" method="post"> - <table class="tabcont" align="center" width="100%" border="0" cellpadding="6" cellspacing="0"> + <table class="tabcont" align="center" width="100%" border="0" cellpadding="6" cellspacing="0" summary="tabcont"> <tr> <td width="10%"> </td> <td width="15%" valign="top"><?=gettext("Backup Count");?></td> - <td width="10%" align="top"> + <td width="10%"> <input name="backupcount" type="text" class="formfld unknown" size="5" value="<?=htmlspecialchars($config['system']['backupcount']);?>"/> </td> <td width="60%"> <?= gettext("Enter the number of older configurations to keep in the local backup cache. By default this is 30 for a full install or 5 on NanoBSD."); ?> </td> - <td width= "5%"><input name="save" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"></td> + <td width= "5%"><input name="save" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" /></td> </tr> <tr> <td class="vncell"> </td> @@ -178,7 +178,7 @@ include("head.inc"); </table> </form> <form action="diag_confbak.php" method="get"> - <table class="tabcont" align="center" width="100%" border="0" cellpadding="6" cellspacing="0"> + <table class="tabcont" align="center" width="100%" border="0" cellpadding="6" cellspacing="0" summary="difference"> <?php if (is_array($confvers)): ?> <tr> <td colspan="7" class="list"> @@ -187,7 +187,7 @@ include("head.inc"); </td> </tr> <tr> - <td width="5%" colspan="2" valign="middle" align="center" class="list" nowrap><input type="submit" name="diff" value="<?=gettext("Diff"); ?>"></td> + <td width="5%" colspan="2" valign="middle" align="center" class="list nowrap"><input type="submit" name="diff" value="<?=gettext("Diff"); ?>" /></td> <td width="20%" class="listhdrr"><?=gettext("Date");?></td> <td width="5%" class="listhdrr"><?=gettext("Version");?></td> <td width="5%" class="listhdrr"><?=gettext("Size");?></td> @@ -195,15 +195,15 @@ include("head.inc"); <td width="5%" class="list"> </td> </tr> <tr valign="top"> - <td valign="middle" class="list" nowrap></td> + <td valign="middle" class="list nowrap"></td> <td class="list"> - <input type="radio" name="newtime" value="current"> + <input type="radio" name="newtime" value="current" /> </td> <td class="listlr"> <?= date(gettext("n/j/y H:i:s"), $config['revision']['time']) ?></td> <td class="listr"> <?= $config['version'] ?></td> <td class="listr"> <?= format_bytes(filesize("/conf/config.xml")) ?></td> <td class="listr"> <?= $config['revision']['description'] ?></td> - <td valign="middle" class="list" nowrap><b><?=gettext("Current");?></b></td> + <td valign="middle" class="list nowrap"><b><?=gettext("Current");?></b></td> </tr> <?php $c = 0; @@ -215,11 +215,11 @@ include("head.inc"); ?> <tr valign="top"> <td class="list"> - <input type="radio" name="oldtime" value="<?php echo $version['time'];?>"> + <input type="radio" name="oldtime" value="<?php echo $version['time'];?>" /> </td> <td class="list"> <?php if ($c < (count($confvers) - 1)) { ?> - <input type="radio" name="newtime" value="<?php echo $version['time'];?>"> + <input type="radio" name="newtime" value="<?php echo $version['time'];?>" /> <?php } else { ?> <?php } @@ -229,21 +229,21 @@ include("head.inc"); <td class="listr"> <?= $version['version'] ?></td> <td class="listr"> <?= format_bytes($version['filesize']) ?></td> <td class="listr"> <?= $version['description'] ?></td> - <td valign="middle" class="list" nowrap> - <a href="diag_confbak.php?newver=<?=$version['time'];?>" onclick="return confirm('<?=gettext("Revert to this configuration?");?>'")> - <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="<?=gettext("Revert to this configuration");?>" title="<?=gettext("Revert to this configuration");?>"> + <td valign="middle" class="list nowrap"> + <a href="diag_confbak.php?newver=<?=$version['time'];?>" onclick="return confirm('<?=gettext("Revert to this configuration?");?>')"> + <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="<?=gettext("Revert to this configuration");?>" title="<?=gettext("Revert to this configuration");?>" /> </a> <a href="diag_confbak.php?rmver=<?=$version['time'];?>" onclick="return confirm('<?=gettext("Delete this configuration backup?");?>')"> - <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="<?=gettext("Remove this backup");?>" title="<?=gettext("Remove this backup");?>"> + <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="<?=gettext("Remove this backup");?>" title="<?=gettext("Remove this backup");?>" /> </a> <a href="diag_confbak.php?getcfg=<?=$version['time'];?>"> - <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_down.gif" width="17" height="17" border="0" alt="<?=gettext("Download this backup");?>" title="<?=gettext("Download this backup");?>"> + <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_down.gif" width="17" height="17" border="0" alt="<?=gettext("Download this backup");?>" title="<?=gettext("Download this backup");?>" /> </a> </td> </tr> <?php endforeach; ?> <tr> - <td colspan="2"><input type="submit" name="diff" value="<?=gettext("Diff"); ?>"></td> + <td colspan="2"><input type="submit" name="diff" value="<?=gettext("Diff"); ?>" /></td> <td colspan="5"></td> </tr> <?php else: ?> @@ -259,7 +259,7 @@ include("head.inc"); </td> </tr> </table> -</form> + <?php include("fend.inc"); ?> </body> </html> diff --git a/usr/local/www/diag_defaults.php b/usr/local/www/diag_defaults.php index d389e9d..076f6f6 100755 --- a/usr/local/www/diag_defaults.php +++ b/usr/local/www/diag_defaults.php @@ -67,7 +67,7 @@ include("head.inc"); </pre> <?php else: ?> <form action="diag_defaults.php" method="post"> - <p><strong> <?=gettext("If you click") . " "" . gettext("Yes") . "", " . gettext("the firewall will:")?> + <p><strong> <?=gettext("If you click") . " "" . gettext("Yes") . "", " . gettext("the firewall will:")?></strong></p> <ul> <li><?=gettext("Reset to factory defaults");?></li> <li><?=gettext("LAN IP address will be reset to 192.168.1.1");?></li> @@ -77,10 +77,10 @@ include("head.inc"); <li><?=gettext("webConfigurator admin username will be reset to 'admin'");?></li> <li><?=gettext("webConfigurator admin password will be reset to");?> '<?=$g['factory_shipped_password']?>'</li> </ul> - <?=gettext("Are you sure you want to proceed?");?></strong></p> + <p><strong><?=gettext("Are you sure you want to proceed?");?></strong></p> <p> - <input name="Submit" type="submit" class="formbtn" value=" <?=gettext("Yes");?> "> - <input name="Submit" type="submit" class="formbtn" value=" <?=gettext("No");?> "> + <input name="Submit" type="submit" class="formbtn" value=" <?=gettext("Yes");?> " /> + <input name="Submit" type="submit" class="formbtn" value=" <?=gettext("No");?> " /> </p> </form> <?php endif; ?> diff --git a/usr/local/www/diag_ipsec.php b/usr/local/www/diag_ipsec.php index 1b73199..02291e8 100644 --- a/usr/local/www/diag_ipsec.php +++ b/usr/local/www/diag_ipsec.php @@ -81,7 +81,7 @@ $status = ipsec_smp_dump_status(); <body link="#0000CC" vlink="#0000CC" alink="#0000CC" onload="<?php echo $jsevents["body"]["onload"]; ?>"> <?php include("fbegin.inc"); ?> <div id="inputerrors"></div> -<table width="100%" border="0" cellpadding="0" cellspacing="0"> +<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="status ipsec"> <tr> <td> <?php @@ -97,16 +97,16 @@ $status = ipsec_smp_dump_status(); <tr> <td> <div id="mainarea"> - <table width="100%" border="0" cellpadding="6" cellspacing="0" class="tabcont sortable"> + <table width="100%" border="0" cellpadding="6" cellspacing="0" class="tabcont sortable" summary="status"> <thead> <tr> - <th nowrap class="listhdrr"><?php echo gettext("Description");?></th> - <th nowrap class="listhdrr"><?php echo gettext("Local ID");?></th> - <th nowrap class="listhdrr"><?php echo gettext("Local IP");?></th> - <th nowrap class="listhdrr"><?php echo gettext("Remote ID");?></th> - <th nowrap class="listhdrr"><?php echo gettext("Remote IP");?></a></th> - <th nowrap class="listhdrr"><?php echo gettext("Role");?></a></th> - <th nowrap class="listhdrr"><?php echo gettext("Status");?></a></th> + <th class="listhdrr nowrap"><?php echo gettext("Description");?></th> + <th class="listhdrr nowrap"><?php echo gettext("Local ID");?></th> + <th class="listhdrr nowrap"><?php echo gettext("Local IP");?></th> + <th class="listhdrr nowrap"><?php echo gettext("Remote ID");?></th> + <th class="listhdrr nowrap"><?php echo gettext("Remote IP");?></th> + <th class="listhdrr nowrap"><?php echo gettext("Role");?></th> + <th class="listhdrr nowrap"><?php echo gettext("Status");?></th> </tr> </thead> <tbody> @@ -175,8 +175,8 @@ $status = ipsec_smp_dump_status(); <td class="listbg"> <?php ?> </td> - <td valign="middle" nowrap class="list"> - <table border="0" cellspacing="0" cellpadding="1"> + <td valign="middle" class="list nowrap"> + <table border="0" cellspacing="0" cellpadding="1" summary=""> </table> </td> </tr> @@ -184,15 +184,15 @@ $status = ipsec_smp_dump_status(); <tr> <td class="listrborder" colspan="7"> <div id="btnchildsa-<?=$ikeid;?>"> - <input type="button" onClick="show_childsa('childsa-<?=$ikeid;?>','btnchildsa-<?=$ikeid;?>');" value="+" /> - Show child SA entries</a> + <input type="button" onclick="show_childsa('childsa-<?=$ikeid;?>','btnchildsa-<?=$ikeid;?>');" value="+" /> - Show child SA entries </div> - <table class="tabcont" width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" id="childsa-<?=$ikeid;?>" style="display:none"> + <table class="tabcont" width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" id="childsa-<?=$ikeid;?>" style="display:none" summary=""> <thead> <tr> - <th nowrap class="listhdrr"><?php echo gettext("Local subnets");?></th> - <th nowrap class="listhdrr"><?php echo gettext("Local SPI");?></th> - <th nowrap class="listhdrr"><?php echo gettext("Remote SPI");?></th> - <th nowrap class="listhdrr"><?php echo gettext("Remote subnets");?></th> + <th class="listhdrr nowrap"><?php echo gettext("Local subnets");?></th> + <th class="listhdrr nowrap"><?php echo gettext("Local SPI");?></th> + <th class="listhdrr nowrap"><?php echo gettext("Remote SPI");?></th> + <th class="listhdrr nowrap"><?php echo gettext("Remote subnets");?></th> </tr> </thead> <tbody> @@ -201,7 +201,7 @@ $status = ipsec_smp_dump_status(); foreach ($ikesa['childsalist']['childsa'] as $childsa) { ?> <tr valign="top"> - <td nowrap class="listlr"> + <td class="listlr nowrap"> <?php if (is_array($childsa['local']) && is_array($childsa['local']['networks']) && is_array($childsa['local']['networks']['network'])) { foreach ($childsa['local']['networks']['network'] as $lnets) { echo htmlspecialchars($lnets) . "<br />"; @@ -210,17 +210,17 @@ $status = ipsec_smp_dump_status(); echo "Unknown"; ?> </td> - <td nowrap class="listr"> + <td class="listr nowrap"> <?php if (is_array($childsa['local'])) echo htmlspecialchars($childsa['local']['spi']); ?> </td> - <td nowrap class="listr"> + <td class="listr nowrap"> <?php if (is_array($childsa['remote'])) echo htmlspecialchars($childsa['remote']['spi']); ?> </td> - <td nowrap class="listlr"> + <td class="listlr nowrap"> <?php if (is_array($childsa['remote']) && is_array($childsa['remote']['networks']) && is_array($childsa['remote']['networks']['network'])) { foreach ($childsa['remote']['networks']['network'] as $rnets) { echo htmlspecialchars($rnets) . "<br />"; @@ -229,11 +229,12 @@ $status = ipsec_smp_dump_status(); echo "Unknown"; ?> </td> - <td nowrap class="list"> + <td class="list nowrap"> </td> </tr> <?php } } ?> + <tr style="display:none;"><td></td></tr> </tbody> </table> </td> @@ -242,28 +243,30 @@ $status = ipsec_smp_dump_status(); } } ?> + <tr style="display:none;"><td></td></tr> </tbody> </table> </div> </td> </tr> </table> -</div> -<span class="vexpl"> +<p class="vexpl"> <span class="red"> <strong><?php echo gettext("Note:");?><br /></strong> </span> <?php echo gettext("You can configure IPsec");?> <a href="vpn_ipsec.php">here</a>. -</span> +</p> <?php unset($status); include("fend.inc"); ?> <script type="text/javascript"> +//<![CDATA[ function show_childsa(id, buttonid) { document.getElementById(buttonid).innerHTML=''; aodiv = document.getElementById(id); aodiv.style.display = "block"; } +//]]> </script> </body> </html> diff --git a/usr/local/www/diag_ipsec_sad.php b/usr/local/www/diag_ipsec_sad.php index 55ed336..225b0a0 100644 --- a/usr/local/www/diag_ipsec_sad.php +++ b/usr/local/www/diag_ipsec_sad.php @@ -66,7 +66,7 @@ if ($_GET['act'] == "del") { <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <?php include("fbegin.inc"); ?> - <table width="100%" border="0" cellpadding="0" cellspacing="0"> + <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="status ipsec sad"> <tr> <td> <?php @@ -82,17 +82,17 @@ if ($_GET['act'] == "del") { <tr> <td> <div id="mainarea"> - <table class="tabcont sortable" width="100%" border="0" cellpadding="6" cellspacing="0"> + <table class="tabcont sortable" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area"> <?php if (count($sad)): ?> <tr> - <td nowrap class="listhdrr"><?=gettext("Source");?></td> - <td nowrap class="listhdrr"><?=gettext("Destination");?></td> - <td nowrap class="listhdrr"><?=gettext("Protocol");?></td> - <td nowrap class="listhdrr"><?=gettext("SPI");?></td> - <td nowrap class="listhdrr"><?=gettext("Enc. alg.");?></td> - <td nowrap class="listhdr"><?=gettext("Auth. alg.");?></td> - <td nowrap class="listhdr"><?=gettext("Data");?></td> - <td nowrap class="list"></td> + <td class="listhdrr nowrap"><?=gettext("Source");?></td> + <td class="listhdrr nowrap"><?=gettext("Destination");?></td> + <td class="listhdrr nowrap"><?=gettext("Protocol");?></td> + <td class="listhdrr nowrap"><?=gettext("SPI");?></td> + <td class="listhdrr nowrap"><?=gettext("Enc. alg.");?></td> + <td class="listhdr nowrap"><?=gettext("Auth. alg.");?></td> + <td class="listhdr nowrap"><?=gettext("Data");?></td> + <td class="list nowrap"></td> </tr> <?php foreach ($sad as $sa): ?> <tr> @@ -103,15 +103,15 @@ if ($_GET['act'] == "del") { <td class="listr"><?=htmlspecialchars($sa['ealgo']);?></td> <td class="listr"><?=htmlspecialchars($sa['aalgo']);?></td> <td class="listr"><?=htmlspecialchars($sa['data']);?></td> - <td class="list" nowrap> + <td class="list nowrap"> <?php $args = "src=" . rawurlencode($sa['src']); - $args .= "&dst=" . rawurlencode($sa['dst']); - $args .= "&proto=" . rawurlencode($sa['proto']); - $args .= "&spi=" . rawurlencode("0x" . $sa['spi']); + $args .= "&dst=" . rawurlencode($sa['dst']); + $args .= "&proto=" . rawurlencode($sa['proto']); + $args .= "&spi=" . rawurlencode("0x" . $sa['spi']); ?> - <a href="diag_ipsec_sad.php?act=del&<?=$args;?>" onclick="return confirm('<?=gettext("Do you really want to delete this security association?"); ?>')"> - <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"> + <a href="diag_ipsec_sad.php?act=del&<?=$args;?>" onclick="return confirm('<?=gettext("Do you really want to delete this security association?"); ?>')"> + <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="delete" /> </a> </td> </tr> @@ -129,12 +129,10 @@ if ($_GET['act'] == "del") { </tr> </table> -<p/> - -<span class="vexpl"> +<p class="vexpl"> <span class="red"><strong><?=gettext("Note:");?><br /></strong></span> <?=gettext("You can configure your IPsec");?> <a href="vpn_ipsec.php"><?=gettext("here.");?></a> -</span> +</p> <?php include("fend.inc"); ?> </body> diff --git a/usr/local/www/diag_ipsec_spd.php b/usr/local/www/diag_ipsec_spd.php index 1592d04..d156105 100644 --- a/usr/local/www/diag_ipsec_spd.php +++ b/usr/local/www/diag_ipsec_spd.php @@ -65,7 +65,7 @@ $spd = ipsec_dump_spd(); <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <?php include("fbegin.inc"); ?> - <table width="100%" border="0" cellpadding="0" cellspacing="0"> + <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="status ipsec spd"> <tr> <td> <?php @@ -81,49 +81,49 @@ $spd = ipsec_dump_spd(); <tr> <td> <div id="mainarea" style="background:#eeeeee"> - <table class="tabcont sortable" width="100%" border="0" cellpadding="6" cellspacing="0"> + <table class="tabcont sortable" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area"> <?php if (count($spd)): ?> <tr> - <td nowrap class="listhdrr"><?= gettext("Source"); ?></td> - <td nowrap class="listhdrr"><?= gettext("Destination"); ?></td> - <td nowrap class="listhdrr"><?= gettext("Direction"); ?></td> - <td nowrap class="listhdrr"><?= gettext("Protocol"); ?></td> - <td nowrap class="listhdrr"><?= gettext("Tunnel endpoints"); ?></td> - <td nowrap class="list"></td> + <td class="listhdrr nowrap"><?= gettext("Source"); ?></td> + <td class="listhdrr nowrap"><?= gettext("Destination"); ?></td> + <td class="listhdrr nowrap"><?= gettext("Direction"); ?></td> + <td class="listhdrr nowrap"><?= gettext("Protocol"); ?></td> + <td class="listhdrr nowrap"><?= gettext("Tunnel endpoints"); ?></td> + <td class="list nowrap"></td> </tr> <?php foreach ($spd as $sp): ?> <tr> <td class="listlr" valign="top"><?=htmlspecialchars($sp['srcid']);?></td> <td class="listr" valign="top"><?=htmlspecialchars($sp['dstid']);?></td> <td class="listr" valign="top"> - <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_<?=$sp['dir'];?>.gif" width="11" height="11" style="margin-top: 2px"> + <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_<?=$sp['dir'];?>.gif" width="11" height="11" style="margin-top: 2px" alt="direction" /> </td> <td class="listr" valign="top"><?=htmlspecialchars(strtoupper($sp['proto']));?></td> <td class="listr" valign="top"><?=htmlspecialchars($sp['src']);?> -> <?=htmlspecialchars($sp['dst']);?></td> - <td class="list" nowrap> + <td class="list nowrap"> <?php $args = "srcid=".rawurlencode($sp['srcid']); - $args .= "&dstid=".rawurlencode($sp['dstid']); - $args .= "&dir=".rawurlencode($sp['dir']); + $args .= "&dstid=".rawurlencode($sp['dstid']); + $args .= "&dir=".rawurlencode($sp['dir']); ?> - <a href="diag_ipsec_spd.php?act=del&<?=$args;?>" onclick="return confirm('<?= gettext("Do you really want to delete this security policy?"); ?>')"> - <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"> + <a href="diag_ipsec_spd.php?act=del&<?=$args;?>" onclick="return confirm('<?= gettext("Do you really want to delete this security policy?"); ?>')"> + <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="delete" /> </a> </td> </tr> <?php endforeach; ?> </table> <br /> - <table class="tabcont" border="0" cellspacing="0" cellpadding="6"> + <table class="tabcont" border="0" cellspacing="0" cellpadding="6" summary="policies"> <tr> - <td width="16"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_in.gif" width="11" height="11"></td> + <td width="16"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_in.gif" width="11" height="11" alt="in" /></td> <td><?= gettext("incoming (as seen by firewall)"); ?></td> </tr> <tr> <td colspan="5" height="4"></td> </tr> <tr> - <td><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_out.gif" width="11" height="11"></td> + <td><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_out.gif" width="11" height="11" alt="out" /></td> <td><?= gettext("outgoing (as seen by firewall)"); ?></td> </tr> <?php else: ?> @@ -139,13 +139,11 @@ $spd = ipsec_dump_spd(); </tr> </table> -<p> -<span class="vexpl"> +<p class="vexpl"> <span class="red"><strong><?= gettext("Note:"); ?><br /></strong></span> <?= gettext("You can configure your IPsec"); ?> <a href="vpn_ipsec.php"><?= gettext("here."); ?></a> -</span> +</p> <?php include("fend.inc"); ?> </body> </html> - diff --git a/usr/local/www/diag_limiter_info.php b/usr/local/www/diag_limiter_info.php index eb592b5..b6c0ecc 100644 --- a/usr/local/www/diag_limiter_info.php +++ b/usr/local/www/diag_limiter_info.php @@ -62,8 +62,9 @@ include("head.inc"); ?> <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> - +<?php include("fbegin.inc"); ?> <script type="text/javascript"> +//<![CDATA[ function getlimiteractivity() { var url = "/diag_limiter_info.php"; var pars = 'getactivity=yes'; @@ -76,44 +77,42 @@ include("head.inc"); }); } function activitycallback(transport) { - jQuery('#limiteractivitydiv').html('<font face="Courier"><font size="2"><b><pre style="text-align:left;">' + transport.responseText + '</pre></font>'); - setTimeout('getlimiteractivity()', 2000); + jQuery('#limiteractivitydiv').html('<font face="Courier" size="2"><pre style="text-align:left;">' + transport.responseText + '<\/pre><\/font>'); + setTimeout('getlimiteractivity()', 2000); } - setTimeout('getlimiteractivity()', 5000); + setTimeout('getlimiteractivity()', 5000); +//]]> </script> -<div id='maincontent'> +<div id="maincontent"> <?php - include("fbegin.inc"); if($savemsg) { - echo "<div id='savemsg'>"; + echo "<div id=\"savemsg\">"; print_info_box($savemsg); echo "</div>"; } if ($input_errors) print_input_errors($input_errors); ?> -<table width="100%" border="0" cellpadding="0" cellspacing="0"> +<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="diag limiter info"> <tr> <td> - <table id="backuptable" class="tabcont" align="center" width="100%" border="0" cellpadding="6" cellspacing="0"> + <table id="backuptable" class="tabcont" align="center" width="100%" border="0" cellpadding="6" cellspacing="0" summary="tabcont"> <tr> - <td> - <center> - <table> + <td align="center"> + <table summary="results"> <tr><td> - <div name='limiteractivitydiv' id='limiteractivitydiv'> - <b><?=gettext("Gathering Limiter information, please wait...");?> + <div id="limiteractivitydiv"> + <?=gettext("Gathering Limiter information, please wait...");?> </div> </td></tr> </table> </td> </tr> </table> - </div> </td> </tr> </table> -</form> +</div> <?php include("fend.inc"); ?> </body> </html> diff --git a/usr/local/www/diag_logs_filter.php b/usr/local/www/diag_logs_filter.php index f68d4b4..13d72bd 100644 --- a/usr/local/www/diag_logs_filter.php +++ b/usr/local/www/diag_logs_filter.php @@ -159,11 +159,10 @@ include("head.inc"); <tr> <td> <div id="mainarea"> - <table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0" sortableMultirow="<?=$config['syslog']['filterdescriptions'] === "2"?2:1?>" summary="main area"> - <thead> + <table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0" style="sortableMultirow:<?=$config['syslog']['filterdescriptions'] === "2"?2:1?>" summary="main area"> <tr> <td colspan="<?=(!isset($config['syslog']['rawfilter']))?7:2?>" align="left" valign="middle"> - <div id="filterlogentries_show" class="widgetconfigdiv" style=<?=(!isset($config['syslog']['rawfilter']))?"":"display:none"?>> + <div id="filterlogentries_show" class="widgetconfigdiv" style="<?=(!isset($config['syslog']['rawfilter']))?"":"display:none"?>"> <form id="filterlogentries" name="filterlogentries" action="diag_logs_filter.php" method="post"> <?php $Include_Act = explode(",", str_replace(" ", ",", $filterfieldsarray['act'])); @@ -231,14 +230,14 @@ include("head.inc"); </table> </form> </div> - <div id="filterform_show" class="widgetconfigdiv" style=<?=(!isset($config['syslog']['rawfilter']))?"display:none":""?>> + <div id="filterform_show" class="widgetconfigdiv" style="<?=(!isset($config['syslog']['rawfilter']))?"display:none":""?>"> <form id="filterform" name="filterform" action="diag_logs_filter.php" method="post"> <table width="0%" border="0" cellpadding="0" cellspacing="0" summary="firewall log"> <tr> <td> <div align="center" style="vertical-align:top;"><?=gettext("Interface");?></div> <div align="center" style="vertical-align:top;"> - <select name="interface" onChange="dst_change(this.value,iface_old,document.iform.dsttype.value);iface_old = document.iform.interface.value;typesel_change();"> + <select name="interface" onchange="dst_change(this.value,iface_old,document.iform.dsttype.value);iface_old = document.iform.interface.value;typesel_change();"> <option value="" <?=$interfacefilter?"":"selected=\"selected\""?>>*Any interface</option> <?php $iflist = get_configured_interface_with_descr(false, true); @@ -320,17 +319,16 @@ include("head.inc"); </td> </tr> <tr class="sortableHeaderRowIdentifier"> - <td width="10%" class="listhdrr"><?=gettext("Act");?></ td> - <td width="10%" class="listhdrr"><?=gettext("Time");?></ td> - <td width="15%" class="listhdrr"><?=gettext("If");?></ td> + <td width="10%" class="listhdrr"><?=gettext("Act");?></td> + <td width="10%" class="listhdrr"><?=gettext("Time");?></td> + <td width="15%" class="listhdrr"><?=gettext("If");?></td> <?php if ($config['syslog']['filterdescriptions'] === "1"):?> - <td width="10%" class="listhdrr"><?=gettext("Rule");?></ td> + <td width="10%" class="listhdrr"><?=gettext("Rule");?></td> <?php endif;?> - <td width="25%" class="listhdrr"><?=gettext("Source");?></ td> - <td width="25%" class="listhdrr"><?=gettext("Destination");?></ td> - <td width="15%" class="listhdrr"><?=gettext("Proto");?></ td> + <td width="25%" class="listhdrr"><?=gettext("Source");?></td> + <td width="25%" class="listhdrr"><?=gettext("Destination");?></td> + <td width="15%" class="listhdrr"><?=gettext("Proto");?></td> </tr> - </thead> <?php if ($config['syslog']['filterdescriptions']) buffer_rules_load(); @@ -344,8 +342,8 @@ include("head.inc"); <a onclick="javascript:getURL('diag_logs_filter.php?getrulenum=<?php echo "{$filterent['rulenum']},{$filterent['tracker']},{$filterent['act']}"; ?>', outputrule);"> <img border="0" src="<?php echo find_action_image($filterent['act']);?>" width="11" height="11" align="middle" alt="<?php echo $filterent['act'] .'/'. $filterent['tracker'];?>" title="<?php echo $filterent['act'] .'/'. $filterent['tracker'];?>" /> <?php if ($filterent['count']) echo $filterent['count'];?></a></center></td> - <td class="listMRr" nowrap="nowrap"><?php echo htmlspecialchars($filterent['time']);?></td> - <td class="listMRr" nowrap="nowrap"> + <td class="listMRr nowrap"><?php echo htmlspecialchars($filterent['time']);?></td> + <td class="listMRr nowrap"> <?php if ($filterent['direction'] == "out"): ?> <img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/out.gif" alt="Direction=OUT" title="Direction=OUT"/> <?php endif; ?> @@ -385,7 +383,7 @@ include("head.inc"); if ($filterent['proto'] == "TCP") $filterent['proto'] .= ":{$filterent['tcpflags']}"; ?> - <td class="listMRr" nowrap="nowrap"><?php echo htmlspecialchars($filterent['proto']);?></td> + <td class="listMRr nowrap"><?php echo htmlspecialchars($filterent['proto']);?></td> </tr> <?php if (isset($config['syslog']['filterdescriptions']) && $config['syslog']['filterdescriptions'] === "2"):?> <tr class="<?=$evenRowClass?>"> @@ -407,7 +405,6 @@ include("head.inc"); dump_clog($filter_logfile, $nentries); ?> <?php endif; ?> - <tfoot> <tr> <td align="left" valign="top" colspan="3"> <form id="clearform" name="clearform" action="diag_logs_filter.php" method="post" style="margin-top: 14px;"> @@ -415,7 +412,6 @@ include("head.inc"); </form> </td> </tr> - </tfoot> </table> </div> </td> @@ -428,7 +424,7 @@ include("head.inc"); <!-- AJAXY STUFF --> <script type="text/javascript"> - +//<![CDATA[ function resolve_with_ajax(ip_to_resolve) { var url = "/diag_logs_filter.php"; @@ -448,7 +444,7 @@ function resolve_with_ajax(ip_to_resolve) { function resolve_ip_callback(transport) { var response = jQuery.parseJSON(transport.responseText); var resolve_class = htmlspecialchars(response.resolve_ip.replace(/[.:]/g, '-')); - var resolve_text = '<small><br />' + htmlspecialchars(response.resolve_text) + '</small>'; + var resolve_text = '<small><br />' + htmlspecialchars(response.resolve_text) + '<\/small>'; jQuery('span.RESOLVE-' + resolve_class).html(resolve_text); jQuery('img.ICON-' + resolve_class).removeAttr('title'); @@ -462,6 +458,7 @@ function resolve_ip_callback(transport) { function htmlspecialchars(str) { return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, '''); } +//]]> </script> </body> diff --git a/usr/local/www/diag_logs_filter_dynamic.php b/usr/local/www/diag_logs_filter_dynamic.php index 6f2dde2..02ec32e 100755 --- a/usr/local/www/diag_logs_filter_dynamic.php +++ b/usr/local/www/diag_logs_filter_dynamic.php @@ -127,16 +127,16 @@ include("head.inc"); <thead> <tr> <td colspan="6" class="listtopic"> - <?php printf(gettext("Last %s records"),$nentries);?>; <?=gettext("Pause:");?><input style="vertical-align:middle;" type="checkbox" onClick="javascript:toggle_pause();" /> + <?php printf(gettext("Last %s records"),$nentries);?>; <?=gettext("Pause:");?><input style="vertical-align:middle;" type="checkbox" onclick="javascript:toggle_pause();" /> </td> </tr> <tr> - <td width="10%" class="listhdrr"><?=gettext("Act");?></ td> - <td width="10%" class="listhdrr"><?=gettext("Time");?></ td> - <td width="15%" class="listhdrr"><?=gettext("If");?></ td> - <td width="25%" class="listhdrr"><?=gettext("Source");?></ td> - <td width="25%" class="listhdrr"><?=gettext("Destination");?></ td> - <td width="15%" class="listhdrr"><?=gettext("Proto");?></ td> + <td width="10%" class="listhdrr"><?=gettext("Act");?></td> + <td width="10%" class="listhdrr"><?=gettext("Time");?></td> + <td width="15%" class="listhdrr"><?=gettext("If");?></td> + <td width="25%" class="listhdrr"><?=gettext("Source");?></td> + <td width="25%" class="listhdrr"><?=gettext("Destination");?></td> + <td width="15%" class="listhdrr"><?=gettext("Proto");?></td> </tr> </thead> <tbody id="filter-log-entries"> @@ -162,6 +162,7 @@ include("head.inc"); <td class="listMRr nowrap"><?php echo htmlspecialchars($filterent['proto']);?></td> </tr> <?php endforeach; ?> + <tr style="display:none;"><td></td></tr> </tbody> </table> </div> diff --git a/usr/local/www/diag_logs_filter_summary.php b/usr/local/www/diag_logs_filter_summary.php index 46caf66..349555c 100644 --- a/usr/local/www/diag_logs_filter_summary.php +++ b/usr/local/www/diag_logs_filter_summary.php @@ -142,7 +142,7 @@ function pie_block($summary, $stat, $num) { print "</script>\n"; print "<table cellpadding=\"3\" cellspacing=\"0\" border=\"0\" summary=\"pie chart\">"; print "<tr><th><font size=\"+1\">{$fields[$stat]}</font></th></tr>"; - print "<tr><td><div id=\"piechart{$stat}\" style=\"width:450px;height:300px\"></div>"; + print "<tr><td><div id=\"piechart{$stat}\" style=\"width:450px;height:300px\"></div></td></tr>"; print "</table>\n"; } @@ -233,4 +233,4 @@ foreach(array_keys($fields) as $field) { </table> <?php include("fend.inc"); ?> </body> -</html>
\ No newline at end of file +</html> diff --git a/usr/local/www/diag_ndp.php b/usr/local/www/diag_ndp.php index bdec04b..2a290d4 100644 --- a/usr/local/www/diag_ndp.php +++ b/usr/local/www/diag_ndp.php @@ -114,8 +114,8 @@ include("head.inc"); <?php include("fbegin.inc"); ?> <div id="loading"> - <img src="/themes/<?=$g['theme'];?>/images/misc/loader.gif"><?= gettext("Loading, please wait..."); ?> - <p/> + <img src="/themes/<?=$g['theme'];?>/images/misc/loader.gif" alt="loader" /><?= gettext("Loading, please wait..."); ?> + <p> </p> </div> <?php @@ -125,10 +125,10 @@ for ($i = 0; $i < ob_get_level(); $i++) { ob_end_flush(); } ob_implicit_flush(1); ?> -<table width="100%" border="0" cellpadding="0" cellspacing="0"> +<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="diag ndp"> <tr> <td> - <table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0"> + <table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0" summary="tabcont"> <tr> <td class="listhdrr"><?= gettext("IPv6 address"); ?></td> <td class="listhdrr"><?= gettext("MAC address"); ?></td> @@ -170,5 +170,9 @@ ob_implicit_flush(1); <?php include("fend.inc"); ?> <script type="text/javascript"> +//<![CDATA[ jQuery('#loading').html(''); +//]]> </script> +</body> +</html> diff --git a/usr/local/www/diag_packet_capture.php b/usr/local/www/diag_packet_capture.php index 0566e73..f67ed8f 100644 --- a/usr/local/www/diag_packet_capture.php +++ b/usr/local/www/diag_packet_capture.php @@ -178,10 +178,10 @@ include("fbegin.inc"); <?php if ($input_errors) print_input_errors($input_errors); ?> -<table width="100%" border="0" cellpadding="0" cellspacing="0"> +<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="diag packet capture"> <tr><td> <form action="diag_packet_capture.php" method="post" name="iform" id="iform"> - <table width="100%" border="0" cellpadding="6" cellspacing="0"> + <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="table"> <tr> <td colspan="3" valign="top" class="listtopic"><?=gettext("Packet capture");?></td> </tr> @@ -192,7 +192,7 @@ include("fbegin.inc"); <?php ?> <?php foreach ($interfaces as $iface => $ifacename): ?> - <option value="<?=$iface;?>" <?php if ($selectedif == $iface) echo "selected"; ?>> + <option value="<?=$iface;?>" <?php if ($selectedif == $iface) echo "selected=\"selected\""; ?>> <?php echo $ifacename;?> </option> <?php endforeach; ?> @@ -203,7 +203,7 @@ include("fbegin.inc"); <tr> <td width="17%" valign="top" class="vncellreq"><?=gettext("Promiscuous");?></td> <td width="51%" class="vtable"> - <input name="promiscuous" type="checkbox"<?php if($_POST['promiscuous']) echo " CHECKED"; ?>> + <input name="promiscuous" type="checkbox"<?php if($_POST['promiscuous']) echo " checked=\"checked\""; ?> /> <br /><?=gettext("If checked, the");?> <a target="_blank" href="http://www.freebsd.org/cgi/man.cgi?query=tcpdump&apropos=0&sektion=0&manpath=FreeBSD+8.3-stable&arch=default&format=html"><?= gettext("packet capture")?></a> <?= gettext("will be performed using promiscuous mode.");?> <br /><b><?=gettext("Note");?>: </b><?=gettext("Some network adapters do not support or work well in promiscuous mode.");?> </td> @@ -213,8 +213,8 @@ include("fbegin.inc"); <td colspan="2" width="83%" class="vtable"> <select name="fam"> <option value="">Any</option> - <option value="ip" <?php if ($fam == "ip") echo "selected"; ?>>IPv4 Only</option> - <option value="ip6" <?php if ($fam == "ip6") echo "selected"; ?>>IPv6 Only</option> + <option value="ip" <?php if ($fam == "ip") echo "selected=\"selected\""; ?>>IPv4 Only</option> + <option value="ip6" <?php if ($fam == "ip6") echo "selected=\"selected\""; ?>>IPv6 Only</option> </select> <br /><?=gettext("Select the type of traffic to be captured, either Any, IPv4 only or IPv6 only.");?> </td> @@ -224,13 +224,13 @@ include("fbegin.inc"); <td colspan="2" width="83%" class="vtable"> <select name="proto"> <option value="">Any</option> - <option value="icmp" <?php if ($proto == "icmp") echo "selected"; ?>>ICMP</option> - <option value="icmp6" <?php if ($proto == "icmp6") echo "selected"; ?>>ICMPv6</option> - <option value="tcp" <?php if ($proto == "tcp") echo "selected"; ?>>TCP</option> - <option value="udp" <?php if ($proto == "udp") echo "selected"; ?>>UDP</option> - <option value="arp" <?php if ($proto == "arp") echo "selected"; ?>>ARP</option> - <option value="carp" <?php if ($proto == "carp") echo "selected"; ?>>CARP (VRRP)</option> - <option value="esp" <?php if ($proto == "esp") echo "selected"; ?>>ESP</option> + <option value="icmp" <?php if ($proto == "icmp") echo "selected=\"selected\""; ?>>ICMP</option> + <option value="icmp6" <?php if ($proto == "icmp6") echo "selected=\"selected\""; ?>>ICMPv6</option> + <option value="tcp" <?php if ($proto == "tcp") echo "selected=\"selected\""; ?>>TCP</option> + <option value="udp" <?php if ($proto == "udp") echo "selected=\"selected\""; ?>>UDP</option> + <option value="arp" <?php if ($proto == "arp") echo "selected=\"selected\""; ?>>ARP</option> + <option value="carp" <?php if ($proto == "carp") echo "selected=\"selected\""; ?>>CARP (VRRP)</option> + <option value="esp" <?php if ($proto == "esp") echo "selected=\"selected\""; ?>>ESP</option> </select> <br /><?=gettext("Select the protocol to capture, or Any.");?> </td> @@ -238,7 +238,7 @@ include("fbegin.inc"); <tr> <td width="17%" valign="top" class="vncellreq"><?=gettext("Host Address");?></td> <td colspan="2" width="83%" class="vtable"> - <input name="host" type="text" class="formfld host" id="host" size="20" value="<?=htmlspecialchars($host);?>"> + <input name="host" class="formfld host" id="host" size="20" value="<?=htmlspecialchars($host);?>" /> <br /><?=gettext("This value is either the Source or Destination IP address or subnet in CIDR notation. The packet capture will look for this address in either field.");?> <br /><?=gettext("This value can be a domain name or IP address, or subnet in CIDR notation.");?> <br /><?=gettext("If you leave this field blank, all packets on the specified interface will be captured.");?> @@ -247,7 +247,7 @@ include("fbegin.inc"); <tr> <td width="17%" valign="top" class="vncellreq"><?=gettext("Port");?></td> <td colspan="2" width="83%" class="vtable"> - <input name="port" type="text" class="formfld unknown" id="port" size="5" value="<?=$port;?>"> + <input name="port" class="formfld unknown" id="port" size="5" value="<?=$port;?>" /> <br /><?=gettext("The port can be either the source or destination port. The packet capture will look for this port in either field.");?> <br /><?=gettext("Leave blank if you do not want to filter by port.");?> </td> @@ -255,25 +255,25 @@ include("fbegin.inc"); <tr> <td width="17%" valign="top" class="vncellreq"><?=gettext("Packet Length");?></td> <td colspan="2" width="83%" class="vtable"> - <input name="snaplen" type="text" class="formfld unknown" id="snaplen" size="5" value="<?=$snaplen;?>"> + <input name="snaplen" class="formfld unknown" id="snaplen" size="5" value="<?=$snaplen;?>" /> <br /><?=gettext("The Packet length is the number of bytes of each packet that will be captured. Default value is 0, which will capture the entire frame regardless of its size.");?> </td> </tr> <tr> <td width="17%" valign="top" class="vncellreq"><?=gettext("Count");?></td> <td colspan="2" width="83%" class="vtable"> - <input name="count" type="text" class="formfld unknown" id="count" size="5" value="<?=$count;?>"> + <input name="count" class="formfld unknown" id="count" size="5" value="<?=$count;?>" /> <br /><?=gettext("This is the number of packets the packet capture will grab. Default value is 100.") . "<br />" . gettext("Enter 0 (zero) for no count limit.");?> </td> </tr> <tr> <td width="17%" valign="top" class="vncellreq"><?=gettext("Level of Detail");?></td> <td colspan="2" width="83%" class="vtable"> - <select name="detail" type="text" class="formselect" id="detail" size="1"> - <option value="normal" <?php if ($detail == "normal") echo "selected"; ?>><?=gettext("Normal");?></option> - <option value="medium" <?php if ($detail == "medium") echo "selected"; ?>><?=gettext("Medium");?></option> - <option value="high" <?php if ($detail == "high") echo "selected"; ?>><?=gettext("High");?></option> - <option value="full" <?php if ($detail == "full") echo "selected"; ?>><?=gettext("Full");?></option> + <select name="detail" class="formselect" id="detail" size="1"> + <option value="normal" <?php if ($detail == "normal") echo "selected=\"selected\""; ?>><?=gettext("Normal");?></option> + <option value="medium" <?php if ($detail == "medium") echo "selected=\"selected\""; ?>><?=gettext("Medium");?></option> + <option value="high" <?php if ($detail == "high") echo "selected=\"selected\""; ?>><?=gettext("High");?></option> + <option value="full" <?php if ($detail == "full") echo "selected=\"selected\""; ?>><?=gettext("Full");?></option> </select> <br /><?=gettext("This is the level of detail that will be displayed after hitting 'Stop' when the packets have been captured.") . "<br /><b>" . gettext("Note:") . "</b> " . @@ -283,7 +283,7 @@ include("fbegin.inc"); <tr> <td width="17%" valign="top" class="vncellreq"><?=gettext("Reverse DNS Lookup");?></td> <td colspan="2" width="83%" class="vtable"> - <input name="dnsquery" type="checkbox"<?php if($_POST['dnsquery']) echo " CHECKED"; ?>> + <input name="dnsquery" type="checkbox" <?php if($_POST['dnsquery']) echo " checked=\"checked\""; ?> /> <br /><?=gettext("This check box will cause the packet capture to perform a reverse DNS lookup associated with all IP addresses.");?> <br /><b><?=gettext("Note");?>: </b><?=gettext("This option can cause delays for large packet captures.");?> </td> @@ -302,13 +302,13 @@ include("fbegin.inc"); $processisrunning = false; if (($action == gettext("Stop") or $action == "") and $processisrunning != true) - echo "<input type=\"submit\" name=\"startbtn\" value=\"" . gettext("Start") . "\"> "; + echo "<input type=\"submit\" name=\"startbtn\" value=\"" . gettext("Start") . "\" /> "; else { - echo "<input type=\"submit\" name=\"stopbtn\" value=\"" . gettext("Stop") . "\"> "; + echo "<input type=\"submit\" name=\"stopbtn\" value=\"" . gettext("Stop") . "\" /> "; } if (file_exists($fp.$fn) and $processisrunning != true) { - echo "<input type=\"submit\" name=\"viewbtn\" value=\"" . gettext("View Capture") . "\"> "; - echo "<input type=\"submit\" name=\"downloadbtn\" value=\"" . gettext("Download Capture") . "\">"; + echo "<input type=\"submit\" name=\"viewbtn\" value=\"" . gettext("View Capture") . "\" /> "; + echo "<input type=\"submit\" name=\"downloadbtn\" value=\"" . gettext("Download Capture") . "\" />"; echo "<br />" . gettext("The packet capture file was last updated:") . " " . date("F jS, Y g:i:s a.", filemtime($fp.$fn)); } ?> @@ -316,11 +316,11 @@ include("fbegin.inc"); </tr> </table> </form> - <table width="100%" border="0" cellpadding="6" cellspacing="0"> + <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="results"> <tr> <td valign="top" colspan="2"> <?php - echo "<font face='terminal' size='2'>"; + echo "<font face=\"terminal\" size=\"2\">"; if ($processisrunning == true) echo("<strong>" . gettext("Packet Capture is running.") . "</strong><br />"); @@ -364,7 +364,14 @@ include("fbegin.inc"); //action = stop echo("<strong>" . gettext("Packet Capture stopped.") . "<br /><br />" . gettext("Packets Captured:") . "</strong><br />"); ?> - <textarea style="width:98%" name="code" rows="15" cols="66" wrap="off" readonly="readonly"> + <script type="text/javascript"> + //<![CDATA[ + window.onload=function(){ + document.getElementById("packetsCaptured").wrap='off'; + } + //]]> + </script> + <textarea id="packetsCaptured" style="width:98%" name="code" rows="15" cols="66" readonly="readonly"> <?php $detail_args = ""; switch ($detail) { @@ -391,6 +398,7 @@ include("fbegin.inc"); } } ?> + </font> </td> </tr> </table> @@ -400,3 +408,5 @@ include("fbegin.inc"); <?php include("fend.inc"); ?> +</body> +</html> diff --git a/usr/local/www/diag_pf_info.php b/usr/local/www/diag_pf_info.php index ce7bd90..de57667 100644 --- a/usr/local/www/diag_pf_info.php +++ b/usr/local/www/diag_pf_info.php @@ -59,8 +59,10 @@ include("head.inc"); ?> <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> +<?php include("fbegin.inc"); ?> <script type="text/javascript"> jQuery(document).ready(function() {setTimeout('getpfinfo()', 5000);}); +//<![CDATA[ function getpfinfo() { jQuery.ajax({ type: "POST", @@ -71,43 +73,41 @@ jQuery(document).ready(function() {setTimeout('getpfinfo()', 5000);}); }); } function activitycallback(transport) { - jQuery('#pfactivitydiv').html('<font face="Courier"><font size="2"><b><pre style="text-align:left;">' + transport.responseText + '</pre></font>'); + jQuery('#pfactivitydiv').html('<font face="Courier" size="2"><pre style="text-align:left;">' + transport.responseText + '<\/pre><\/font>'); setTimeout('getpfinfo()', 2000); } +//]]> </script> -<div id='maincontent'> +<div id="maincontent"> <?php - include("fbegin.inc"); if($savemsg) { - echo "<div id='savemsg'>"; + echo "<div id=\"savemsg\">"; print_info_box($savemsg); echo "</div>"; } if ($input_errors) print_input_errors($input_errors); ?> -<table width="100%" border="0" cellpadding="0" cellspacing="0"> +<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="diag pf info"> <tr> <td> - <table id="backuptable" class="tabcont" align="center" width="100%" border="0" cellpadding="6" cellspacing="0"> + <table id="backuptable" class="tabcont" align="center" width="100%" border="0" cellpadding="6" cellspacing="0" summary="tabcont"> <tr> - <td> - <center> - <table> + <td align="center"> + <table summary="results"> <tr><td> - <div name='pfactivitydiv' id='pfactivitydiv'> - <b><?=gettext("Gathering PF information, please wait...");?> + <div id="pfactivitydiv"> + <?=gettext("Gathering PF information, please wait...");?> </div> </td></tr> </table> </td> </tr> </table> - </div> </td> </tr> </table> -</form> +</div> <?php include("fend.inc"); ?> </body> </html> diff --git a/usr/local/www/diag_ping.php b/usr/local/www/diag_ping.php index e2e8a85..d74feac 100644 --- a/usr/local/www/diag_ping.php +++ b/usr/local/www/diag_ping.php @@ -85,25 +85,25 @@ if (!isset($do_ping)) { include("head.inc"); ?> <body link="#000000" vlink="#000000" alink="#000000"> <?php include("fbegin.inc"); ?> -<table width="100%" border="0" cellpadding="0" cellspacing="0"> +<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="ping"> <tr><td> <?php if ($input_errors) print_input_errors($input_errors); ?> <form action="diag_ping.php" method="post" name="iform" id="iform"> -<table width="100%" border="0" cellpadding="6" cellspacing="0"> +<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="tabcont"> <tr> <td colspan="2" valign="top" class="listtopic"><?=gettext("Ping"); ?></td> </tr> <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("Host"); ?></td> <td width="78%" class="vtable"> - <?=$mandfldhtml;?><input name="host" type="text" class="formfldunknown" id="host" size="20" value="<?=htmlspecialchars($host);?>"></td> + <?=$mandfldhtml;?><input name="host" type="text" class="formfldunknown" id="host" size="20" value="<?=htmlspecialchars($host);?>" /></td> </tr> <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("IP Protocol"); ?></td> <td width="78%" class="vtable"> <select name="ipproto" class="formselect"> - <option value="ipv4" <?php if ($ipproto == "ipv4") echo 'selected="selected"' ?>>IPv4</option> - <option value="ipv6" <?php if ($ipproto == "ipv6") echo 'selected="selected"' ?>>IPv6</option> + <option value="ipv4" <?php if ($ipproto == "ipv4") echo "selected=\"selected\"" ?>>IPv4</option> + <option value="ipv6" <?php if ($ipproto == "ipv6") echo "selected=\"selected\"" ?>>IPv6</option> </select> </td> </tr> @@ -116,7 +116,7 @@ include("head.inc"); ?> foreach ($sourceips as $sip): $selected = ""; if (!link_interface_to_bridge($sip['value']) && ($sip['value'] == $sourceip)) - $selected = 'selected="selected"'; + $selected = "selected=\"selected\""; ?> <option value="<?=$sip['value'];?>" <?=$selected;?>> <?=htmlspecialchars($sip['name']);?> @@ -130,7 +130,7 @@ include("head.inc"); ?> <td width="78%" class="vtable"> <select name="count" class="formfld" id="count"> <?php for ($i = 1; $i <= MAX_COUNT; $i++): ?> - <option value="<?=$i;?>" <?php if ($i == $count) echo "selected"; ?>><?=$i;?></option> + <option value="<?=$i;?>" <?php if ($i == $count) echo "selected=\"selected\""; ?>><?=$i;?></option> <?php endfor; ?> </select> </td> @@ -138,15 +138,24 @@ include("head.inc"); ?> <tr> <td width="22%" valign="top"> </td> <td width="78%"> - <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Ping"); ?>"> + <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Ping"); ?>" /> </td> </tr> <tr> <td valign="top" colspan="2"> <?php if ($do_ping) { - echo "<font face='terminal' size='2'>"; + echo "<font face=\"terminal\" size=\"2\">"; echo "<strong>" . gettext("Ping output") . ":</strong><br />"; - echo('<pre>'); +?> + <script type="text/javascript"> + //<![CDATA[ + window.onload=function(){ + document.getElementById("pingCaptured").wrap='off'; + } + //]]> + </script> +<?php + echo "<textarea id=\"pingCaptured\" style=\"width:98%\" name=\"code\" rows=\"15\" cols=\"66\" readonly=\"readonly\">"; $ifscope = ''; $command = "/sbin/ping"; if ($ipproto == "ipv6") { @@ -166,7 +175,7 @@ include("head.inc"); ?> $cmd = "{$command} {$srcip} -c" . escapeshellarg($count) . " " . escapeshellarg($host); //echo "Ping command: {$cmd}\n"; system($cmd); - echo('</pre>'); + echo('</textarea> </font>'); } ?> </td> @@ -180,3 +189,5 @@ include("head.inc"); ?> </td></tr> </table> <?php include("fend.inc"); ?> +</body> +</html> diff --git a/usr/local/www/diag_routes.php b/usr/local/www/diag_routes.php index 8dc01ad..d62e55a 100644 --- a/usr/local/www/diag_routes.php +++ b/usr/local/www/diag_routes.php @@ -75,6 +75,8 @@ include('head.inc'); ?> <body link="#000000" vlink="#000000" alink="#000000"> +<?php include("fbegin.inc"); ?> + <script type="text/javascript"> //<![CDATA[ @@ -105,7 +107,7 @@ include('head.inc'); var elements = 8; var tr_class = ''; - var thead = '<tr><td class="listtopic" colspan="' + elements + '"><strong>' + section + '</strong></td></tr>' + "\n"; + var thead = '<tr><td class="listtopic" colspan="' + elements + '"><strong>' + section + '<\/strong><\/td><\/tr>' + "\n"; for (var i = 0; i < responseTextArr.length; i++) { if (responseTextArr[i] == "") continue; @@ -124,15 +126,15 @@ include('head.inc'); continue; if (i == 0 && j == (elements - 1)) tr_class = 'listhdr'; - tmp += '<td class="' + tr_class + '">' + entry[k] + '</td>' + "\n"; + tmp += '<td class="' + tr_class + '">' + entry[k] + '<\/td>' + "\n"; if (i > 0) tr_class = 'listr'; j++; } // The 'Expire' field might be blank if (j == (elements - 1)) - tmp += '<td class="listr"> </td>' + "\n"; - tmp += '</tr>' + "\n"; + tmp += '<td class="listr"> <\/td>' + "\n"; + tmp += '<\/tr>' + "\n"; if (i == 0) thead += tmp; else @@ -145,8 +147,6 @@ include('head.inc'); //]]> </script> -<?php include("fbegin.inc"); ?> - <script type="text/javascript"> //<![CDATA[ @@ -162,12 +162,12 @@ include('head.inc'); <div id="mainarea"> <form action="diag_routes.php" method="post"> -<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="6"> +<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="6" summary="diag routes"> <tr> <td class="vncellreq" width="22%"><?=gettext("Name resolution");?></td> <td class="vtable" width="78%"> -<input type="checkbox" class="formfld" id="resolve" name="resolve" value="yes" <?php if ($_POST['resolve'] == 'yes') echo 'checked'; ?> /><?=gettext("Enable");?> +<input type="checkbox" class="formfld" id="resolve" name="resolve" value="yes" <?php if ($_POST['resolve'] == 'yes') echo "checked=\"checked\""; ?> /><?=gettext("Enable");?> <br /> <span class="expl"><?=gettext("Enable this to attempt to resolve names when displaying the tables.");?></span> </td> @@ -179,7 +179,7 @@ include('head.inc'); <select id="limit" name="limit"> <?php foreach (array("10", "50", "100", "200", "500", "1000", gettext("all")) as $item) { - echo "<option value=\"{$item}\" " . ($item == "100" ? "selected" : "") . ">{$item}</option>\n"; + echo "<option value=\"{$item}\" " . ($item == "100" ? "selected=\"selected\"" : "") . ">{$item}</option>\n"; } ?> </select> @@ -210,7 +210,7 @@ include('head.inc'); </table> </form> -<table class="tabcont sortable" width="100%" cellspacing="0" cellpadding="6" border="0" id="IPv4"> +<table class="tabcont sortable" width="100%" cellspacing="0" cellpadding="6" border="0" id="IPv4" summary="ipv4 routes"> <thead> <tr><td class="listtopic"><strong>IPv4</strong></td></tr> </thead> @@ -218,7 +218,7 @@ include('head.inc'); <tr><td class="listhdrr"><?=gettext("Gathering data, please wait...");?></td></tr> </tbody> </table> -<table class="tabcont sortable" width="100%" cellspacing="0" cellpadding="6" border="0" id="IPv6"> +<table class="tabcont sortable" width="100%" cellspacing="0" cellpadding="6" border="0" id="IPv6" summary="ipv6 routes"> <thead> <tr><td class="listtopic"><strong>IPv6</strong></td></tr> </thead> @@ -232,3 +232,6 @@ include('head.inc'); <?php include('fend.inc'); ?> + +</body> +</html> diff --git a/usr/local/www/diag_system_pftop.php b/usr/local/www/diag_system_pftop.php index a4674cb..2afcd7b 100644 --- a/usr/local/www/diag_system_pftop.php +++ b/usr/local/www/diag_system_pftop.php @@ -91,8 +91,10 @@ if($_REQUEST['sorttype'] && in_array($_REQUEST['sorttype'], $sorttypes) ?> <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> +<?php include("fbegin.inc"); ?> <form method="post" action="diag_system_pftop.php"> <script type="text/javascript"> +//<![CDATA[ function getpftopactivity() { var url = "/diag_system_pftop.php"; var pars = 'getactivity=yes&sorttype=' + jQuery('#sorttype').val() + '&viewtype=' + jQuery('#viewtype').val() + '&states=' + jQuery('#states').val(); @@ -105,86 +107,83 @@ if($_REQUEST['sorttype'] && in_array($_REQUEST['sorttype'], $sorttypes) }); } function activitycallback(transport) { - jQuery('#pftopactivitydiv').html('<font face="Courier"><font size="2"><b><pre style="text-align:left;">' + transport.responseText + '</pre></font>'); + jQuery('#pftopactivitydiv').html('<font face="Courier" size="2"><pre style="text-align:left;">' + transport.responseText + '<\/pre><\/font>'); setTimeout('getpftopactivity()', 2500); } setTimeout('getpftopactivity()', 1000); +//]]> </script> -<div id='maincontent'> +<div id="maincontent"> <?php - include("fbegin.inc"); if($savemsg) { - echo "<div id='savemsg'>"; + echo "<div id=\"savemsg\">"; print_info_box($savemsg); echo "</div>"; } if ($input_errors) print_input_errors($input_errors); ?> - <form method="post"> <div id="mainarea" style="padding-bottom: 0px;"> - <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0"> + <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0" summary="diag system pftop"> <tr> <td class="list"> <div id='viewtypediv'><?=gettext("View type:"); ?> <select name='viewtype' id='viewtype'> - <option value='default' <?php echo ($viewtype == "default") ? "selected" : ""; ?>><?=gettext("Default");?></option> - <option value='label' <?php echo ($viewtype == "label") ? "selected" : ""; ?>><?=gettext("Label");?></option> - <option value='long' <?php echo ($viewtype == "long") ? "selected" : ""; ?>><?=gettext("Long");?></option> - <option value='queue' <?php echo ($viewtype == "queue") ? "selected" : ""; ?>><?=gettext("Queue");?></option> - <option value='rules' <?php echo ($viewtype == "rules") ? "selected" : ""; ?>><?=gettext("Rules");?></option> - <option value='size' <?php echo ($viewtype == "size") ? "selected" : ""; ?>><?=gettext("Size");?></option> - <option value='speed' <?php echo ($viewtype == "speed") ? "selected" : ""; ?>><?=gettext("Speed");?></option> - <option value='state' <?php echo ($viewtype == "state") ? "selected" : ""; ?>><?=gettext("State");?></option> - <option value='time' <?php echo ($viewtype == "time") ? "selected" : ""; ?>><?=gettext("Time");?></option> + <option value='default' <?php echo ($viewtype == "default") ? "selected=\"selected\"" : ""; ?>><?=gettext("Default");?></option> + <option value='label' <?php echo ($viewtype == "label") ? "selected=\"selected\"" : ""; ?>><?=gettext("Label");?></option> + <option value='long' <?php echo ($viewtype == "long") ? "selected=\"selected\"" : ""; ?>><?=gettext("Long");?></option> + <option value='queue' <?php echo ($viewtype == "queue") ? "selected=\"selected\"" : ""; ?>><?=gettext("Queue");?></option> + <option value='rules' <?php echo ($viewtype == "rules") ? "selected=\"selected\"" : ""; ?>><?=gettext("Rules");?></option> + <option value='size' <?php echo ($viewtype == "size") ? "selected=\"selected\"" : ""; ?>><?=gettext("Size");?></option> + <option value='speed' <?php echo ($viewtype == "speed") ? "selected=\"selected\"" : ""; ?>><?=gettext("Speed");?></option> + <option value='state' <?php echo ($viewtype == "state") ? "selected=\"selected\"" : ""; ?>><?=gettext("State");?></option> + <option value='time' <?php echo ($viewtype == "time") ? "selected=\"selected\"" : ""; ?>><?=gettext("Time");?></option> </select> </div> </td> <td class="list"> <div id='sorttypediv'><?=gettext("Sort type:"); ?> <select name='sorttype' id='sorttype'> - <option value='age' <?php echo ($sorttype == "age") ? "selected" : ""; ?>><?=gettext("Age");?></option> - <option value='bytes' <?php echo ($sorttype == "bytes") ? "selected" : ""; ?>><?=gettext("Bytes");?></option> - <option value='dest' <?php echo ($sorttype == "dest") ? "selected" : ""; ?>><?=gettext("Destination Address");?></option> - <option value='dport' <?php echo ($sorttype == "dport") ? "selected" : ""; ?>><?=gettext("Destination Port");?></option> - <option value='exp' <?php echo ($sorttype == "exp") ? "selected" : ""; ?>><?=gettext("Expiry");?></option> - <option value='none' <?php echo ($sorttype == "none") ? "selected" : ""; ?>><?=gettext("None");?></option> - <option value='peak' <?php echo ($sorttype == "peak") ? "selected" : ""; ?>><?=gettext("Peak");?></option> - <option value='pkt' <?php echo ($sorttype == "pkt") ? "selected" : ""; ?>><?=gettext("Packet");?></option> - <option value='rate' <?php echo ($sorttype == "rate") ? "selected" : ""; ?>><?=gettext("Rate");?></option> - <option value='size' <?php echo ($sorttype == "size") ? "selected" : ""; ?>><?=gettext("Size");?></option> - <option value='sport' <?php echo ($sorttype == "sport") ? "selected" : ""; ?>><?=gettext("Source Port");?></option> - <option value='src' <?php echo ($sorttype == "src") ? "selected" : ""; ?>><?=gettext("Source Address");?></option> + <option value='age' <?php echo ($sorttype == "age") ? "selected=\"selected\"" : ""; ?>><?=gettext("Age");?></option> + <option value='bytes' <?php echo ($sorttype == "bytes") ? "selected=\"selected\"" : ""; ?>><?=gettext("Bytes");?></option> + <option value='dest' <?php echo ($sorttype == "dest") ? "selected=\"selected\"" : ""; ?>><?=gettext("Destination Address");?></option> + <option value='dport' <?php echo ($sorttype == "dport") ? "selected=\"selected\"" : ""; ?>><?=gettext("Destination Port");?></option> + <option value='exp' <?php echo ($sorttype == "exp") ? "selected=\"selected\"" : ""; ?>><?=gettext("Expiry");?></option> + <option value='none' <?php echo ($sorttype == "none") ? "selected=\"selected\"" : ""; ?>><?=gettext("None");?></option> + <option value='peak' <?php echo ($sorttype == "peak") ? "selected=\"selected\"" : ""; ?>><?=gettext("Peak");?></option> + <option value='pkt' <?php echo ($sorttype == "pkt") ? "selected=\"selected\"" : ""; ?>><?=gettext("Packet");?></option> + <option value='rate' <?php echo ($sorttype == "rate") ? "selected=\"selected\"" : ""; ?>><?=gettext("Rate");?></option> + <option value='size' <?php echo ($sorttype == "size") ? "selected=\"selected\"" : ""; ?>><?=gettext("Size");?></option> + <option value='sport' <?php echo ($sorttype == "sport") ? "selected=\"selected\"" : ""; ?>><?=gettext("Source Port");?></option> + <option value='src' <?php echo ($sorttype == "src") ? "selected=\"selected\"" : ""; ?>><?=gettext("Source Address");?></option> </select> </div> </td> <td class="list"> <div id='statesdiv'><?=gettext("Number of States:"); ?> <select name='states' id='states'> - <option value='50' <?php echo ($numstate == "50") ? "selected" : ""; ?>>50</option> - <option value='100' <?php echo ($numstate == "100") ? "selected" : ""; ?>>100</option> - <option value='200' <?php echo ($numstate == "200") ? "selected" : ""; ?>>200</option> - <option value='500' <?php echo ($numstate == "500") ? "selected" : ""; ?>>500</option> - <option value='1000' <?php echo ($numstate == "1000") ? "selected" : ""; ?>>1000</option> - <option value='all' <?php echo ($numstate == "all") ? "selected" : ""; ?>>all</option> + <option value='50' <?php echo ($numstate == "50") ? "selected=\"selected\"" : ""; ?>>50</option> + <option value='100' <?php echo ($numstate == "100") ? "selected=\"selected\"" : ""; ?>>100</option> + <option value='200' <?php echo ($numstate == "200") ? "selected=\"selected\"" : ""; ?>>200</option> + <option value='500' <?php echo ($numstate == "500") ? "selected=\"selected\"" : ""; ?>>500</option> + <option value='1000' <?php echo ($numstate == "1000") ? "selected=\"selected\"" : ""; ?>>1000</option> + <option value='all' <?php echo ($numstate == "all") ? "selected=\"selected\"" : ""; ?>>all</option> </select> </div> </td> </tr> <tr> - <td colspan=3 align=center> - <table id="backuptable" class="tabcont" align="center" width="100%" border="0" cellpadding="6" cellspacing="0"> + <td colspan="3" align="center"> + <table id="backuptable" class="tabcont" align="center" width="100%" border="0" cellpadding="6" cellspacing="0" summary="tabcont"> <tr> - <td> - <center> - <table> + <td align="center"> + <table summary="results"> <tr> <td> - <div name='pftopactivitydiv' id='pftopactivitydiv'><b><?=gettext("Gathering pfTOP activity, please wait...");?></div> + <div id="pftopactivitydiv"><?=gettext("Gathering pfTOP activity, please wait...");?></div> </td> </tr> </table> - </center> </td> </tr> </table> @@ -192,9 +191,11 @@ if($_REQUEST['sorttype'] && in_array($_REQUEST['sorttype'], $sorttypes) </tr> </table> </div> +</div> </form> <?php include("fend.inc"); ?> <script type="text/javascript"> +//<![CDATA[ jQuery("#viewtype").change(function() { var selected = jQuery("#viewtype option:selected"); switch(selected.val()) { @@ -207,6 +208,7 @@ jQuery("#viewtype").change(function() { jQuery("#sorttype, #sorttypediv, #statesdiv, #states").show(); } }); +//]]> </script> </body> </html> diff --git a/usr/local/www/edit.php b/usr/local/www/edit.php index f48b9bf..17729b6 100644 --- a/usr/local/www/edit.php +++ b/usr/local/www/edit.php @@ -86,17 +86,19 @@ if($_POST['action']) { exit; } +$closehead = false; require("head.inc"); outputCSSFileInline("code-syntax-highlighter/SyntaxHighlighter.css"); outputJavaScriptFileInline("filebrowser/browser.js"); outputJavaScriptFileInline("javascript/base64.js"); ?> - +</head> <body link="#000000" vlink="#000000" alink="#000000"> <?php include("fbegin.inc"); ?> <script type="text/javascript"> +//<![CDATA[ function loadFile() { jQuery("#fileStatus").html("<?=gettext("Loading file"); ?> ..."); jQuery("#fileStatusBox").show(500); @@ -159,6 +161,7 @@ outputJavaScriptFileInline("javascript/base64.js"); } ); } +//]]> </script> <!-- file status box --> @@ -170,12 +173,12 @@ outputJavaScriptFileInline("javascript/base64.js"); <br /> -<table width="100%" border="0" cellpadding="0" cellspacing="0"> +<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="file editor"> <tr> <td class="tabcont" align="center"> <!-- controls --> -<table width="100%" cellpadding="9" cellspacing="9"> +<table width="100%" cellpadding="9" cellspacing="9" summary="controls"> <tr> <td align="center" class="list"> <?=gettext("Save / Load from path"); ?>: @@ -197,11 +200,18 @@ outputJavaScriptFileInline("javascript/base64.js"); <div id="fbBrowser" style="display:none; border:1px dashed gray; width:98%;"></div> <!-- file viewer/editor --> -<table width="100%"> +<table width="100%" summary="file editor"> <tr> <td valign="top"> <div style="background:#eeeeee;" id="fileOutput"> - <textarea id="fileContent" name="fileContent" style="width:100%;" rows="30" wrap="off"></textarea> + <script type="text/javascript"> + //<![CDATA[ + window.onload=function(){ + document.getElementById("fileContent").wrap='off'; + } + //]]> + </script> + <textarea id="fileContent" name="fileContent" style="width:100%;" rows="30" cols=""></textarea> </div> </td> </tr> @@ -217,6 +227,7 @@ outputJavaScriptFileInline("javascript/base64.js"); <script type="text/javascript" src="/code-syntax-highlighter/shBrushPhp.js"></script> <script type="text/javascript" src="/code-syntax-highlighter/shBrushXml.js"></script> <script type="text/javascript"> +//<![CDATA[ jQuery(window).load( function() { jQuery("#fbTarget").focus(); @@ -234,6 +245,7 @@ outputJavaScriptFileInline("javascript/base64.js"); } ); <?php endif; ?> +//]]> </script> <?php include("fend.inc"); ?> diff --git a/usr/local/www/exec.php b/usr/local/www/exec.php index 42ee97c..c1eb4bb 100644 --- a/usr/local/www/exec.php +++ b/usr/local/www/exec.php @@ -90,12 +90,13 @@ $ScriptName = $REQUEST['SCRIPT_NAME']; $arrDT = localtime(); $intYear = $arrDT[5] + 1900; +$closehead = false; $pgtitle = array(gettext("Diagnostics"),gettext("Execute command")); include("head.inc"); ?> <script type="text/javascript"> -<!-- +//<![CDATA[ // Create recall buffer array (of encoded strings). @@ -182,10 +183,10 @@ if (isBlank( $_POST['txtRecallBuffer'] )) { return true; } -//--> +//]]> </script> -<style> -<!-- +<style type="text/css"> +/*<![CDATA[*/ input { font-family: courier new, courier; @@ -215,7 +216,7 @@ pre { font-size: 11px; } ---> +/*]]>*/ </style> </head> <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> @@ -235,7 +236,7 @@ if (!isBlank($_POST['txtCommand'])) { $ph = popen($_POST['txtCommand'] . ' 2>&1', "r" ); while ($line = fgets($ph)) echo htmlspecialchars($line); pclose($ph); - puts("</pre>"); + puts(" </pre>"); } @@ -244,28 +245,28 @@ if (!isBlank($_POST['txtPHPCommand'])) { require_once("config.inc"); require_once("functions.inc"); echo eval($_POST['txtPHPCommand']); - puts("</pre>"); + puts(" </pre>"); } ?> <div id="niftyOutter"> -<form action="exec.php" method="post" enctype="multipart/form-data" name="frmExecPlus" onSubmit="return frmExecPlus_onSubmit( this );"> - <table> +<form action="exec.php" method="post" enctype="multipart/form-data" name="frmExecPlus" onsubmit="return frmExecPlus_onSubmit( this );"> + <table summary="exec"> <tr> <td colspan="2" valign="top" class="vnsepcell"><?=gettext("Execute Shell command"); ?></td> </tr> <tr> <td class="label" align="right"><?=gettext("Command"); ?>:</td> - <td class="type"><input id="txtCommand" name="txtCommand" type="text" class="formfld unknown" size="80" value="<?=htmlspecialchars($_POST['txtCommand']);?>"></td> + <td class="type"><input id="txtCommand" name="txtCommand" type="text" class="formfld unknown" size="80" value="<?=htmlspecialchars($_POST['txtCommand']);?>" /></td> </tr> <tr> <td valign="top"> </td> <td valign="top" class="label"> - <input type="hidden" name="txtRecallBuffer" value="<?=htmlspecialchars($_POST['txtRecallBuffer']) ?>"> - <input type="button" class="button" name="btnRecallPrev" value="<" onClick="btnRecall_onClick( this.form, -1 );"> - <input type="submit" class="button" value="<?=gettext("Execute"); ?>"> - <input type="button" class="button" name="btnRecallNext" value=">" onClick="btnRecall_onClick( this.form, 1 );"> - <input type="button" class="button" value="<?=gettext("Clear"); ?>" onClick="return Reset_onClick( this.form );"> + <input type="hidden" name="txtRecallBuffer" value="<?=htmlspecialchars($_POST['txtRecallBuffer']) ?>" /> + <input type="button" class="button" name="btnRecallPrev" value="<" onclick="btnRecall_onClick( this.form, -1 );" /> + <input type="submit" class="button" value="<?=gettext("Execute"); ?>" /> + <input type="button" class="button" name="btnRecallNext" value=">" onclick="btnRecall_onClick( this.form, 1 );" /> + <input type="button" class="button" value="<?=gettext("Clear"); ?>" onclick="return Reset_onClick( this.form );" /> </td> </tr> <tr> @@ -277,12 +278,12 @@ if (!isBlank($_POST['txtPHPCommand'])) { <tr> <td align="right"><?=gettext("File to download"); ?>:</td> <td> - <input name="dlPath" type="text" class="formfld file" id="dlPath" size="50"> + <input name="dlPath" type="text" class="formfld file" id="dlPath" size="50" /> </td></tr> <tr> <td valign="top"> </td> <td valign="top" class="label"> - <input name="submit" type="submit" class="button" id="download" value="<?=gettext("Download"); ?>"> + <input name="submit" type="submit" class="button" id="download" value="<?=gettext("Download"); ?>" /> </td> </tr> <tr> @@ -294,12 +295,12 @@ if (!isBlank($_POST['txtPHPCommand'])) { <tr> <td align="right"><?=gettext("File to upload"); ?>:</td> <td valign="top" class="label"> - <input name="ulfile" type="file" class="formfld file" id="ulfile"> + <input name="ulfile" type="file" class="formfld file" id="ulfile" /> </td></tr> <tr> <td valign="top"> </td> <td valign="top" class="label"> - <input name="submit" type="submit" class="button" id="upload" value="<?=gettext("Upload"); ?>"></td> + <input name="submit" type="submit" class="button" id="upload" value="<?=gettext("Upload"); ?>" /></td> </tr> <tr> <td colspan="2" valign="top" height="16"></td> @@ -309,23 +310,26 @@ if (!isBlank($_POST['txtPHPCommand'])) { </tr> <tr> <td align="right"><?=gettext("Command"); ?>:</td> - <td class="type"><textarea id="txtPHPCommand" name="txtPHPCommand" type="text" rows="9" cols="80"><?=htmlspecialchars($_POST['txtPHPCommand']);?></textarea></td> + <td class="type"><textarea id="txtPHPCommand" name="txtPHPCommand" rows="9" cols="80"><?=htmlspecialchars($_POST['txtPHPCommand']);?></textarea></td> </tr> <tr> <td valign="top"> </td> <td valign="top" class="label"> - <input type="submit" class="button" value="<?=gettext("Execute"); ?>"> + <input type="submit" class="button" value="<?=gettext("Execute"); ?>" /> <p> <strong><?=gettext("Example"); ?>:</strong> interfaces_carp_setup(); + </p> </td> </tr> </table> +</form> </div> <?php include("fend.inc"); ?> -</form> -<script language="Javascript"> +<script type="text/javascript"> +//<![CDATA[ document.forms[0].txtCommand.focus(); +//]]> </script> </body> </html> diff --git a/usr/local/www/halt.php b/usr/local/www/halt.php index 442a2da..cd3de11 100755 --- a/usr/local/www/halt.php +++ b/usr/local/www/halt.php @@ -66,8 +66,8 @@ include('head.inc'); <form action="halt.php" method="post"> <p><strong><?=gettext("Are you sure you want to halt the system?");?></strong></p> <p> - <input name="Submit" type="submit" class="formbtn" value=" <?=gettext("Yes"); ?> "> - <input name="Submit" type="submit" class="formbtn" value=" <?=gettext("No"); ?> "> + <input name="Submit" type="submit" class="formbtn" value=" <?=gettext("Yes"); ?> " /> + <input name="Submit" type="submit" class="formbtn" value=" <?=gettext("No"); ?> " /> </p> </form> <?php endif; ?> diff --git a/usr/local/www/includes/functions.inc.php b/usr/local/www/includes/functions.inc.php index 7ad0ed9..78043e8 100644 --- a/usr/local/www/includes/functions.inc.php +++ b/usr/local/www/includes/functions.inc.php @@ -191,9 +191,29 @@ function get_temp() { return $temp_out; } -function disk_usage() { +/* Get mounted filesystems and usage. Do not display entries for virtual filesystems (e.g. devfs, nullfs, unionfs) */ +function get_mounted_filesystems() { + $mout = ""; + $filesystems = array(); + exec("/bin/df -Tht ufs,zfs,cd9660 | /usr/bin/awk '{print $1, $2, $3, $6, $7;}'", $mout); + + /* Get rid of the header */ + array_shift($mout); + foreach ($mout as $fs) { + $f = array(); + list($f['device'], $f['type'], $f['total_size'], $f['percent_used'], $f['mountpoint']) = explode(' ', $fs); + + /* We dont' want the trailing % sign. */ + $f['percent_used'] = trim($f['percent_used'], '%'); + + $filesystems[] = $f; + } + return $filesystems; +} + +function disk_usage($slice = '/') { $dfout = ""; - exec("/bin/df -h | /usr/bin/grep -w '/' | /usr/bin/awk '{ print $5 }' | /usr/bin/cut -d '%' -f 1", $dfout); + exec("/bin/df -h {$slice} | /usr/bin/tail -n 1 | /usr/bin/awk '{ print $5 }' | /usr/bin/cut -d '%' -f 1", $dfout); $diskusage = trim($dfout[0]); return $diskusage; diff --git a/usr/local/www/pkg_mgr.php b/usr/local/www/pkg_mgr.php index 73dd917..4afb295 100644 --- a/usr/local/www/pkg_mgr.php +++ b/usr/local/www/pkg_mgr.php @@ -202,7 +202,11 @@ include("head.inc"); /* get history/changelog git dir */ $commit_dir=explode("/",$index['config_file']); - $changeloglink ="https://github.com/pfsense/pfsense-packages/commits/master/config/".$commit_dir[(count($commit_dir)-2)]; + $changeloglink = "https://github.com/pfsense/pfsense-packages/commits/master/config/"; + if ($commit_dir[(count($commit_dir)-2)] == "config") + $changeloglink .= $commit_dir[(count($commit_dir)-1)]; + else + $changeloglink .= $commit_dir[(count($commit_dir)-2)]; /* Check package info link */ if($index['pkginfolink']) { diff --git a/usr/local/www/reboot.php b/usr/local/www/reboot.php index f809b94..1a9a52a 100755 --- a/usr/local/www/reboot.php +++ b/usr/local/www/reboot.php @@ -49,10 +49,10 @@ $pgtitle = array(gettext("Diagnostics"),gettext("Reboot System")); include("head.inc"); ?> +<body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <?php include("fbegin.inc"); ?> <?php if ($_POST['Submit'] == " " . gettext("Yes") . " "): ?> <meta http-equiv=\"refresh\" content=\"70;url=/\"> -<body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <?php print_info_box(gettext("The system is rebooting now. This may take one minute.")); ?> <pre> <?php system_reboot(); ?> @@ -61,8 +61,8 @@ include("head.inc"); <form action="reboot.php" method="post"> <p><strong><?=gettext("Are you sure you want to reboot the system?");?></strong></p> <p> - <input name="Submit" type="submit" class="formbtn" value=" <?=gettext("Yes");?> "> - <input name="Submit" type="submit" class="formbtn" value=" <?=gettext("No");?> "> + <input name="Submit" type="submit" class="formbtn" value=" <?=gettext("Yes");?> " /> + <input name="Submit" type="submit" class="formbtn" value=" <?=gettext("No");?> " /> </p> </form> <?php endif; ?> diff --git a/usr/local/www/services_captiveportal_filemanager.php b/usr/local/www/services_captiveportal_filemanager.php index 1f4c659..7f756a3 100644 --- a/usr/local/www/services_captiveportal_filemanager.php +++ b/usr/local/www/services_captiveportal_filemanager.php @@ -172,7 +172,7 @@ include("head.inc"); <tr> <td class="listlr"><?=htmlspecialchars($element['name']);?></td> <td class="listr" align="right"><?=format_bytes($element['size']);?></td> - <td valign="middle" nowrap class="list"> + <td valign="middle" class="list nowrap"> <a href="services_captiveportal_filemanager.php?zone=<?=$cpzone;?>&act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this file?"); ?>')"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete file"); ?>" width="17" height="17" border="0" alt="delete" /></a> </td> </tr> diff --git a/usr/local/www/services_captiveportal_vouchers.php b/usr/local/www/services_captiveportal_vouchers.php index b25b784..28dcfcf 100644 --- a/usr/local/www/services_captiveportal_vouchers.php +++ b/usr/local/www/services_captiveportal_vouchers.php @@ -487,7 +487,7 @@ function enable_change(enable_change) { <td class="listr"> <?=htmlspecialchars($rollent['descr']); ?> </td> - <td valign="middle" nowrap class="list"> + <td valign="middle" class="list nowrap"> <div id='addeditdelete<?=$i?>'> <?php if ($pconfig['enable']): ?> <a href="services_captiveportal_vouchers_edit.php?zone=<?=$cpzone;?>&id=<?=$i; ?>"><img src="/themes/<?=$g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit voucher"); ?>" width="17" height="17" border="0" alt="<?=gettext("edit voucher"); ?>" /></a> diff --git a/usr/local/www/status_captiveportal.php b/usr/local/www/status_captiveportal.php index 994445e..918f6dc 100644 --- a/usr/local/www/status_captiveportal.php +++ b/usr/local/www/status_captiveportal.php @@ -117,7 +117,7 @@ $mac_man = load_mac_manufacturer_table(); <td class="tabcont"> <?php endif; ?> -<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0"> +<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0" summary="main area"> <tr> <td width="20%" class="vncell" valign="top"> <br /><?=gettext("Captive Portal Zone"); ?><br/><br /> @@ -125,11 +125,11 @@ $mac_man = load_mac_manufacturer_table(); <td class="vncell" width="30%" align="center"> <form action="status_captiveportal.php" method="post" enctype="multipart/form-data" name="form1" id="form1"> <select name="zone" class="formselect" onchange="document.form1.submit()"> - echo "<option value="">none</option>\n"; + <option value="">none</option> <?php foreach ($a_cp as $cpkey => $cp) { - echo "<option value='{$cpkey}' "; + echo "<option value=\"{$cpkey}\" "; if ($cpzone == $cpkey) - echo "selected"; + echo "selected=\"selected\""; echo ">" . htmlspecialchars($cp['zone']) . "</option>\n"; } ?> @@ -139,7 +139,7 @@ $mac_man = load_mac_manufacturer_table(); </td> <td colspan="3" width="50%"></td> </tr> - <tr><td colspan="5"><br /></tr> + <tr><td colspan="5"><br /></td></tr> <?php if (!empty($cpzone)): ?> <tr> <td colspan="5" valign="top" class="listtopic"><?=gettext("Captiveportal status");?></td> @@ -152,7 +152,7 @@ $mac_man = load_mac_manufacturer_table(); <td class="listhdrr"><a href="?zone=<?=$cpzone?>&order=start&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Session start");?></a></td> <td class="listhdr"><a href="?zone=<?=$cpzone?>&order=lastact&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Last activity");?></a></td> <?php else: ?> - <td class="listhdr"><a href="?zone=<?=$cpzone?>&order=start&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Session start");?></a></td> + <td class="listhdr" colspan="2"><a href="?zone=<?=$cpzone?>&order=start&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Session start");?></a></td> <?php endif; ?> <td class="list sort_ignore"></td> </tr> @@ -174,8 +174,10 @@ $mac_man = load_mac_manufacturer_table(); <?php if ($_GET['showact']): $last_act = captiveportal_get_last_activity($cpent[2], $cpent[3]); ?> <td class="listr"><?php if ($last_act != 0) echo htmlspecialchars(date("m/d/Y H:i:s", $last_act));?></td> + <?php else: ?> + <td class="listr" colspan="2"><?=htmlspecialchars(date("m/d/Y H:i:s", $cpent[0]));?></td> <?php endif; ?> - <td valign="middle" class="list" nowrap> + <td valign="middle" class="list nowrap"> <a href="?zone=<?=$cpzone;?>&order=<?=$_GET['order'];?>&showact=<?=htmlspecialchars($_GET['showact']);?>&act=del&id=<?=$cpent[5];?>" onclick="return confirm('<?=gettext("Do you really want to disconnect this client?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("Disconnect");?>"></a> </td> </tr> diff --git a/usr/local/www/status_captiveportal_expire.php b/usr/local/www/status_captiveportal_expire.php index d4de544..2083ff0 100644 --- a/usr/local/www/status_captiveportal_expire.php +++ b/usr/local/www/status_captiveportal_expire.php @@ -58,8 +58,9 @@ $a_cp =& $config['captiveportal']; $pgtitle = array(gettext("Status"), gettext("Captive portal"), gettext("Expire Vouchers"), $a_cp[$cpzone]['zone']); include("head.inc"); -include("fbegin.inc"); ?> +<body> +<?php include("fbegin.inc"); ?> <form action="status_captiveportal_expire.php" method="post" enctype="multipart/form-data" name="iform" id="iform"> <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="tab pane"> @@ -81,37 +82,38 @@ include("fbegin.inc"); <tr> <td valign="top" class="vncellreq"><?=gettext("Voucher(s)"); ?></td> <td class="vtable"> - <textarea name="vouchers" cols="65" rows="3" type="text" id="vouchers" class="formpre"><?=htmlspecialchars($_POST['vouchers']);?></textarea> + <textarea name="vouchers" cols="65" rows="3" id="vouchers" class="formpre"><?=htmlspecialchars($_POST['vouchers']);?></textarea> <br /> <?=gettext("Enter multiple vouchers separated by space or newline. All valid vouchers will be marked as expired"); ?>.</td> </tr> <tr> <td width="22%" valign="top"> </td> <td width="78%"> - <input name="zone" type="hidden" value="<?=htmlspecialchars($cpzone);?>"> - <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Submit"); ?>"> + <input name="zone" type="hidden" value="<?=htmlspecialchars($cpzone);?>" /> + <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Submit"); ?>" /> </td> </tr> </table> </td></tr></table> </form> -<p> +<br/> <?php if ($_POST) { if ($_POST['vouchers']) { $result = voucher_expire($_POST['vouchers']); - echo "<p><table border=\"0\" cellspacing=\"0\" cellpadding=\"4\" width=\"100%\">\n"; + echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"4\" width=\"100%\" summary=\"results\">\n"; if ( $result) { - echo "<tr><td bgcolor=\"#D9DEE8\"><img src=\"/themes/{$g['theme']}/images/icons/icon_pass.gif\"></td>"; + echo "<tr><td bgcolor=\"#D9DEE8\"><img src=\"/themes/{$g['theme']}/images/icons/icon_pass.gif\" alt=\"pass\" /></td>"; echo "<td bgcolor=\"#D9DEE8\">Success</td></tr>"; } else { - echo "<tr><td bgcolor=\"#FFD9D1\"><img src=\"/themes/{$g['theme']}/images/icons/icon_block.gif\"></td>"; + echo "<tr><td bgcolor=\"#FFD9D1\"><img src=\"/themes/{$g['theme']}/images/icons/icon_block.gif\" alt=\"block\" /></td>"; echo "<td bgcolor=\"#FFD9D1\">Error</td></tr>"; } - echo "</table></p>"; + echo "</table>"; } } include("fend.inc"); ?> - +</body> +</html> diff --git a/usr/local/www/status_captiveportal_test.php b/usr/local/www/status_captiveportal_test.php index 47d64c9..dd065ad 100644 --- a/usr/local/www/status_captiveportal_test.php +++ b/usr/local/www/status_captiveportal_test.php @@ -59,9 +59,9 @@ $pgtitle = array(gettext("Status"), gettext("Captive portal"), gettext("Test Vou $shortcut_section = "captiveportal-vouchers"; include("head.inc"); -include("fbegin.inc"); - ?> +<body> +<?php include("fbegin.inc"); ?> <form action="status_captiveportal_test.php" method="post" enctype="multipart/form-data" name="iform" id="iform"> <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="tab pane"> @@ -83,38 +83,40 @@ include("fbegin.inc"); <tr> <td valign="top" class="vncellreq"><?=gettext("Voucher(s)"); ?></td> <td class="vtable"> - <textarea name="vouchers" cols="65" rows="3" type="text" id="vouchers" class="formpre"><?=htmlspecialchars($_POST['vouchers']);?></textarea> + <textarea name="vouchers" cols="65" rows="3" id="vouchers" class="formpre"><?=htmlspecialchars($_POST['vouchers']);?></textarea> <br /> <?=gettext("Enter multiple vouchers separated by space or newline. The remaining time, if valid, will be shown for each voucher"); ?>.</td> </tr> <tr> <td width="22%" valign="top"> </td> <td width="78%"> - <input name="zone" type="hidden" value="<?=htmlspecialchars($cpzone);?>"> - <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Submit"); ?>"> + <input name="zone" type="hidden" value="<?=htmlspecialchars($cpzone);?>" /> + <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Submit"); ?>" /> </td> </tr> </table> </td></tr></table> </form> -<p> +<br/> <?php if ($_POST) { if ($_POST['vouchers']) { $test_results = voucher_auth($_POST['vouchers'], 1); - echo "<p><table border=\"0\" cellspacing=\"0\" cellpadding=\"4\" width=\"100%\">\n"; + echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"4\" width=\"100%\" summary=\"results\">\n"; foreach ($test_results as $result) { if (strpos($result, " good ") || strpos($result, " granted ")) { - echo "<tr><td bgcolor=\"#D9DEE8\"><img src=\"/themes/{$g['theme']}/images/icons/icon_pass.gif\"></td>"; + echo "<tr><td bgcolor=\"#D9DEE8\"><img src=\"/themes/{$g['theme']}/images/icons/icon_pass.gif\" alt=\"pass\" /></td>"; echo "<td bgcolor=\"#D9DEE8\">$result</td></tr>"; } else { - echo "<tr><td bgcolor=\"#FFD9D1\"><img src=\"/themes/{$g['theme']}/images/icons/icon_block.gif\"></td>"; + echo "<tr><td bgcolor=\"#FFD9D1\"><img src=\"/themes/{$g['theme']}/images/icons/icon_block.gif\" alt=\"block\" /></td>"; echo "<td bgcolor=\"#FFD9D1\">$result</td></tr>"; } } - echo "</table></p>"; + echo "</table>"; } } include("fend.inc"); ?> +</body> +</html> diff --git a/usr/local/www/status_captiveportal_voucher_rolls.php b/usr/local/www/status_captiveportal_voucher_rolls.php index 216ecb4..3b7f40a 100644 --- a/usr/local/www/status_captiveportal_voucher_rolls.php +++ b/usr/local/www/status_captiveportal_voucher_rolls.php @@ -63,8 +63,9 @@ if (!is_array($config['voucher'][$cpzone]['roll'])) { $a_roll = &$config['voucher'][$cpzone]['roll']; include("head.inc"); -include("fbegin.inc"); ?> +<body> +<?php include("fbegin.inc"); ?> <form action="status_captiveportal_voucher_rolls.php" method="post" enctype="multipart/form-data" name="iform" id="iform"> <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="tab pane"> @@ -132,3 +133,5 @@ include("fbegin.inc"); </table> </form> <?php include("fend.inc"); ?> +</body> +</html> diff --git a/usr/local/www/status_captiveportal_vouchers.php b/usr/local/www/status_captiveportal_vouchers.php index b52e1c8..663ead1 100644 --- a/usr/local/www/status_captiveportal_vouchers.php +++ b/usr/local/www/status_captiveportal_vouchers.php @@ -97,8 +97,9 @@ if ($_GET['order']) { } include("head.inc"); -include("fbegin.inc"); ?> +<body> +<?php include("fbegin.inc"); ?> <form action="status_captiveportal_vouchers.php" method="post" enctype="multipart/form-data" name="iform" id="iform"> <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="tab pane"> @@ -118,11 +119,11 @@ include("fbegin.inc"); <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="content pane"> <tr> - <td class="listhdrr"><a href="?order=0&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Voucher"); ?></a></td> - <td class="listhdrr"><a href="?order=1&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Roll"); ?></a></td> - <td class="listhdrr"><a href="?order=2&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Activated at"); ?></a></td> - <td class="listhdrr"><a href="?order=3&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Expires in"); ?></a></td> - <td class="listhdr"><a href="?order=4&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Expires at"); ?></a></td> + <td class="listhdrr"><a href="?order=0&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Voucher"); ?></a></td> + <td class="listhdrr"><a href="?order=1&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Roll"); ?></a></td> + <td class="listhdrr"><a href="?order=2&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Activated at"); ?></a></td> + <td class="listhdrr"><a href="?order=3&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Expires in"); ?></a></td> + <td class="listhdr"><a href="?order=4&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Expires at"); ?></a></td> <td class="list"></td> </tr> <?php foreach ($db as $dbent): ?> @@ -141,3 +142,5 @@ include("fbegin.inc"); </table> </form> <?php include("fend.inc"); ?> +</body> +</html> diff --git a/usr/local/www/status_dhcp_leases.php b/usr/local/www/status_dhcp_leases.php index edd445e..6acc42c 100644 --- a/usr/local/www/status_dhcp_leases.php +++ b/usr/local/www/status_dhcp_leases.php @@ -294,7 +294,7 @@ if ($_GET['order']) /* only print pool status when we have one */ if(count($pools) > 0) { ?> -<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0"> +<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0" summary="dhcp leases"> <tr> <td class="listhdrr"><?=gettext("Failover Group"); ?></a></td> <td class="listhdrr"><?=gettext("My State"); ?></a></td> @@ -305,11 +305,11 @@ if(count($pools) > 0) { <?php foreach ($pools as $data) { echo "<tr>\n"; - echo "<td class=\"listlr\">{$fspans}{$data['name']}{$fspane} </td>\n"; - echo "<td class=\"listr\">{$fspans}{$data['mystate']}{$fspane} </td>\n"; - echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['mydate']) . "{$fspane} </td>\n"; - echo "<td class=\"listr\">{$fspans}{$data['peerstate']}{$fspane} </td>\n"; - echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['peerdate']) . "{$fspane} </td>\n"; + echo "<td class=\"listlr\">{$fspans}{$data['name']}{$fspane}</td>\n"; + echo "<td class=\"listr\">{$fspans}{$data['mystate']}{$fspane}</td>\n"; + echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['mydate']) . "{$fspane}</td>\n"; + echo "<td class=\"listr\">{$fspans}{$data['peerstate']}{$fspane}</td>\n"; + echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['peerdate']) . "{$fspane}</td>\n"; echo "<td class=\"list\" valign=\"middle\" width=\"17\"> </td>\n"; echo "<td class=\"list\" valign=\"middle\" width=\"17\"> </td>\n"; echo "</tr>\n"; @@ -323,9 +323,9 @@ foreach ($pools as $data) { } ?> -<p> +<br/> -<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0"> +<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0" summary="dhcp leases"> <tr> <td class="listhdrr"><a href="#"><?=gettext("IP address"); ?></a></td> <td class="listhdrr"><a href="#"><?=gettext("MAC address"); ?></a></td> @@ -342,9 +342,10 @@ foreach ($leases as $data) { if (($data['act'] == "active") || ($data['act'] == "static") || ($_GET['all'] == 1)) { if ($data['act'] != "active" && $data['act'] != "static") { $fspans = "<span class=\"gray\">"; - $fspane = "</span>"; + $fspane = " </span>"; } else { - $fspans = $fspane = ""; + $fspans = ""; + $fspane = " "; } $lip = ip2ulong($data['ip']); if ($data['act'] == "static") { @@ -372,64 +373,63 @@ foreach ($leases as $data) { } } echo "<tr>\n"; - echo "<td class=\"listlr\">{$fspans}{$data['ip']}{$fspane} </td>\n"; + echo "<td class=\"listlr\">{$fspans}{$data['ip']}{$fspane}</td>\n"; $mac=$data['mac']; $mac_hi = strtoupper($mac[0] . $mac[1] . $mac[3] . $mac[4] . $mac[6] . $mac[7]); if ($data['online'] != "online") { if(isset($mac_man[$mac_hi])){ // Manufacturer for this MAC is defined - echo "<td class=\"listr\">{$fspans}<a href=\"services_wol.php?if={$data['if']}&mac=$mac\" title=\"" . gettext("$mac - send Wake on LAN packet to this MAC address") ."\">{$mac}</a><br /><font size=\"-2\"><i>{$mac_man[$mac_hi]}</i></font>{$fspane} </td>\n"; + echo "<td class=\"listr\">{$fspans}<a href=\"services_wol.php?if={$data['if']}&mac=$mac\" title=\"" . gettext("$mac - send Wake on LAN packet to this MAC address") ."\">{$mac}</a><br /><font size=\"-2\"><i>{$mac_man[$mac_hi]}</i></font>{$fspane}</td>\n"; }else{ - echo "<td class=\"listr\">{$fspans}<a href=\"services_wol.php?if={$data['if']}&mac={$data['mac']}\" title=\"" . gettext("send Wake on LAN packet to this MAC address") ."\">{$data['mac']}</a>{$fspane} </td>\n"; + echo "<td class=\"listr\">{$fspans}<a href=\"services_wol.php?if={$data['if']}&mac={$data['mac']}\" title=\"" . gettext("send Wake on LAN packet to this MAC address") ."\">{$data['mac']}</a>{$fspane}</td>\n"; } }else{ if(isset($mac_man[$mac_hi])){ // Manufacturer for this MAC is defined - echo "<td class=\"listr\">{$fspans}{$mac}<br /><font size=\"-2\"><i>{$mac_man[$mac_hi]}</i></font>{$fspane} </td>\n"; + echo "<td class=\"listr\">{$fspans}{$mac}<br /><font size=\"-2\"><i>{$mac_man[$mac_hi]}</i></font>{$fspane}</td>\n"; }else{ - echo "<td class=\"listr\">{$fspans}{$data['mac']}{$fspane} </td>\n"; + echo "<td class=\"listr\">{$fspans}{$data['mac']}{$fspane}</td>\n"; } } - echo "<td class=\"listr\">{$fspans}" . htmlentities($data['hostname']) . "{$fspane} </td>\n"; + echo "<td class=\"listr\">{$fspans}" . htmlentities($data['hostname']) . "{$fspane}</td>\n"; if ($data['type'] != "static") { - echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['start']) . "{$fspane} </td>\n"; - echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['end']) . "{$fspane} </td>\n"; + echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['start']) . "{$fspane}</td>\n"; + echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['end']) . "{$fspane}</td>\n"; } else { - echo "<td class=\"listr\">{$fspans} n/a {$fspane} </td>\n"; - echo "<td class=\"listr\">{$fspans} n/a {$fspane} </td>\n"; + echo "<td class=\"listr\">{$fspans} n/a {$fspane}</td>\n"; + echo "<td class=\"listr\">{$fspans} n/a {$fspane}</td>\n"; } - echo "<td class=\"listr\">{$fspans}{$data['online']}{$fspane} </td>\n"; - echo "<td class=\"listr\">{$fspans}{$data['act']}{$fspane} </td>\n"; - + echo "<td class=\"listr\">{$fspans}{$data['online']}{$fspane}</td>\n"; + echo "<td class=\"listr\">{$fspans}{$data['act']}{$fspane}</td>\n"; + echo "<td valign=\"middle\"> "; if ($data['type'] == "dynamic") { - echo "<td valign=\"middle\"><a href=\"services_dhcp_edit.php?if={$data['if']}&mac={$data['mac']}&hostname={$data['hostname']}\">"; - echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_plus.gif\" width=\"17\" height=\"17\" border=\"0\" title=\"" . gettext("add a static mapping for this MAC address") ."\"></a></td>\n"; + echo "<a href=\"services_dhcp_edit.php?if={$data['if']}&mac={$data['mac']}&hostname={$data['hostname']}\">"; + echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_plus.gif\" width=\"17\" height=\"17\" border=\"0\" title=\"" . gettext("add a static mapping for this MAC address") ."\" alt=\"add\" /></a> \n"; } else { - echo "<td class=\"list\" valign=\"middle\">"; - echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_plus_mo.gif\" width=\"17\" height=\"17\" border=\"0\"></td>\n"; + echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_plus_mo.gif\" width=\"17\" height=\"17\" border=\"0\" alt=\"add\" /> \n"; } - echo "<td valign=\"middle\"><a href=\"services_wol_edit.php?if={$data['if']}&mac={$data['mac']}&descr={$data['hostname']}\">"; - echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_wol_all.gif\" width=\"17\" height=\"17\" border=\"0\" title=\"" . gettext("add a Wake on LAN mapping for this MAC address") ."\"></a></td>\n"; + echo "<a href=\"services_wol_edit.php?if={$data['if']}&mac={$data['mac']}&descr={$data['hostname']}\">"; + echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_wol_all.gif\" width=\"17\" height=\"17\" border=\"0\" title=\"" . gettext("add a Wake on LAN mapping for this MAC address") ."\" alt=\"add\" /></a> \n"; /* Only show the button for offline dynamic leases */ if (($data['type'] == "dynamic") && ($data['online'] != "online")) { - echo "<td class=\"list\" valign=\"middle\"><a href=\"status_dhcp_leases.php?deleteip={$data['ip']}&all=" . htmlspecialchars($_GET['all']) . "\">"; - echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_x.gif\" width=\"17\" height=\"17\" border=\"0\" title=\"" . gettext("delete this DHCP lease") . "\"></a></td>\n"; + echo "<a href=\"status_dhcp_leases.php?deleteip={$data['ip']}&all=" . htmlspecialchars($_GET['all']) . "\">"; + echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_x.gif\" width=\"17\" height=\"17\" border=\"0\" title=\"" . gettext("delete this DHCP lease") . "\" alt=\"delete\" /></a> \n"; } - echo "</tr>\n"; + echo "</td></tr>\n"; } } ?> </table> -<p> +<br/> <form action="status_dhcp_leases.php" method="get"> -<input type="hidden" name="order" value="<?=htmlspecialchars($_GET['order']);?>"> +<input type="hidden" name="order" value="<?=htmlspecialchars($_GET['order']);?>" /> <?php if ($_GET['all']): ?> -<input type="hidden" name="all" value="0"> -<input type="submit" class="formbtn" value="<?=gettext("Show active and static leases only"); ?>"> +<input type="hidden" name="all" value="0" /> +<input type="submit" class="formbtn" value="<?=gettext("Show active and static leases only"); ?>" /> <?php else: ?> -<input type="hidden" name="all" value="1"> -<input type="submit" class="formbtn" value="<?=gettext("Show all configured leases"); ?>"> +<input type="hidden" name="all" value="1" /> +<input type="submit" class="formbtn" value="<?=gettext("Show all configured leases"); ?>" /> <?php endif; ?> </form> <?php if($leases == 0): ?> diff --git a/usr/local/www/status_dhcpv6_leases.php b/usr/local/www/status_dhcpv6_leases.php index 3fa58a6..b925029 100644 --- a/usr/local/www/status_dhcpv6_leases.php +++ b/usr/local/www/status_dhcpv6_leases.php @@ -379,7 +379,7 @@ if ($_GET['order']) /* only print pool status when we have one */ if(count($pools) > 0) { ?> -<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0"> +<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0" summary="dhcp leases"> <tr> <td class="listhdrr"><?=gettext("Failover Group"); ?></a></td> <td class="listhdrr"><?=gettext("My State"); ?></a></td> @@ -390,11 +390,11 @@ if(count($pools) > 0) { <?php foreach ($pools as $data) { echo "<tr>\n"; - echo "<td class=\"listlr\">{$fspans}{$data['name']}{$fspane} </td>\n"; - echo "<td class=\"listr\">{$fspans}{$data['mystate']}{$fspane} </td>\n"; - echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['mydate']) . "{$fspane} </td>\n"; - echo "<td class=\"listr\">{$fspans}{$data['peerstate']}{$fspane} </td>\n"; - echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['peerdate']) . "{$fspane} </td>\n"; + echo "<td class=\"listlr\">{$fspans}{$data['name']}{$fspane}</td>\n"; + echo "<td class=\"listr\">{$fspans}{$data['mystate']}{$fspane}</td>\n"; + echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['mydate']) . "{$fspane}</td>\n"; + echo "<td class=\"listr\">{$fspans}{$data['peerstate']}{$fspane}</td>\n"; + echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['peerdate']) . "{$fspane}</td>\n"; echo "<td class=\"list\" valign=\"middle\" width=\"17\"> </td>\n"; echo "<td class=\"list\" valign=\"middle\" width=\"17\"> </td>\n"; echo "</tr>\n"; @@ -408,9 +408,9 @@ foreach ($pools as $data) { } ?> -<p> +<br/> -<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0"> +<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0" summary="dhcp leases"> <tr> <td class="listhdrr"><a href="#"><?=gettext("IPv6 address"); ?></a></td> <td class="listhdrr"><a href="#"><?=gettext("IAID"); ?></a></td> @@ -426,9 +426,10 @@ foreach ($leases as $data) { if (($data['act'] == "active") || ($data['act'] == "static") || ($_GET['all'] == 1)) { if ($data['act'] != "active" && $data['act'] != "static") { $fspans = "<span class=\"gray\">"; - $fspane = "</span>"; + $fspane = " </span>"; } else { - $fspans = $fspane = ""; + $fspans = ""; + $fspane = " "; } if ($data['act'] == "static") { @@ -449,9 +450,9 @@ foreach ($leases as $data) { $data['if'] = convert_real_interface_to_friendly_interface_name(guess_interface_from_ip($data['ip'])); } echo "<tr>\n"; - echo "<td class=\"listlr\">{$fspans}{$data['ip']}{$fspane} </td>\n"; - echo "<td class=\"listr\">{$fspans}{$data['iaid']}{$fspane} </td>\n"; - echo "<td class=\"listr\">{$fspans}{$data['duid']}{$fspane} </td>\n"; + echo "<td class=\"listlr\">{$fspans}{$data['ip']}{$fspane}</td>\n"; + echo "<td class=\"listr\">{$fspans}{$data['iaid']}{$fspane}</td>\n"; + echo "<td class=\"listr\">{$fspans}{$data['duid']}{$fspane}</td>\n"; echo "<td class=\"listr\">{$fspans}"; if (!empty($data['hostname'])) { echo htmlentities($data['hostname']) . "<br />"; @@ -466,36 +467,36 @@ foreach ($leases as $data) { echo "{$fspane} </td>\n"; if ($data['type'] != "static") { - echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['start']) . "{$fspane} </td>\n"; - echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['end']) . "{$fspane} </td>\n"; + echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['start']) . "{$fspane}</td>\n"; + echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['end']) . "{$fspane}</td>\n"; } else { - echo "<td class=\"listr\">{$fspans} n/a {$fspane} </td>\n"; - echo "<td class=\"listr\">{$fspans} n/a {$fspane} </td>\n"; + echo "<td class=\"listr\">{$fspans} n/a {$fspane}</td>\n"; + echo "<td class=\"listr\">{$fspans} n/a {$fspane}</td>\n"; } - echo "<td class=\"listr\">{$fspans}{$data['online']}{$fspane} </td>\n"; - echo "<td class=\"listr\">{$fspans}{$data['act']}{$fspane} </td>\n"; + echo "<td class=\"listr\">{$fspans}{$data['online']}{$fspane}</td>\n"; + echo "<td class=\"listr\">{$fspans}{$data['act']}{$fspane}</td>\n"; if ($data['type'] == "dynamic") { - echo "<td valign=\"middle\"><a href=\"services_dhcpv6_edit.php?if={$data['if']}&duid={$data['duid']}&hostname={$data['hostname']}\">"; - echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_plus.gif\" width=\"17\" height=\"17\" border=\"0\" title=\"" . gettext("add a static mapping for this MAC address") ."\"></a></td>\n"; + echo "<td valign=\"middle\"><a href=\"services_dhcpv6_edit.php?if={$data['if']}&duid={$data['duid']}&hostname={$data['hostname']}\">"; + echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_plus.gif\" width=\"17\" height=\"17\" border=\"0\" title=\"" . gettext("add a static mapping for this MAC address") ."\" alt=\"add\" /></a></td>\n"; } else { echo "<td class=\"list\" valign=\"middle\">"; - echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_plus_mo.gif\" width=\"17\" height=\"17\" border=\"0\"></td>\n"; + echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_plus_mo.gif\" width=\"17\" height=\"17\" border=\"0\" alt=\"add\" /></td>\n"; } /* Only show the button for offline dynamic leases */ if (($data['type'] == "dynamic") && ($data['online'] != "online")) { - echo "<td class=\"list\" valign=\"middle\"><a href=\"status_dhcpv6_leases.php?deleteip={$data['ip']}&all=" . htmlspecialchars($_GET['all']) . "\">"; - echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_x.gif\" width=\"17\" height=\"17\" border=\"0\" title=\"" . gettext("delete this DHCP lease") . "\"></a></td>\n"; + echo "<td class=\"list\" valign=\"middle\"><a href=\"status_dhcpv6_leases.php?deleteip={$data['ip']}&all=" . htmlspecialchars($_GET['all']) . "\">"; + echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_x.gif\" width=\"17\" height=\"17\" border=\"0\" title=\"" . gettext("delete this DHCP lease") . "\" alt=\"delete\" /></a></td>\n"; } echo "</tr>\n"; } } ?> </table> -<p> +<br/> <h3>Delegated Prefixes</h3> -<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0"> +<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0" summary="prefixes"> <tr> <td class="listhdrr"><a href="#"><?=gettext("IPv6 Prefix"); ?></a></td> <td class="listhdrr"><a href="#"><?=gettext("IAID"); ?></a></td> @@ -509,9 +510,10 @@ foreach ($prefixes as $data) { if (($data['act'] == "active") || ($data['act'] == "static") || ($_GET['all'] == 1)) { if ($data['act'] != "active" && $data['act'] != "static") { $fspans = "<span class=\"gray\">"; - $fspane = "</span>"; + $fspane = " </span>"; } else { - $fspans = $fspane = ""; + $fspans = ""; + $fspane = " "; } if ($data['act'] == "static") { @@ -535,31 +537,31 @@ foreach ($prefixes as $data) { if ($mappings[$data['iaid'] . $data['duid']]) { $dip = "<br />Routed To: {$mappings[$data['iaid'] . $data['duid']]}"; } - echo "<td class=\"listlr\">{$fspans}{$data['prefix']}{$dip}{$fspane} </td>\n"; - echo "<td class=\"listr\">{$fspans}{$data['iaid']}{$fspane} </td>\n"; - echo "<td class=\"listr\">{$fspans}{$data['duid']}{$fspane} </td>\n"; + echo "<td class=\"listlr\">{$fspans}{$data['prefix']}{$dip}{$fspane}</td>\n"; + echo "<td class=\"listr\">{$fspans}{$data['iaid']}{$fspane}</td>\n"; + echo "<td class=\"listr\">{$fspans}{$data['duid']}{$fspane}</td>\n"; if ($data['type'] != "static") { - echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['start']) . "{$fspane} </td>\n"; - echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['end']) . "{$fspane} </td>\n"; + echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['start']) . "{$fspane}</td>\n"; + echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['end']) . "{$fspane}</td>\n"; } else { - echo "<td class=\"listr\">{$fspans} n/a {$fspane} </td>\n"; - echo "<td class=\"listr\">{$fspans} n/a {$fspane} </td>\n"; + echo "<td class=\"listr\">{$fspans} n/a {$fspane}</td>\n"; + echo "<td class=\"listr\">{$fspans} n/a {$fspane}</td>\n"; } - echo "<td class=\"listr\">{$fspans}{$data['act']}{$fspane} </td>\n"; + echo "<td class=\"listr\">{$fspans}{$data['act']}{$fspane}</td>\n"; echo "</tr>\n"; } } ?> </table> -<p> -<form action="status_dhcpv6_leases.php" method="GET"> -<input type="hidden" name="order" value="<?=htmlspecialchars($_GET['order']);?>"> +<br/> +<form action="status_dhcpv6_leases.php" method="get"> +<input type="hidden" name="order" value="<?=htmlspecialchars($_GET['order']);?>" /> <?php if ($_GET['all']): ?> -<input type="hidden" name="all" value="0"> -<input type="submit" class="formbtn" value="<?=gettext("Show active and static leases only"); ?>"> +<input type="hidden" name="all" value="0" /> +<input type="submit" class="formbtn" value="<?=gettext("Show active and static leases only"); ?>" /> <?php else: ?> -<input type="hidden" name="all" value="1"> -<input type="submit" class="formbtn" value="<?=gettext("Show all configured leases"); ?>"> +<input type="hidden" name="all" value="1" /> +<input type="submit" class="formbtn" value="<?=gettext("Show all configured leases"); ?>" /> <?php endif; ?> </form> <?php if($leases == 0): ?> diff --git a/usr/local/www/status_filter_reload.php b/usr/local/www/status_filter_reload.php index 4575a19..9b04716 100644 --- a/usr/local/www/status_filter_reload.php +++ b/usr/local/www/status_filter_reload.php @@ -70,27 +70,28 @@ include("head.inc"); <?php include("fbegin.inc"); ?> <br /> <form action="status_filter_reload.php" method="post" name="filter"> -<input type="submit" value="Reload Filter" name="reloadfilter" id="reloadfilter"> +<input type="submit" value="Reload Filter" name="reloadfilter" id="reloadfilter" /> <?php if ($config['hasync'] && $config['hasync']["synchronizetoip"] != ""): ?> -<input type="submit" value="Force Config Sync" name="syncfilter" id="syncfilter"> +<input type="submit" value="Force Config Sync" name="syncfilter" id="syncfilter" /> <?php endif; ?> </form> <br /><br /><br /> -<div id="status" name="status" style="padding:5px; border:1px dashed #990000; background-color: #ffffff; color: #000000;"> +<div id="status" style="padding:5px; border:1px dashed #990000; background-color: #ffffff; color: #000000;"> <?php echo $status; ?> </div> -<div id="doneurl" name="doneurl"> +<div id="doneurl"> </div> -<p> +<br/> -<div id="reloadinfo" name="reloadinfo"><?=gettext("This page will automatically refresh every 3 seconds until the filter is done reloading"); ?>.</div> +<div id="reloadinfo"><?=gettext("This page will automatically refresh every 3 seconds until the filter is done reloading"); ?>.</div> <script type="text/javascript"> +//<![CDATA[ /* init update "thread */ function update_status_thread() { getURL('status_filter_reload.php?getstatus=true', update_data); @@ -102,24 +103,26 @@ function update_data(obj) { result_text = result_text.replace("\n",""); result_text = result_text.replace("\r",""); if (result_text) { - jQuery('#status').html('<img src="/themes/<?=$g['theme'];?>/images/misc/loader.gif"> ' + result_text + '...'); + jQuery('#status').html('<img src="/themes/<?=$g['theme'];?>/images/misc/loader.gif" alt="loader" /> ' + result_text + '...'); } else { - jQuery('#status').html('<img src="/themes/<?=$g['theme'];?>/images/misc/loader.gif"> Obtaining filter status...'); + jQuery('#status').html('<img src="/themes/<?=$g['theme'];?>/images/misc/loader.gif" alt="loader" /> Obtaining filter status...'); } if(result_text == "Initializing") { - jQuery('#status').html('<img src="/themes/<?=$g['theme'];?>/images/misc/loader.gif"> Initializing...'); + jQuery('#status').html('<img src="/themes/<?=$g['theme'];?>/images/misc/loader.gif" alt="loader" /> Initializing...'); } else if(result_text == "Done") { jQuery('#status').effect('highlight'); jQuery('#status').html('Done. The filter rules have been reloaded.'); jQuery('#reloadinfo').css("visibility","hidden"); jQuery('#doneurl').css("visibility","visible"); - jQuery('#doneurl').html("<p/><a href='status_queues.php'>Queue Status</a>"); + jQuery('#doneurl').html("<p><a href='status_queues.php'>Queue Status<\/a><\/p>"); } window.setTimeout('update_status_thread()', 2500); } +//]]> </script> <script type="text/javascript"> +//<![CDATA[ /* * getURL is a proprietary Adobe function, but it's simplicity has made it very * popular. If getURL is undefined we spin our own by wrapping XMLHttpRequest. @@ -164,6 +167,7 @@ if (typeof getURL == 'undefined') { } } window.setTimeout('update_status_thread()', 2500); +//]]> </script> <?php include("fend.inc"); ?> diff --git a/usr/local/www/status_graph.php b/usr/local/www/status_graph.php index 9ef7144..ada2fe1 100644 --- a/usr/local/www/status_graph.php +++ b/usr/local/www/status_graph.php @@ -115,9 +115,10 @@ include("head.inc"); ?> <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> +<?php include("fbegin.inc"); ?> <script type="text/javascript"> - +//<![CDATA[ function updateBandwidth(){ var hostinterface = jQuery("#if").val(); var sorting = jQuery("#sort").val(); @@ -190,11 +191,9 @@ function updateBandwidthHosts(data){ setTimeout('updateBandwidth()', 1000); } - - +//]]> </script> -<?php include("fbegin.inc"); ?> <?php /* link the ipsec interface magically */ @@ -208,7 +207,7 @@ if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enabl <?php foreach ($ifdescrs as $ifn => $ifd) { echo "<option value=\"$ifn\""; - if ($ifn == $curif) echo " selected"; + if ($ifn == $curif) echo " selected=\"selected\""; echo ">" . htmlspecialchars($ifd) . "</option>\n"; } ?> @@ -216,28 +215,34 @@ foreach ($ifdescrs as $ifn => $ifd) { , Sort by: <select id="sort" name="sort" class="formselect" style="z-index: -10;" onchange="document.form1.submit()"> <option value="">Bw In</option> - <option value="out"<?php if ($cursort == "out") echo " selected";?>>Bw Out</option> + <option value="out"<?php if ($cursort == "out") echo " selected=\"selected\"";?>>Bw Out</option> </select> , Filter: <select id="filter" name="filter" class="formselect" style="z-index: -10;" onchange="document.form1.submit()"> - <option value="local"<?php if ($curfilter == "local") echo " selected";?>>Local</option> - <option value="remote"<?php if ($curfilter == "remote") echo " selected";?>>Remote</option> - <option value="all"<?php if ($curfilter == "all") echo " selected";?>>All</option> + <option value="local"<?php if ($curfilter == "local") echo " selected=\"selected\"";?>>Local</option> + <option value="remote"<?php if ($curfilter == "remote") echo " selected=\"selected\"";?>>Remote</option> + <option value="all"<?php if ($curfilter == "all") echo " selected=\"selected\"";?>>All</option> </select> , Display: <select id="hostipformat" name="hostipformat" class="formselect" style="z-index: -10;" onchange="document.form1.submit()"> <option value="">IP Address</option> <option value="hostname"<?php if ($curhostipformat == "hostname") echo " selected";?>>Host Name</option> - <option value="fqdn"<?php if ($curhostipformat == "fqdn") echo " selected";?>>FQDN</option> + <option value="fqdn"<?php if ($curhostipformat == "fqdn") echo " selected=\"selected\"";?>>FQDN</option> </select> </form> -<p> +<p> </p> <div id="niftyOutter"> <div id="col1" style="float: left; width: 46%; padding: 5px; position: relative;"> - <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" /> + <object data="graph.php?ifnum=<?=htmlspecialchars($curif);?>&ifname=<?=rawurlencode($ifdescrs[htmlspecialchars($curif)]);?>"> + <param name="id" value="graph" /> + <param name="type" value="image/svg+xml" /> + <param name="width" value="<? echo $width; ?>" /> + <param name="height" value="<? echo $height; ?>" /> + <param name="pluginspage" value="http://www.adobe.com/svg/viewer/install/auto" /> + </object> </div> <div id="col2" style="float: right; width: 48%; padding: 5px; position: relative;"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <table width="100%" border="0" cellspacing="0" cellpadding="0" summary="status"> <tr> <td class="listtopic" valign="top"><?=(($curhostipformat=="") ? gettext("Host IP") : gettext("Host Name or IP")); ?></td> <td class="listtopic" valign="top"><?=gettext("Bandwidth In"); ?></td> @@ -327,12 +332,14 @@ foreach ($ifdescrs as $ifn => $ifd) { </div> <div style="clear: both;"></div> </div> -<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><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> <?php include("fend.inc"); ?> <script type="text/javascript"> +//<![CDATA[ jQuery(document).ready(updateBandwidth); +//]]> </script> </body> </html> diff --git a/usr/local/www/status_lb_pool.php b/usr/local/www/status_lb_pool.php index 125ce89..0e39316 100644 --- a/usr/local/www/status_lb_pool.php +++ b/usr/local/www/status_lb_pool.php @@ -109,10 +109,10 @@ if ($_POST) { <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <?php include("fbegin.inc"); ?> <form action="status_lb_pool.php" method="post"> -<?php if (is_subsystem_dirty('loadbalancer')): ?><p> +<?php if (is_subsystem_dirty('loadbalancer')): ?><br/> <?php print_info_box_np(sprintf(gettext("The load balancer configuration has been changed%sYou must apply the changes in order for them to take effect."), "<br />"));?><br /> <?php endif; ?> -<table width="100%" border="0" cellpadding="0" cellspacing="0"> +<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="status load balancer pools"> <tr><td class="tabnavtbl"> <?php /* active tabs */ @@ -125,7 +125,7 @@ if ($_POST) { <tr> <td> <div id="mainarea"> - <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabcont sortable" name="sortabletable" id="sortabletable"> + <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabcont sortable" id="sortabletable" summary="main area"> <tr> <td width="10%" class="listhdrr"><?=gettext("Name");?></td> <td width="10%" class="listhdrr"><?=gettext("Mode");?></td> @@ -153,7 +153,7 @@ if ($_POST) { ?> </td> <td class="listr" align="center"> - <table border="0" cellpadding="2" cellspacing="0"> + <table border="0" cellpadding="2" cellspacing="0" summary="status"> <?php $pool_hosts=array(); foreach ((array) $pool['servers'] as $server) { @@ -175,7 +175,7 @@ if ($_POST) { switch ($server['ip']['state']) { case 'up': $bgcolor = "#90EE90"; // lightgreen - $checked = "checked"; + $checked = "checked=\"checked\""; break; case 'disabled': $bgcolor = "white"; @@ -183,19 +183,19 @@ if ($_POST) { break; default: $bgcolor = "#F08080"; // lightcoral - $checked = "checked"; + $checked = "checked=\"checked\""; } echo "<tr>"; switch ($pool['mode']) { case 'loadbalance': - echo "<td><input type='checkbox' name='{$pool['name']}|".str_replace('.', '_', $server['ip']['addr'])."' {$checked}></td>\n"; + echo "<td><input type=\"checkbox\" name=\"{$pool['name']}|" . str_replace('.', '_', $server['ip']['addr']) . "\" {$checked} /></td>\n"; break; case 'failover': - echo "<td><input type='radio' name='{$pool['name']}' value='{$server['ip']['addr']}' {$checked}></td>\n"; + echo "<td><input type=\"radio\" name=\"{$pool['name']}\" value=\"{$server['ip']['addr']}\" {$checked} /></td>\n"; break; } - echo "<td bgcolor={$bgcolor}> {$server['ip']['addr']}:{$pool['port']} </td><td bgcolor={$bgcolor}> "; -# echo "<td bgcolor={$bgcolor}> {$server['ip']['addr']}:{$pool['port']} "; + echo "<td bgcolor=\"{$bgcolor}\"> {$server['ip']['addr']}:{$pool['port']} </td><td bgcolor=\"{$bgcolor}\"> "; +# echo "<td bgcolor=\"{$bgcolor}\"> {$server['ip']['addr']}:{$pool['port']} "; if($server['ip']['avail']) echo " ({$server['ip']['avail']}) "; echo " </td></tr>"; @@ -214,13 +214,14 @@ if ($_POST) { <?php endforeach; ?> <tr> <td colspan="5"> - <input name="Submit" type="submit" class="formbtn" value="<?= gettext("Save"); ?>"> - <input name="Reset" type="reset" class="formbtn" value="<?= gettext("Reset"); ?>"> + <input name="Submit" type="submit" class="formbtn" value="<?= gettext("Save"); ?>" /> + <input name="Reset" type="reset" class="formbtn" value="<?= gettext("Reset"); ?>" /> </td> </tr> </table> </div> - </table> +</td></tr> +</table> </form> <?php include("fend.inc"); ?> </body> diff --git a/usr/local/www/status_lb_vs.php b/usr/local/www/status_lb_vs.php index 97b5588..814b924 100644 --- a/usr/local/www/status_lb_vs.php +++ b/usr/local/www/status_lb_vs.php @@ -59,7 +59,7 @@ include("head.inc"); ?> <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <?php include("fbegin.inc"); ?> -<table width="100%" border="0" cellpadding="0" cellspacing="0"> +<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="status load balancer virtual servers"> <tr><td class="tabnavtbl"> <?php /* active tabs */ @@ -72,10 +72,10 @@ include("head.inc"); <tr> <td> <div id="mainarea"> - <table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0"> + <table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0" summary="main area"> <tr> <td width="10%" class="listhdrr"><?=gettext("Name"); ?></td> - <td width="20%" class="listhdrr"><?=gettext("Address"); ?></td> + <td width="20%" class="listhdrr"><?=gettext("Address"); ?></td> <td width="10%" class="listhdrr"><?=gettext("Servers"); ?></td> <td width="25%" class="listhdrr"><?=gettext("Status"); ?></td> <td width="25%" class="listhdr"><?=gettext("Description"); ?></td> @@ -90,7 +90,7 @@ include("head.inc"); <br /> </td> <td class="listr" align="center" > - <table border="0" cellpadding="0" cellspacing="2"> + <table border="0" cellpadding="0" cellspacing="2" summary="servers"> <?php foreach ($a_pool as $vipent) { if ($vipent['name'] == $vsent['poolname']) { @@ -118,7 +118,7 @@ include("head.inc"); } ?> <td class="listr" nowrap> - <table border="0" cellpadding="3" cellspacing="2"> + <table border="0" cellpadding="3" cellspacing="2" summary="status"> <tr><td bgcolor="<?=$bgcolor?>"><?=$rdr_a[$vsent['name']]['status']?> </td></tr> </table> <?php @@ -137,7 +137,8 @@ include("head.inc"); <?php $i++; endforeach; ?> </table> </div> - </table> +</td></tr> +</table> <?php include("fend.inc"); ?> </body> diff --git a/usr/local/www/status_ntpd.php b/usr/local/www/status_ntpd.php index 49d89eb..c3e850f 100644 --- a/usr/local/www/status_ntpd.php +++ b/usr/local/www/status_ntpd.php @@ -162,12 +162,12 @@ include("head.inc"); ?> <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <?php include("fbegin.inc"); ?> -<table width="100%" border="0" cellpadding="0" cellspacing="0"> +<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="status ntpd"> <tr><td><div id="mainarea"> - <table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0"> + <table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0" summary="heading"> <tr><td class="listtopic">Network Time Protocol Status</td></tr> </table> - <table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0"> + <table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0" summary="main area"> <thead> <tr> <th class="listhdrr"><?=gettext("Status"); ?></th> @@ -195,37 +195,37 @@ include("head.inc"); <?php else: ?> <?php $i = 0; foreach ($ntpq_servers as $server): ?> <tr> - <td class="listlr" nowrap> + <td class="listlr nowrap"> <?=$server['status'];?> </td> - <td class="listlr"> + <td class="listr"> <?=$server['server'];?> </td> - <td class="listlr"> + <td class="listr"> <?=$server['refid'];?> </td> - <td class="listlr"> + <td class="listr"> <?=$server['stratum'];?> </td> - <td class="listlr"> + <td class="listr"> <?=$server['type'];?> </td> - <td class="listlr"> + <td class="listr"> <?=$server['when'];?> </td> - <td class="listlr"> + <td class="listr"> <?=$server['poll'];?> </td> - <td class="listlr"> + <td class="listr"> <?=$server['reach'];?> </td> - <td class="listlr"> + <td class="listr"> <?=$server['delay'];?> </td> - <td class="listlr"> + <td class="listr"> <?=$server['offset'];?> </td> - <td class="listlr"> + <td class="listr"> <?=$server['jitter'];?> </td> </tr> @@ -234,20 +234,20 @@ include("head.inc"); </table> <?php if (($gps_ok) && ($gps_lat) && ($gps_lon)): ?> <?php $gps_goo_lnk = 2; ?> - <table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0"> + <table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0" summary="gps status"> <thead> <tr> <th class="listhdrr"><?=gettext("Clock Latitude"); ?></th> <th class="listhdrr"><?=gettext("Clock Longitude"); ?></th> - <?php if (isset($gps_alt)) { echo '<th class="listhdrr">'.gettext("Clock Altitude").'</th>'; $gps_goo_lnk++;}?> - <?php if (isset($gps_sat) || isset($gps_satview)) { echo '<th class="listhdrr">'.gettext("Satellites").'</th>'; $gps_goo_lnk++;}?> + <?php if (isset($gps_alt)) { echo '<th class="listhdrr">' . gettext("Clock Altitude") . '</th>'; $gps_goo_lnk++;}?> + <?php if (isset($gps_sat) || isset($gps_satview)) { echo '<th class="listhdrr">' . gettext("Satellites") . '</th>'; $gps_goo_lnk++;}?> </tr> </thead> <tbody> <tr> <td class="listlr" align="center"><?php echo sprintf("%.5f", $gps_lat); ?> (<?php echo sprintf("%d", $gps_lat_deg); ?>° <?php echo sprintf("%.5f", $gps_lat_min*60); ?><?php echo $gps_vars[4]; ?>)</td> <td class="listlr" align="center"><?php echo sprintf("%.5f", $gps_lon); ?> (<?php echo sprintf("%d", $gps_lon_deg); ?>° <?php echo sprintf("%.5f", $gps_lon_min*60); ?><?php echo $gps_vars[6]; ?>)</td> - <?php if (isset($gps_alt)) { echo '<td class="listlr" align="center">'.$gps_alt.' '.$gps_alt_unit.'</td>';}?> + <?php if (isset($gps_alt)) { echo '<td class="listlr" align="center">' . $gps_alt . ' ' . $gps_alt_unit . '</td>';}?> <td class="listr" align="center"> <?php if (isset($gps_satview)) {echo 'in view ' . intval($gps_satview);} diff --git a/usr/local/www/status_openvpn.php b/usr/local/www/status_openvpn.php index 8746254..4d1f46f 100644 --- a/usr/local/www/status_openvpn.php +++ b/usr/local/www/status_openvpn.php @@ -111,6 +111,7 @@ include("head.inc"); ?> <?php include("fbegin.inc"); ?> <form action="status_openvpn.php" method="get" name="iform"> <script type="text/javascript"> +//<![CDATA[ function killClient(mport, remipp) { var busy = function(index,icon) { jQuery(icon).bind("onclick",""); @@ -138,11 +139,12 @@ include("head.inc"); ?> function(index,row) { jQuery(row).fadeOut(1000); } ); } +//]]> </script> <?php $i = 0; ?> <?php foreach ($servers as $server): ?> -<table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" width="100%" border="0" cellpadding="0" cellspacing="0"> +<table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" width="100%" border="0" cellpadding="0" cellspacing="0" summary="status openvpn"> <tr> <td colspan="6" class="listtopic"> <?=$server['name'];?> <?=gettext("Client connections"); ?> @@ -150,7 +152,7 @@ include("head.inc"); ?> </tr> <tr> <td> - <table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0"> + <table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0" summary="connections"> <tr> <td class="listhdrr"><?=gettext("Common Name"); ?></td> <td class="listhdrr"><?=gettext("Real Address"); ?></td> @@ -161,7 +163,7 @@ include("head.inc"); ?> </tr> <?php foreach ($server['conns'] as $conn): ?> - <tr name='<?php echo "r:{$server['mgmt']}:{$conn['remote_host']}"; ?>'> + <tr id="<?php echo "r:{$server['mgmt']}:{$conn['remote_host']}"; ?>"> <td class="listlr"> <?=$conn['common_name'];?> </td> @@ -180,11 +182,11 @@ include("head.inc"); ?> <td class="listr"> <?=$conn['bytes_recv'];?> </td> - <td class='list'> - <img src='/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif' height='17' width='17' border='0' - onclick="killClient('<?php echo $server['mgmt']; ?>', '<?php echo $conn['remote_host']; ?>');" style='cursor:pointer;' - name='<?php echo "i:{$server['mgmt']}:{$conn['remote_host']}"; ?>' - title='<?php echo gettext("Kill client connection from") . ' ' . $conn['remote_host']; ?>' alt='' /> + <td class="list"> + <img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif" height="17" width="17" border="0" + onclick="killClient('<?php echo $server['mgmt']; ?>', '<?php echo $conn['remote_host']; ?>');" style="cursor:pointer;" + id="<?php echo "i:{$server['mgmt']}:{$conn['remote_host']}"; ?>" + title="<?php echo gettext("Kill client connection from") . " " . $conn['remote_host']; ?>" alt="delete" /> </td> </tr> @@ -194,9 +196,9 @@ include("head.inc"); ?> <td colspan="2" class="list" height="12"> <table> <tr> - <?php $ssvc = find_service_by_openvpn_vpnid($server['vpnid']); ?> + <td><?php $ssvc = find_service_by_openvpn_vpnid($server['vpnid']); ?> <?= get_service_status_icon($ssvc, true, true); ?> - <td><?= get_service_control_links($ssvc, true); ?></td> + <?= get_service_control_links($ssvc, true); ?></td> </tr> </table> </td> @@ -209,10 +211,10 @@ include("head.inc"); ?> </table> <?php if (is_array($server['routes']) && count($server['routes'])): ?> <div id="shroutebut-<?= $i ?>"> -<input type="button" onClick="show_routes('tabroute-<?= $i ?>','shroutebut-<?= $i ?>')" value="<?php echo gettext("Show Routing Table"); ?>" /> - <?= gettext("Display OpenVPN's internal routing table for this server.") ?></a> +<input type="button" onClick="show_routes('tabroute-<?= $i ?>','shroutebut-<?= $i ?>')" value="<?php echo gettext("Show Routing Table"); ?>" /> - <?= gettext("Display OpenVPN's internal routing table for this server.") ?> <br /><br /> </div> -<table style="display: none; padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" width="100%" border="0" cellpadding="0" cellspacing="0" id="tabroute-<?= $i ?>"> +<table style="display: none; padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" width="100%" border="0" cellpadding="0" cellspacing="0" id="tabroute-<?= $i ?>" summary="routing table"> <tr> <td colspan="6" class="listtopic"> <?=$server['name'];?> <?=gettext("Routing Table"); ?> @@ -220,7 +222,7 @@ include("head.inc"); ?> </tr> <tr> <td> - <table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0"> + <table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0" summary="results"> <tr> <td class="listhdrr"><?=gettext("Common Name"); ?></td> <td class="listhdrr"><?=gettext("Real Address"); ?></td> @@ -229,7 +231,7 @@ include("head.inc"); ?> </tr> <?php foreach ($server['routes'] as $conn): ?> - <tr name='<?php echo "r:{$server['mgmt']}:{$conn['remote_host']}"; ?>'> + <tr id="<?php echo "r:{$server['mgmt']}:{$conn['remote_host']}"; ?>"> <td class="listlr"> <?=$conn['common_name'];?> </td> @@ -261,7 +263,7 @@ include("head.inc"); ?> <br /> <?php if (!empty($sk_servers)) { ?> -<table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" width="100%" border="0" cellpadding="0" cellspacing="0"> +<table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" width="100%" border="0" cellpadding="0" cellspacing="0" summary="peer to peer stats"> <tr> <td colspan="6" class="listtopic"> <?=gettext("Peer to Peer Server Instance Statistics"); ?> @@ -269,7 +271,7 @@ include("head.inc"); ?> </tr> <tr> <td> - <table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0"> + <table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0" summary="results"> <tr> <td class="listhdrr"><?=gettext("Name"); ?></td> <td class="listhdrr"><?=gettext("Status"); ?></td> @@ -282,7 +284,7 @@ include("head.inc"); ?> </tr> <?php foreach ($sk_servers as $sk_server): ?> - <tr name='<?php echo "r:{$sk_server['port']}:{$sk_server['vpnid']}"; ?>'> + <tr id="<?php echo "r:{$sk_server['port']}:{$sk_server['vpnid']}"; ?>"> <td class="listlr"> <?=$sk_server['name'];?> </td> @@ -307,9 +309,9 @@ include("head.inc"); ?> <td class="listr"> <table> <tr> - <?php $ssvc = find_service_by_openvpn_vpnid($sk_server['vpnid']); ?> + <td><?php $ssvc = find_service_by_openvpn_vpnid($sk_server['vpnid']); ?> <?= get_service_status_icon($ssvc, false, true); ?> - <td><?= get_service_control_links($ssvc, true); ?></td> + <?= get_service_control_links($ssvc, true); ?></td> </tr> </table> </td> @@ -324,7 +326,7 @@ include("head.inc"); ?> } ?> <br /> <?php if (!empty($clients)) { ?> -<table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" width="100%" border="0" cellpadding="0" cellspacing="0"> +<table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" width="100%" border="0" cellpadding="0" cellspacing="0" summary="client stats"> <tr> <td colspan="6" class="listtopic"> <?=gettext("Client Instance Statistics"); ?> @@ -332,7 +334,7 @@ include("head.inc"); ?> </tr> <tr> <td> - <table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0"> + <table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0" summary="results"> <tr> <td class="listhdrr"><?=gettext("Name"); ?></td> <td class="listhdrr"><?=gettext("Status"); ?></td> @@ -345,7 +347,7 @@ include("head.inc"); ?> </tr> <?php foreach ($clients as $client): ?> - <tr name='<?php echo "r:{$client['port']}:{$client['vpnid']}"; ?>'> + <tr id="<?php echo "r:{$client['port']}:{$client['vpnid']}"; ?>"> <td class="listlr"> <?=$client['name'];?> </td> @@ -370,9 +372,9 @@ include("head.inc"); ?> <td class="listr" height="12"> <table> <tr> - <?php $ssvc = find_service_by_openvpn_vpnid($client['vpnid']); ?> + <td><?php $ssvc = find_service_by_openvpn_vpnid($client['vpnid']); ?> <?= get_service_status_icon($ssvc, false, true); ?> - <td><?= get_service_control_links($ssvc, true); ?></td> + <?= get_service_control_links($ssvc, true); ?></td> </tr> </table> </td> @@ -382,6 +384,7 @@ include("head.inc"); ?> </td> </tr> </table> +</form> <?php } @@ -398,9 +401,13 @@ if ((empty($clients)) && (empty($servers)) && (empty($sk_servers))) { <?php include("fend.inc"); ?> <script type="text/javascript"> +//<![CDATA[ function show_routes(id, buttonid) { document.getElementById(buttonid).innerHTML=''; aodiv = document.getElementById(id); aodiv.style.display = "block"; } +//]]> </script> +</body> +</html> diff --git a/usr/local/www/status_queues.php b/usr/local/www/status_queues.php index 7c0cd32..00c5d95 100644 --- a/usr/local/www/status_queues.php +++ b/usr/local/www/status_queues.php @@ -135,7 +135,7 @@ if(!is_array($config['shaper']['queue']) || count($config['shaper']['queue']) < <?php if (!$error): ?> <form action="status_queues.php" method="post"> <script type="text/javascript"> - /*<![CDATA[*/ +//<![CDATA[ function getqueueactivity() { var url = "/status_queues.php"; var pars = "getactivity=yes&stats=" + jQuery("#selStatistic").val(); @@ -153,10 +153,10 @@ if(!is_array($config['shaper']['queue']) || count($config['shaper']['queue']) < jQuery(document).ready(function(){ setTimeout('getqueueactivity()', 150); }); - /*]]>*/ +//]]> </script> <?php endif; ?> -<table width="100%" border="1" cellpadding="0" cellspacing="0"> +<table width="100%" border="1" cellpadding="0" cellspacing="0" summary="status queues"> <?php if ($error): ?> <tr><td><?php echo $error; ?></td></tr> <?php else: ?> @@ -187,6 +187,7 @@ if(!is_array($config['shaper']['queue']) || count($config['shaper']['queue']) < <?=gettext("You can configure the Traffic Shaper"); ?> <a href="/firewall_shaper_wizards.php"><?=gettext("here"); ?></a>. </p> <script type="text/javascript"> +//<![CDATA[ function StatsShowHide(classname) { var firstrow = jQuery("." + classname).first(); if (firstrow.is(':visible')) { @@ -194,6 +195,7 @@ if(!is_array($config['shaper']['queue']) || count($config['shaper']['queue']) < else { jQuery("." + classname).show();} } +//]]> </script> </form> <?php include("fend.inc"); ?> @@ -234,7 +236,7 @@ function processQueues($altqstats, $level, $parent_name){ </td> <?php $cpuUsage = 0; - echo "<td nowrap=\"nowrap\" width=\"1%\" bgcolor=\"#{$row_background}\">"; + echo "<td class=\"nowrap\" width=\"1%\" bgcolor=\"#{$row_background}\">"; echo "<img src='./themes/".$g['theme']."/images/misc/bar_left.gif' height='10' width='4' border='0' align='middle' alt='' />"; echo "<img src='./themes/".$g['theme']."/images/misc/bar_blue.gif' height='10' name='queue{$q['name']}{$q['interface']}widtha' id='queue{$q['name']}{$q['interface']}widtha' width='" . $cpuUsage . "' border='0' align='middle' alt='" . htmlspecialchars($q['name']) . "' />"; echo "<img src='./themes/".$g['theme']."/images/misc/bar_gray.gif' height='10' name='queue{$q['name']}{$q['interface']}widthb' id='queue{$q['name']}{$q['interface']}widthb' width='" . (150 - $cpuUsage) . "' border='0' align='middle' alt='" . htmlspecialchars($q['name']) . "' />"; diff --git a/usr/local/www/vpn_ipsec_phase2.php b/usr/local/www/vpn_ipsec_phase2.php index 382030b..6848efd 100644 --- a/usr/local/www/vpn_ipsec_phase2.php +++ b/usr/local/www/vpn_ipsec_phase2.php @@ -189,8 +189,6 @@ if ($_POST) { } /* Validate enabled phase2's are not duplicates */ if (isset($pconfig['mobile'])){ - if (substr($pconfig['mode'], 0, 6) != "tunnel") - $input_errors[] = gettext("Mobile IPsec only supports Tunnel mode."); /* User is adding phase 2 for mobile phase1 */ foreach($a_phase2 as $key => $name){ if (isset($name['mobile'])){ diff --git a/usr/local/www/widgets/widgets/system_information.widget.php b/usr/local/www/widgets/widgets/system_information.widget.php index 2cb00f2..3705937 100644 --- a/usr/local/www/widgets/widgets/system_information.widget.php +++ b/usr/local/www/widgets/widgets/system_information.widget.php @@ -85,6 +85,8 @@ if($_REQUEST['getupdatestatus']) { $curcfg = $config['system']['firmware']; +$filesystems = get_mounted_filesystems(); + ?> <script type="text/javascript"> //<![CDATA[ @@ -93,7 +95,11 @@ $curcfg = $config['system']['firmware']; jQuery("#mbufPB").progressbar( { value: <?php echo get_mbuf(true); ?> } ); jQuery("#cpuPB").progressbar( { value:false } ); jQuery("#memUsagePB").progressbar( { value: <?php echo mem_usage(); ?> } ); - jQuery("#diskUsagePB").progressbar( { value: <?php echo disk_usage(); ?> } ); + +<?PHP $d = 0; ?> +<?PHP foreach ($filesystems as $fs): ?> + jQuery("#diskUsagePB<?php echo $d++; ?>").progressbar( { value: <?php echo $fs['percent_used']; ?> } ); +<?PHP endforeach; ?> <?php if($showswap == true): ?> jQuery("#swapUsagePB").progressbar( { value: <?php echo swap_usage(); ?> } ); @@ -274,9 +280,13 @@ $curcfg = $config['system']['firmware']; <tr> <td width="25%" class="vncellt"><?=gettext("Disk usage");?></td> <td width="75%" class="listr"> - <?php $diskusage = disk_usage(); ?> - <div id="diskUsagePB"></div> - <span id="diskusagemeter"><?= $diskusage.'%'; ?></span> of <?= `/bin/df -h / | /usr/bin/grep -v 'Size' | /usr/bin/awk '{ print $2 }'` ?> +<?PHP $d = 0; ?> +<?PHP foreach ($filesystems as $fs): ?> + <div id="diskUsagePB<?php echo $d; ?>"></div> + <?PHP if (substr(basename($fs['device']), 0, 2) == "md") $fs['type'] .= " in RAM"; ?> + <?PHP echo "{$fs['mountpoint']} ({$fs['type']})";?>: <span id="diskusagemeter<?php echo $d++ ?>"><?= $fs['percent_used'].'%'; ?></span> of <?PHP echo $fs['total_size'];?> + <br /> +<?PHP endforeach; ?> </td> </tr> </tbody> diff --git a/usr/local/www/widgets/widgets/traffic_graphs.widget.php b/usr/local/www/widgets/widgets/traffic_graphs.widget.php index 28486ac..768a0a2 100644 --- a/usr/local/www/widgets/widgets/traffic_graphs.widget.php +++ b/usr/local/www/widgets/widgets/traffic_graphs.widget.php @@ -96,7 +96,7 @@ if (isset($a_config["scale_type"])) { } ?> -<input type="hidden" id="traffic_graphs-config" name="traffic_graphs-config" value=""> +<input type="hidden" id="traffic_graphs-config" name="traffic_graphs-config" value="" /> <?php //set variables for traffic graph @@ -104,7 +104,7 @@ if (isset($a_config["scale_type"])) { $height = "150"; ?> -<div id="traffic_graphs-settings" name="traffic_graphs-settings" class="widgetconfigdiv" style="display:none;"> +<div id="traffic_graphs-settings" class="widgetconfigdiv" style="display:none;"> <form action="/widgets/widgets/traffic_graphs.widget.php" method="post" name="iform" id="iform"> <?php foreach ($ifdescrs as $ifname => $ifdescr) { ?> <input type="hidden" name="shown[<?= $ifname ?>]" value="<?= $shown[$ifname] ? "show" : "hide" ?>" /> @@ -112,14 +112,14 @@ if (isset($a_config["scale_type"])) { Default AutoScale: <?php $scale_type_up="checked"; - $scale_type_follow="unchecked"; + $scale_type_follow=""; if (isset($config["widgets"]["trafficgraphs"]["scale_type"])) { $selected_radio = $config["widgets"]["trafficgraphs"]["scale_type"]; if ($selected_radio == "up") { - $scale_type_up = "checked"; + $scale_type_up = "checked=\"checked\""; } else if ($selected_radio == "follow") { - $scale_type_follow = "checked"; + $scale_type_follow = "checked=\"checked\""; } } ?> @@ -128,7 +128,7 @@ if (isset($a_config["scale_type"])) { Refresh Interval: <select name="refreshinterval" class="formfld" id="refreshinterval" onchange="updateGraphDisplays();"> <?php for ($i = 1; $i <= 10; $i += 1) { ?> - <option value="<?= $i ?>" <?php if ($refreshinterval == $i) echo "selected='selected'";?>><?= $i ?></option> + <option value="<?= $i ?>" <?php if ($refreshinterval == $i) echo "selected=\"selected\"";?>><?= $i ?></option> <?php } ?> </select> Seconds<br /> <b>Note:</b> changing this setting will increase CPU utilization<br /><br /> <input id="submit" name="submit" type="submit" onclick="return updatePref();" class="formbtn" value="Save Settings" /> @@ -136,10 +136,12 @@ if (isset($a_config["scale_type"])) { </div> <script type="text/javascript"> +//<![CDATA[ d = document; selectIntLink = "traffic_graphs-configure"; textlink = d.getElementById(selectIntLink); textlink.style.display = "inline"; +//]]> </script> <?php @@ -160,7 +162,7 @@ foreach ($ifdescrs as $ifname => $ifdescr) { <div id="<?=$ifname;?>trafficdiv" style="padding: 5px"> <div id="<?=$ifname;?>topic" class="widgetsubheader"> <div style="float:left;width:49%"> - <span onClick="location.href='/status_graph.php?if=<?=$ifname;?>'" style="cursor:pointer">Current <?=$ifdescr;?> Traffic</span> + <span onclick="location.href='/status_graph.php?if=<?=$ifname;?>'" style="cursor:pointer">Current <?=$ifdescr;?> Traffic</span> </div> <div align="right" style="float:right;width:49%"> <div id="<?=$ifname;?>graphdiv-min" onclick='return trafficminimizeDiv("<?= $ifname ?>", true);' @@ -171,7 +173,13 @@ foreach ($ifdescrs as $ifname => $ifdescr) { <div style="clear:both;"></div> </div> <div id="<?=$ifname;?>graphdiv" style="display:<?php echo $graphdisplay;?>"> - <embed id="graph" src="graph.php?ifnum=<?=$ifname;?>&ifname=<?=rawurlencode($ifdescr);?>&timeint=<?=$refreshinterval;?>&initdelay=<?=($graphcounter+1) * 2;?>" type="image/svg+xml" width="100%" height="100%" pluginspage="http://www.adobe.com/svg/viewer/install/auto" /> + <object data="graph.php?ifnum=<?=$ifname;?>&ifname=<?=rawurlencode($ifdescr);?>&timeint=<?=$refreshinterval;?>&initdelay=<?=($graphcounter+1) * 2;?>"> + <param name="id" value="graph" /> + <param name="type" value="image/svg+xml" /> + <param name="width" value="<? echo $width; ?>" /> + <param name="height" value="<? echo $height; ?>" /> + <param name="pluginspage" value="http://www.adobe.com/svg/viewer/install/auto" /> + </object> </div> </div> <?php } |