Mercurial Hosting > linkmystyle
comparison src/private/reports/registers.html.luan @ 0:8f4df159f06b
start public repo
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Fri, 11 Jul 2025 20:57:49 -0600 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:8f4df159f06b |
|---|---|
| 1 local Luan = require "luan:Luan.luan" | |
| 2 local error = Luan.error | |
| 3 local ipairs = Luan.ipairs or error() | |
| 4 local Io = require "luan:Io.luan" | |
| 5 local Http = require "luan:http/Http.luan" | |
| 6 local User = require "site:/lib/User.luan" | |
| 7 local Logging = require "luan:logging/Logging.luan" | |
| 8 local logger = Logging.logger "reports/registers.html" | |
| 9 | |
| 10 | |
| 11 return function() | |
| 12 local users = User.search("type:user","id desc",100) | |
| 13 Io.stdout = Http.response.text_writer() | |
| 14 %> | |
| 15 <!doctype html> | |
| 16 <html lang="en"> | |
| 17 <head> | |
| 18 <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| 19 <style> | |
| 20 @import "/tools/tools.css"; | |
| 21 </style> | |
| 22 </head> | |
| 23 <body> | |
| 24 <h1>registers</h1> | |
| 25 <table> | |
| 26 <tr> | |
| 27 <th>email</th> | |
| 28 <th>name</th> | |
| 29 <th>code</th> | |
| 30 </tr> | |
| 31 <% | |
| 32 for _, user in ipairs(users) do | |
| 33 local code = user.code | |
| 34 if code == nil then | |
| 35 continue | |
| 36 end | |
| 37 %> | |
| 38 <tr> | |
| 39 <td><%= user.email %></td> | |
| 40 <td><a href="/register2.html?user=<%=user.name%>"><%= user.name %></a></td> | |
| 41 <td><%= code %></td> | |
| 42 </tr> | |
| 43 <% | |
| 44 end | |
| 45 %> | |
| 46 </table> | |
| 47 </body> | |
| 48 </html> | |
| 49 <% | |
| 50 end |
