diff options
author | bcyrill <cyrill@bannwart.info> | 2012-12-29 00:48:41 +0100 |
---|---|---|
committer | bcyrill <cyrill@bannwart.info> | 2012-12-29 00:48:41 +0100 |
commit | 339688b2c0ead22366dd33de04b89203dfa05963 (patch) | |
tree | 55f8d4c57b100547bd9ebbb32767f64a34233ada | |
parent | 43affef2c1bb3728b5df3687f3ea8074d88292cc (diff) | |
download | pfsense-339688b2c0ead22366dd33de04b89203dfa05963.zip pfsense-339688b2c0ead22366dd33de04b89203dfa05963.tar.gz |
Fix: last activity on CP status
-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> |