2012-08-12 08:00:16 +00:00
|
|
|
<?
|
|
|
|
$FeaturedAlbum = $Cache->get_value('featured_album');
|
2013-04-23 08:01:29 +00:00
|
|
|
if ($FeaturedAlbum === false) {
|
|
|
|
$DB->query('
|
|
|
|
SELECT
|
|
|
|
fa.GroupID,
|
|
|
|
tg.Name,
|
|
|
|
tg.WikiImage,
|
|
|
|
fa.ThreadID,
|
|
|
|
fa.Title
|
|
|
|
FROM featured_albums AS fa
|
2013-08-28 23:08:41 +00:00
|
|
|
JOIN torrents_group AS tg ON tg.ID = fa.GroupID
|
2013-04-23 08:01:29 +00:00
|
|
|
WHERE Ended = 0');
|
2012-08-12 08:00:16 +00:00
|
|
|
$FeaturedAlbum = $DB->next_record();
|
|
|
|
$Cache->cache_value('featured_album', $FeaturedAlbum, 0);
|
|
|
|
}
|
2013-04-23 08:01:29 +00:00
|
|
|
if (is_number($FeaturedAlbum['GroupID'])) {
|
2012-10-11 08:00:15 +00:00
|
|
|
$Artists = Artists::get_artist($FeaturedAlbum['GroupID']);
|
2012-08-12 08:00:16 +00:00
|
|
|
?>
|
|
|
|
<div class="box">
|
|
|
|
<div class="head colhead_dark"><strong>Featured Album</strong></div>
|
2013-03-09 08:00:18 +00:00
|
|
|
<div class="center pad">
|
|
|
|
<?=Artists::display_artists($Artists, true, true)?><a href="torrents.php?id=<?=$FeaturedAlbum['GroupID']?>"><?=$FeaturedAlbum['Name']?></a>
|
|
|
|
</div>
|
2013-06-08 08:01:02 +00:00
|
|
|
<div class="center pad">
|
2013-11-05 08:01:12 +00:00
|
|
|
<a href="torrents.php?id=<?=$FeaturedAlbum['GroupID']?>" class="tooltip" title="<?=Artists::display_artists($Artists, false, false)?> - <?=$FeaturedAlbum['Name']?>">
|
2013-04-30 18:18:07 +00:00
|
|
|
<img src="<?=ImageTools::process($FeaturedAlbum['WikiImage'], true)?>" alt="<?=Artists::display_artists($Artists, false, false)?> - <?=$FeaturedAlbum['Name']?>" width="100%" />
|
2013-03-09 08:00:18 +00:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div class="center pad">
|
|
|
|
<a href="forums.php?action=viewthread&threadid=<?=$FeaturedAlbum['ThreadID']?>"><em>Read the interview with the artist, discuss here</em></a>
|
|
|
|
</div>
|
2012-08-12 08:00:16 +00:00
|
|
|
</div>
|
|
|
|
<?
|
2013-02-22 08:00:24 +00:00
|
|
|
}
|
2013-03-09 08:00:18 +00:00
|
|
|
?>
|