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 DISTINCTROW 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 IN ('2', '3', '4', '7'),1000 + ta.Importance, tg.ReleaseType) ASC, tg.Year DESC, tg.Name DESC"); $GroupIDs = $DB->collect('GroupID'); $Importances = $DB->to_array(false, 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) { switch ($Importances[$ID]['Importance']) { case '2': $Importances[$ID]['ReleaseType'] = 1024; //$TorrentList[$GroupID]['ReleaseType'] = 1024; $GuestAlbums = true; break; case '3': $Importances[$ID]['ReleaseType'] = 1023; //$TorrentList[$GroupID]['ReleaseType'] = 1023; $RemixerAlbums = true; break; case '4': $Importances[$ID]['ReleaseType'] = 1022; //$TorrentList[$GroupID]['ReleaseType'] = 1022; $ComposerAlbums = true; break; case '7': $Importances[$ID]['ReleaseType'] = 1021; //$TorrentList[$GroupID]['ReleaseType'] = 1021; $ProducerAlbums = true; break; default: $Importances[$ID]['ReleaseType'] = $TorrentList[$Group['GroupID']]['ReleaseType']; } if(!in_array($Importances[$ID]['ReleaseType'], $UsedReleases)) { $UsedReleases[] = $Importances[$ID]['ReleaseType']; } } if(!empty($GuestAlbums)) { $ReleaseTypes[1024] = "Guest Appearance"; } if(!empty($RemixerAlbums)) { $ReleaseTypes[1023] = "Remixed By"; } if(!empty($ComposerAlbums)) { $ReleaseTypes[1022] = "Composition"; } if(!empty($ProducerAlbums)) { $ReleaseTypes[1021] = "Produced By"; } reset($TorrentList); if(!empty($UsedReleases)) { ?>
">[] 0) { ?> [Requests]
$Group) { $TagList = explode(' ',str_replace('_','.',$Group['TagList'])); $TorrentTags = array(); // $Tags array is for the sidebar on the right. Skip compilations and soundtracks. if (!in_array($ReleaseType, array(7, 3))) { foreach($TagList as $Tag) { if(!isset($Tags[$Tag])) { $Tags[$Tag] = array('name'=>$Tag, 'count'=>1); } else { $Tags[$Tag]['count']++; } } } $TorrentTags = implode(', ', $TorrentTags); $TorrentTags = '
'.$TorrentTags.'
'; foreach ($Group['Torrents'] as $TorrentID => $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']; } } $OpenTable = false; $ShowGroups = !isset($LoggedUser['TorrentGrouping']) || $LoggedUser['TorrentGrouping'] == 0; $HideTorrents = ($ShowGroups ? '' : ' hidden'); $OldGroupID = 0; $ReleaseType = 0; foreach ($Importances as $Group) { list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists, $ExtendedArtists) = array_values($TorrentList[$Group['GroupID']]); $ReleaseType = $Group['ReleaseType']; $GroupVanityHouse = $Group['VanityHouse']; if ($GroupID == $OldGroupID && $ReleaseType == $OldReleaseType) { continue; } else { $OldGroupID = $GroupID; $OldReleaseType = $ReleaseType; } if (!empty($LoggedUser['DiscogView']) || (isset($LoggedUser['HideTypes']) && in_array($ReleaseType, $LoggedUser['HideTypes']))) { $HideDiscog = ' hidden'; } else { $HideDiscog = ''; } $TagList = explode(' ',str_replace('_','.',$TagList)); $TorrentTags = array(); // $Tags array is for the sidebar on the right. Skip compilations and soundtracks. foreach($TagList as $Tag) { $TorrentTags[] = ''.$Tag.''; } $TorrentTags = implode(', ', $TorrentTags); $TorrentTags = '
'.$TorrentTags.'
'; 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') || check_perms('torrents_fix_ghosts')) { $DisplayName .= ' [Fix]'; } switch($ReleaseType){ case 1023: // Remixes, DJ Mixes, Guest artists, and Producers need the artist name case 1024: case 1021: 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) { if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) { $FirstUnknown = !isset($FirstUnknown); } if (in_array($TorrentID, $TokenTorrents) && empty($Torrent['FreeTorrent'])) { $Torrent['PersonalFL'] = 1; } 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); ?>