diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-09-25 01:05:23 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-09-25 01:05:23 +0000 |
commit | e32557bf900153c5cfb0d2f28640aa9091ef7488 (patch) | |
tree | 56e2d9b722c582d536a6b3e8065914851894db72 /lib/ui.lib.php | |
parent | 3ad79fc4c9a6718a336fd929e33b6a0ac9bbf173 (diff) | |
download | ampache-e32557bf900153c5cfb0d2f28640aa9091ef7488.tar.gz ampache-e32557bf900153c5cfb0d2f28640aa9091ef7488.tar.bz2 ampache-e32557bf900153c5cfb0d2f28640aa9091ef7488.zip |
finished up ACL work
Diffstat (limited to 'lib/ui.lib.php')
-rw-r--r-- | lib/ui.lib.php | 40 |
1 files changed, 33 insertions, 7 deletions
diff --git a/lib/ui.lib.php b/lib/ui.lib.php index f4783b53..88f050ec 100644 --- a/lib/ui.lib.php +++ b/lib/ui.lib.php @@ -888,31 +888,31 @@ function get_location() { case 'preferences.php': $location['title'] = 'Preferences'; break; - case 'admin/index.php': + case 'adminindex.php': $location['title'] = 'Admin'; $location['section'] = 'admin'; break; - case 'admin/catalog.php': + case 'admincatalog.php': $location['title'] = 'Catalog'; $location['section'] = 'admin'; break; - case 'admin/users.php': + case 'adminusers.php': $location['title'] = 'User Management'; $location['section'] = 'admin'; break; - case 'admin/mail.php': + case 'adminmail.php': $location['title'] = 'Mail Users'; $location['section'] = 'admin'; break; - case 'admin/access.php': + case 'adminaccess.php': $location['title'] = 'Manage Access Lists'; $location['section'] = 'admin'; break; - case 'admin/preferences.php': + case 'adminpreferences.php': $location['title'] = 'Site Preferences'; $location['section'] = 'admin'; break; - case 'admin/modules.php': + case 'adminmodules.php': $location['title'] = 'Manage Modules'; $location['section'] = 'admin'; break; @@ -1263,6 +1263,32 @@ function show_catalog_select($name='catalog',$catalog_id=0,$style='') { } // show_catalog_select + +/** + * show_user_select + * This one is for users! shows a select/option statement so you can pick a user + * to blame + */ +function show_user_select($name,$selected='',$style='') { + + echo "<select name=\"$name\" style=\"$style\">\n"; + echo "\t<option value=\"\">" . _('None') . "</option>\n"; + + $sql = "SELECT username as id,fullname FROM user ORDER BY fullname"; + $db_results = mysql_query($sql, dbh()); + + while ($r = mysql_fetch_assoc($db_results)) { + $select_txt = ''; + if ($r['id'] == $selected) { + $select_txt = 'selected="selected"'; + } + + echo "\t<option value=\"" . $r['id'] . "\" $select_txt>" . scrub_out($r['fullname']) . "</option>\n"; + + } // end while users + +} // show_user_select + /** * show_box_top * This function requires the top part of the box |