purchaseTokenOther($LoggedUser['ID'], $UserID, $match[1]); } catch (Exception $e) { if ($e->getMessage() == 'Bonus:otherToken:no-gift-funds') { error('Purchase of tokens not concluded. Either you lacked funds or they have chosen to decline FL tokens.'); } else { error(0); } } } $Preview = isset($_GET['preview']) ? $_GET['preview'] : 0; if ($UserID == $LoggedUser['ID']) { $OwnProfile = true; if ($Preview == 1) { $OwnProfile = false; $ParanoiaString = $_GET['paranoia']; $CustomParanoia = explode(',', $ParanoiaString); } $FL_Items = []; } else { $OwnProfile = false; //Don't allow any kind of previewing on others' profiles $Preview = 0; $FL_Items = $Bonus->getListOther($LoggedUser['BonusPoints']); } $FA_Key = null; if (check_perms('users_mod')) { // Person viewing is staff $DB->prepared_query(' SELECT um.Username, um.Email, ula.last_access, um.IP, p.Level AS Class, uls.Uploaded, uls.Downloaded, coalesce(ub.points, 0) as BonusPoints, um.RequiredRatio, um.Title, um.torrent_pass, um.Enabled, um.Paranoia, um.Invites, um.can_leech, um.Visible, 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.DisablePoints, i.DisableForums, i.DisableTagging, i.DisableUpload, i.DisableWiki, i.DisablePM, i.DisableIRC, i.DisableRequests, uf.tokens AS FLTokens, um.2FA_Key, SHA1(i.AdminComment), i.InfoTitle, la.Type AS LockedAccount, i.collages, CASE WHEN uhafl.UserID IS NULL THEN 1 ELSE 0 END AS AcceptFL, CASE WHEN uhaud.UserID IS NULL THEN 0 ELSE 1 END AS UnlimitedDownload FROM users_main AS um LEFT JOIN user_last_access AS ula ON (ula.user_id = um.ID) INNER JOIN users_leech_stats AS uls ON (uls.UserID = um.ID) INNER JOIN users_info AS i ON (i.UserID = um.ID) INNER JOIN user_flt AS uf ON (uf.user_id = um.ID) LEFT JOIN user_bonus AS ub ON (ub.user_id = um.ID) LEFT JOIN users_main AS inviter ON (i.Inviter = inviter.ID) LEFT JOIN permissions AS p ON (p.ID = um.PermissionID) LEFT JOIN forums_posts AS posts ON (posts.AuthorID = um.ID) LEFT JOIN locked_accounts AS la ON (la.UserID = um.ID) LEFT JOIN user_has_attr AS uhafl ON (uhafl.UserID = um.ID AND uhafl.UserAttrID = (SELECT ID FROM user_attr WHERE Name = ?)) LEFT JOIN user_has_attr AS uhaud ON (uhaud.UserID = um.ID AND uhaud.UserAttrID = (SELECT ID FROM user_attr WHERE Name = ?)) WHERE um.ID = ? GROUP BY AuthorID ', 'no-fl-gifts', 'unlimited-download', $UserID ); list($Username, $Email, $LastAccess, $IP, $Class, $Uploaded, $Downloaded, $BonusPoints, $RequiredRatio, $CustomTitle, $torrent_pass, $Enabled, $Paranoia, $Invites, $DisableLeech, $Visible, $JoinDate, $Info, $Avatar, $AdminComment, $Donor, $Artist, $Warned, $SupportFor, $RestrictedForums, $PermittedForums, $InviterID, $InviterName, $ForumPosts, $RatioWatchEnds, $RatioWatchDownload, $DisableAvatar, $DisableInvites, $DisablePosting, $DisablePoints, $DisableForums, $DisableTagging, $DisableUpload, $DisableWiki, $DisablePM, $DisableIRC, $DisableRequests, $FLTokens, $FA_Key, $CommentHash, $InfoTitle, $LockedAccount, $MaxCollages, $AcceptFL, $UnlimitedDownload) = $DB->next_record(MYSQLI_NUM, [9, 12]); } else { // Person viewing is a normal user $DB->prepared_query(' SELECT um.Username, um.Email, ula.last_access, um.IP, p.Level AS Class, uls.Uploaded, uls.Downloaded, coalesce(ub.points, 0) as BonusPoints, um.RequiredRatio, um.Enabled, um.Paranoia, um.Invites, um.Title, um.torrent_pass, um.can_leech, i.JoinDate, i.Info, i.Avatar, uf.tokens AS FLTokens, i.Donor, i.Warned, COUNT(posts.id) AS ForumPosts, i.Inviter, i.DisableInvites, inviter.username, i.InfoTitle, CASE WHEN uhafl.UserID IS NULL THEN 1 ELSE 0 END AS AcceptFL FROM users_main AS um LEFT JOIN user_last_access AS ula ON (ula.user_id = um.ID) INNER JOIN users_leech_stats AS uls ON (uls.UserID = um.ID) INNER JOIN users_info AS i ON (i.UserID = um.ID) INNER JOIN user_flt AS uf ON (uf.user_id = um.ID) LEFT JOIN user_bonus AS ub ON (ub.user_id = um.ID) LEFT JOIN permissions AS p ON (p.ID = um.PermissionID) LEFT JOIN users_main AS inviter ON (i.Inviter = inviter.ID) LEFT JOIN forums_posts AS posts ON (posts.AuthorID = um.ID) LEFT JOIN user_has_attr AS uhafl ON (uhafl.UserID = um.ID AND uhafl.UserAttrID = (SELECT ID FROM user_attr WHERE Name = ?)) WHERE um.ID = ? GROUP BY AuthorID ', 'no-fl-gifts', $UserID ); list($Username, $Email, $LastAccess, $IP, $Class, $Uploaded, $Downloaded, $BonusPoints, $RequiredRatio, $Enabled, $Paranoia, $Invites, $CustomTitle, $torrent_pass, $DisableLeech, $JoinDate, $Info, $Avatar, $FLTokens, $Donor, $Warned, $ForumPosts, $InviterID, $DisableInvites, $InviterName, $InfoTitle, $AcceptFL) = $DB->next_record(MYSQLI_NUM, [10, 12]); $UnlimitedDownload = null; } if (!$Username) { // If user doesn't exist header("Location: log.php?search=User+$UserID"); } if ($Warned == '') { $Warned = null; // Fuck Gazelle } $BonusPointsPerHour = $Bonus->userHourlyRate($UserID); // 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 = unserialize($Paranoia); if (!is_array($Paranoia)) { $Paranoia = []; } } $ParanoiaLevel = 0; foreach ($Paranoia as $P) { $ParanoiaLevel++; if (strpos($P, '+') !== false) { $ParanoiaLevel++; } } $JoinedDate = time_diff($JoinDate); 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, "jquery.imagesloaded,jquery.wookmark,user,bbcode,requests,lastfm,comments,info_paster", "tiles"); $User = new Gazelle\User($UserID); $User->forceCacheFlush($OwnProfile); list($ClassRatio, $Buffer) = $User->buffer(); ?>

$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.
enabledRewards($UserID); $ProfileRewards = $donorMan->profileRewards($UserID); for ($i = 1; $i <= 4; $i++) { if ($EnabledRewards['HasProfileInfo' . $i] && $ProfileRewards['ProfileInfo' . $i]) { ?> render('user/recent.twig', [ 'id' => $UserID, 'recent' => $User->recentSnatches(), 'title' => 'Snatches', 'type' => 'snatched', ]); } if (check_paranoia_here('uploads')) { echo G::$Twig->render('user/recent.twig', [ 'id' => $UserID, 'recent' => $User->recentUploads(), 'title' => 'Uploads', 'type' => 'uploaded', ]); } $Collages = $User->personalCollages(); $FirstCol = true; foreach ($Collages as $CollageInfo) { list($CollageID, $CName) = $CollageInfo; $DB->prepared_query(' SELECT ct.GroupID, tg.WikiImage, tg.CategoryID FROM collages_torrents AS ct INNER JOIN torrents_group AS tg ON (tg.ID = ct.GroupID) WHERE ct.CollageID = ? ORDER BY ct.Sort LIMIT 5 ', $CollageID ); $Collage = $DB->to_array(false, MYSQLI_ASSOC, false); ?> $Group['Artists']], false, true) . $Group['Name']; ?>
- See full
<?= $Name ?>
0) { require(__DIR__ . '/../../classes/invite_tree.class.php'); $Tree = new INVITE_TREE($UserID, ['visible' => false]); ?>
Invite Tree View
render('donation/history.twig', [ 'history' => $donorMan->history($UserID), ]); } // Requests if (empty($LoggedUser['DisableRequests']) && check_paranoia_here('requestsvoted_list')) { $SphQL = new SphinxqlQuery(); $SphQLResult = $SphQL->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 View
prepared_query(' SELECT SQL_CALC_FOUND_ROWS spc.ID, spc.Subject, spc.Status, spc.Level, spc.AssignedToUser, spc.Date, COUNT(spm.ID) AS Resplies, spc.ResolverID FROM staff_pm_conversations AS spc JOIN staff_pm_messages spm ON spm.ConvID = spc.ID WHERE spc.UserID = ? AND (spc.Level <= ? OR spc.AssignedToUser = ?) GROUP BY spc.ID ORDER BY spc.Date DESC ', $UserID, $UserLevel, $LoggedUser['ID'] ); if ($DB->has_results()) { $StaffPMs = $DB->to_array(); ?>
Staff PMs View
forumWarning(); if ($ForumWarnings) { ?>
Forum warnings
Staff Notes Edit Toggle
Toggle edit
render('user/edit-username.twig', [ 'username' => $Username, ]); } if (check_perms('users_edit_titles')) { echo G::$Twig->render('user/edit-title.twig', [ 'title' => $CustomTitle, ]); } if (check_perms('users_promote_below', $Class) || check_perms('users_promote_to', $Class - 1)) { ?> render('user/edit-permission.twig', [ 'permission' => $User->permissionList(), ]); } if (check_perms('users_make_invisible')) { echo G::$Twig->render('user/edit-peer-visibility.twig', [ 'is_visible' => $Visible == 1, ]); } if (check_perms('admin_rate_limit_manage')) { echo G::$Twig->render('user/edit-rate-limit.twig', [ 'unlimited' => $UnlimitedDownload, ]); } if (check_perms('users_edit_ratio', $Class) || (check_perms('users_edit_own_ratio') && $OwnProfile)) { echo G::$Twig->render('user/edit-buffer.twig', [ 'up' => $Uploaded, 'down' => $Downloaded, 'bonus' => $BonusPoints, 'collages' => $MaxCollages, 'donor_collages' => $donorMan->personalCollages($UserID), ]); } if (check_perms('users_edit_invites')) { echo G::$Twig->render('user/edit-invite.twig', [ 'amount' => $Invites, ]); } if (check_perms('admin_manage_user_fls')) { echo G::$Twig->render('user/edit-fltoken.twig', [ 'amount' => $FLTokens, ]); } if (check_perms('admin_manage_fls') || (check_perms('users_mod') && $OwnProfile)) { echo G::$Twig->render('user/edit-remark.twig', [ 'remark' => $SupportFor, ]); } if (check_perms('users_edit_reset_keys')) { echo G::$Twig->render('user/edit-reset.twig'); } if (check_perms('users_edit_password')) { echo G::$Twig->render('user/edit-password.twig', [ 'key_2fa' => $FA_Key, 'user_id' => $UserID, ]); } ?>
User Information
Primary class:
render('user/edit-privileges.twig', [ 'email' => $User->emailHistory(), 'is_unconfirmed' => $Enabled == '0', 'is_enabled' => $Enabled == '1', 'is_disabled' => $Enabled == '2', 'forum' => [ 'restricted' => $RestrictedForums, 'permitted' => $PermittedForums, ], 'permission' => [ 'disable_any' => check_perms('users_disable_any'), 'delete_user' => check_perms('users_delete_users'), ], 'disable' => [ 'avatar' => $DisableAvatar, 'bonus' => $DisablePoints, 'forum' => $DisableForums, 'invite' => $DisableInvites, 'irc' => $DisableIRC, 'leech' => $DisableLeech == 0, 'pm' => $DisablePM, 'posting' => $DisablePosting, 'request' => $DisableRequests, 'tag' => $DisableTagging, 'upload' => $DisableUpload, 'wiki' => $DisableWiki, ], ]); } if (check_perms('users_give_donor')) { echo G::$Twig->render('donation/admin-panel.twig', [ 'rank' => $donorMan->rank($UserID), 'special_rank' => $donorMan->specialRank($UserID), 'total_rank' => $donorMan->totalRank($UserID), ]); } if (check_perms('users_warn')) { echo G::$Twig->render('user/edit-warn.twig', [ 'is_warned' => !is_null($Warned), 'until' => !is_null($Warned) ? date('Y-m-d H:i', strtotime($Warned)) : 'n/a', ]); } if (check_perms('users_disable_any')) { echo G::$Twig->render('user/edit-lock.twig', [ 'is_locked' => $LockedAccount, 'staff_lock' => STAFF_LOCKED, 'can_logout' => check_perms('users_logout'), ]); } echo G::$Twig->render('user/edit-submit.twig'); ?>