summaryrefslogtreecommitdiff
path: root/backend.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-03-20 15:12:41 +0100
committerAndrew Dolgov <[email protected]>2006-03-20 15:12:41 +0100
commit5917a8e4a7549dd708521ca8b96134674c35e3b6 (patch)
treee4180f69fdd26fb0e3cb4fc092ddbed519951cdf /backend.php
parentc38c2b69c9479817291ac06042fb5529b24f33f0 (diff)
easier user privilege editor, misc js cleanups
Diffstat (limited to 'backend.php')
-rw-r--r--backend.php26
1 files changed, 21 insertions, 5 deletions
diff --git a/backend.php b/backend.php
index 9dae91381..ba73e1a0f 100644
--- a/backend.php
+++ b/backend.php
@@ -3984,6 +3984,8 @@
$line["last_login"] = date(get_pref($link, 'SHORT_DATE_FORMAT'),
strtotime($line["last_login"]));
+ $access_level_names = array(0 => "User", 10 => "Administrator");
+
/* if ($uid == $_SESSION["uid"]) {
print "<td align='center'><input disabled=\"true\" type=\"checkbox\"
@@ -4005,7 +4007,7 @@
$line["email"] . "</td>";
print "<td><a href=\"javascript:editUser($uid);\">" .
- $line["access_level"] . "</td>";
+ $access_level_names[$line["access_level"]] . "</td>";
} else if ($uid != $edit_uid) {
@@ -4014,7 +4016,7 @@
print "<td>".$line["login"]."</td>";
print "<td>".$line["email"]."</td>";
- print "<td>".$line["access_level"]."</td>";
+ print "<td>".$access_level_names[$line["access_level"]]."</td>";
} else {
@@ -4027,9 +4029,23 @@
print "<td><input id=\"iedit_email\" value=\"".$line["email"].
"\"></td>";
- print "<td><input id=\"iedit_ulevel\" value=\"".$line["access_level"].
- "\"></td>";
-
+// print "<td><input id=\"iedit_ulevel\" value=\"".$line["access_level"].
+// "\"></td>";
+
+ print "<td>";
+ print "<select id=\"iedit_ulevel\">";
+ foreach (array_keys($access_level_names) as $al) {
+ if ($al == $line["access_level"]) {
+ $selected = "selected";
+ } else {
+ $selected = "";
+ }
+ print "<option $selected id=\"$al\">" .
+ $access_level_names[$al] . "</option>";
+ }
+ print "</select>";
+ print "</td>";
+
}
print "<td>".$line["last_login"]."</td>";