This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

User Access Log on Vis
#3
(06.05.2022, 08:26)admin Wrote: Via .lp file:
Code:
<!DOCTYPE html> <html> <head>   <meta charset="UTF-8">   <link rel="stylesheet" href="/apps/css/bootstrap.css"> </head> <body> <table class="table table-striped"> <tr>   <th>Date/time</th>   <th>Login</th>   <th>Name</th>   <th>IP</th> </tr> <? require('apps') items = db:getall([[   SELECT user_logs.*, users.name   FROM user_logs   JOIN users ON user_logs.login=users.login   ORDER BY user_logs.id DESC   LIMIT 50 ]]) for _, item in ipairs(items) do   cls = toboolean(item.failed) and 'danger' or 'success'   datetime = os.date('%Y.%m.%d %H:%M:%S', item.created) ?> <tr class="<?=cls?>">   <td><?=datetime?></td>   <td><?=escape(item.login)?></td>   <td><?=escape(item.name)?></td>   <td><?=escape(item.ip)?></td> </tr> <? end ?> </table> </body> </html>
 Many thanks for your help
Reply


Messages In This Thread
User Access Log on Vis - by sjfp - 03.05.2022, 08:38
RE: User Access Log on Vis - by admin - 06.05.2022, 08:26
RE: User Access Log on Vis - by sjfp - 06.05.2022, 13:43
RE: User Access Log on Vis - by khalil - 07.05.2022, 09:57
RE: User Access Log on Vis - by khalil - 08.05.2022, 15:47

Forum Jump: