$Recommend = $Cache->get_value('recommend');
$Recommend_artists = $Cache->get_value('recommend_artists');
if (!is_array($Recommend) || !is_array($Recommend_artists)) {
$DB->query("SELECT
tr.GroupID,
tr.UserID,
u.Username,
tg.Name
FROM torrents_recommended AS tr
JOIN torrents_group AS tg ON tg.ID=tr.GroupID
LEFT JOIN users_main AS u ON u.ID=tr.UserID
ORDER BY tr.Time DESC LIMIT 10
");
$Recommend = $DB->to_array();
$Cache->cache_value('recommend',$Recommend,1209600);
$Recommend_artists = get_artists($DB->collect('GroupID'));
$Cache->cache_value('recommend_artists',$Recommend_artists,1209600);
}
if (count($Recommend) >= 4) {
$Cache->increment('usage_index');
?>
Latest vanity house additions
(View)
foreach($Recommend as $Recommendations) {
list($GroupID, $UserID, $Username, $GroupName) = $Recommendations;
?>
=display_artists($Recommend_artists[$GroupID], true, false) ?> |
=$GroupName?> (by =format_username($UserID, $Username)?>) |
} ?>
}
$Count = 0;
foreach ($News as $NewsItem) {
list($NewsID,$Title,$Body,$NewsTime) = $NewsItem;
if (strtotime($NewsTime) > time()) {
continue;
}
?>
=$Text->full_format($Title)?> =time_diff($NewsTime);?>
if(check_perms('admin_manage_news')) {?>
-
[Edit]
} ?>
=$Text->full_format($Body)?>
if (++$Count > 4) {
break;
}
}
?>