diff options
author | Jared Dillard <jdillard@netgate.com> | 2016-07-12 18:08:22 -0500 |
---|---|---|
committer | Jared Dillard <jdillard@netgate.com> | 2016-07-12 18:10:37 -0500 |
commit | f78b316a336a685ac5873c42934685262a1f4ade (patch) | |
tree | ccf301a3e368afac4b9043ef2dffed5394178faf /src/usr/local/www | |
parent | ff24fa40b508386abf8f1aff27e9e554e9cd44fd (diff) | |
download | pfsense-f78b316a336a685ac5873c42934685262a1f4ade.zip pfsense-f78b316a336a685ac5873c42934685262a1f4ade.tar.gz |
clean up captive poral widget
Diffstat (limited to 'src/usr/local/www')
-rw-r--r-- | src/usr/local/www/widgets/widgets/captive_portal_status.widget.php | 80 |
1 files changed, 31 insertions, 49 deletions
diff --git a/src/usr/local/www/widgets/widgets/captive_portal_status.widget.php b/src/usr/local/www/widgets/widgets/captive_portal_status.widget.php index f610cf0..3180447 100644 --- a/src/usr/local/www/widgets/widgets/captive_portal_status.widget.php +++ b/src/usr/local/www/widgets/widgets/captive_portal_status.widget.php @@ -107,53 +107,35 @@ foreach ($a_cp as $cpzone => $cp) { } } -if ($_GET['order']) { - if ($_GET['order'] == "ip") { - $order = 2; - } else if ($_GET['order'] == "mac") { - $order = 3; - } else if ($_GET['order'] == "user") { - $order = 4; - } else if ($_GET['order'] == "lastact") { - $order = 5; - } else if ($_GET['order'] == "zone") { - $order = 10; - } else { - $order = 0; - } - usort($cpdb_all, "clientcmp"); -} -?> -<table class="table table-condensed sortable-theme-bootstrap" data-sortable> - <thead> - <tr> - <th><a href="?order=ip&showact=<?=$showact;?>"><?=gettext("IP address");?></a></th> - <th><a href="?order=mac&showact=<?=$showact;?>"><?=gettext("MAC address");?></a></th> - <th><a href="?order=user&showact=<?=$showact;?>"><?=gettext("Username");?></a></th> -<?php if ($showact == 1): ?> - <th><a href="?order=start&showact=<?=$showact;?>"><?=gettext("Session start");?></a></th> - <th><a href="?order=start&showact=<?=$showact;?>"><?=gettext("Last activity");?></a></th> -<?php endif; ?> - </tr> - </thead> - <tbody> -<?php foreach ($cpdb_all as $cpent): ?> - <tr> - <td><?=$cpent[2];?></td> - <td><?=$cpent[3];?></td> - <td><?=$cpent[4];?></td> -<?php if ($showact == 1): ?> - <td><?=date("m/d/Y H:i:s", $cpent[0]);?></td> - <td><?php if ($cpent[11] && ($cpent[11] > 0)) echo date("m/d/Y H:i:s", $cpent[11]);?></td> -<?php endif; ?> - <td> - <a href="?order=<?=htmlspecialchars($_GET['order']);?>&showact=<?=$showact;?>&act=del&zone=<?=$cpent[10];?>&id=<?=$cpent[5];?>"> - <i class="fa fa-trash" title="<?=gettext("delete");?>"></i> - </a> - </td> - </tr> -<?php -endforeach; ?> - </tbody> -</table> +<div class="table-responsive"> + <table class="table table-condensed sortable-theme-bootstrap" data-sortable> + <thead> + <tr> + <th><?=gettext("IP address");?></th> + <th><?=gettext("MAC address");?></th> + <th><?=gettext("Username");?></th> + <th><?=gettext("Session start");?></th> + <th><?=gettext("Last activity");?></th> + </tr> + </thead> + <tbody> + <?php foreach ($cpdb_all as $cpent): ?> + <tr> + <td><?=$cpent[2];?></td> + <td><?=$cpent[3];?></td> + <td><?=$cpent[4];?></td> + <td><?=date("m/d/Y H:i:s", $cpent[0]);?></td> + <td><?php if ($cpent[11] && ($cpent[11] > 0)) echo date("m/d/Y H:i:s", $cpent[11]);?></td> + <td> + <a href="?order=<?=htmlspecialchars($_GET['order']);?>&showact=<?=$showact;?>&act=del&zone=<?=$cpent[10];?>&id=<?=$cpent[5];?>"> + <i class="fa fa-trash" title="<?=gettext("delete");?>"></i> + </a> + </td> + </tr> + <?php + endforeach; + ?> + </tbody> + </table> +</div> |