19.10.2023, 11:06
Check this
Code:
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'
log(item.login,item.name, cls, item.ip)
end
------------------------------
Ctrl+F5
Ctrl+F5