Files
PHP_Bot-ModInterface/software/v0.0.1/web/slots.php
Thomas a184c31cca Software
v0.0..1
2025-10-05 14:58:05 +02:00

47 lines
1.3 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
require_once __DIR__ . '/guard.php';
require_login();
$db = new PDO('sqlite:' . dirname(__DIR__) . '/data/app.db');
// Hent de 50 seneste spins
$rows = $db->query('SELECT * FROM slots_spins ORDER BY id DESC LIMIT 50')->fetchAll(PDO::FETCH_ASSOC);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Emote Slots</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="wrap">
<div class="card">
<h2>🎰 Emote Slot Seneste spins</h2>
<p><a class="btn" href="index.php">← Tilbage</a></p>
<table>
<tr>
<th>Tid</th>
<th>Bruger</th>
<th>Indsats</th>
<th>Resultat</th>
<th>Udbetaling</th>
</tr>
<?php foreach ($rows as $r): ?>
<?php $res = $r['r1'] . ' | ' . $r['r2'] . ' | ' . $r['r3']; ?>
<tr>
<td><?php echo htmlspecialchars($r['ts']); ?></td>
<td>@<?php echo htmlspecialchars($r['user_login']); ?></td>
<td><?php echo (int)$r['amount']; ?></td>
<td><?php echo htmlspecialchars($res); ?></td>
<td><?php echo (int)$r['payout']; ?></td>
</tr>
<?php endforeach; ?>
</table>
</div>
</div>
</body>
</html>