| 1 | <html> |
|---|
| 2 | <head> |
|---|
| 3 | <title>User Statistics</title> |
|---|
| 4 | </head> |
|---|
| 5 | <body> |
|---|
| 6 | |
|---|
| 7 | <table> |
|---|
| 8 | <tr> |
|---|
| 9 | <td><b>Online Status:</b></td> |
|---|
| 10 | <td> |
|---|
| 11 | {if $userinfo.online_status == ONLINE_STATUS_ONLINE} |
|---|
| 12 | <font color="#008000"><b>Online</b></font> |
|---|
| 13 | {elseif $userinfo.online_status == ONLINE_STATUS_OFFLINE} |
|---|
| 14 | Offline |
|---|
| 15 | {else} |
|---|
| 16 | Unknown |
|---|
| 17 | {/if} |
|---|
| 18 | </td> |
|---|
| 19 | </tr> |
|---|
| 20 | <tr> |
|---|
| 21 | <td><b>User email:</b></td> |
|---|
| 22 | <td>{$userinfo.email}</td> |
|---|
| 23 | </tr> |
|---|
| 24 | <tr> |
|---|
| 25 | <td><b>User ID:</b></td> |
|---|
| 26 | <td>{$userinfo.user_id}</td> |
|---|
| 27 | </tr> |
|---|
| 28 | <tr> |
|---|
| 29 | <td><b>Registered on:</b></td> |
|---|
| 30 | <td>{$userinfo.reg_date|date_format:"%Y/%m/%d"}</td> |
|---|
| 31 | </tr> |
|---|
| 32 | <tr> |
|---|
| 33 | <td><b>Account Status:</b></td> |
|---|
| 34 | <td>{$userinfo.account_status_description}</td> |
|---|
| 35 | </tr> |
|---|
| 36 | <tr> |
|---|
| 37 | <td><b>Registered on:</b></td> |
|---|
| 38 | <td>{$userinfo.reg_date|date_format:"%Y/%m/%d"}</td> |
|---|
| 39 | </tr> |
|---|
| 40 | </table> |
|---|
| 41 | |
|---|
| 42 | {if $connections} |
|---|
| 43 | <p><b>Connections:</b></p> |
|---|
| 44 | |
|---|
| 45 | <table border="1"> |
|---|
| 46 | <tr> |
|---|
| 47 | <td><b>Date In</b></td> |
|---|
| 48 | <td><b>Date Out</b></td> |
|---|
| 49 | <td><b>Token status</b></td> |
|---|
| 50 | <td><b>User's MAC</b></td> |
|---|
| 51 | <td><b>User's IP</b></td> |
|---|
| 52 | <td><b>Hotspot ID</b></td> |
|---|
| 53 | <td><b>Hotspot IP</b></td> |
|---|
| 54 | <td><b>Incoming traffic</b></td> |
|---|
| 55 | <td><b>Outgoing traffic</b></td> |
|---|
| 56 | </tr> |
|---|
| 57 | {foreach from=$connections item=connection} |
|---|
| 58 | <tr> |
|---|
| 59 | <td>{$connection.timestamp_in}</td> |
|---|
| 60 | <td>{$connection.timestamp_out}</td> |
|---|
| 61 | <td>{$connection.token_status_description}</td> |
|---|
| 62 | <td>{$connection.user_mac}</td> |
|---|
| 63 | <td>{$connection.user_ip}</td> |
|---|
| 64 | <td>{$connection.node_id}</td> |
|---|
| 65 | <td>{$connection.node_ip}</td> |
|---|
| 66 | <td align="right">{$connection.incoming}</td> |
|---|
| 67 | <td align="right">{$connection.outgoing}</td> |
|---|
| 68 | </tr> |
|---|
| 69 | {/foreach} |
|---|
| 70 | <tr> |
|---|
| 71 | <td COLSPAN=7 align="right">Total</td> |
|---|
| 72 | <td align="right">{$total.incoming}</td> |
|---|
| 73 | <td align="right">{$total.outgoing}</td> |
|---|
| 74 | </tr> |
|---|
| 75 | </table> |
|---|
| 76 | {else} |
|---|
| 77 | <p><b>No connections from this user yet!</b></p> |
|---|
| 78 | {/if} |
|---|
| 79 | |
|---|
| 80 | </body> |
|---|
| 81 | </html> |
|---|
| 82 | |
|---|