diff --git a/includes/model/LogEntries_model.php b/includes/model/LogEntries_model.php index d8615f0e..5659c0ee 100644 --- a/includes/model/LogEntries_model.php +++ b/includes/model/LogEntries_model.php @@ -6,10 +6,15 @@ * @param $message Log Message */ function LogEntry_create($nick, $message) { - $timestamp = date(); + $timestamp = time(); sql_query("INSERT INTO `LogEntries` SET `timestamp`=" . sql_escape($timestamp) . ", `nick`='" . sql_escape($nick) . "', `message`='" . sql_escape($message) . "'"); } +function LogEntries() { + $log_entries_source = sql_select("SELECT * FROM `LogEntries` WHERE `timestamp` > " . (time() - 24*60*60) . " LIMIT 1000"); + return $log_entries_source; +} + ?> \ No newline at end of file diff --git a/includes/pages/admin_log.php b/includes/pages/admin_log.php index 4a29a496..ce30a246 100644 --- a/includes/pages/admin_log.php +++ b/includes/pages/admin_log.php @@ -1,76 +1,20 @@ 0) { - $html .= "
Time | \n\tUser | \n\tCommend | \n\tSQL Command | \n
---|---|---|---|
" . mysql_result($Erg, $n, "Time") . " | \n"; - $html .= "\t" . UID2Nick(mysql_result($Erg, $n, "UID")) . displayavatar(mysql_result($Erg, $n, "UID")) . " | \n"; - $html .= "\t" . mysql_result($Erg, $n, "Commend") . " | \n"; - $html .= "\t" . mysql_result($Erg, $n, "SQLCommad") . " | \n"; - $html .= "