From 4e53956addb597d99a76d10d302ab56faad88bf8 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 16 Apr 2013 20:16:15 +0400 Subject: implement error log viewer --- classes/pref/prefs.php | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'classes/pref/prefs.php') diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index 29541e04d..c6d41c15b 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -723,6 +723,51 @@ class Pref_Prefs extends Handler_Protected { print ""; #pane + if ($_SESSION["access_level"] == 10) { + + print "
"; + print "

".__("Error Log")."

"; + + $result = db_query($this->link, "SELECT errno, errstr, filename, lineno, + created_at, login FROM ttrss_error_log + LEFT JOIN ttrss_users ON (owner_uid = ttrss_users.id) + ORDER BY ttrss_error_log.id DESC + LIMIT 100"); + + print "

"; + + print " + + + + + + "; + + while ($line = db_fetch_assoc($result)) { + print ""; + + foreach ($line as $k => $v) { + $line[$k] = htmlspecialchars($v); + } + + print ""; + print ""; + print ""; + print ""; + + print ""; + + print ""; + } + + print "
".__("Error")."".__("Filename")."".__("Message")."".__("User")."".__("Date")."
" . Logger::$errornames[$line["errno"]] . " (" . $line["errno"] . ")" . $line["filename"] . ":" . $line["lineno"] . "" . $line["errstr"] . "" . + make_local_datetime($this->link, + $line["created_at"], false) . "
"; + + print "

"; + } + print "
"; print "

".__("Plugins")."

"; -- cgit v1.2.3