if (check_perms('users_mod', $Class) || check_perms('users_view_ips',$Class) || check_perms('users_view_keys',$Class)) {
$DB->query("SELECT COUNT(*) FROM users_history_passwords WHERE UserID='$UserID'");
list($PasswordChanges) = $DB->next_record();
if (check_perms('users_view_keys',$Class)) {
$DB->query("SELECT COUNT(*) FROM users_history_passkeys WHERE UserID='$UserID'");
list($PasskeyChanges) = $DB->next_record();
}
if (check_perms('users_view_ips',$Class)) {
$DB->query("SELECT COUNT(DISTINCT IP) FROM users_history_ips WHERE UserID='$UserID'");
list($IPChanges) = $DB->next_record();
$DB->query("SELECT COUNT(DISTINCT IP) FROM xbt_snatched WHERE uid='$UserID' AND IP != ''");
list($TrackerIPs) = $DB->next_record();
}
if (check_perms('users_view_email',$Class)) {
$DB->query("SELECT COUNT(*) FROM users_history_emails WHERE UserID='$UserID'");
list($EmailChanges) = $DB->next_record();
}
?>
This user is currently on ratio watch and must upload =Format::get_size(($Downloaded*$RequiredRatio)-$Uploaded)?> in the next =time_diff($RatioWatchEnds)?>, or their leeching privileges will be revoked. Amount downloaded while on ratio watch: =Format::get_size($Downloaded-$RatioWatchDownload)?>
if (!$Info) { ?>
This profile is currently empty.
} else {
echo $Text->full_format($Info);
}
?>
if ($Snatched > 4 && check_paranoia_here('snatched')) {
$RecentSnatches = $Cache->get_value('recent_snatches_'.$UserID);
if(!is_array($RecentSnatches)){
$DB->query("SELECT
g.ID,
g.Name,
g.WikiImage
FROM xbt_snatched AS s
INNER JOIN torrents AS t ON t.ID=s.fid
INNER JOIN torrents_group AS g ON t.GroupID=g.ID
WHERE s.uid='$UserID'
AND g.CategoryID='1'
AND g.WikiImage <> ''
GROUP BY g.ID
ORDER BY s.tstamp DESC
LIMIT 5");
$RecentSnatches = $DB->to_array();
$Artists = Artists::get_artists($DB->collect('ID'));
foreach($RecentSnatches as $Key => $SnatchInfo) {
$RecentSnatches[$Key]['Artist'] = Artists::display_artists($Artists[$SnatchInfo['ID']], false, true);
}
$Cache->cache_value('recent_snatches_'.$UserID, $RecentSnatches, 0); //inf cache
}
?>
Recent Snatches
foreach($RecentSnatches as $RS) { ?>
} ?>
}
if(!isset($Uploads)) { $Uploads = 0; }
if ($Uploads > 4 && check_paranoia_here('uploads')) {
$RecentUploads = $Cache->get_value('recent_uploads_'.$UserID);
if(!is_array($RecentUploads)){
$DB->query("SELECT
g.ID,
g.Name,
g.WikiImage
FROM torrents_group AS g
INNER JOIN torrents AS t ON t.GroupID=g.ID
WHERE t.UserID='$UserID'
AND g.CategoryID='1'
AND g.WikiImage <> ''
GROUP BY g.ID
ORDER BY t.Time DESC
LIMIT 5");
$RecentUploads = $DB->to_array();
$Artists = Artists::get_artists($DB->collect('ID'));
foreach($RecentUploads as $Key => $UploadInfo) {
$RecentUploads[$Key]['Artist'] = Artists::display_artists($Artists[$UploadInfo['ID']], false, true);
}
$Cache->cache_value('recent_uploads_'.$UserID, $RecentUploads, 0); //inf cache
}
?>
Recent Uploads
foreach($RecentUploads as $RU) { ?>
} ?>
}
$DB->query("SELECT ID, Name FROM collages WHERE UserID='$UserID' AND CategoryID='0' AND Deleted='0' ORDER BY Featured DESC, Name ASC");
$Collages = $DB->to_array();
$FirstCol = true;
foreach ($Collages as $CollageInfo) {
list($CollageID, $CName) = $CollageInfo;
$DB->query("SELECT ct.GroupID,
tg.WikiImage,
tg.CategoryID
FROM collages_torrents AS ct
JOIN torrents_group AS tg ON tg.ID=ct.GroupID
WHERE ct.CollageID='$CollageID'
ORDER BY ct.Sort LIMIT 5");
$Collage = $DB->to_array();
?>
}
// Requests
if (check_paranoia_here('requestsvoted_list')) {
$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 users_main AS u ON u.ID=UserID
LEFT JOIN requests_votes AS rv ON rv.RequestID=r.ID
WHERE r.UserID = ".$UserID."
AND r.TorrentID = 0
GROUP BY r.ID
ORDER BY Votes DESC");
if($DB->record_count() > 0) {
$Requests = $DB->to_array();
?>
}
}
?>
// Displays a table of forum warnings viewable only to Forum Moderators
if($LoggedUser['Class'] == 650 && check_perms('users_warn', $Class)) {
$DB->query("SELECT Comment FROM users_warnings_forums WHERE UserID = '$UserID'");
list($ForumWarnings) = $DB->next_record();
if($DB->record_count() > 0) {
?>
Forum Warnings
=$Text->full_format($ForumWarnings)?>
}
}
if (check_perms('users_mod', $Class)) { ?>
} ?>