From 11ee95dadc408e16e9832af9fd0b41495e78b0a6 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 19 Oct 2000 13:31:23 +0000 Subject: A big, fat commit with a shitload of internal changes. Not that much visual changes: - removed redundant files user.class.php, calendar.class.php and backend.class.php. - converted *all* mysql queries to queries supported by the database abstraction layer. - expanded the watchdog to record more information on what actually happened. - bugfix: anonymous readers where not able to view comments. - bugfix: anonymous readers could gain read-only access to the submission queue. - bugfix: invalid includes in backend.php - bugfix: invalid use of '$user->block' and last but not least: - redid 50% of the user account system --- admin.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'admin.php') diff --git a/admin.php b/admin.php index 9cc637d6b..05737b1c6 100644 --- a/admin.php +++ b/admin.php @@ -8,7 +8,7 @@ if ($user->userid != "Dries") exit(); */ function account_display($order = "username") { - $sort = array("ID" => "id", "fake e-mail address" => "femail", "homepage" => "url", "hostname" => "last_host", "last access date" => "last_access", "real e-mail address" => "email", "real name" => "name", "status" => "status", "theme" => "theme", "username" => "userid"); + $sort = array("ID" => "id", "fake e-mail address" => "fake_email", "homepage" => "url", "hostname" => "last_host", "last access date" => "last_access", "real e-mail address" => "real_email", "real name" => "name", "status" => "status", "theme" => "theme", "username" => "userid"); $show = array("ID" => "id", "username" => "userid", "$order" => "$sort[$order]", "status" => "status"); ### Perform query: @@ -39,7 +39,7 @@ function account_display($order = "username") { $output .= " \n"; foreach ($show as $key=>$value) { switch($value) { - case "email": + case "real_email": $output .= " ". format_email_address($account[$value]) ."\n"; break; case "last_access": @@ -91,8 +91,8 @@ function account_view($name) { $output .= " ID:$account->id\n"; $output .= " Username:$account->userid\n"; $output .= " Real name:". format_data($account->name) ."\n"; - $output .= " Real e-mail address:". format_email_address($account->email) ."\n"; - $output .= " Fake e-mail address:". format_data($account->femail) ."\n"; + $output .= " Real e-mail address:". format_email_address($account->real_email) ."\n"; + $output .= " Fake e-mail address:". format_data($account->fake_email) ."\n"; $output .= " URL of homepage:". format_url($account->url) ."\n"; $output .= " Last access:". format_date($account->last_access) ." from $account->last_host\n"; $output .= " Bio information:". format_data($account->bio) ."\n"; @@ -110,10 +110,10 @@ function account_view($name) { */ function log_display($order = "date") { $colors = array("#FFFFFF", "#FFFFFF", "#90EE90", "#CD5C5C"); - $fields = array("date" => "id DESC", "username" => "user", "message" => "message DESC", "level" => "level DESC"); + $fields = array("date" => "id DESC", "username" => "user", "location" => "location", "message" => "message DESC", "level" => "level DESC"); ### Perform query: - $result = db_query("SELECT l.*, u.userid FROM logs l LEFT JOIN users u ON l.user = u.id ORDER BY l.$fields[$order]"); + $result = db_query("SELECT l.*, u.userid FROM watchdog l LEFT JOIN users u ON l.user = u.id ORDER BY l.$fields[$order]"); ### Generate output: $output .= "\n"; @@ -146,13 +146,14 @@ function log_display($order = "date") { } function log_view($id) { - $result = db_query("SELECT l.*, u.userid FROM logs l LEFT JOIN users u ON l.user = u.id WHERE l.id = $id"); + $result = db_query("SELECT l.*, u.userid FROM watchdog l LEFT JOIN users u ON l.user = u.id WHERE l.id = $id"); if ($log = db_fetch_object($result)) { $output .= "
\n"; $output .= " \n"; $output .= " \n"; $output .= " \n"; + $output .= " \n"; $output .= " \n"; $output .= " \n"; $output .= "
Level:$log->level
Date:". format_date($log->timestamp, "extra large") ."
User:". format_username($log->userid, 1) ."
Location:$log->location
Message:$log->message
Hostname:$log->hostname
\n"; @@ -557,7 +558,6 @@ function info_display() { $output .= "sitename: $sitename
\n"; $output .= "e-mail address: $contact_email
\n"; - $output .= "signature: $contact_signature
\n"; $output .= "send e-mail notifications: $notify
\n"; $output .= "allowed HTML tags: ". htmlspecialchars($allowed_html) ."
\n"; $output .= "anonymous user: $anonymous
\n"; -- cgit v1.2.3