summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-02-19 09:00:23 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-02-19 09:00:23 +0000
commit062398443b26b4f146e5d6866b452857a09759e8 (patch)
treeb6dfc477c31eb39cf6e6f23582fd87826f5b68ba /lib
parentcbfb6bc3f38bae0a05f7fab5e7fe9569b9464d40 (diff)
downloadampache-062398443b26b4f146e5d6866b452857a09759e8.tar.gz
ampache-062398443b26b4f146e5d6866b452857a09759e8.tar.bz2
ampache-062398443b26b4f146e5d6866b452857a09759e8.zip
tweaked catalog drop down, added bandwidth throttling and fixed some spelling errors
Diffstat (limited to 'lib')
-rw-r--r--lib/ui.lib.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/ui.lib.php b/lib/ui.lib.php
index 128ba533..cd82cfc7 100644
--- a/lib/ui.lib.php
+++ b/lib/ui.lib.php
@@ -1294,4 +1294,29 @@ function show_genre_select($name='genre',$genre_id=0) {
} // show_genre_select
+/**
+ * show_catalog_select
+ * Yet another one of these buggers. this shows a drop down of all of your catalogs
+ */
+function show_catalog_select($name='catalog',$catalog_id=0,$style='') {
+
+ echo "<select name=\"$name\" style=\"$style\">\n";
+
+ $sql = "SELECT id, name FROM catalog ORDER BY name";
+ $db_results = mysql_query($sql, dbh());
+
+ while ($r = mysql_fetch_assoc($db_results)) {
+ $selected = '';
+ if ($r['id'] == $catalog_id) {
+ $selected = "selected=\"selected\"";
+ }
+
+ echo "\t<option value=\"" . $r['id'] . "\" $selected>" . scrub_out($r['name']) . "</option>\n";
+
+ } // end while
+
+ echo "</select>\n";
+
+} // show_catalog_select
+
?>