get_value("artist_$ArtistID"."_revision_$RevisionID"); } else { // viewing the live version $Data = $Cache->get_value('artist_'.$ArtistID); $RevisionID = false; } if($Data) { $Data = unserialize($Data); list($K, list($Name, $Image, $Body, $NumSimilar, $SimilarArray, $TorrentList, $GroupMeta)) = each($Data); } else { $sql = "SELECT a.Name, wiki.Image, wiki.body, a.VanityHouse FROM artists_group AS a LEFT JOIN wiki_artists AS wiki ON wiki.RevisionID=a.RevisionID WHERE "; if($RevisionID){ $sql.=" wiki.RevisionID='$RevisionID' "; } else { $sql.=" a.ArtistID='$ArtistID' "; } $sql .= " GROUP BY a.ArtistID"; $DB->query($sql, MYSQLI_NUM, true); if($DB->record_count()==0) { error(404); } list($Name, $Image, $Body, $VanityHouseArtist) = $DB->next_record(); } //----------------- Build list and get stats ob_start(); // Requests $Requests = $Cache->get_value('artists_requests_'.$ArtistID); if(!is_array($Requests)) { $DB->query("SELECT r.ID, r.CategoryID, r.Title, r.Year, r.TimeAdded, COUNT(rv.UserID) AS Votes, SUM(rv.Bounty) AS Bounty FROM requests AS r LEFT JOIN requests_votes AS rv ON rv.RequestID=r.ID LEFT JOIN requests_artists AS ra ON r.ID=ra.RequestID WHERE ra.ArtistID = ".$ArtistID." AND r.TorrentID = 0 GROUP BY r.ID ORDER BY Votes DESC"); if($DB->record_count() > 0) { $Requests = $DB->to_array(); } else { $Requests = array(); } $Cache->cache_value('artists_requests_'.$ArtistID, $Requests); } $NumRequests = count($Requests); $LastReleaseType = 0; if(empty($GroupMeta) || empty($TorrentList)) { $DB->query("SELECT DISTINCT ta.GroupID, ta.Importance, tg.VanityHouse FROM torrents_artists AS ta JOIN torrents_group AS tg ON tg.ID=ta.GroupID WHERE ta.ArtistID='$ArtistID' ORDER BY ta.Importance, tg.ReleaseType ASC, tg.Year DESC"); $GroupIDs = $DB->collect('GroupID'); $GroupMeta = $DB->to_array('GroupID', MYSQLI_BOTH, false); if(count($GroupIDs)>0) { $TorrentList = Torrents::get_groups($GroupIDs, true, true); $TorrentList = $TorrentList['matches']; } else { $TorrentList = array(); } } $NumGroups = count($TorrentList); if(!empty($TorrentList)) { ?>
$ReleaseType) { if(!array_key_exists($ReleaseType, $ReleaseTypesOrder)) { $ReleaseTypesOrder[$ReleaseType] = $HasShown ? 1 : 0; // If no releasetype is open by default assume (s)he wants them all closed } } } else { // Load defaults $ReleaseTypesOrder = array_flip($ReleaseTypesDefaultOrder); } foreach($ReleaseTypesOrder as $ReleaseType => $ReleaseTypeName) { $TorrentListByReleaseType[$ReleaseType] = array(); } //Names for releasetypes that are not uploadable but exist in the defaultordering $ReleaseTypes[1023] = "Remixed By"; $ReleaseTypes[1024] = "Guest Appearance"; foreach($TorrentList as $GroupID=>$Group) { if($GroupMeta[$GroupID]['Importance'] == '2') { $TorrentList[$GroupID]['ReleaseType'] = 1024; } if($GroupMeta[$GroupID]['Importance'] == '3') { $TorrentList[$GroupID]['ReleaseType'] = 1023; } if(!in_array($TorrentList[$GroupID]['ReleaseType'], $UsedReleases)) { $UsedReleases[] = $TorrentList[$GroupID]['ReleaseType']; } $TorrentListByReleaseType[$TorrentList[$GroupID]['ReleaseType']][$GroupID] = $Group; } reset($TorrentList); if(!empty($UsedReleases)) { ?>
$Torrents) { if(!in_array($ReleaseID, $UsedReleases)) { continue; } switch($ReleaseTypes[$ReleaseID]) { case "Remix" : $DisplayName = "Remixes"; break; case "Anthology" : $DisplayName = "Anthologies"; break; default : $DisplayName = $ReleaseTypes[$ReleaseID]."s"; break; } ?> " id="torrents__anchorlink">[] 0) { ?> [Requests]
$TorrentListForReleaseType) { $NumTorrentsReleaseType = count($TorrentListForReleaseType); if($OpenTable) { ?> " id="torrents_"> $Group) { list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $NewReleaseType, $GroupVanityHouse, $Torrents, $GroupArtists) = array_values($Group); $GroupVanityHouse = $GroupMeta[$GroupID]['VanityHouse']; $TagList = explode(' ',str_replace('_','.',$TagList)); $TorrentTags = array(); // $Tags array is for the sidebar on the right foreach($TagList as $Tag) { if(!isset($Tags[$Tag])) { $Tags[$Tag] = array('name'=>$Tag, 'count'=>1); } else { $Tags[$Tag]['count']++; } $TorrentTags[]=''.$Tag.''; } $TorrentTags = implode(', ', $TorrentTags); $TorrentTags = '
'.$TorrentTags.'
'; if (($ReleaseType == 1023) || ($ReleaseType == 1024)) { $ArtistPrefix = Artists::display_artists(array(1 => $GroupArtists)); } else { $ArtistPrefix = ''; } $DisplayName = $ArtistPrefix . ''.$GroupName.''; if($GroupYear>0) { $DisplayName = $GroupYear. ' - '.$DisplayName; } if($GroupVanityHouse) { $DisplayName .= ' [VH]'; } ?> $Torrent) { $NumTorrents++; $Torrent['Seeders'] = (int)$Torrent['Seeders']; $Torrent['Leechers'] = (int)$Torrent['Leechers']; $Torrent['Snatched'] = (int)$Torrent['Snatched']; $NumSeeders+=$Torrent['Seeders']; $NumLeechers+=$Torrent['Leechers']; $NumSnatches+=$Torrent['Snatched']; if($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear || $Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber || $Torrent['Media'] != $LastMedia) { $EditionID++; if($Torrent['RemasterTitle'] || $Torrent['RemasterYear'] || $Torrent['RemasterRecordLabel'] || $Torrent['RemasterCatalogueNumber']) { $RemasterName = $Torrent['RemasterYear']; $AddExtra = " - "; if($Torrent['RemasterRecordLabel']) { $RemasterName .= $AddExtra.display_str($Torrent['RemasterRecordLabel']); $AddExtra=' / '; } if($Torrent['RemasterCatalogueNumber']) { $RemasterName .= $AddExtra.display_str($Torrent['RemasterCatalogueNumber']); $AddExtra=' / '; } if($Torrent['RemasterTitle']) { $RemasterName .= $AddExtra.display_str($Torrent['RemasterTitle']); $AddExtra=' / '; } $RemasterName .= $AddExtra.display_str($Torrent['Media']); ?>
0) { ?>     0) { ?> ( id="releases__viewlink" onclick="setShow('',true);return false;">View id="releases__hidelink" onclick="setShow('',false);return false;">Hide) Size Snatches Seeders Leechers
[ DL ]   » 

(Revision #) [Vanity House]

[Edit ordering]
0) { ?> ".$Title." [".$Year."]"; } else if($CategoryName == "Audiobooks" || $CategoryName == "Comedy") { $FullName = "".$Title." [".$Year."]"; } else { $FullName ="".$Title.""; } $Row = ($Row == 'a') ? 'b' : 'a'; $Tags = get_request_tags($RequestID); ?>
  Request Name Vote Bounty Added
$TagName) { $TagList[] = "".display_str($TagName).""; } $TagList = implode(', ', $TagList); ?>
   (+)
0) { $SimilarData = $Cache->get_value('similar_positions_'.$ArtistID); if(!$Data) { include(SERVER_ROOT.'/classes/class_image.php'); $Img = new IMAGE; $Img->create(WIDTH, HEIGHT); $Img->color(255,255,255, 127); $Similar = new ARTISTS_SIMILAR($ArtistID, $Name); $Similar->set_up(); $Similar->set_positions(); $Similar->background_image(); $SimilarData = $Similar->dump_data(); $Cache->cache_value('similar_positions_'.$ArtistID, $SimilarData, 3600*24); } else { $Similar = new ARTISTS_SIMILAR($ArtistID); $Similar->load_data($SimilarData); } ?>
Similar artist map
write_artists(); ?>
0 ?>
Artist info
full_format($Body)?>
cache_value($Key, $Data, 3600); ?>