Historique récent
prepare("
SELECT amount, reason, created_at
FROM logs
WHERE user_id = :uid OR user_id = :discord_id
ORDER BY created_at DESC
");
$stmt->execute([
':uid' => $user['id'],
':discord_id' => $user['discord_id']
]);
$logs = $stmt->fetchAll();
if (!$logs): ?>
Aucun historique.
| Date |
Montant |
Raison |
= 0 ? '#d4f7d4' : '#f7d4d4'; // vert pale si gain, rouge pale si perte
?>
| = htmlspecialchars($l['created_at']) ?> |
= $amount ?> |
= htmlspecialchars($l['reason']) ?> |