diff options
author | Chris Buechler <cmb@pfsense.org> | 2012-12-28 16:38:57 -0800 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2012-12-28 16:38:57 -0800 |
commit | 9d81dcdf3ecc79ca42e161bdbcd6149ca5fdf0fb (patch) | |
tree | 6fedf97cd5d9eaf9747535126e72bd06f8360579 /usr/local | |
parent | 894f18ef3125ef0e1402dfc1fcb40b7d3023e699 (diff) | |
parent | 339688b2c0ead22366dd33de04b89203dfa05963 (diff) | |
download | pfsense-9d81dcdf3ecc79ca42e161bdbcd6149ca5fdf0fb.zip pfsense-9d81dcdf3ecc79ca42e161bdbcd6149ca5fdf0fb.tar.gz |
Merge pull request #297 from bcyrill/patch-15
Fix: last activity on CP status
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/status_captiveportal.php | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/usr/local/www/status_captiveportal.php b/usr/local/www/status_captiveportal.php index ed61e86..942cd77 100755 --- a/usr/local/www/status_captiveportal.php +++ b/usr/local/www/status_captiveportal.php @@ -79,13 +79,7 @@ function clientcmp($a, $b) { if (!empty($cpzone)) { $cpdb = captiveportal_read_db(); - $concurrent = count($cpdb); - foreach ($cpdb as $cpent) { - $sessionid = $cpent[5]; - if ($_GET['showact']) - $cpent[5] = captiveportal_get_last_activity($cpent[2]); - } if ($_GET['order']) { if ($_GET['order'] == "ip") $order = 2; @@ -165,8 +159,9 @@ if (!empty($cpzone)) { <td class="listr"><?=$cpent[3];?> </td> <td class="listr"><?=$cpent[4];?> </td> <td class="listr"><?=htmlspecialchars(date("m/d/Y H:i:s", $cpent[0]));?></td> - <?php if ($_GET['showact']): ?> - <td class="listr"><?php if ($cpent[5]) echo htmlspecialchars(date("m/d/Y H:i:s", $cpent[5]));?></td> + <?php if ($_GET['showact']): + $last_act = captiveportal_get_last_activity($cpent[2]); ?> + <td class="listr"><?php if ($last_act != 0) echo htmlspecialchars(date("m/d/Y H:i:s", $last_act));?></td> <?php endif; ?> <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> |