= '10') { mysql_query("TRUNCATE TABLE `syslog`"); } ?>
= '5') { $sql = "SELECT *, DATE_FORMAT(timestamp, '%D %b %T') AS date from syslog WHERE 1 $where ORDER BY timestamp DESC LIMIT 1000"; } else { $sql = "SELECT *, DATE_FORMAT(timestamp, '%D %b %T') AS date from syslog AS S, devices_perms AS P WHERE S.device_id = P.device_id AND P.user_id = " . $_SESSION['user_id'] . " $where ORDER BY timestamp DESC LIMIT 1000"; } $query = mysql_query($sql); echo(""); while ($entry = mysql_fetch_array($query)) { $entry = array_merge($entry, device_by_id_cache($entry['device_id'])); include("includes/print-syslog.inc.php"); } echo("
"); ?>