123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- $lychee = __DIR__ . '/../../';
- require($lychee . 'php/define.php');
- require($lychee . 'php/autoload.php');
- require($lychee . 'php/modules/misc.php');
- header('content-type: text/plain');
- if (!file_exists(LYCHEE_CONFIG_FILE)) exit('Error 001: Configuration not found. Please install Lychee first.');
- require(LYCHEE_CONFIG_FILE);
- $result = '';
- $database = new mysqli($dbHost, $dbUser, $dbPassword, $dbName);
- if (mysqli_connect_errno()!=0) {
- echo 'Error 100: ' . mysqli_connect_errno() . ': ' . mysqli_connect_error() . '' . PHP_EOL;
- exit();
- }
- $result = $database->query('SELECT FROM_UNIXTIME(time), type, function, line, text FROM lychee_log;');
- if ($result === FALSE) {
- echo('Everything looks fine, Lychee has not reported any problems!' . PHP_EOL . PHP_EOL);
- } else {
- while ( $row = $result->fetch_row() ) {
-
- $row = array_map("htmlentities", $row);
-
- printf ("%s %s - %s - %s (%s) \t- %s\n", $row[0], date_default_timezone_get(), $row[1], $row[2], $row[3], $row[4]);
- }
- }
- ?>
|