artist.php 1.42 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
<?php

/* Libre.fm -- a free network service for sharing your music listening habits

   Copyright (C) 2009 Libre.fm Project

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU Affero General Public License for more details.

   You should have received a copy of the GNU Affero General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.

*/


clint's avatar
clint committed
23 24 25 26 27
require_once('database.php');
require_once('templating.php');
require_once('data/sanitize.php');
require_once('data/Server.php');
require_once('data/TagCloud.php');
28

jurgbohn's avatar
jurgbohn committed
29
$artist = new Artist(urldecode($_GET['artist']));
30 31

$smarty->assign("name", $artist->name);
tobyink's avatar
tobyink committed
32
$smarty->assign("id", $artist->id);
33
$smarty->assign("bio_summary", $artist->bio_summary);
34

clint's avatar
clint committed
35
$aTagCloud = TagCloud::GenerateTagCloud('Scrobbles', 'artist');
clint's avatar
clint committed
36 37 38 39
if (!PEAR::isError ($aTagCloud)) {
        $smarty->assign('tagcloud', $aTagCloud);
}

40 41 42 43
$aArtistAlbums = $artist->getAlbums();
if (!PEAR::isError($aArtistAlbums)) {
	$smarty->assign("albums", $aArtistAlbums);
}
44 45 46 47 48

$smarty->display("artist.tpl");


?>