get_value('news')) { $DB->query(" SELECT ID, Title, Body, Time FROM news ORDER BY Time DESC LIMIT $NewsCount"); $News = $DB->to_array(false, MYSQLI_NUM, false); $Cache->cache_value('news', $News, 3600 * 24 * 30); $Cache->cache_value('news_latest_id', $News[0][0], 0); $Cache->cache_value('news_latest_title', $News[0][1], 0); } if ($LoggedUser['LastReadNews'] != $News[0][0]) { $Cache->begin_transaction("user_info_heavy_$UserID"); $Cache->update_row(false, array('LastReadNews' => $News[0][0])); $Cache->commit_transaction(0); $DB->query(" UPDATE users_info SET LastReadNews = '".$News[0][0]."' WHERE UserID = $UserID"); $LoggedUser['LastReadNews'] = $News[0][0]; } View::show_header('News', 'bbcode,news_ajax'); ?>
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, tg.TagList 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 = Artists::get_artists($DB->collect('GroupID')); $Cache->cache_value('recommend_artists', $Recommend_artists, 1209600); } if (count($Recommend) >= 4) { $Cache->increment('usage_index'); ?> time()) { continue; } ?>
full_format($Title)?> - Edit Hide
full_format($Body)?>
($NewsCount - 1)) { break; } } ?>
Click to load more news. To browse old news posts, click here.
true)); function contest() { global $DB, $Cache, $LoggedUser; list($Contest, $TotalPoints) = $Cache->get_value('contest'); if (!$Contest) { $DB->query(" SELECT UserID, SUM(Points), Username FROM users_points AS up JOIN users_main AS um ON um.ID = up.UserID GROUP BY UserID ORDER BY SUM(Points) DESC LIMIT 20"); $Contest = $DB->to_array(); $DB->query(" SELECT SUM(Points) FROM users_points"); list($TotalPoints) = $DB->next_record(); $Cache->cache_value('contest', array($Contest, $TotalPoints), 600); } ?>
Quality time scoreboard
  1. ()
Total uploads:
Full scoreboard