diff options
author | Phil Davis <phil.davis@inf.org> | 2015-05-27 16:25:15 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2015-05-27 16:25:15 +0545 |
commit | 699737d90221580b18adfbd30abdbd609803cffd (patch) | |
tree | c899d693cdc72c36c9893d8f58d5f9d18217f703 /usr/local/www/diag_dump_states.php | |
parent | 7fd939939c7cfd73ea5e944e05ce28a73cb073e2 (diff) | |
download | pfsense-699737d90221580b18adfbd30abdbd609803cffd.zip pfsense-699737d90221580b18adfbd30abdbd609803cffd.tar.gz |
Code style www diag more bits
Diffstat (limited to 'usr/local/www/diag_dump_states.php')
-rwxr-xr-x | usr/local/www/diag_dump_states.php | 59 |
1 files changed, 30 insertions, 29 deletions
diff --git a/usr/local/www/diag_dump_states.php b/usr/local/www/diag_dump_states.php index 1cc844a..1a2f435 100755 --- a/usr/local/www/diag_dump_states.php +++ b/usr/local/www/diag_dump_states.php @@ -69,7 +69,7 @@ if (isset($_POST['filter']) && isset($_POST['killfilter'])) { } } -$pgtitle = array(gettext("Diagnostics"),gettext("Show States")); +$pgtitle = array(gettext("Diagnostics"), gettext("Show States")); include("head.inc"); ?> @@ -80,10 +80,10 @@ include("head.inc"); <script type="text/javascript"> //<![CDATA[ function removeState(srcip, dstip) { - var busy = function(index,icon) { - jQuery(icon).bind("onclick",""); - jQuery(icon).attr('src',jQuery(icon).attr('src').replace("\.gif", "_d.gif")); - jQuery(icon).css("cursor","wait"); + var busy = function(index, icon) { + jQuery(icon).bind("onclick", ""); + jQuery(icon).attr('src', jQuery(icon).attr('src').replace("\.gif", "_d.gif")); + jQuery(icon).css("cursor", "wait"); } jQuery('img[name="i:' + srcip + ":" + dstip + '"]').each(busy); @@ -110,7 +110,7 @@ include("head.inc"); } jQuery('tr[id="r:' + values[1] + ":" + values[2] + '"]').each( - function(index,row) { jQuery(row).fadeOut(1000); } + function(index, row) { jQuery(row).fadeOut(1000); } ); } //]]> @@ -179,7 +179,7 @@ include("head.inc"); $row = 0; /* get our states */ $grepline = (isset($_POST['filter'])) ? "| /usr/bin/egrep " . escapeshellarg(htmlspecialchars($_POST['filter'])) : ""; -$fd = popen("/sbin/pfctl -s state {$grepline}", "r" ); +$fd = popen("/sbin/pfctl -s state {$grepline}", "r"); while ($line = chop(fgets($fd))) { if ($row >= 10000) { break; @@ -203,34 +203,35 @@ while ($line = chop(fgets($fd))) { $dstip = trim($parts[0]); ?> - <tr valign="top" id="r:<?= $srcip ?>:<?= $dstip ?>"> - <td class="listlr"><?= $iface ?></td> - <td class="listr"><?= $proto ?></td> - <td class="listr"><?= $info ?></td> - <td class="listr"><?= $state ?></td> - <td class="list"> - <img src="/themes/<?= $g['theme'] ?>/images/icons/icon_x.gif" height="17" width="17" border="0" - onclick="removeState('<?= $srcip ?>', '<?= $dstip ?>');" style="cursor:pointer;" - name="i:<?= $srcip ?>:<?= $dstip ?>" - title="<?= gettext('Remove all state entries from') ?> <?= $srcip ?> <?= gettext('to') ?> <?= $dstip ?>" alt="" /> - </td> - </tr> + <tr valign="top" id="r:<?= $srcip ?>:<?= $dstip ?>"> + <td class="listlr"><?= $iface ?></td> + <td class="listr"><?= $proto ?></td> + <td class="listr"><?= $info ?></td> + <td class="listr"><?= $state ?></td> + <td class="list"> + <img src="/themes/<?= $g['theme'] ?>/images/icons/icon_x.gif" height="17" width="17" border="0" + onclick="removeState('<?= $srcip ?>', '<?= $dstip ?>');" style="cursor:pointer;" + name="i:<?= $srcip ?>:<?= $dstip ?>" + title="<?= gettext('Remove all state entries from') ?> <?= $srcip ?> <?= gettext('to') ?> <?= $dstip ?>" alt="" /> + </td> + </tr> <?php $row++; ob_flush(); } -if ($row == 0): ?> - <tr> - <td class="list" colspan="4" align="center" valign="top"> - <?= gettext("No states were found.") ?> - </td> - </tr> +if ($row == 0): +?> + <tr> + <td class="list" colspan="4" align="center" valign="top"> + <?= gettext("No states were found.") ?> + </td> + </tr> <?php endif; pclose($fd); ?> - </tbody> + </tbody> </table> </td> </tr> @@ -245,9 +246,9 @@ pclose($fd); <!-- End of tab content --> - </div> - </td> - </tr> + </div> + </td> + </tr> </table> <?php require("fend.inc"); ?> |