summaryrefslogtreecommitdiffstats
path: root/lib/ui.lib.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-11-12 07:36:52 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-11-12 07:36:52 +0000
commitf435ca753c1d6ce8f657c3374ae71daec6daf2be (patch)
tree47fcefdbfb3b3ffd71c8bc27b35af0255df62e83 /lib/ui.lib.php
parent7b303176665062673f07f451ddbf571f8a2c3c80 (diff)
downloadampache-f435ca753c1d6ce8f657c3374ae71daec6daf2be.tar.gz
ampache-f435ca753c1d6ce8f657c3374ae71daec6daf2be.tar.bz2
ampache-f435ca753c1d6ce8f657c3374ae71daec6daf2be.zip
more democratic play work, still not working going to need db change to make it work how I want, will do later
Diffstat (limited to 'lib/ui.lib.php')
-rw-r--r--lib/ui.lib.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/ui.lib.php b/lib/ui.lib.php
index cbfb0fc1..9ab7650d 100644
--- a/lib/ui.lib.php
+++ b/lib/ui.lib.php
@@ -910,6 +910,32 @@ function show_user_select($name,$selected='',$style='') {
} // show_user_select
/**
+ * show_playlist_select
+ * This one is for users! shows a select/option statement so you can pick a user
+ * to blame
+ */
+function show_playlist_select($name,$selected='',$style='') {
+
+ echo "<select name=\"$name\" style=\"$style\">\n";
+ echo "\t<option value=\"\">" . _('None') . "</option>\n";
+
+ $sql = "SELECT `id`,`name` FROM `playlist` ORDER BY `name`";
+ $db_results = Dba::query($sql);
+
+ while ($row = Dba::fetch_assoc($db_results)) {
+ $select_txt = '';
+ if ($row['id'] == $selected) {
+ $select_txt = 'selected="selected"';
+ }
+ // If they don't have a full name, revert to the username
+ echo "\t<option value=\"" . $row['id'] . "\" $select_txt>" . scrub_out($row['name']) . "</option>\n";
+ } // end while users
+
+ echo "</select>\n";
+
+} // show_playlist_select
+
+/**
* show_box_top
* This function requires the top part of the box
* it takes title as an optional argument