From af2ff07a8174ac2796fa45337bcc5c70d870e0b1 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Thu, 7 Jun 2007 07:20:01 +0000 Subject: - Fixed Ratings - Tweaked RSS, still needs work - Show Single artist mostly finished --- artists.php | 87 ++++++++++++++++++------------------------------------------- 1 file changed, 25 insertions(+), 62 deletions(-) (limited to 'artists.php') diff --git a/artists.php b/artists.php index 8e3241e8..276c02d7 100644 --- a/artists.php +++ b/artists.php @@ -1,7 +1,7 @@ import_session_view(); +/** + * Doing Switch + */ +switch($_REQUEST['action']) { - $artist = new Artist($_REQUEST['artist']); - $sql = "SELECT DISTINCT(album.id) FROM song,album WHERE song.album=album.id AND song.artist='$artist->id'"; +} // end display switch - if ($_REQUEST['keep_view']) { - $view->initialize(); - } - // If we aren't keeping the view then initlize it - elseif ($sql) { - if (!$sort_order) { $sort_order = 'album.name'; } - $db_results = mysql_query($sql, dbh()); - $total_items = mysql_num_rows($db_results); - $offset_limit = $total_items; - $view = new View($sql, 'artists.php',$sort_order,$total_items,$offset_limit); - } - - else { $view = false; } - - if ($view->base_sql) { - $artist->show_albums($view->sql); - } - - - - //$artist->show_albums(); +/** + * Display Switch + */ +switch($_REQUEST['action']) { + case 'show': + $artist = new Artist($_REQUEST['artist']); + $artist->format(); + $albums = $artist->get_albums(); + require_once Config::get('prefix') . '/templates/show_artist.inc.php'; break; - - case 'show_all_songs': - $artist = new Artist($_REQUEST['artist']); - $artist->format_artist(); - $song_ids = $artist->get_song_ids(); - $artist_id = $artist->id; - require(conf('prefix') . '/templates/show_artist_box.inc.php'); - show_songs($song_ids,''); + case 'show_all_songs': + $artist = new Artist($_REQUEST['artist']); + $artist->format_artist(); + $song_ids = $artist->get_song_ids(); + $artist_id = $artist->id; + require(conf('prefix') . '/templates/show_artist_box.inc.php'); + show_songs($song_ids,''); break; - case 'update_from_tags': + case 'update_from_tags': $artist = new Artist($_REQUEST['artist']); @@ -246,12 +215,6 @@ switch($action) { } } break; - default: - //FIXME: This is being moved to browse - show_alphabet_list('artists','artists.php'); - show_alphabet_form('',_("Show Artists starting with"),"artists.php?action=match"); - show_artists('A'); - break; } // end switch show_footer(); -- cgit