get_value("top10_history_$SQLTime");
if ($Details === false) {
$DB->query("
SELECT
tht.`Rank`,
tht.`TitleString`,
tht.`TagString`,
tht.`TorrentID`,
g.`ID`,
g.`Name`,
g.`CategoryID`,
g.`TagList`,
t.`Format`,
t.`Encoding`,
t.`Media`,
t.`Scene`,
t.`HasLog`,
t.`HasCue`,
t.`LogScore`,
t.`RemasterYear`,
g.`Year`,
t.`RemasterTitle`
FROM
`top10_history` AS th
LEFT JOIN `top10_history_torrents` AS tht
ON
tht.`HistoryID` = th.`ID`
LEFT JOIN `torrents` AS t
ON
t.`ID` = tht.`TorrentID`
LEFT JOIN `torrents_group` AS g
ON
g.`ID` = t.`GroupID`
$Where
ORDER BY
tht.`Rank` ASC
");
$Details = $DB->to_array();
$Cache->cache_value("top10_history_$SQLTime", $Details, 3600 * 24);
} ?>
Top 10 for =($Type == 'day' ? $Date : "the first week after $Date")?>
Name
$GroupName";
if ($GroupCategoryID === 1 && $GroupYear > 0) {
$DisplayName .= " [$GroupYear]";
}
// Append extra info to torrent title
$ExtraInfo = '';
$AddExtra = ' | '; # breaking
if ($Format) {
$ExtraInfo .= $Format;
}
if ($Encoding) {
$ExtraInfo .= $AddExtra.$Encoding;
}
if ($HasLog) {
$ExtraInfo .= "$AddExtra Log ($LogScore%)";
}
if ($HasCue) {
$ExtraInfo .= "{$AddExtra}Cue";
}
if ($Media) {
$ExtraInfo .= $AddExtra.$Media;
}
if ($Scene) {
$ExtraInfo .= "{$AddExtra}Scene";
}
if ($Year > 0) {
$ExtraInfo .= $AddExtra.$Year;
}
if ($RemasterTitle) {
$ExtraInfo .= $AddExtra.$RemasterTitle;
}
if ($ExtraInfo !== '') {
$ExtraInfo = "- [$ExtraInfo]";
}
$DisplayName .= $ExtraInfo;
$TorrentTags = new Tags($TorrentTags);
} else {
$DisplayName = "$TitleString (Deleted)";
$TorrentTags = new Tags($TagString);
} // if ($GroupID)
?>