query(" SELECT m.`Username`, m.`Email`, m.`LastAccess`, m.`IP`, p.`Level` AS Class, m.`Uploaded`, m.`Downloaded`, m.`RequiredRatio`, m.`Title`, m.`torrent_pass`, m.`Enabled`, m.`Paranoia`, m.`Invites`, m.`can_leech`, m.`Visible`, m.`BonusPoints`, m.`IRCLines`, i.`JoinDate`, i.`Info`, i.`Avatar`, i.`AdminComment`, i.`Donor`, i.`Artist`, i.`Warned`, i.`SupportFor`, i.`RestrictedForums`, i.`PermittedForums`, i.`Inviter`, inviter.`Username`, COUNT(posts.id) AS ForumPosts, i.`RatioWatchEnds`, i.`RatioWatchDownload`, i.`DisableAvatar`, i.`DisableInvites`, i.`DisablePosting`, i.`DisableForums`, i.`DisableTagging`, i.`DisableUpload`, i.`DisableWiki`, i.`DisablePM`, i.`DisablePoints`, i.`DisablePromotion`, i.`DisableIRC`, i.`DisableRequests`, m.`FLTokens`, SHA1(i.`AdminComment`), i.`InfoTitle`, la.`Type` AS LockedAccount FROM `users_main` AS m JOIN `users_info` AS i ON i.`UserID` = m.`ID` LEFT JOIN `users_main` AS inviter ON i.`Inviter` = inviter.`ID` LEFT JOIN `permissions` AS p ON p.`ID` = m.`PermissionID` LEFT JOIN `forums_posts` AS posts ON posts.`AuthorID` = m.`ID` LEFT JOIN `locked_accounts` AS la ON la.`UserID` = m.`ID` WHERE m.`ID` = '$UserID' GROUP BY `AuthorID` "); if (!$DB->has_results()) { // If user doesn't exist header("Location: log.php?search=User+$UserID"); } list($Username, $Email, $LastAccess, $IP, $Class, $Uploaded, $Downloaded, $RequiredRatio, $CustomTitle, $torrent_pass, $Enabled, $Paranoia, $Invites, $DisableLeech, $Visible, $BonusPoints, $IRCLines, $JoinDate, $Info, $Avatar, $AdminComment, $Donor, $Artist, $Warned, $SupportFor, $RestrictedForums, $PermittedForums, $InviterID, $InviterName, $ForumPosts, $RatioWatchEnds, $RatioWatchDownload, $DisableAvatar, $DisableInvites, $DisablePosting, $DisableForums, $DisableTagging, $DisableUpload, $DisableWiki, $DisablePM, $DisablePoints, $DisablePromotion, $DisableIRC, $DisableRequests, $FLTokens, $CommentHash, $InfoTitle, $LockedAccount) = $DB->next_record(MYSQLI_NUM, array(8, 11)); } /** * Normal view main query */ else { // Person viewing is a normal user $DB->query(" SELECT m.`Username`, m.`Email`, m.`LastAccess`, m.`IP`, p.`Level` AS Class, m.`Uploaded`, m.`Downloaded`, m.`RequiredRatio`, m.`Enabled`, m.`Paranoia`, m.`Invites`, m.`Title`, m.`torrent_pass`, m.`can_leech`, i.`JoinDate`, i.`Info`, i.`Avatar`, m.`FLTokens`, m.`BonusPoints`, m.`IRCLines`, i.`Donor`, i.`Warned`, COUNT(posts.id) AS ForumPosts, i.`Inviter`, i.`DisableInvites`, inviter.`username`, i.`InfoTitle` FROM `users_main` AS m JOIN `users_info` AS i ON i.`UserID` = m.`ID` LEFT JOIN `permissions` AS p ON p.`ID` = m.`PermissionID` LEFT JOIN `users_main` AS inviter ON i.`Inviter` = inviter.`ID` LEFT JOIN `forums_posts` AS posts ON posts.`AuthorID` = m.`ID` WHERE m.`ID` = '$UserID' GROUP BY `AuthorID` "); if (!$DB->has_results()) { // If user doesn't exist header("Location: log.php?search=User+$UserID"); } list($Username, $Email, $LastAccess, $IP, $Class, $Uploaded, $Downloaded, $RequiredRatio, $Enabled, $Paranoia, $Invites, $CustomTitle, $torrent_pass, $DisableLeech, $JoinDate, $Info, $Avatar, $FLTokens, $BonusPoints, $IRCLines, $Donor, $Warned, $ForumPosts, $InviterID, $DisableInvites, $InviterName, $InfoTitle) = $DB->next_record(MYSQLI_NUM, array(9, 11)); } $Email = apcu_exists('DBKEY') ? Crypto::decrypt($Email) : '[Encrypted]'; $DB->query(" SELECT SUM(t.Size) FROM xbt_files_users AS xfu JOIN torrents AS t on t.ID = xfu.fid WHERE xfu.uid = '$UserID' AND xfu.active = 1 AND xfu.Remaining = 0"); if ($DB->has_results()) { list($TotalSeeding) = $DB->next_record(MYSQLI_NUM, false); } // Image proxy CTs $DisplayCustomTitle = $CustomTitle; if (check_perms('site_proxy_images') && !empty($CustomTitle)) { $DisplayCustomTitle = preg_replace_callback( '~src=("?)(http.+?)(["\s>])~', function ($Matches) { return 'src=' . $Matches[1] . ImageTools::process($Matches[2]) . $Matches[3]; }, $CustomTitle ); } if ($Preview == 1) { if (strlen($ParanoiaString) == 0) { $Paranoia = []; } else { $Paranoia = $CustomParanoia; } } else { $Paranoia = json_decode($Paranoia, true); if (!is_array($Paranoia)) { $Paranoia = []; } } $ParanoiaLevel = 0; foreach ($Paranoia as $P) { $ParanoiaLevel++; if (strpos($P, '+') !== false) { $ParanoiaLevel++; } } $JoinedDate = time_diff($JoinDate); $LastAccess = time_diff($LastAccess); function check_paranoia_here($Setting) { global $Paranoia, $Class, $UserID, $Preview; if ($Preview == 1) { return check_paranoia($Setting, $Paranoia, $Class); } else { return check_paranoia($Setting, $Paranoia, $Class, $UserID); } } View::show_header( $Username, 'vendor/imagesloaded.min,user,bbcode,requests,comments,info_paster,wall' ); ?>

$Uploaded) { ?>
Ratio watch
This user is currently on ratio watch and must upload in the next , or their leeching privileges will be revoked. Amount downloaded while on ratio watch:
Hide 
This profile is currently empty.
get_value("recent_snatches_$UserID"); if ($RecentSnatches === false) { $DB->query(" SELECT g.ID, g.Name, g.Title2, g.NameJP, 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.WikiImage != '' GROUP BY g.ID,s.tstamp 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 } if (!empty($RecentSnatches)) { ?>
Recent Snatches Show 
get_value("recent_uploads_$UserID"); if ($RecentUploads === false) { $DB->query(" SELECT g.ID, g.Name, g.Title2, g.NameJP, g.WikiImage FROM torrents_group AS g INNER JOIN torrents AS t ON t.GroupID = g.ID WHERE t.UserID = '$UserID' AND g.WikiImage != '' GROUP BY g.ID,t.Time 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 } if (!empty($RecentUploads)) { ?>
Recent Uploads Show 
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(false, MYSQLI_NUM, false); 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(false, MYSQLI_ASSOC, false); ?> 0) { include(SERVER_ROOT.'/classes/invite_tree.class.php'); $Tree = new INVITE_TREE($UserID, array('visible' => false)); ?>
Invite Tree Toggle
select('id, votes, bounty') ->from('requests, requests_delta') ->where('userid', $UserID) ->where('torrentid', 0) ->order_by('votes', 'desc') ->order_by('bounty', 'desc') ->limit(0, 100, 100) // Limit to 100 requests ->query(); if ($SphQLResult->has_results()) { $SphRequests = $SphQLResult->to_array('id', MYSQLI_ASSOC); ?>
Requests Show
query(" SELECT SQL_CALC_FOUND_ROWS ID, Subject, Status, Level, AssignedToUser, Date, ResolverID FROM staff_pm_conversations WHERE UserID = $UserID AND (Level <= $UserLevel OR AssignedToUser = '".$LoggedUser['ID']."') ORDER BY Date DESC"); if ($DB->has_results()) { $StaffPMs = $DB->to_array(); ?>
Staff PMs Toggle
query(" SELECT Comment FROM users_warnings_forums WHERE UserID = '$UserID'"); list($ForumWarnings) = $DB->next_record(); if ($DB->has_results()) { ?>
Forum warnings
Staff Notes Edit Toggle
Toggle edit
User Information
Username:
Custom title:
Primary class:
Donor: checked="checked" />
Secondary classes: query(" SELECT p.ID, p.Name, l.UserID FROM permissions AS p LEFT JOIN users_levels AS l ON l.PermissionID = p.ID AND l.UserID = '$UserID' WHERE p.Secondary = 1 ORDER BY p.Name"); $i = 0; while (list($PermID, $PermName, $IsSet) = $DB->next_record()) { $i++; ?> checked="checked" />  \n"; } } ?>
Visible in peer lists: checked="checked" />
Uploaded:
Downloaded:
: query(" SELECT COUNT(DISTINCT x.fid) AS Torrents, SUM(t.Size) AS Size, SUM(xs.seedtime) AS Seedtime, SUM(t.Seeders) AS Seeders FROM users_main AS um LEFT JOIN users_info AS i on um.ID = i.UserID LEFT JOIN xbt_files_users AS x ON um.ID=x.uid LEFT JOIN torrents AS t ON t.ID=x.fid LEFT JOIN xbt_snatched AS xs ON x.uid=xs.uid AND x.fid=xs.fid WHERE um.ID = $UserID AND um.Enabled = '1' AND x.active = 1 AND x.completed = 0 AND x.Remaining = 0 GROUP BY um.ID"); if ($DB->has_results()) { list($NumTorr, $TSize, $TTime, $TSeeds) = $DB->next_record(); $ENV = ENV::go(); $PointsRate = ($ENV->BP_COEFF + (0.55*($NumTorr * (sqrt(($TSize/$NumTorr)/1073741824) * pow(1.5, ($TTime/$NumTorr)/(24*365))))) / (max(1, sqrt(($TSeeds/$NumTorr)+4)/3)))**0.95; } $PointsRate = intval(max(min($PointsRate, ($PointsRate * 2) - ($BonusPoints/1440)), 0)); $PointsPerHour = number_format($PointsRate)." ".BONUS_POINTS."/hour"; $PointsPerDay = number_format($PointsRate*24)." ".BONUS_POINTS."/day"; } else { $PointsPerHour = "0 ".BONUS_POINTS."/hour"; $PointsPerDay = BONUS_POINTS." disabled"; } ?> ()
Merge stats from:
Freeleech tokens:
Invites:
FLS/Staff remark:
Reset: | | | |
|
New password:
Badges Owned: /> "; } } ?>
Warnings
Warned: checked="checked" />
Expiration:
Extension:
Reduction:
Warning reason:
Lock Account
Lock Account: checked="checked" />
Reason:
query(" SELECT DISTINCT Email, IP, Time FROM users_history_emails WHERE UserID = $UserID ORDER BY Time ASC"); $Emails = $DB->to_array(); ?>
User Privileges
Disable: checked="checked" /> | checked="checked" /> | checked="checked" /> | checked="checked" /> | checked="checked" /> |

checked="checked" /> | checked="checked" /> | checked="checked" /> | checked="checked" />

checked="checked" /> | checked="checked" /> | checked="checked" /> | checked="checked" />
Hacked: to
Account:
User reason:
Restricted forums:
Extra forums:
Session
Reset session:
Log out:
Submit
Reason:
Paste user stats: