]> git.wh0rd.org Git - tt-rss.git/commitdiff
add new access level 5, show user's level in prefs
authorAndrew Dolgov <fox@madoka.spb.ru>
Fri, 4 Apr 2008 03:46:51 +0000 (04:46 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Fri, 4 Apr 2008 03:46:51 +0000 (04:46 +0100)
backend.php
modules/pref-prefs.php

index b078250ad6b348b4d6a8f62395b7dc9050dcd786..a7606c5b7c5a77e91d541efba96fd0a40dab0d0f 100644 (file)
 
        $access_level_names = array(
                0 => __("User"), 
+               5 => __("Power User"),
                10 => __("Administrator"));
 
        require_once "modules/pref-prefs.php";
index 72191134705b9dc1b548122ee5c7013239bedc8b..20cffe5e5b14b7313e762ca63b78bcfc71893169 100644 (file)
@@ -8,6 +8,9 @@
        }
 
        function module_pref_prefs($link) {
+
+               global $access_level_names;
+
                $subop = $_REQUEST["subop"];
 
                $prefs_blacklist = array("HIDE_FEEDLIST");
                                print "<table width=\"100%\" class=\"prefPrefsList\">";
                                print "<tr><td colspan='3'><h3>".__("Personal data")."</h3></tr></td>";
 
-                               $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");
                                print "<td><input class=\"editbox\" name=\"email\" 
                                        onkeypress=\"return filterCR(event, changeUserEmail)\"
                                        value=\"$email\"></td></tr>";
+
+                               if (!SINGLE_USER_MODE) {
+
+                                       $access_level = db_fetch_result($result, 0, "access_level");
+
+                                       print "<tr><td width=\"40%\">".__('Access level')."</td>";
+                                       print "<td>" . $access_level_names[$access_level] . "</td></tr>";
+
+                               }
        
                                print "</table>";