Files
Roosters/php/getLog.php
T
2026-06-17 11:55:21 +02:00

19 lines
800 B
PHP

<?php
SESSION_START();
require('connect.php');
if($_SESSION['login']>1){
$query = "SELECT `name`, `last_login_ip`, `last_login` FROM `login` WHERE `last_login`!='0000-00-00 00:00:00' ORDER BY `last_login` DESC LIMIT 0,20";
$result_temp = mysql_query($query, $connection);
$table = "<table cellpadding=2 class='bericht'><tr><th width='180' align='left'>Gebruiker</th><th width='220' align='left' class='leftline'>Datum</th><th width='200' align='left' class='leftline'>IP Adres</th></tr>";
while($result = mysql_fetch_assoc($result_temp)){
$table .= "<tr><td>" . $result['name'] . "</td><td class='leftline'>" . $result['last_login'] . "</td><td class='leftline'>" . $result['last_login_ip'] . "</td><tr>";
}
$table .= "</table>";
echo $table;
}
else { echo false; }
?>