31.05.2021, 09:00
You can place it via an iframe similar to this example: https://forum.logicmachine.net/showthread.php?tid=3331
Keep in mind that this will work only locally, not via cloud.
Code for logs.lp:
Keep in mind that this will work only locally, not via cloud.
Code for logs.lp:
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>Script name</th>
<th>Log</th>
</tr>
<?
require('apps')
items = db:getall([[
SELECT * FROM logs
ORDER BY logtime DESC
LIMIT 50
]])
for _, item in ipairs(items) do
datetime = os.date('%Y.%m.%d %H:%M:%S', item.logtime)
?>
<tr>
<td><?=datetime?></td>
<td><?=escape(item.scriptname)?></td>
<td><?=escape(item.log)?></td>
</tr>
<? end ?>
</table>
</body>
</html>