diff --git a/plugins/displaylog/index.php b/plugins/displaylog/index.php new file mode 100644 index 0000000..6204edf --- /dev/null +++ b/plugins/displaylog/index.php @@ -0,0 +1,54 @@ +query('SELECT FROM_UNIXTIME(time), type, function, line, text FROM lychee_log;'); + +# Output +if ($result === FALSE) { + echo('Everything looks fine, Lychee has not reported any problems!' . PHP_EOL . PHP_EOL); +} else { + while ( $row = $result->fetch_row() ) { + + # Encode result before printing + htmlentities($row); + + # Format: time TZ - type - function(line) - text + printf ("%s %s - %s - %s (%s) \t- %s\n", $row[0], date_default_timezone_get(), $row[1], $row[2], $row[3], $row[4]); + } + +} + +?>