From a88d37e5d2333ee72386de1564fb6173c5d5c620 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 4 Apr 2008 04:46:51 +0100 Subject: [PATCH] add new access level 5, show user's level in prefs --- backend.php | 1 + modules/pref-prefs.php | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/backend.php b/backend.php index b078250ad..a7606c5b7 100644 --- a/backend.php +++ b/backend.php @@ -132,6 +132,7 @@ $access_level_names = array( 0 => __("User"), + 5 => __("Power User"), 10 => __("Administrator")); require_once "modules/pref-prefs.php"; diff --git a/modules/pref-prefs.php b/modules/pref-prefs.php index 721911347..20cffe5e5 100644 --- a/modules/pref-prefs.php +++ b/modules/pref-prefs.php @@ -8,6 +8,9 @@ } function module_pref_prefs($link) { + + global $access_level_names; + $subop = $_REQUEST["subop"]; $prefs_blacklist = array("HIDE_FEEDLIST"); @@ -218,7 +221,7 @@ print ""; print ""; - $result = db_query($link, "SELECT email FROM ttrss_users + $result = db_query($link, "SELECT email,access_level FROM ttrss_users WHERE id = ".$_SESSION["uid"]); $email = db_fetch_result($result, 0, "email"); @@ -227,6 +230,15 @@ print ""; + + if (!SINGLE_USER_MODE) { + + $access_level = db_fetch_result($result, 0, "access_level"); + + print ""; + print ""; + + } print "

".__("Personal data")."

".__('Access level')."" . $access_level_names[$access_level] . "
";