diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-12-21 08:03:20 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-12-21 08:03:20 +0000 |
commit | 975bbcebe9c68ac729dd051b008cf6c615d443c2 (patch) | |
tree | 46737108023c5d65797d39f748c53cff0c160e10 /browse.php | |
parent | 742f6bfa6a7b285db898da220e1799fbb9b79ded (diff) | |
download | ampache-975bbcebe9c68ac729dd051b008cf6c615d443c2.tar.gz ampache-975bbcebe9c68ac729dd051b008cf6c615d443c2.tar.bz2 ampache-975bbcebe9c68ac729dd051b008cf6c615d443c2.zip |
new interface which breaks all previous themes... and current themes, still under development
Diffstat (limited to 'browse.php')
-rw-r--r-- | browse.php | 43 |
1 files changed, 36 insertions, 7 deletions
@@ -40,13 +40,44 @@ $action = scrub_in($_REQUEST['action']); /* Display the headers and menus */ show_template('header'); -show_menu_items('Browse'); -show_browse_menu($_REQUEST['action']); -show_clear(); switch($action) { + case 'file': case 'album': + show_alphabet_list('albums','albums.php',$match); + show_alphabet_form($match,_("Show Albums starting with"),"albums.php?action=match"); + + /* Get the results and show them */ + $sql = "SELECT id FROM album WHERE name LIKE '$match%'"; + + $view = new View(); + $view->import_session_view(); + + // if we are returning + if ($_REQUEST['keep_view']) { + $view->initialize(); + } + + // If we aren't keeping the view then initlize it + elseif ($sql) { + $db_results = mysql_query($sql, dbh()); + $total_items = mysql_num_rows($db_results); + if ($match != "Show_all") { $offset_limit = $_SESSION['userdata']['offset_limit']; } + $view = new View($sql, 'albums.php','name',$total_items,$offset_limit); + } + + else { $view = false; } + + if ($view->base_sql) { + $albums = get_albums($view->sql); + show_albums($albums,$view); + } + break; case 'artist': + show_alphabet_list('artists','artists.php'); + show_alphabet_form('',_("Show Artists starting with"),"artists.php?action=match"); + show_artists(); + break; case 'genre': /* Create the Needed Object */ $genre = new Genre(); @@ -74,6 +105,7 @@ switch($action) { } break; + case 'catalog': break; @@ -90,9 +122,6 @@ switch($action) { } // end Switch $action -show_clear(); - /* Show the Footer */ -show_page_footer('Browse', '',$user->prefs['display_menu']); - +show_footer(); ?> |