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, $Importances, $VanityHouseArtist)) = each($Data); } else { if ($RevisionID) { $sql = "SELECT a.Name, wiki.Image, wiki.body, a.VanityHouse FROM wiki_artists AS wiki LEFT JOIN artists_group AS a ON wiki.RevisionID=a.RevisionID WHERE wiki.RevisionID='$RevisionID' "; } 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 a.ArtistID='$ArtistID' "; } $sql .= " GROUP BY a.ArtistID"; $DB->query($sql); if($DB->record_count()==0) { error(404); } list($Name, $Image, $Body, $VanityHouseArtist) = $DB->next_record(MYSQLI_NUM, array(0)); } $TokenTorrents = $Cache->get_value('users_tokens_'.$UserID); if (empty($TokenTorrents)) { $DB->query("SELECT TorrentID FROM users_freeleeches WHERE UserID=$UserID AND Expired=FALSE"); $TokenTorrents = $DB->collect('TorrentID'); $Cache->cache_value('users_tokens_'.$UserID, $TokenTorrents); } //----------------- 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($Importances) || 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 IF(ta.Importance = '2' OR ta.Importance = '3' OR ta.Importance = '4',ta.Importance, 1), tg.ReleaseType ASC, tg.Year DESC, tg.Name DESC"); $GroupIDs = $DB->collect('GroupID'); $Importances = $DB->to_array('GroupID', MYSQLI_BOTH, false); if(count($GroupIDs)>0) { $TorrentList = get_groups($GroupIDs, true,true); $TorrentList = $TorrentList['matches']; } else { $TorrentList = array(); } } $NumGroups = count($TorrentList); if(!empty($TorrentList)) { ?>
$Group) { if($Importances[$GroupID]['Importance'] == '2') { $TorrentList[$GroupID]['ReleaseType'] = 1024; $GuestAlbums = true; } if($Importances[$GroupID]['Importance'] == '3') { $TorrentList[$GroupID]['ReleaseType'] = 1023; $RemixerAlbums = true; } if($Importances[$GroupID]['Importance'] == '4') { $TorrentList[$GroupID]['ReleaseType'] = 1022; $ComposerAlbums = true; } if(!in_array($TorrentList[$GroupID]['ReleaseType'], $UsedReleases)) { $UsedReleases[] = $TorrentList[$GroupID]['ReleaseType']; } } if(!empty($GuestAlbums)) { $ReleaseTypes[1024] = "Guest Appearance"; } if(!empty($RemixerAlbums)) { $ReleaseTypes[1023] = "Remixed By"; } if(!empty($ComposerAlbums)) { $ReleaseTypes[1022] = "Composition"; } reset($TorrentList); if(!empty($UsedReleases)) { ?>
">[] 0) { ?> [Requests]
$Group) { list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists, $ExtendedArtists) = array_values($Group); $GroupVanityHouse = $Importances[$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 (!empty($LoggedUser['DiscogView']) || (isset($LoggedUser['HideTypes']) && in_array($ReleaseType, $LoggedUser['HideTypes']))) { $HideDiscog = ' hidden'; } else { $HideDiscog = ''; } if($ReleaseType!=$LastReleaseType) { switch($ReleaseTypes[$ReleaseType]) { case "Remix" : $DisplayName = "Remixes"; break; case "Anthology" : $DisplayName = "Anthologies"; break; case "DJ Mix" : $DisplayName = "DJ Mixes"; break; default : $DisplayName = $ReleaseTypes[$ReleaseType]."s"; break; } $ReleaseTypeLabel = strtolower(str_replace(' ','_',$ReleaseTypes[$ReleaseType])); if($OpenTable) { ?> '.$GroupName.''; if(check_perms('users_mod')) { $DisplayName .= ' [Fix]'; } switch($ReleaseType){ case 1023: // Remixes, DJ Mixes, and Guest artists need the artist name case 1024: case 8: if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) { unset($ExtendedArtists[2]); unset($ExtendedArtists[3]); $DisplayName = display_artists($ExtendedArtists).$DisplayName; } elseif(count($GroupArtists)>0) { $DisplayName = display_artists(array(1 => $Artists), true, true).$DisplayName; } break; case 1022: // Show performers on composer pages if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5])) { unset($ExtendedArtists[4]); unset($ExtendedArtists[3]); unset($ExtendedArtists[6]); $DisplayName = display_artists($ExtendedArtists).$DisplayName; } elseif(count($GroupArtists)>0) { $DisplayName = display_artists(array(1 => $Artists), true, true).$DisplayName; } break; default: // Show composers otherwise if (!empty($ExtendedArtists[4])) { $DisplayName = display_artists(array(4 => $ExtendedArtists[4]), true, true).$DisplayName; } } if($GroupYear>0) { $DisplayName = $GroupYear. ' - '.$DisplayName; } if($GroupVanityHouse) { $DisplayName .= ' [VH]'; } ?> $Torrent) { $NumTorrents++; if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) { $FirstUnknown = !isset($FirstUnknown); } if (in_array($TorrentID, $TokenTorrents) && empty($Torrent['FreeTorrent'])) { $Torrent['PersonalFL'] = 1; } $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 || $FirstUnknown || $Torrent['Media'] != $LastMedia) { $EditionID++; if($Torrent['Remastered'] && $Torrent['RemasterYear'] != 0) { $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']); ?> >
  (View) Size Snatches Seeders Leechers
[ 0) && ($Torrent['Size'] < 1073741824) && !in_array($TorrentID, $TokenTorrents) && empty($Torrent['FreeTorrent']) && ($LoggedUser['CanLeech'] == '1')) { ?> | FL ]   » 

(Revision #) [Vanity House]

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) { if($SimilarData = $Cache->get_value('similar_positions_'.$ArtistID)) { $Similar = new ARTISTS_SIMILAR($ArtistID, $Name); $Similar->load_data($SimilarData); if(!(current($Similar->Artists)->NameLength)) { unset($Similar); } } if(empty($Similar) || empty($Similar->Artists)) { 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); } ?>
Similar artist map
write_artists(); ?>
0 ?>
Artist info
full_format($Body)?>
cache_value($Key, $Data, 3600); ?>