diff options
Diffstat (limited to 'usr/local/www/widgets/widgets')
14 files changed, 141 insertions, 129 deletions
diff --git a/usr/local/www/widgets/widgets/captive_portal_status.widget.php b/usr/local/www/widgets/widgets/captive_portal_status.widget.php index 2db0a2a..245b65b 100644 --- a/usr/local/www/widgets/widgets/captive_portal_status.widget.php +++ b/usr/local/www/widgets/widgets/captive_portal_status.widget.php @@ -88,14 +88,14 @@ if ($_GET['order']) { usort($cpdb_all, "clientcmp"); } ?> -<table class="sortable" name="sortabletable" id="sortabletable" width="100%" border="0" cellpadding="0" cellspacing="0"> +<table class="sortable" name="sortabletable" id="sortabletable" width="100%" border="0" cellpadding="0" cellspacing="0" summary="captive portal status"> <tr> - <td class="listhdrr"><a href="?order=ip&showact=<?=$_GET['showact'];?>">IP address</a></td> - <td class="listhdrr"><a href="?order=mac&showact=<?=$_GET['showact'];?>">MAC address</a></td> - <td class="listhdrr"><a href="?order=user&showact=<?=$_GET['showact'];?>"><?=gettext("Username");?></a></td> + <td class="listhdrr"><a href="?order=ip&showact=<?=$_GET['showact'];?>">IP address</a></td> + <td class="listhdrr"><a href="?order=mac&showact=<?=$_GET['showact'];?>">MAC address</a></td> + <td class="listhdrr"><a href="?order=user&showact=<?=$_GET['showact'];?>"><?=gettext("Username");?></a></td> <?php if ($_GET['showact']): ?> - <td class="listhdrr"><a href="?order=start&showact=<?=$_GET['showact'];?>"><?=gettext("Session start");?></a></td> - <td class="listhdrr"><a href="?order=start&showact=<?=$_GET['showact'];?>"><?=gettext("Last activity");?></a></td> + <td class="listhdrr"><a href="?order=start&showact=<?=$_GET['showact'];?>"><?=gettext("Session start");?></a></td> + <td class="listhdrr"><a href="?order=start&showact=<?=$_GET['showact'];?>"><?=gettext("Last activity");?></a></td> <?php endif; ?> </tr> <?php foreach ($cpdb_all as $cpent): ?> @@ -107,8 +107,8 @@ if ($_GET['order']) { <td class="listr"><?=htmlspecialchars(date("m/d/Y H:i:s", $cpent[0]));?></td> <td class="listr"><?php if ($cpent[11] && ($cpent[11] > 0)) echo htmlspecialchars(date("m/d/Y H:i:s", $cpent[11]));?></td> <?php endif; ?> - <td valign="middle" class="list" nowrap> - <a href="?order=<?=$_GET['order'];?>&showact=<?=$_GET['showact'];?>&act=del&zone=<?=$cpent[10];?>&id=<?=$cpent[5];?>" onclick="return confirm('Do you really want to disconnect this client?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td> + <td valign="middle" class="list nowrap"> + <a href="?order=<?=$_GET['order'];?>&showact=<?=$_GET['showact'];?>&act=del&zone=<?=$cpent[10];?>&id=<?=$cpent[5];?>" onclick="return confirm('Do you really want to disconnect this client?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="x" /></a></td> </tr> <?php endforeach; ?> -</table> +</table>
\ No newline at end of file diff --git a/usr/local/www/widgets/widgets/carp_status.widget.php b/usr/local/www/widgets/widgets/carp_status.widget.php index bc048ba..1710d1b 100644 --- a/usr/local/www/widgets/widgets/carp_status.widget.php +++ b/usr/local/www/widgets/widgets/carp_status.widget.php @@ -37,7 +37,7 @@ require_once("/usr/local/www/widgets/include/carp_status.inc"); $carp_enabled = get_carp_status(); ?> -<table bgcolor="#990000" width="100%" border="0" cellspacing="0" cellpadding="0"> +<table bgcolor="#990000" width="100%" border="0" cellspacing="0" cellpadding="0" summary="carp status"> <?php if(is_array($config['virtualip']['vip'])) { $carpint=0; @@ -54,7 +54,7 @@ $carp_enabled = get_carp_status(); ?> <tr> <td class="vncellt" width="35%"> - <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_cablenic.gif"/> + <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_cablenic.gif" alt="cablenic" /> <strong><a href="/system_hasync.php"> <span style="color:#000000"><?=htmlspecialchars($carp_int);?></span></a></strong> </td> @@ -62,14 +62,14 @@ $carp_enabled = get_carp_status(); <?php if($carp_enabled == false) { $status = "DISABLED"; - echo "<img src='/themes/".$g['theme']."/images/icons/icon_block.gif' title=\"$status\">"; + echo "<img src='/themes/".$g['theme']."/images/icons/icon_block.gif' title=\"$status\" alt=\"$status\" />"; } else { if($status == "MASTER") { - echo "<img src='/themes/".$g['theme']."/images/icons/icon_pass.gif' title=\"$status\">"; + echo "<img src='/themes/".$g['theme']."/images/icons/icon_pass.gif' title=\"$status\" alt=\"$status\" />"; } else if($status == "BACKUP") { - echo "<img src='/themes/".$g['theme']."/images/icons/icon_pass_d.gif' title=\"$status\">"; + echo "<img src='/themes/".$g['theme']."/images/icons/icon_pass_d.gif' title=\"$status\" alt=\"$status\" />"; } else if($status == "INIT") { - echo "<img src='/themes/".$g['theme']."/images/icons/icon_log.gif' title=\"$status\">"; + echo "<img src='/themes/".$g['theme']."/images/icons/icon_log.gif' title=\"$status\" alt=\"$status\" />"; } } if ($ipaddress){ ?> @@ -79,4 +79,4 @@ $carp_enabled = get_carp_status(); } else { ?> <tr><td class="listr">No CARP Interfaces Defined. Click <a href="carp_status.php">here</a> to configure CARP.</td></tr> <?php } ?> -</table> +</table>
\ No newline at end of file diff --git a/usr/local/www/widgets/widgets/gateways.widget.php b/usr/local/www/widgets/widgets/gateways.widget.php index 17efa58..1b7bd81 100644 --- a/usr/local/www/widgets/widgets/gateways.widget.php +++ b/usr/local/www/widgets/widgets/gateways.widget.php @@ -32,6 +32,7 @@ $nocsrf = true; require_once("guiconfig.inc"); require_once("pfsense-utils.inc"); require_once("functions.inc"); +require_once("/usr/local/www/widgets/include/gateways.inc"); $a_gateways = return_gateways_array(); $gateways_status = array(); @@ -41,13 +42,13 @@ $counter = 1; ?> -<table bgcolor="#990000" width="100%" border="0" cellspacing="0" cellpadding="0"> +<table bgcolor="#990000" width="100%" border="0" cellspacing="0" cellpadding="0" summary="gateway status"> <tr> <td class="vncellt" width="30%" id="gatewayname"> Name </td> <td width="70%" class="listr"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <table width="100%" border="0" cellspacing="0" cellpadding="0" summary="heading"> <tr> <td width="25%" class="listhdrr">RTT</td> <td width="25%" class="listhdrr">Loss</td> @@ -65,7 +66,7 @@ $counter = 1; <?php $counter++; ?> </td> <td width="70%" class="listr"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <table width="100%" border="0" cellspacing="0" cellpadding="0" summary="address"> <tr> <td class="vncellt" width="100%"> <div id="gateway<?php echo $counter; ?>" style="display:inline"> @@ -84,7 +85,7 @@ $counter = 1; </td> </tr> </table> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <table width="100%" border="0" cellspacing="0" cellpadding="0" summary="statistics"> <tr> <td width="25%" class="listlr" align="center" id="gateway<?php echo $counter; ?>"> <?php @@ -105,7 +106,7 @@ $counter = 1; <?php $counter++; ?> </td> <td width="50%" class="listr" id="gateway<?php echo $counter ?>" > - <table border="0" cellpadding="0" cellspacing="2"> + <table border="0" cellpadding="0" cellspacing="2" summary="status"> <?php if ($gateways_status[$gname]) { if (stristr($gateways_status[$gname]['status'], "down")) { diff --git a/usr/local/www/widgets/widgets/gmirror_status.widget.php b/usr/local/www/widgets/widgets/gmirror_status.widget.php index cbbead2..858d862 100644 --- a/usr/local/www/widgets/widgets/gmirror_status.widget.php +++ b/usr/local/www/widgets/widgets/gmirror_status.widget.php @@ -35,15 +35,15 @@ if ($_GET['textonly'] == "true") { exit; } ?> -<table width="100%" border="0" cellspacing="0" cellpadding="0"> +<table width="100%" border="0" cellspacing="0" cellpadding="0" summary="gmirror status"> <tbody id="gmirror_status_table"> <?php echo gmirror_html_status(); ?> </tbody> </table> -<script type="text/javascript" language="javascript"> - // <![CDATA[ +<script type="text/javascript"> +//<![CDATA[ var gmirrorupdater = new Ajax.PeriodicalUpdater('gmirror_status_table', '/widgets/widgets/gmirror_status.widget.php?textonly=true', { method: 'get', frequency: 5 } ); - // ]]> +//]]> </script> diff --git a/usr/local/www/widgets/widgets/installed_packages.widget.php b/usr/local/www/widgets/widgets/installed_packages.widget.php index 53f8f79..800bb58 100644 --- a/usr/local/www/widgets/widgets/installed_packages.widget.php +++ b/usr/local/www/widgets/widgets/installed_packages.widget.php @@ -49,7 +49,7 @@ if(is_array($config['installedpackages']['package'])) { $updateavailable = false; ?> -<table width="100%" border="0" cellpadding="6" cellspacing="0"> +<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="installed packages"> <tr> <td width="15%" class="listhdrr">Package Name</td> <td width="15%" class="listhdrr">Category</td> @@ -78,11 +78,11 @@ $updateavailable = false; $latest_package = $currentvers[$pkg['name']]['version']; if($latest_package == false) { // We can't determine this package's version status. - echo "Current: Unknown.<br>Installed: " . $pkg['version']; + echo "Current: Unknown.<br/>Installed: " . $pkg['version']; } elseif(strcmp($pkg['version'], $latest_package) > 0) { /* we're running a newer version of the package */ echo "Current: {$latest_package}"; - echo "<br>Installed: {$pkg['version']}"; + echo "<br/>Installed: {$pkg['version']}"; } elseif(strcmp($pkg['version'], $latest_package) < 0) { /* our package is out of date */ $updateavailable = true; @@ -91,7 +91,7 @@ $updateavailable = false; <b>Update Available!</b></div><div style="float:left"> Current: <?php echo $latest_package; ?><br/> Installed: <?php echo $pkg['version']; ?></div><div style="float:right"> - <a href="pkg_mgr_install.php?mode=reinstallpkg&pkg=<?= $pkg['name']; ?>"><img title="Update this package." src="./themes/<?= $g['theme']; ?>/images/icons/icon_reinstall_pkg.gif" width="17" height="17" border="0"/></a> + <a href="pkg_mgr_install.php?mode=reinstallpkg&pkg=<?= $pkg['name']; ?>"><img title="Update this package." src="./themes/<?= $g['theme']; ?>/images/icons/icon_reinstall_pkg.gif" width="17" height="17" border="0" alt="reinstall" /></a> </div> <?php $y++; @@ -103,13 +103,14 @@ $updateavailable = false; <?php } } } else { - echo "<tr><td colspan=\"5\"><center>There are no packages currently installed.</td></tr>"; + echo "<tr><td colspan=\"5\" align=\"center\">There are no packages currently installed.</td></tr>"; } ?> </table> <?php if ($updateavailable): ?> -<script language="javascript" type="text/javascript"> +<script type="text/javascript"> +//<![CDATA[ window.onload = function(in_event) { for (y=1; y<=<?php echo $y;?>; y++){ @@ -117,5 +118,6 @@ $updateavailable = false; jQuery(textID).effect('pulsate'); } } +//]]> </script> <?php endif; ?> diff --git a/usr/local/www/widgets/widgets/interface_statistics.widget.php b/usr/local/www/widgets/widgets/interface_statistics.widget.php index 7dca538..ff14a2e 100644 --- a/usr/local/www/widgets/widgets/interface_statistics.widget.php +++ b/usr/local/www/widgets/widgets/interface_statistics.widget.php @@ -82,7 +82,7 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc"); ?> <div style="padding: 5px"> <div id="int_labels" style="float:left;width:32%"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <table width="100%" border="0" cellspacing="0" cellpadding="0" summary="interfaces statistics"> <tr><td class="widgetsubheader" style="height:25px"> </td></tr> <tr> <td class="vncellt" style="height:25px">Packets In</td> @@ -109,15 +109,14 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc"); </div> <div id="interfacestats" style="float:right;overflow: auto; width:68%"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <table width="100%" border="0" cellspacing="0" cellpadding="0" summary="the stats"> <tr> - <tr> <?php $interface_names = array(); foreach ($ifdescrs as $ifdescr => $ifname): $ifinfo = get_interface_info($ifdescr); if ($ifinfo['status'] != "down"){ ?> - <td class="widgetsubheader" nowrap style="height:25px"> + <td class="widgetsubheader nowrap" style="height:25px"> <?=htmlspecialchars($ifname);?> </td> <?php @@ -131,7 +130,7 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc"); <?php $counter = 1; foreach ($array_in_packets as $data): ?> - <td class="listr" id="stat<?php echo $counter?>" nowrap style="height:25px"> + <td class="listr nowrap" id="stat<?php echo $counter?>" style="height:25px"> <?=htmlspecialchars($data);?> </td> <?php @@ -143,7 +142,7 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc"); <?php $counter = 2; foreach ($array_out_packets as $data): ?> - <td class="listr" id="stat<?php echo $counter;?>" nowrap style="height:25px"> + <td class="listr nowrap" id="stat<?php echo $counter;?>" style="height:25px"> <?=htmlspecialchars($data);?> </td> <?php @@ -155,7 +154,7 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc"); <?php $counter = 3; foreach ($array_in_bytes as $data): ?> - <td class="listr" id="stat<?php echo $counter;?>" nowrap style="height:25px"> + <td class="listr nowrap" id="stat<?php echo $counter;?>" style="height:25px"> <?=htmlspecialchars($data);?> </td> <?php @@ -167,7 +166,7 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc"); <?php $counter = 4; foreach ($array_out_bytes as $data): ?> - <td class="listr" id="stat<?php echo $counter;?>" nowrap style="height:25px"> + <td class="listr nowrap" id="stat<?php echo $counter;?>" style="height:25px"> <?=htmlspecialchars($data);?> </td> <?php @@ -179,7 +178,7 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc"); <?php $counter = 5; foreach ($array_in_errors as $data): ?> - <td class="listr" id="stat<?php echo $counter;?>" nowrap style="height:25px"> + <td class="listr nowrap" id="stat<?php echo $counter;?>" style="height:25px"> <?=htmlspecialchars($data);?> </td> <?php @@ -191,7 +190,7 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc"); <?php $counter = 6; foreach ($array_out_errors as $data): ?> - <td class="listr" id="stat<?php echo $counter;?>" nowrap style="height:25px"> + <td class="listr nowrap" id="stat<?php echo $counter;?>" style="height:25px"> <?=htmlspecialchars($data);?> </td> <?php @@ -203,7 +202,7 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc"); <?php $counter = 7; foreach ($array_collisions as $data): ?> - <td class="listr" id="stat<?php echo $counter;?>" nowrap style="height:25px"> + <td class="listr nowrap" id="stat<?php echo $counter;?>" style="height:25px"> <?=htmlspecialchars($data);?> </td> <?php @@ -212,4 +211,4 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc"); </tr> </table> </div> - </div> + </div>
\ No newline at end of file diff --git a/usr/local/www/widgets/widgets/interfaces.widget.php b/usr/local/www/widgets/widgets/interfaces.widget.php index e77f9d6..1a9398b 100644 --- a/usr/local/www/widgets/widgets/interfaces.widget.php +++ b/usr/local/www/widgets/widgets/interfaces.widget.php @@ -42,7 +42,7 @@ require_once("/usr/local/www/widgets/include/interfaces.inc"); $ifdescrs = get_configured_interface_with_descr(); ?> - <table bgcolor="#990000" width="100%" border="0" cellspacing="0" cellpadding="0"> + <table bgcolor="#990000" width="100%" border="0" cellspacing="0" cellpadding="0" summary="interfaces"> <?php foreach ($ifdescrs as $ifdescr => $ifname) { $ifinfo = get_interface_info($ifdescr); @@ -52,18 +52,18 @@ require_once("/usr/local/www/widgets/include/interfaces.inc"); <td class="vncellt" width="40%"> <?php if($ifinfo['ppplink']) { - echo "<img src='./themes/{$g['theme']}/images/icons/icon_3g.gif' />"; + echo "<img src='./themes/{$g['theme']}/images/icons/icon_3g.gif' alt='3g' />"; } else if($iswireless) { if($ifinfo['status'] == "associated") { ?> - <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_wlan.gif" /> + <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_wlan.gif" alt="wlan" /> <?php } else { ?> - <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_wlan_d.gif" /> + <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_wlan_d.gif" alt="wlan_d" /> <?php } ?> <?php } else { ?> - <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_cablenic.gif"/> + <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_cablenic.gif" alt="cablenic" /> <?php } ?> <strong><u> - <span onClick="location.href='/interfaces.php?if=<?=$ifdescr; ?>'" style="cursor:pointer"> + <span onclick="location.href='/interfaces.php?if=<?=$ifdescr; ?>'" style="cursor:pointer"> <?=htmlspecialchars($ifname);?></span></u></strong> <?php if ($ifinfo['dhcplink']) @@ -71,37 +71,37 @@ require_once("/usr/local/www/widgets/include/interfaces.inc"); ?> </td> <td width="60%" class="listr"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <table width="100%" border="0" cellspacing="0" cellpadding="0" summary="status"> <tr> <?php if($ifinfo['status'] == "up" || $ifinfo['status'] == "associated") { ?> <td> - <div id="<?php echo $ifname;?>-up" style="display:inline" ><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_interface_up.gif" title="<?=$ifname;?> is up" /></div> + <div id="<?php echo $ifname;?>-up" style="display:inline" ><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_interface_up.gif" title="<?=$ifname;?> is up" alt="up" /></div> </td> <td> - <div id="<?php echo $ifname;?>-down" style="display:none" ><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_interface_down.gif" title="<?=$ifname;?> is down" /></div> + <div id="<?php echo $ifname;?>-down" style="display:none" ><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_interface_down.gif" title="<?=$ifname;?> is down" alt="down" /></div> </td> <td> - <div id="<?php echo $ifname;?>-block" style="display:none" ><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block.gif" title="<?=$ifname;?> is disabled" /></div> + <div id="<?php echo $ifname;?>-block" style="display:none" ><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block.gif" title="<?=$ifname;?> is disabled" alt="disabled" /></div> </td> <?php } else if ($ifinfo['status'] == "no carrier") { ?> <td> - <div id="<?php echo $ifname;?>-down" style="display:inline" ><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_interface_down.gif" title="<?=$ifname;?> is down" /></div> + <div id="<?php echo $ifname;?>-down" style="display:inline" ><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_interface_down.gif" title="<?=$ifname;?> is down" alt="down" /></div> </td> <td> - <div id="<?php echo $ifname;?>-block" style="display:none" ><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block.gif" title="<?=$ifname;?> is disabled" /></div> + <div id="<?php echo $ifname;?>-block" style="display:none" ><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block.gif" title="<?=$ifname;?> is disabled" alt="disabled" /></div> </td> <td> - <div id="<?php echo $ifname;?>-up" style="display:none" ><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_interface_up.gif" title="<?=$ifname;?> is up" /></div> + <div id="<?php echo $ifname;?>-up" style="display:none" ><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_interface_up.gif" title="<?=$ifname;?> is up" alt="up" /></div> </td> <?php } else if ($ifinfo['status'] == "down") { ?> <td> - <div id="<?php echo $ifname;?>-block" style="display:inline" ><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block.gif" title="<?=$ifname;?> is disabled" /></div> + <div id="<?php echo $ifname;?>-block" style="display:inline" ><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block.gif" title="<?=$ifname;?> is disabled" alt="disabled" /></div> </td> <td> - <div id="<?php echo $ifname;?>-up" style="display:none" ><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_interface_up.gif" title="<?=$ifname;?> is up" /></div> + <div id="<?php echo $ifname;?>-up" style="display:none" ><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_interface_up.gif" title="<?=$ifname;?> is up" alt="up" /></div> </td> <td> - <div id="<?php echo $ifname;?>-down" style="display:none" ><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_interface_down.gif" title="<?=$ifname;?> is down" /></div> + <div id="<?php echo $ifname;?>-down" style="display:none" ><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_interface_down.gif" title="<?=$ifname;?> is down" alt="down" /></div> </td> <?php } else { ?><?=htmlspecialchars($ifinfo['status']); }?> <td> @@ -109,7 +109,7 @@ require_once("/usr/local/www/widgets/include/interfaces.inc"); </td> </tr> </table> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <table width="100%" border="0" cellspacing="0" cellpadding="0" summary="summary"> <tr> <td class="vncellt" width="100%"> <div id="<?php echo $ifname;?>-ip" style="display:inline"><?=htmlspecialchars($ifinfo['ipaddr']);?> </div> @@ -118,6 +118,6 @@ require_once("/usr/local/www/widgets/include/interfaces.inc"); </td> </tr> </table> - <?php }//end for each ?> </td></tr> + <?php }//end for each ?> </table> diff --git a/usr/local/www/widgets/widgets/ipsec.widget.php b/usr/local/www/widgets/widgets/ipsec.widget.php index c9653fc..059e51c 100644 --- a/usr/local/www/widgets/widgets/ipsec.widget.php +++ b/usr/local/www/widgets/widgets/ipsec.widget.php @@ -92,11 +92,11 @@ if (isset($config['ipsec']['phase1'])){?> <div id="ipsec-Overview" style="display:block;background-color:#EEEEEE;"> <div> - <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0"> + <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0" summary="heading"> <tr> - <td nowrap class="listhdrr">Active Tunnels</td> - <td nowrap class="listhdrr">Inactive Tunnels</td> - <td nowrap class="listhdrr">Mobile Users</td> + <td class="listhdrr nowrap">Active Tunnels</td> + <td class="listhdrr nowrap">Inactive Tunnels</td> + <td class="listhdrr nowrap">Mobile Users</td> </tr> <tr> <td class="listlr"><?php echo $activecounter; ?></td> @@ -141,7 +141,7 @@ if (isset($config['ipsec']['phase1'])){?> (<?php echo htmlspecialchars($ipsec['dest']);?>)<?php echo $spane;?> </div> <div class="listr" style="display:table-cell;width:90px"><?php echo $spans;?><?php echo htmlspecialchars($ipsec['descr']);?><?php echo $spane;?></div> - <div class="listr" style="display:table-cell;width:37px"><?php echo $spans;?><center> + <div class="listr" style="display:table-cell;width:37px" align="center"><?php echo $spans;?> <?php if($ipsec['status'] == "true") { @@ -154,7 +154,7 @@ if (isset($config['ipsec']['phase1'])){?> echo "<img src ='/themes/{$g['theme']}/images/icons/icon_{$iconfn}.gif'>"; - ?></center><?php echo $spane;?></div> + ?><?php echo $spane;?></div> </div> <?php endforeach; ?> </div> @@ -178,8 +178,8 @@ if (isset($config['ipsec']['phase1'])){?> <?php echo htmlspecialchars($muser['local']);?><br/> <?php echo htmlspecialchars($muser['remote']);?> </div> - <div class="listr" style="display:table-cell;width:30px"> - <center><a href="diag_ipsec.php?act=disconnect&user=<?php echo $muser['username']; ?>"><img src='/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif' height='17' width='17' border='0'/></a></center> + <div class="listr" style="display:table-cell;width:30px" align="center"> + <a href="diag_ipsec.php?act=disconnect&user=<?php echo $muser['username']; ?>"><img src='/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif' height='17' width='17' border='0' alt='x' /></a> </div> </div> <?php endforeach; ?> @@ -190,10 +190,9 @@ if (isset($config['ipsec']['phase1'])){?> }//end if tunnels are configured, else show code below else { ?> <div style="display:block"> - <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0"> + <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0" summary="note"> <tr> <td colspan="4"> - <p> <span class="vexpl"> <span class="red"> <strong> @@ -203,7 +202,6 @@ else { ?> You can configure your IPsec <a href="vpn_ipsec.php">here</a>. </span> - </p> </td> </tr> </table> diff --git a/usr/local/www/widgets/widgets/load_balancer_status.widget.php b/usr/local/www/widgets/widgets/load_balancer_status.widget.php index d63df92..3ec5ba6 100644 --- a/usr/local/www/widgets/widgets/load_balancer_status.widget.php +++ b/usr/local/www/widgets/widgets/load_balancer_status.widget.php @@ -62,7 +62,7 @@ if (!$nentries) ?> -<table bgcolor="#990000" width="100%" border="0" cellspacing="0" cellpadding="0"> +<table bgcolor="#990000" width="100%" border="0" cellspacing="0" cellpadding="0" summary="load balancer"> <tr> <td width="10%" class="listhdrr">Server</td> <td width="10%" class="listhdrr">Pool</td> @@ -91,7 +91,7 @@ if (!$nentries) <?=$vsent['ipaddr'].":".$vsent['port'];?><br/> </td> <td class="listr" align="center" > - <table border="0" cellpadding="0" cellspacing="2"> + <table border="0" cellpadding="0" cellspacing="2" summary="status"> <?php foreach ($a_pool as $pool) { if ($pool['name'] == $vsent['pool']) { diff --git a/usr/local/www/widgets/widgets/log.widget.php b/usr/local/www/widgets/widgets/log.widget.php index 61c2acf..15d32f3 100644 --- a/usr/local/www/widgets/widgets/log.widget.php +++ b/usr/local/www/widgets/widgets/log.widget.php @@ -58,7 +58,9 @@ if($_POST['filterlogentries']) { $filename = $_SERVER['HTTP_REFERER']; if(headers_sent($file, $line)){ echo '<script type="text/javascript">'; + echo '//<![CDATA['; echo 'window.location.href="'.$filename.'";'; + echo '//]]>'; echo '</script>'; echo '<noscript>'; echo '<meta http-equiv="refresh" content="0;url='.$filename.'" />'; @@ -86,7 +88,8 @@ handle_ajax($nentries, $nentries + 20); ?> -<script language="javascript"> +<script type="text/javascript"> +//<![CDATA[ lastsawtime = '<?php echo time(); ?>'; var lines = Array(); var timer; @@ -104,11 +107,11 @@ else /* Called by the AJAX updater */ function format_log_line(row) { - var line = '<td class="listMRlr" align="center">' + row[0] + '</td>' + - '<td class="listMRr ellipsis" title="' + row[2] + '">' + row[2] + '</td>' + - '<td class="listMRr ellipsis" title="' + row[3] + '">' + row[3] + '</td>' + - '<td class="listMRr ellipsis" title="' + row[4] + '">' + row[4] + '</td>' + - '<td class="listMRr ellipsis" title="' + row[5] + '">' + row[5] + '</td>'; + var line = '<td class="listMRlr" align="center">' + row[0] + '<\/td>' + + '<td class="listMRr ellipsis" title="' + row[2] + '">' + row[2] + '<\/td>' + + '<td class="listMRr ellipsis" title="' + row[3] + '">' + row[3] + '<\/td>' + + '<td class="listMRr ellipsis" title="' + row[4] + '">' + row[4] + '<\/td>' + + '<td class="listMRr ellipsis" title="' + row[5] + '">' + row[5] + '<\/td>'; var nentriesacts = "<?php echo $nentriesacts; ?>"; var nentriesinterfaces = "<?php echo $nentriesinterfaces; ?>"; @@ -121,16 +124,17 @@ function format_log_line(row) { return line; } +//]]> </script> <script src="/javascript/filter_log.js" type="text/javascript"></script> -<input type="hidden" id="log-config" name="log-config" value=""> +<input type="hidden" id="log-config" name="log-config" value="" /> -<div id="log-settings" name="log-settings" class="widgetconfigdiv" style="display:none;"> +<div id="log-settings" class="widgetconfigdiv" style="display:none;"> <form action="/widgets/widgets/log.widget.php" method="post" name="iforma"> Number of lines to display: <select name="filterlogentries" class="formfld unknown" id="filterlogentries"> <?php for ($i = 0; $i <= 20; $i++) { ?> - <option value="<?php if ($i > 0) echo $i; else echo ' ';?>" <?php if ($nentries == $i) echo "SELECTED";?>><?php if ($i > 0) echo ' ' . $i; else echo ' ';?></option> + <option value="<?php if ($i > 0) echo $i; else echo ' ';?>" <?php if ($nentries == $i) echo "selected=\"selected\"";?>><?php if ($i > 0) echo ' ' . $i; else echo ' ';?></option> <?php } ?> </select> @@ -138,19 +142,19 @@ function format_log_line(row) { $Include_Act = explode(",", str_replace(" ", ",", $nentriesacts)); if ($nentriesinterfaces == "All") $nentriesinterfaces = ""; ?> - <input id="actpass" name="actpass" type="checkbox" value="Pass" <?php if (in_arrayi('Pass', $Include_Act)) echo "checked"; ?> /> Pass - <input id="actblock" name="actblock" type="checkbox" value="Block" <?php if (in_arrayi('Block', $Include_Act)) echo "checked"; ?> /> Block - <input id="actreject" name="actreject" type="checkbox" value="Reject" <?php if (in_arrayi('Reject', $Include_Act)) echo "checked"; ?> /> Reject + <input id="actpass" name="actpass" type="checkbox" value="Pass" <?php if (in_arrayi('Pass', $Include_Act)) echo "checked=\"checked\""; ?> /> Pass + <input id="actblock" name="actblock" type="checkbox" value="Block" <?php if (in_arrayi('Block', $Include_Act)) echo "checked=\"checked\""; ?> /> Block + <input id="actreject" name="actreject" type="checkbox" value="Reject" <?php if (in_arrayi('Reject', $Include_Act)) echo "checked=\"checked\""; ?> /> Reject <br/> Interfaces: - <input id="filterlogentriesinterfaces" name="filterlogentriesinterfaces" class="formfld unknown" type="text" size="20" class="formfld unknown" value="<?= $nentriesinterfaces ?>" /> -       + <input id="filterlogentriesinterfaces" name="filterlogentriesinterfaces" class="formfld unknown" type="text" size="20" value="<?= $nentriesinterfaces ?>" /> + <input id="submita" name="submita" type="submit" class="formbtn" value="Save" /> </form> </div> -<table width="100%" border="0" cellpadding="0" cellspacing="0" style="table-layout: fixed;"> +<table width="100%" border="0" cellpadding="0" cellspacing="0" style="table-layout: fixed;" summary="logs"> <colgroup> <col style='width: 8%;' /> <col style='width: 10%;' /> @@ -180,22 +184,24 @@ function format_log_line(row) { <img border="0" src="<?php echo find_action_image($filterent['act']);?>" width="11" height="11" alt="<?php echo $filterent['act'];?>" title="<?php echo $filterent['act'];?>" /> </a> </td> - <td class="listMRr ellipsis" nowrap="nowrap" title="<?php echo htmlspecialchars($filterent['interface']);?>"><?php echo htmlspecialchars($filterent['interface']);?></td> - <td class="listMRr ellipsis" nowrap="nowrap" title="<?php echo htmlspecialchars($filterent['src']);?>"><?php echo htmlspecialchars($filterent['src']);?></td> - <td class="listMRr ellipsis" nowrap="nowrap" title="<?php echo htmlspecialchars($filterent['dst']);?>"><?php echo htmlspecialchars($filterent['dst']);?></td> + <td class="listMRr ellipsis nowrap" title="<?php echo htmlspecialchars($filterent['interface']);?>"><?php echo htmlspecialchars($filterent['interface']);?></td> + <td class="listMRr ellipsis nowrap" title="<?php echo htmlspecialchars($filterent['src']);?>"><?php echo htmlspecialchars($filterent['src']);?></td> + <td class="listMRr ellipsis nowrap" title="<?php echo htmlspecialchars($filterent['dst']);?>"><?php echo htmlspecialchars($filterent['dst']);?></td> <?php if ($filterent['proto'] == "TCP") $filterent['proto'] .= ":{$filterent['tcpflags']}"; ?> - <td class="listMRr ellipsis" nowrap="nowrap" title="<?php echo htmlspecialchars($filterent['proto']);?>"><?php echo htmlspecialchars($filterent['proto']);?></td> + <td class="listMRr ellipsis nowrap" title="<?php echo htmlspecialchars($filterent['proto']);?>"><?php echo htmlspecialchars($filterent['proto']);?></td> </tr> <?php endforeach; ?> </tbody> </table> <!-- needed to display the widget settings menu --> -<script language="javascript" type="text/javascript"> +<script type="text/javascript"> +//<![CDATA[ selectIntLink = "log-configure"; textlink = document.getElementById(selectIntLink); textlink.style.display = "inline"; +//]]> </script> diff --git a/usr/local/www/widgets/widgets/picture.widget.php b/usr/local/www/widgets/widgets/picture.widget.php index 27b9df2..145768c 100644 --- a/usr/local/www/widgets/widgets/picture.widget.php +++ b/usr/local/www/widgets/widgets/picture.widget.php @@ -69,26 +69,27 @@ if($_POST) { ?> -<input type="hidden" id="picture-config" name="picture-config" value=""> +<input type="hidden" id="picture-config" name="picture-config" value="" /> -<div id="picture-settings" name="picture-settings" class="widgetconfigdiv" style="display:none;"> - </form> +<div id="picture-settings" class="widgetconfigdiv" style="display:none;"> <form action="/widgets/widgets/picture.widget.php" method="post" name="iforma" enctype="multipart/form-data"> - <input name="pictfile" type="file" class="formfld unknown" id="pictfile" size="20"></p> + <input name="pictfile" type="file" class="formfld unknown" id="pictfile" size="20" /> <input id="submita" name="submita" type="submit" class="formbtn" value="Upload" /><br/> <b>NOTE:</b> Best image size is 350x350 or smaller. </form> </div> <div id="picture-widgets" style="padding: 5px"> - <a href='/widgets/widgets/picture.widget.php?getpic=true' target='_new'> - <img border=0 width="350" height="350" src="/widgets/widgets/picture.widget.php?getpic=true"> + <a href='/widgets/widgets/picture.widget.php?getpic=true' target='_blank'> + <img border="0" width="350" height="350" src="/widgets/widgets/picture.widget.php?getpic=true" alt="picture" /> </a> </div> <!-- needed to show the settings widget icon --> -<script language="javascript" type="text/javascript"> +<script type="text/javascript"> +//<![CDATA[ selectIntLink = "picture-configure"; textlink = document.getElementById(selectIntLink); textlink.style.display = "inline"; +//]]> </script> diff --git a/usr/local/www/widgets/widgets/rss.widget.php b/usr/local/www/widgets/widgets/rss.widget.php index d7bbcbd..f955fcd 100644 --- a/usr/local/www/widgets/widgets/rss.widget.php +++ b/usr/local/www/widgets/widgets/rss.widget.php @@ -76,14 +76,13 @@ else ?> -<input type="hidden" id="rss-config" name="rss-config" value=""> +<input type="hidden" id="rss-config" name="rss-config" value="" /> -<div id="rss-settings" name="rss-settings" class="widgetconfigdiv" style="display:none;"> - </form> - <form action="/widgets/widgets/rss.widget.php" method="post" name="iforma"> - <textarea name=rssfeed class="formfld unknown" id="rssfeed" cols="40" rows="3"><?=$textarea_txt;?></textarea> +<div id="rss-settings" class="widgetconfigdiv" style="display:none;"> + <form action="/widgets/widgets/rss.widget.php" method="post" name="iformc"> + <textarea name="rssfeed" class="formfld unknown" id="rssfeed" cols="40" rows="3"><?=$textarea_txt;?></textarea> <br/> - <table> + <table summary="rss widget"> <tr> <td align="right"> Display number of items: @@ -131,7 +130,7 @@ else </td> <td> - <input id="submita" name="submita" type="submit" class="formbtn" value="Save" /> + <input id="submitc" name="submitc" type="submit" class="formbtn" value="Save" /> </td> </tr> </table> @@ -162,11 +161,11 @@ else foreach($feed->get_items() as $item) { $feed = $item->get_feed(); $feed->strip_htmltags(); - echo "<a target='_new' href='" . $item->get_permalink() . "'>" . $item->get_title() . "</a><br/>"; + echo "<a target='blank' href='" . $item->get_permalink() . "'>" . $item->get_title() . "</a><br/>"; $content = $item->get_content(); $content = strip_tags($content); echo textLimit($content, $rsswidgettextlength) . "<br/>"; - echo "Source: <a target='_new' href='" . $item->get_permalink() . "'><img src='" . $feed->get_favicon() . "' alt='" . $feed->get_title() . "' title='" . $feed->get_title() . "' border='0' width='16' height='16'></a><br/>"; + echo "Source: <a target='_blank' href='" . $item->get_permalink() . "'><img src='" . $feed->get_favicon() . "' alt='" . $feed->get_title() . "' title='" . $feed->get_title() . "' border='0' width='16' height='16' /></a><br/>"; $counter++; if($counter > $max_items) break; @@ -176,8 +175,10 @@ else </div> <!-- needed to display the widget settings menu --> -<script language="javascript" type="text/javascript"> +<script type="text/javascript"> +//<![CDATA[ selectIntLink = "rss-configure"; textlink = document.getElementById(selectIntLink); textlink.style.display = "inline"; +//]]> </script> diff --git a/usr/local/www/widgets/widgets/services_status.widget.php b/usr/local/www/widgets/widgets/services_status.widget.php index 11ecfcd..d69919b 100644 --- a/usr/local/www/widgets/widgets/services_status.widget.php +++ b/usr/local/www/widgets/widgets/services_status.widget.php @@ -46,21 +46,21 @@ if(isset($_POST['servicestatusfilter'])) { header("Location: ../../index.php"); } ?> -<input type="hidden" id="services_status-config" name="services_status-config" value=""> -<div id="services_status-settings" name="services_status-settings" class="widgetconfigdiv" style="display:none;"> - <form action="/widgets/widgets/services_status.widget.php" method="post" name="iforma"> +<input type="hidden" id="services_status-config" name="services_status-config" value="" /> +<div id="services_status-settings" class="widgetconfigdiv" style="display:none;"> + <form action="/widgets/widgets/services_status.widget.php" method="post" name="iformd"> Comma separated list of services to NOT display in the widget<br /> - <input type="text" length="30" name="servicestatusfilter" class="formfld unknown" id="servicestatusfilter" value="<?= $config['widgets']['servicestatusfilter'] ?>"> - <input id="submita" name="submita" type="submit" class="formbtn" value="Save" /> + <input type="text" size="30" name="servicestatusfilter" class="formfld unknown" id="servicestatusfilter" value="<?= $config['widgets']['servicestatusfilter'] ?>" /> + <input id="submitd" name="submitd" type="submit" class="formbtn" value="Save" /> </form> </div> -<table width="100%" border="0" cellpadding="0" cellspacing="0"> +<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="services"> <tr> - <td class="widgetsubheader"><b><center>Service</center></b></td> - <td class="widgetsubheader"><b><center>Description</center></b></td> - <td class="widgetsubheader"><b><center>Status</center></b></td> - <td class="widgetsubheader"> </td> + <td class="widgetsubheader" align="center"><b>Service></b></td> + <td class="widgetsubheader" align="center"><b>Description</b></td> + <td class="widgetsubheader" align="center"><b>Status</b></td> + <td class="widgetsubheader"> </td> </tr> <?php $skipservices = explode(",", $config['widgets']['servicestatusfilter']); @@ -76,19 +76,21 @@ if (count($services) > 0) { echo '<tr><td class="listlr">' . $service['name'] . '</td>' . "\n"; echo '<td class="listr">' . $service_desc[0] . '</td>' . "\n"; echo get_service_status_icon($service, false, true); - echo '<td valign="middle" class="list" nowrap>'; + echo '<td valign="middle" class="list nowrap">'; echo get_service_control_links($service); echo "</td></tr>\n"; } } else { - echo "<tr><td colspan=\"3\"><center>" . gettext("No services found") . ".</td></tr>\n"; + echo "<tr><td colspan=\"3\" align=\"center\">" . gettext("No services found") . ".</td></tr>\n"; } ?> </table> <!-- needed to display the widget settings menu --> -<script language="javascript" type="text/javascript"> +<script type="text/javascript"> +//<![CDATA[ selectIntLink = "services_status-configure"; textlink = document.getElementById(selectIntLink); textlink.style.display = "inline"; +//]]> </script> diff --git a/usr/local/www/widgets/widgets/system_information.widget.php b/usr/local/www/widgets/widgets/system_information.widget.php index 02e1439..403b24c 100644 --- a/usr/local/www/widgets/widgets/system_information.widget.php +++ b/usr/local/www/widgets/widgets/system_information.widget.php @@ -83,8 +83,8 @@ if($_REQUEST['getupdatestatus']) { $curcfg = $config['system']['firmware']; ?> -</script> -<table width="100%" border="0" cellspacing="0" cellpadding="0"> + +<table width="100%" border="0" cellspacing="0" cellpadding="0" summary="system information"> <tbody> <tr> <td width="25%" class="vncellt">Name</td> @@ -98,7 +98,7 @@ $curcfg = $config['system']['firmware']; <br /> built on <?php readfile("/etc/version.buildtime"); ?> <br /> - <div name="uname" id="uname"><a href="#" onClick='swapuname(); return false;'><?php echo php_uname("s") . " " . php_uname("r"); ?></a></div> + <div id="uname"><a href="#" onclick='swapuname(); return false;'><?php echo php_uname("s") . " " . php_uname("r"); ?></a></div> <?php if(!isset($config['system']['firmware']['disablecheck'])): ?> <div id='updatestatus'><br/><?php echo gettext("Obtaining update status"); ?> ...</div> <?php endif; ?> @@ -168,7 +168,7 @@ $curcfg = $config['system']['firmware']; <?php $dns_servers = get_dns_servers(); foreach($dns_servers as $dns) { - echo "{$dns}<br>"; + echo "{$dns}<br/>"; } ?> </td> @@ -202,7 +202,7 @@ $curcfg = $config['system']['firmware']; <td width="25%" class="vncellt">Temperature</td> <td width="75%" class="listr"> <?php $TempMeter = $temp = get_temp(); ?> - <img src="./themes/<?= $g['theme']; ?>/images/misc/bar_left.gif" height="15" width="4" border="0" align="middle" alt="left bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_blue.gif" height="15" name="tempwidtha" id="tempwidtha" width="<?= $TempMeter; ?>" border="0" align="middle" alt="red bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_gray.gif" height="15" name="tempwidthb" id="tempwidthb" width="<?= (100 - $TempMeter); ?>" border="0" align="middle" alt="gray bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_right.gif" height="15" width="5" border="0" align="middle" alt="right bar" /> + <img src="./themes/<?= $g['theme']; ?>/images/misc/bar_left.gif" height="15" width="4" border="0" align="middle" alt="left bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_blue.gif" height="15" name="tempwidtha" id="tempwidtha" width="<?= round($TempMeter); ?>" border="0" align="middle" alt="red bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_gray.gif" height="15" name="tempwidthb" id="tempwidthb" width="<?= (100 - $TempMeter); ?>" border="0" align="middle" alt="gray bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_right.gif" height="15" width="5" border="0" align="middle" alt="right bar" /> <span id="tempmeter"><?= $temp."°C"; ?></span> </td> @@ -255,6 +255,7 @@ $curcfg = $config['system']['firmware']; </tbody> </table> <script type="text/javascript"> +//<![CDATA[ function swapuname() { jQuery('#uname').html("<?php echo php_uname("a"); ?>"); } @@ -278,4 +279,5 @@ $curcfg = $config['system']['firmware']; } setTimeout('getstatus()', 4000); <?php endif; ?> +//]]> </script> |