/** * Generate a table row for a staff member on staff.php * * @param $Row used for alternating row colors * @param $ID the user ID of the staff member * @param $Paranoia the user's paranoia * @param $Class the user class * @param $LastAccess datetime the user last browsed the site * @param $Remark the "Staff remark" or FLS' "Support for" text * @param $HiddenBy the text that is displayed when a staff member's * paranoia hides their LastAccess time * @return string $Row */ function make_staff_row($Row, $ID, $Paranoia, $Class, $LastAccess, $Remark = '', $HiddenBy = 'Hidden by user') { $Row = $Row === 'a' ? 'b' : 'a'; echo "\t\t\t<tr class=\"row{$Row}\">\n\t\t\t\t<td class=\"nobr\">\n\t\t\t\t\t" . Users::format_username($ID, false, false, false) . "\n\t\t\t\t</td>\n\t\t\t\t<td class=\"nobr\">\n\t\t\t\t\t"; //used for proper indentation of HTML if (check_paranoia('lastseen', $Paranoia, $Class)) { echo time_diff($LastAccess); } else { echo "{$HiddenBy}"; } echo "\n\t\t\t\t</td>\n\t\t\t\t<td class=\"nobr\">" . Text::full_format($Remark) . "</td>\n\t\t\t</tr>\n"; // the "\n" is needed for pretty HTML // the foreach loop that calls this function needs to know the new value of $Row return $Row; }
/** * Render the revision history * @param array $RevisionHistory see RevisionHistory::get_revision_history * @param string $BaseURL */ public static function render_revision_history($RevisionHistory, $BaseURL) { ?> <table cellpadding="6" cellspacing="1" border="0" width="100%" class="border"> <tr class="colhead"> <td>Revision</td> <td>Date</td> <td>User</td> <td>Summary</td> </tr> <?php $Row = 'a'; foreach ($RevisionHistory as $Entry) { list($RevisionID, $Summary, $Time, $UserID) = $Entry; $Row = $Row == 'a' ? 'b' : 'a'; ?> <tr class="row<?php echo $Row; ?> "> <td> <?php echo "<a href=\"{$BaseURL}&revisionid={$RevisionID}\">#{$RevisionID}</a>"; ?> </td> <td> <?php echo $Time; ?> </td> <td> <?php echo Users::format_username($UserID, false, false, false); ?> </td> <td> <?php echo $Summary ? $Summary : '(empty)'; ?> </td> </tr> <?php } ?> </table> <?php }
function user_dupes_table($UserID) { global $DB, $LoggedUser; if (!check_perms('users_mod')) { error(403); } if (!is_number($UserID)) { error(403); } $DB->query("\n\t\tSELECT d.ID, d.Comments, SHA1(d.Comments) AS CommentHash\n\t\tFROM dupe_groups AS d\n\t\t\tJOIN users_dupes AS u ON u.GroupID = d.ID\n\t\tWHERE u.UserID = {$UserID}"); if (list($GroupID, $Comments, $CommentHash) = $DB->next_record()) { $DB->query("\n\t\t\tSELECT m.ID\n\t\t\tFROM users_main AS m\n\t\t\t\tJOIN users_dupes AS d ON m.ID = d.UserID\n\t\t\tWHERE d.GroupID = {$GroupID}\n\t\t\tORDER BY m.ID ASC"); $DupeCount = $DB->record_count(); $Dupes = $DB->to_array(); } else { $DupeCount = 0; $Dupes = array(); } ?> <form class="manage_form" name="user" method="post" id="linkedform" action=""> <input type="hidden" name="action" value="dupes" /> <input type="hidden" name="dupeaction" value="update" /> <input type="hidden" name="userid" value="<?php echo $UserID; ?> " /> <input type="hidden" id="auth" name="auth" value="<?php echo $LoggedUser['AuthKey']; ?> " /> <input type="hidden" id="form_comment_hash" name="form_comment_hash" value="<?php echo $CommentHash; ?> " /> <div class="box box2" id="l_a_box"> <div class="head"> Linked Accounts (<?php echo max($DupeCount - 1, 0); ?> ) <a href="#" onclick="$('.linkedaccounts').gtoggle(); return false;" class="brackets">View</a> </div> <table width="100%" class="layout hidden linkedaccounts"> <?php echo $DupeCount ? "<tr>\n" : ''; $i = 0; foreach ($Dupes as $Dupe) { $i++; list($DupeID) = $Dupe; $DupeInfo = Users::user_info($DupeID); ?> <td align="left"><?php echo Users::format_username($DupeID, true, true, true, true); ?> <a href="user.php?action=dupes&dupeaction=remove&auth=<?php echo $LoggedUser['AuthKey']; ?> &userid=<?php echo $UserID; ?> &removeid=<?php echo $DupeID; ?> " onclick="return confirm('Are you sure you wish to remove <?php echo $DupeInfo['Username']; ?> from this group?');" class="brackets tooltip" title="Remove linked account">X</a> </td> <?php if ($i == 4) { $i = 0; echo "\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n"; } } if ($DupeCount) { if ($i !== 0) { for ($j = $i; $j < 4; $j++) { echo "\t\t\t\t\t\t<td> </td>\n"; } } ?> </tr> <?php } ?> <tr> <td colspan="5" align="left" style="border-top: thin solid;"><strong>Comments:</strong></td> </tr> <tr> <td colspan="5" align="left"> <div id="dupecomments" class="<?php echo $DupeCount ? '' : 'hidden'; ?> "><?php echo Text::full_format($Comments); ?> </div> <div id="editdupecomments" class="<?php echo $DupeCount ? 'hidden' : ''; ?> "> <textarea name="dupecomments" onkeyup="resize('dupecommentsbox');" id="dupecommentsbox" cols="65" rows="5" style="width: 98%;"><?php echo display_str($Comments); ?> </textarea> </div> <span style="float: right;"><a href="#" onclick="$('#dupecomments').gtoggle(); $('#editdupecomments').gtoggle(); resize('dupecommentsbox'); return false;" class="brackets">Edit linked account comments</a></span> </td> </tr> </table> <div class="pad hidden linkedaccounts"> <label for="target">Link this user with: </label> <input type="text" name="target" id="target" /> <input type="submit" value="Update" id="submitlink" /> </div> </div> </form> <?php }
if ($HasDupe) { $HideMe = count($UserIDs) > 10; foreach ($UserIDs as $Key => $Val) { if (!$UserEndTimes[$Key]) { $UserEndTimes[$Key] = sqltime(); } ?> <tr class="rowb<?php echo $HideMe ? ' hidden' : ''; ?> " name="<?php echo $Index; ?> "> <td> » <?php echo Users::format_username($Val, true, true, true); ?> </td> <td><?php echo time_diff($UserStartTimes[$Key]); ?> </td> <td class="hidden"><?php echo $UserStartTimes[$Key]; ?> </td> <td><?php echo time_diff($UserEndTimes[$Key]); ?> </td> <td class="hidden"><?php
} ?> <table> <tr class="colhead_dark" style="font-weight: bold;"> <td>User</td> <td>Time</td> <td>User</td> <td>Time</td> </tr> <tr> <?php $i = 0; foreach ($Results as $ID => $Data) { list($SnatcherID, $Timestamp) = array_values($Data); $User = Users::format_username($SnatcherID, true, true, true, true); if (!array_key_exists($SnatcherID, $Snatched) && $SnatcherID != $UserID) { $User = '******' . $User . '</span>'; if (array_key_exists($SnatcherID, $Seeding)) { $User = '******' . $User . '</strong>'; } } if ($i % 2 == 0 && $i > 0) { ?> </tr> <tr> <?php } ?> <td><?php echo $User;
function build_torrents_table($Cache, $DB, $LoggedUser, $GroupID, $GroupName, $GroupCategoryID, $ReleaseType, $TorrentList, $Types, $Username, $ReportedTimes) { function filelist($Str) { return "</td>\n<td>" . Format::get_size($Str[1]) . "</td>\n</tr>"; } $LastRemasterYear = '-'; $LastRemasterTitle = ''; $LastRemasterRecordLabel = ''; $LastRemasterCatalogueNumber = ''; $EditionID = 0; foreach ($TorrentList as $Torrent) { //t.ID, t.Media, t.Format, t.Encoding, t.Remastered, t.RemasterYear, //t.RemasterTitle, t.RemasterRecordLabel, t.RemasterCatalogueNumber, t.Scene, //t.HasLog, t.HasCue, t.LogScore, t.FileCount, t.Size, t.Seeders, t.Leechers, //t.Snatched, t.FreeTorrent, t.Time, t.Description, t.FileList, //t.FilePath, t.UserID, t.last_action, HEX(t.info_hash), (bad tags), (bad folders), (bad filenames), //(cassette approved), (lossy master approved), (lossy web approved), t.LastReseedRequest, //LogInDB, (has file), Torrents::torrent_properties() list($TorrentID, $Media, $Format, $Encoding, $Remastered, $RemasterYear, $RemasterTitle, $RemasterRecordLabel, $RemasterCatalogueNumber, $Scene, $HasLog, $HasCue, $LogScore, $FileCount, $Size, $Seeders, $Leechers, $Snatched, $FreeTorrent, $TorrentTime, $Description, $FileList, $FilePath, $UserID, $LastActive, $InfoHash, $BadTags, $BadFolders, $BadFiles, $CassetteApproved, $LossymasterApproved, $LossywebApproved, $LastReseedRequest, $LogInDB, $HasFile, $PersonalFL, $IsSnatched) = array_values($Torrent); if ($Remastered && !$RemasterYear) { $FirstUnknown = !isset($FirstUnknown); } $Reported = false; unset($ReportedTimes); $Reports = Torrents::get_reports($TorrentID); $NumReports = count($Reports); if ($NumReports > 0) { $Reported = true; include SERVER_ROOT . '/sections/reportsv2/array.php'; $ReportInfo = ' <table class="reportinfo_table"> <tr class="colhead_dark" style="font-weight: bold;"> <td>This torrent has ' . $NumReports . ' active ' . ($NumReports === 1 ? 'report' : 'reports') . ":</td>\n\t\t\t</tr>"; foreach ($Reports as $Report) { if (check_perms('admin_reports')) { $ReporterID = $Report['ReporterID']; $Reporter = Users::user_info($ReporterID); $ReporterName = $Reporter['Username']; $ReportLinks = "<a href=\"user.php?id={$ReporterID}\">{$ReporterName}</a> <a href=\"reportsv2.php?view=report&id={$Report['ID']}\">reported it</a>"; } else { $ReportLinks = 'Someone reported it'; } if (isset($Types[$GroupCategoryID][$Report['Type']])) { $ReportType = $Types[$GroupCategoryID][$Report['Type']]; } elseif (isset($Types['master'][$Report['Type']])) { $ReportType = $Types['master'][$Report['Type']]; } else { //There was a type but it wasn't an option! $ReportType = $Types['master']['other']; } $ReportInfo .= "\n\t\t\t<tr>\n\t\t\t\t<td>{$ReportLinks} " . time_diff($Report['ReportedTime'], 2, true, true) . ' for the reason "' . $ReportType['title'] . '": <blockquote>' . Text::full_format($Report['UserComment']) . '</blockquote> </td> </tr>'; } $ReportInfo .= "\n\t\t</table>"; } $CanEdit = check_perms('torrents_edit') || $UserID == $LoggedUser['ID'] && !$LoggedUser['DisableWiki'] && !($Remastered && !$RemasterYear); $RegenLink = check_perms('users_mod') ? ' <a href="torrents.php?action=regen_filelist&torrentid=' . $TorrentID . '" class="brackets">Regenerate</a>' : ''; $FileTable = ' <table class="filelist_table"> <tr class="colhead_dark"> <td> <div class="filelist_title" style="float: left;">File Names' . $RegenLink . '</div> <div class="filelist_path" style="float: right;">' . ($FilePath ? "/{$FilePath}/" : '') . '</div> </td> <td> <strong>Size</strong> </td> </tr>'; if (substr($FileList, -3) == '}}}') { // Old style $FileListSplit = explode('|||', $FileList); foreach ($FileListSplit as $File) { $NameEnd = strrpos($File, '{{{'); $Name = substr($File, 0, $NameEnd); if ($Spaces = strspn($Name, ' ')) { $Name = str_replace(' ', ' ', substr($Name, 0, $Spaces)) . substr($Name, $Spaces); } $FileSize = substr($File, $NameEnd + 3, -3); $FileTable .= sprintf("\n<tr><td>%s</td><td class=\"number_column\">%s</td></tr>", $Name, Format::get_size($FileSize)); } } else { $FileListSplit = explode("\n", $FileList); foreach ($FileListSplit as $File) { $FileInfo = Torrents::filelist_get_file($File); $FileTable .= sprintf("\n<tr><td>%s</td><td class=\"number_column\">%s</td></tr>", $FileInfo['name'], Format::get_size($FileInfo['size'])); } } $FileTable .= ' </table>'; $ExtraInfo = ''; // String that contains information on the torrent (e.g. format and encoding) $AddExtra = ''; // Separator between torrent properties $TorrentUploader = $Username; // Save this for "Uploaded by:" below // similar to Torrents::torrent_info() if ($Format) { $ExtraInfo .= display_str($Format); $AddExtra = ' / '; } if ($Encoding) { $ExtraInfo .= $AddExtra . display_str($Encoding); $AddExtra = ' / '; } if ($HasLog) { $ExtraInfo .= "{$AddExtra}Log"; $AddExtra = ' / '; } if ($HasLog && $LogInDB) { $ExtraInfo .= ' (' . (int) $LogScore . '%)'; } if ($HasCue) { $ExtraInfo .= "{$AddExtra}Cue"; $AddExtra = ' / '; } if ($Scene) { $ExtraInfo .= "{$AddExtra}Scene"; $AddExtra = ' / '; } if (!$ExtraInfo) { $ExtraInfo = $GroupName; $AddExtra = ' / '; } if ($IsSnatched) { $ExtraInfo .= $AddExtra . Format::torrent_label('Snatched!'); $AddExtra = ' / '; } if ($FreeTorrent == '1') { $ExtraInfo .= $AddExtra . Format::torrent_label('Freeleech!'); $AddExtra = ' / '; } if ($FreeTorrent == '2') { $ExtraInfo .= $AddExtra . Format::torrent_label('Neutral Leech!'); $AddExtra = ' / '; } if ($PersonalFL) { $ExtraInfo .= $AddExtra . Format::torrent_label('Personal Freeleech!'); $AddExtra = ' / '; } if ($Reported) { $ExtraInfo .= $AddExtra . Format::torrent_label('Reported'); $AddExtra = ' / '; } if (!empty($BadTags)) { $ExtraInfo .= $AddExtra . Format::torrent_label('Bad Tags'); $AddExtra = ' / '; } if (!empty($BadFolders)) { $ExtraInfo .= $AddExtra . Format::torrent_label('Bad Folders'); $AddExtra = ' / '; } if (!empty($CassetteApproved)) { $ExtraInfo .= $AddExtra . Format::torrent_label('Cassette Approved'); $AddExtra = ' / '; } if (!empty($LossymasterApproved)) { $ExtraInfo .= $AddExtra . Format::torrent_label('Lossy Master Approved'); $AddExtra = ' / '; } if (!empty($LossywebApproved)) { $ExtraInfo .= $AddExtra . Format::torrent_label('Lossy WEB Approved'); $AddExtra = ' / '; } if (!empty($BadFiles)) { $ExtraInfo .= $AddExtra . Format::torrent_label('Bad File Names'); $AddExtra = ' / '; } if ($GroupCategoryID == 1 && ($RemasterTitle != $LastRemasterTitle || $RemasterYear != $LastRemasterYear || $RemasterRecordLabel != $LastRemasterRecordLabel || $RemasterCatalogueNumber != $LastRemasterCatalogueNumber || $FirstUnknown || $Media != $LastMedia)) { $EditionID++; ?> <tr class="releases_<?php echo $ReleaseType; ?> groupid_<?php echo $GroupID; ?> edition group_torrent"> <td colspan="5" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?php echo $GroupID; ?> , <?php echo $EditionID; ?> , this, event);" class="tooltip" title="Collapse this edition. Hold "Ctrl" while clicking to collapse all editions in this torrent group.">−</a> <?php echo Torrents::edition_string($Torrent, $TorrentDetails); ?> </strong></td> </tr> <?php } $LastRemasterTitle = $RemasterTitle; $LastRemasterYear = $RemasterYear; $LastRemasterRecordLabel = $RemasterRecordLabel; $LastRemasterCatalogueNumber = $RemasterCatalogueNumber; $LastMedia = $Media; ?> <tr class="torrent_row releases_<?php echo $ReleaseType; ?> groupid_<?php echo $GroupID; ?> edition_<?php echo $EditionID; ?> group_torrent<?php echo $IsSnatched ? ' snatched_torrent' : ''; ?> " style="font-weight: normal;" id="torrent<?php echo $TorrentID; ?> "> <td> <span>[ <a href="torrents.php?action=download&id=<?php echo $TorrentID; ?> &authkey=<?php echo $LoggedUser['AuthKey']; ?> &torrent_pass=<?php echo $LoggedUser['torrent_pass']; ?> " class="tooltip" title="Download"><?php echo $HasFile ? 'DL' : 'Missing'; ?> </a> <?php if (Torrents::can_use_token($Torrent)) { ?> | <a href="torrents.php?action=download&id=<?php echo $TorrentID; ?> &authkey=<?php echo $LoggedUser['AuthKey']; ?> &torrent_pass=<?php echo $LoggedUser['torrent_pass']; ?> &usetoken=1" class="tooltip" title="Use a FL Token" onclick="return confirm('Are you sure you want to use a freeleech token here?');">FL</a> <?php } ?> | <a href="reportsv2.php?action=report&id=<?php echo $TorrentID; ?> " class="tooltip" title="Report">RP</a> <?php if ($CanEdit) { ?> | <a href="torrents.php?action=edit&id=<?php echo $TorrentID; ?> " class="tooltip" title="Edit">ED</a> <?php } if (check_perms('torrents_delete') || $UserID == $LoggedUser['ID']) { ?> | <a href="torrents.php?action=delete&torrentid=<?php echo $TorrentID; ?> " class="tooltip" title="Remove">RM</a> <?php } ?> | <a href="torrents.php?torrentid=<?php echo $TorrentID; ?> " class="tooltip" title="Permalink">PL</a> ]</span> » <a href="#" onclick="$('#torrent_<?php echo $TorrentID; ?> ').gtoggle(); return false;"><?php echo $ExtraInfo; ?> </a> </td> <td class="number_column nobr"><?php echo Format::get_size($Size); ?> </td> <td class="number_column"><?php echo number_format($Snatched); ?> </td> <td class="number_column"><?php echo number_format($Seeders); ?> </td> <td class="number_column"><?php echo number_format($Leechers); ?> </td> </tr> <tr class="releases_<?php echo $ReleaseType; ?> groupid_<?php echo $GroupID; ?> edition_<?php echo $EditionID; ?> torrentdetails pad<?php if (!isset($_GET['torrentid']) || $_GET['torrentid'] != $TorrentID) { ?> hidden<?php } ?> " id="torrent_<?php echo $TorrentID; ?> "> <td colspan="5"> <blockquote> Uploaded by <?php echo Users::format_username($UserID, false, false, false); ?> <?php echo time_diff($TorrentTime); if ($Seeders == 0) { if ($LastActive != '0000-00-00 00:00:00' && time() - strtotime($LastActive) >= 1209600) { ?> <br /><strong>Last active: <?php echo time_diff($LastActive); ?> </strong> <?php } else { ?> <br />Last active: <?php echo time_diff($LastActive); } if ($LastActive != '0000-00-00 00:00:00' && time() - strtotime($LastActive) >= 345678 && time() - strtotime($LastReseedRequest) >= 864000) { ?> <br /><a href="torrents.php?action=reseed&torrentid=<?php echo $TorrentID; ?> &groupid=<?php echo $GroupID; ?> " class="brackets">Request re-seed</a> <?php } } ?> </blockquote> <?php if (check_perms('site_moderate_requests')) { ?> <div class="linkbox"> <a href="torrents.php?action=masspm&id=<?php echo $GroupID; ?> &torrentid=<?php echo $TorrentID; ?> " class="brackets">Mass PM snatchers</a> </div> <?php } ?> <div class="linkbox"> <a href="#" class="brackets" onclick="show_peers('<?php echo $TorrentID; ?> ', 0); return false;">View peer list</a> <?php if (check_perms('site_view_torrent_snatchlist')) { ?> <a href="#" class="brackets tooltip" onclick="show_downloads('<?php echo $TorrentID; ?> ', 0); return false;" title="View the list of users that have clicked the "DL" button.">View download list</a> <a href="#" class="brackets tooltip" onclick="show_snatches('<?php echo $TorrentID; ?> ', 0); return false;" title="View the list of users that have reported a snatch to the tracker.">View snatch list</a> <?php } ?> <a href="#" class="brackets" onclick="show_files('<?php echo $TorrentID; ?> '); return false;">View file list</a> <?php if ($Reported) { ?> <a href="#" class="brackets" onclick="show_reported('<?php echo $TorrentID; ?> '); return false;">View report information</a> <?php } ?> </div> <div id="peers_<?php echo $TorrentID; ?> " class="hidden"></div> <div id="downloads_<?php echo $TorrentID; ?> " class="hidden"></div> <div id="snatches_<?php echo $TorrentID; ?> " class="hidden"></div> <div id="files_<?php echo $TorrentID; ?> " class="hidden"><?php echo $FileTable; ?> </div> <?php if ($Reported) { ?> <div id="reported_<?php echo $TorrentID; ?> " class="hidden"><?php echo $ReportInfo; ?> </div> <?php } if (!empty($Description)) { echo "\n\t\t\t\t\t\t<blockquote>" . Text::full_format($Description) . '</blockquote>'; } ?> </td> </tr> <?php } }
die; } Text::$TOC = true; $UserID = (int) $_GET['userid']; $UserIDSQL = ""; if (!empty($UserID)) { $UserIDSQL = " AND UserID != '{$UserID}' "; } G::$DB->query("\n\t\tSELECT UserID, Answer, Date\n\t\tFROM staff_answers\n\t\tWHERE QuestionID = '{$ID}'\n\t\t\t{$UserIDSQL}\n\t\tORDER BY DATE DESC"); $Answers = G::$DB->to_array(false, MYSQLI_ASSOC); foreach ($Answers as $Answer) { ?> <div class="box box2"> <div class="head"> <span> Answer by <?php echo Users::format_username($Answer['UserID']); ?> - <?php echo time_diff($Answer['Date']); ?> </span> </div> <div class="pad"> <?php echo Text::full_format($Answer['Answer']); ?> </div> </div> <?php }
public static function render_donation_history($DonationHistory) { if (empty($DonationHistory)) { return; } ?> <div class="box box2" id="donation_history_box"> <div class="head"> Donation History <a href="#" onclick="$('#donation_history').gtoggle(); return false;" class="brackets">View</a> </div> <?php $Row = 'b'; ?> <div class="hidden" id="donation_history"> <table cellpadding="6" cellspacing="1" border="0" class="border" width="100%"> <tbody> <tr class="colhead_dark"> <td> <strong>Source</strong> </td> <td> <strong>Date</strong> </td> <td> <strong>Amount (EUR)</strong> </td> <td> <strong>Added Points</strong> </td> <td> <strong>Total Points</strong> </td> <td> <strong>Email</strong> </td> <td style="width: 30%;"> <strong>Reason</strong> </td> </tr> <?php foreach ($DonationHistory as $Donation) { ?> <tr class="row<?php echo $Row; ?> "> <td> <?php echo display_str($Donation['Source']); ?> (<?php echo Users::format_username($Donation['AddedBy']); ?> ) </td> <td> <?php echo $Donation['Time']; ?> </td> <td> <?php echo $Donation['Amount']; ?> </td> <td> <?php echo $Donation['Rank']; ?> </td> <td> <?php echo $Donation['TotalRank']; ?> </td> <td> <?php echo display_str($Donation['Email']); ?> </td> <td> <?php echo display_str($Donation['Reason']); ?> </td> </tr> <?php $Row = $Row === 'b' ? 'a' : 'b'; } ?> </tbody> </table> </div> </div> <?php }
</tr> <?php $DB->query("\n\tSELECT\n\t\tRevision,\n\t\tTitle,\n\t\tAuthor,\n\t\tDate\n\tFROM wiki_revisions\n\tWHERE ID = '{$ArticleID}'\n\tORDER BY Revision DESC"); while (list($Revision, $Title, $AuthorID, $Date) = $DB->next_record()) { ?> <tr> <td><?php echo $Revision; ?> </td> <td><?php echo $Title; ?> </td> <td><?php echo Users::format_username($AuthorID, false, false, false); ?> </td> <td><?php echo time_diff($Date); ?> </td> <td><input type="radio" name="old" value="<?php echo $Revision; ?> " /></td> <td><input type="radio" name="new" value="<?php echo $Revision; ?> " /></td> </tr>
<br /> <br /> <div id="inbox"> <?php // Get messages $StaffPMs = $DB->query("\n\t\tSELECT UserID, SentDate, Message, ID\n\t\tFROM staff_pm_messages\n\t\tWHERE ConvID = {$ConvID}"); while (list($UserID, $SentDate, $Message, $MessageID) = $DB->next_record()) { // Set user string if ($UserID == $OwnerID) { // User, use prepared string $UserString = $UserStr; $Username = $OwnerName; } else { // Staff/FLS $UserInfo = Users::user_info($UserID); $UserString = Users::format_username($UserID, true, true, true, true); $Username = $UserInfo['Username']; } ?> <div class="box vertical_space" id="post<?php echo $MessageID; ?> "> <div class="head"> <?php // TODO: the inline style in the <a> tag is an ugly hack. get rid of it. ?> <a class="postid" href="staffpm.php?action=viewconv&id=<?php echo $ConvID; ?> #post<?php
$DB->query("\n\tSELECT InInbox, InSentbox\n\tFROM pm_conversations_users\n\tWHERE UserID = '{$UserID}'\n\t\tAND ConvID = '{$ConvID}'"); if (!$DB->has_results()) { error(403); } list($InInbox, $InSentbox) = $DB->next_record(); if (!$InInbox && !$InSentbox) { error(404); } // Get information on the conversation $DB->query("\n\tSELECT\n\t\tc.Subject,\n\t\tcu.Sticky,\n\t\tcu.UnRead,\n\t\tcu.ForwardedTo\n\tFROM pm_conversations AS c\n\t\tJOIN pm_conversations_users AS cu ON c.ID = cu.ConvID\n\tWHERE c.ID = '{$ConvID}'\n\t\tAND UserID = '{$UserID}'"); list($Subject, $Sticky, $UnRead, $ForwardedID) = $DB->next_record(); $DB->query("\n\tSELECT um.ID, Username\n\tFROM pm_messages AS pm\n\t\tJOIN users_main AS um ON um.ID = pm.SenderID\n\tWHERE pm.ConvID = '{$ConvID}'"); $ConverstionParticipants = $DB->to_array(); foreach ($ConverstionParticipants as $Participant) { $PMUserID = (int) $Participant['ID']; $Users[$PMUserID]['UserStr'] = Users::format_username($PMUserID, true, true, true, true); $Users[$PMUserID]['Username'] = $Participant['Username']; } $Users[0]['UserStr'] = 'System'; // in case it's a message from the system $Users[0]['Username'] = '******'; if ($UnRead == '1') { $DB->query("\n\t\tUPDATE pm_conversations_users\n\t\tSET UnRead = '0'\n\t\tWHERE ConvID = '{$ConvID}'\n\t\t\tAND UserID = '{$UserID}'"); // Clear the caches of the inbox and sentbox $Cache->decrement("inbox_new_{$UserID}"); } View::show_header("View conversation {$Subject}", 'comments,inbox,bbcode,jquery.validate,form_validate'); // Get messages $DB->query("\n\tSELECT SentDate, SenderID, Body, ID\n\tFROM pm_messages\n\tWHERE ConvID = '{$ConvID}'\n\tORDER BY ID"); ?> <div class="thin">
function make_tree() { $QueryID = G::$DB->get_query_id(); $UserID = $this->UserID; ?> <div class="invitetree pad"> <?php G::$DB->query("\n\t\t\tSELECT TreePosition, TreeID, TreeLevel\n\t\t\tFROM invite_tree\n\t\t\tWHERE UserID = {$UserID}"); list($TreePosition, $TreeID, $TreeLevel) = G::$DB->next_record(MYSQLI_NUM, false); if (!$TreeID) { return; } G::$DB->query("\n\t\t\tSELECT TreePosition\n\t\t\tFROM invite_tree\n\t\t\tWHERE TreeID = {$TreeID}\n\t\t\t\tAND TreeLevel = {$TreeLevel}\n\t\t\t\tAND TreePosition > {$TreePosition}\n\t\t\tORDER BY TreePosition ASC\n\t\t\tLIMIT 1"); if (G::$DB->has_results()) { list($MaxPosition) = G::$DB->next_record(MYSQLI_NUM, false); } else { $MaxPosition = false; } $TreeQuery = G::$DB->query("\n\t\t\tSELECT\n\t\t\t\tit.UserID,\n\t\t\t\tEnabled,\n\t\t\t\tPermissionID,\n\t\t\t\tDonor,\n\t\t\t\tUploaded,\n\t\t\t\tDownloaded,\n\t\t\t\tParanoia,\n\t\t\t\tTreePosition,\n\t\t\t\tTreeLevel\n\t\t\tFROM invite_tree AS it\n\t\t\t\tJOIN users_main AS um ON um.ID = it.UserID\n\t\t\t\tJOIN users_info AS ui ON ui.UserID = it.UserID\n\t\t\tWHERE TreeID = {$TreeID}\n\t\t\t\tAND TreePosition > {$TreePosition}" . ($MaxPosition ? " AND TreePosition < {$MaxPosition}" : '') . "\n\t\t\t\tAND TreeLevel > {$TreeLevel}\n\t\t\tORDER BY TreePosition"); $PreviousTreeLevel = $TreeLevel; // Stats for the summary $MaxTreeLevel = $TreeLevel; // The deepest level (this changes) $OriginalTreeLevel = $TreeLevel; // The level of the user we're viewing $BaseTreeLevel = $TreeLevel + 1; // The level of users invited by our user $Count = 0; $Branches = 0; $DisabledCount = 0; $DonorCount = 0; $ParanoidCount = 0; $TotalUpload = 0; $TotalDownload = 0; $TopLevelUpload = 0; $TopLevelDownload = 0; $ClassSummary = array(); global $Classes; foreach ($Classes as $ClassID => $Val) { $ClassSummary[$ClassID] = 0; } // We store this in an output buffer, so we can show the summary at the top without having to loop through twice ob_start(); while (list($ID, $Enabled, $Class, $Donor, $Uploaded, $Downloaded, $Paranoia, $TreePosition, $TreeLevel) = G::$DB->next_record(MYSQLI_NUM, false)) { // Do stats $Count++; if ($TreeLevel > $MaxTreeLevel) { $MaxTreeLevel = $TreeLevel; } if ($TreeLevel == $BaseTreeLevel) { $Branches++; $TopLevelUpload += $Uploaded; $TopLevelDownload += $Downloaded; } $ClassSummary[$Class]++; if ($Enabled == 2) { $DisabledCount++; } if ($Donor) { $DonorCount++; } // Manage tree depth if ($TreeLevel > $PreviousTreeLevel) { for ($i = 0; $i < $TreeLevel - $PreviousTreeLevel; $i++) { echo "\n\n<ul class=\"invitetree\">\n\t<li>\n"; } } elseif ($TreeLevel < $PreviousTreeLevel) { for ($i = 0; $i < $PreviousTreeLevel - $TreeLevel; $i++) { echo "\t</li>\n</ul>\n"; } echo "\t</li>\n\t<li>\n"; } else { echo "\t</li>\n\t<li>\n"; } $UserClass = $Classes[$Class]['Level']; ?> <strong><?php echo Users::format_username($ID, true, true, $Enabled != 2 ? false : true, true); ?> </strong> <?php if (check_paranoia(array('uploaded', 'downloaded'), $Paranoia, $UserClass)) { $TotalUpload += $Uploaded; $TotalDownload += $Downloaded; ?> Uploaded: <strong><?php echo Format::get_size($Uploaded); ?> </strong> Downloaded: <strong><?php echo Format::get_size($Downloaded); ?> </strong> Ratio: <strong><?php echo Format::get_ratio_html($Uploaded, $Downloaded); ?> </strong> <?php } else { $ParanoidCount++; ?> Hidden <?php } ?> <?php $PreviousTreeLevel = $TreeLevel; G::$DB->set_query_id($TreeQuery); } $Tree = ob_get_clean(); for ($i = 0; $i < $PreviousTreeLevel - $OriginalTreeLevel; $i++) { $Tree .= "\t</li>\n</ul>\n"; } if ($Count) { ?> <p style="font-weight: bold;"> This tree has <?php echo number_format($Count); ?> entries, <?php echo number_format($Branches); ?> branches, and a depth of <?php echo number_format($MaxTreeLevel - $OriginalTreeLevel); ?> . It has <?php $ClassStrings = array(); foreach ($ClassSummary as $ClassID => $ClassCount) { if ($ClassCount == 0) { continue; } $LastClass = Users::make_class_string($ClassID); if ($ClassCount > 1) { if ($LastClass == 'Torrent Celebrity') { $LastClass = 'Torrent Celebrities'; } else { $LastClass .= 's'; } } $LastClass = "{$ClassCount} {$LastClass} (" . number_format($ClassCount / $Count * 100) . '%)'; $ClassStrings[] = $LastClass; } if (count($ClassStrings) > 1) { array_pop($ClassStrings); echo implode(', ', $ClassStrings); echo ' and ' . $LastClass; } else { echo $LastClass; } echo '. '; echo $DisabledCount; echo $DisabledCount == 1 ? ' user is' : ' users are'; echo ' disabled ('; if ($DisabledCount == 0) { echo '0%)'; } else { echo number_format($DisabledCount / $Count * 100) . '%)'; } echo ', and '; echo $DonorCount; echo $DonorCount == 1 ? ' user has' : ' users have'; echo ' donated ('; if ($DonorCount == 0) { echo '0%)'; } else { echo number_format($DonorCount / $Count * 100) . '%)'; } echo '. </p>'; echo '<p style="font-weight: bold;">'; echo 'The total amount uploaded by the entire tree was ' . Format::get_size($TotalUpload); echo '; the total amount downloaded was ' . Format::get_size($TotalDownload); echo '; and the total ratio is ' . Format::get_ratio_html($TotalUpload, $TotalDownload) . '. '; echo '</p>'; echo '<p style="font-weight: bold;">'; echo 'The total amount uploaded by direct invitees (the top level) was ' . Format::get_size($TopLevelUpload); echo '; the total amount downloaded was ' . Format::get_size($TopLevelDownload); echo '; and the total ratio is ' . Format::get_ratio_html($TopLevelUpload, $TopLevelDownload) . '. '; echo "These numbers include the stats of paranoid users and will be factored into the invitation giving script.\n\t\t</p>\n"; if ($ParanoidCount) { echo '<p style="font-weight: bold;">'; echo $ParanoidCount; echo $ParanoidCount == 1 ? ' user (' : ' users ('; echo number_format($ParanoidCount / $Count * 100); echo '%) '; echo $ParanoidCount == 1 ? ' is' : ' are'; echo ' too paranoid to have their stats shown here, and '; echo $ParanoidCount == 1 ? ' was' : ' were'; echo ' not factored into the stats for the total tree.'; echo '</p>'; } } ?> <br /> <?php echo $Tree; ?> </div> <?php G::$DB->set_query_id($QueryID); }
</tr> <?php } if (isset($IPMatchesIgnored[$IP])) { foreach ($IPMatchesIgnored[$IP] as $OtherUserID => $MatchCount) { ?> <tr class="rowb otherusers<?php echo $Index; echo $HideMe ? ' hidden' : ''; ?> "> <td colspan="4"> » <?php echo $MatchCount; ?> matches skipped for <?php echo Users::format_username($OtherUserID, false, false, false); ?> </td> </tr> <?php } } } } ?> </table> <div class="linkbox"> <?php echo $Pages; ?> </div>
function generate_user_table($Caption, $Tag, $Details, $Limit) { global $Time; ?> <h3>Top <?php echo $Limit . ' ' . $Caption; ?> <small class="top10_quantity_links"> <?php switch ($Limit) { case 100: ?> - <a href="top10.php?type=users&details=<?php echo $Tag; ?> " class="brackets">Top 10</a> - <span class="brackets">Top 100</span> - <a href="top10.php?type=users&limit=250&details=<?php echo $Tag; ?> " class="brackets">Top 250</a> <?php break; case 250: ?> - <a href="top10.php?type=users&details=<?php echo $Tag; ?> " class="brackets">Top 10</a> - <a href="top10.php?type=users&limit=100&details=<?php echo $Tag; ?> " class="brackets">Top 100</a> - <span class="brackets">Top 250</span> <?php break; default: ?> - <span class="brackets">Top 10</span> - <a href="top10.php?type=users&limit=100&details=<?php echo $Tag; ?> " class="brackets">Top 100</a> - <a href="top10.php?type=users&limit=250&details=<?php echo $Tag; ?> " class="brackets">Top 250</a> <?php } ?> </small> </h3> <table class="border"> <tr class="colhead"> <td class="center">Rank</td> <td>User</td> <td style="text-align: right;">Uploaded</td> <td style="text-align: right;">UL speed</td> <td style="text-align: right;">Downloaded</td> <td style="text-align: right;">DL speed</td> <td style="text-align: right;">Uploads</td> <td style="text-align: right;">Ratio</td> <td style="text-align: right;">Joined</td> </tr> <?php // in the unlikely event that query finds 0 rows... if (empty($Details)) { echo ' <tr class="rowb"> <td colspan="9" class="center"> Found no users matching the criteria </td> </tr> </table><br />'; return; } $Rank = 0; foreach ($Details as $Detail) { $Rank++; $Highlight = $Rank % 2 ? 'a' : 'b'; ?> <tr class="row<?php echo $Highlight; ?> "> <td class="center"><?php echo $Rank; ?> </td> <td><?php echo Users::format_username($Detail['ID'], false, false, false); ?> </td> <td class="number_column"><?php echo Format::get_size($Detail['Uploaded']); ?> </td> <td class="number_column tooltip" title="Upload speed is reported in base 2 in bytes per second, not bits per second."><?php echo Format::get_size($Detail['UpSpeed']); ?> /s</td> <td class="number_column"><?php echo Format::get_size($Detail['Downloaded']); ?> </td> <td class="number_column tooltip" title="Download speed is reported in base 2 in bytes per second, not bits per second."><?php echo Format::get_size($Detail['DownSpeed']); ?> /s</td> <td class="number_column"><?php echo number_format($Detail['NumUploads']); ?> </td> <td class="number_column"><?php echo Format::get_ratio_html($Detail['Uploaded'], $Detail['Downloaded']); ?> </td> <td class="number_column"><?php echo time_diff($Detail['JoinDate']); ?> </td> </tr> <?php } ?> </table><br /> <?php }
<td></td> <td><?php echo time_diff($Time); ?> </td> <td><?php echo display_str($IP); ?> </td> <?php $UserURL = site_url() . "user.php?id={$UserID2}"; $DB->query("\n\t\t\t\tSELECT Enabled\n\t\t\t\tFROM users_main\n\t\t\t\tWHERE ID = {$UserID2}"); list($Enabled) = $DB->next_record(); $DB->set_query_id($ueQuery); ?> <td><a href="<?php echo display_str($UserURL); ?> "><?php echo Users::format_username($UserID2, false, false, true); ?> </a></td> </tr> <?php } } } ?> </table> <?php View::show_footer();
?> </td> <td><?php echo trim($GroupYear) ?: ' '; ?> </td> <td><?php echo trim($DisplayName) ?: ' '; ?> </td> <td><?php echo trim($TorrentLink); ?> </td> <td class="nobr"><?php echo Users::format_username($UserID, $Username, false, false, false); ?> </td> <td class="nobr"> <input type="hidden" name="action" value="manage_handle" /> <input type="hidden" name="auth" value="<?php echo $LoggedUser['AuthKey']; ?> " /> <input type="hidden" name="collageid" value="<?php echo $CollageID; ?> " /> <input type="hidden" name="groupid" value="<?php echo $GroupID; ?>
?> </a> <?php } else { ?> — <?php } ?> </td> <td> <a href="user.php?id=<?php echo $Request['UserID']; ?> "><?php echo Users::format_username($Request['UserID'], false, false, false); ?> </a> </td> <td class="nobr"> <?php echo time_diff($Request['TimeAdded'], 1); ?> </td> <td class="nobr"> <?php echo time_diff($Request['LastVote'], 1); ?> </td> </tr> <?php
while (list($ID, $IP, $UserID, $LastAttempt, $Attempts, $BannedUntil, $Bans) = $DB->next_record()) { $Row = $Row === 'a' ? 'b' : 'a'; ?> <tr class="row<?php echo $Row; ?> "> <td> <?php echo $IP; ?> </td> <td> <?php if ($UserID != 0) { echo Users::format_username($UserID, true, true, true, true); } ?> </td> <td> <?php echo $Bans; ?> </td> <td> <?php echo time_diff($BannedUntil); ?> </td> <td> <form class="manage_form" name="bans" action="" method="post">
authorize(); $DB->query("\n\t\tDELETE FROM users_sessions\n\t\tWHERE UserID = '{$UserID}'\n\t\t\tAND SessionID = '" . db_string($_POST['session']) . "'"); $Cache->delete_value("users_sessions_{$UserID}"); } $UserSessions = $Cache->get_value('users_sessions_' . $UserID); if (!is_array($UserSessions)) { $DB->query("\n\t\tSELECT\n\t\t\tSessionID,\n\t\t\tBrowser,\n\t\t\tOperatingSystem,\n\t\t\tIP,\n\t\t\tLastUpdate\n\t\tFROM users_sessions\n\t\tWHERE UserID = '{$UserID}'\n\t\tORDER BY LastUpdate DESC"); $UserSessions = $DB->to_array('SessionID', MYSQLI_ASSOC); $Cache->cache_value("users_sessions_{$UserID}", $UserSessions, 0); } list($UserID, $Username) = array_values(Users::user_info($UserID)); View::show_header($Username . ' > Sessions'); ?> <div class="thin"> <h2><?php echo Users::format_username($UserID, $Username); ?> > Sessions</h2> <div class="box pad"> <p>Note: Clearing cookies can result in ghost sessions which are automatically removed after 30 days.</p> </div> <div class="box pad"> <table cellpadding="5" cellspacing="1" border="0" class="session_table border" width="100%"> <tr class="colhead"> <td class="nobr"><strong>IP address</strong></td> <td><strong>Browser</strong></td> <td><strong>Platform</strong></td> <td class="nobr"><strong>Last activity</strong></td> <td> <form class="manage_form" name="sessions" action="" method="post"> <input type="hidden" name="action" value="sessions" />
<td>Email</td> <td>Source</td> <td>Reason</td> <td>Time</td> </tr> <?php $PageTotal = 0; foreach ($Donations as $Donation) { $PageTotal += $Donation['Amount']; ?> <tr> <td><?php echo Users::format_username($Donation['UserID'], true); ?> (<?php echo Users::format_username($Donation['AddedBy']); ?> )</td> <td><?php echo display_str($Donation['Amount']); ?> </td> <td><?php echo display_str($Donation['Email']); ?> </td> <td><?php echo display_str($Donation['Source']); ?> </td> <td><?php
foreach ($StaffPMs as $StaffPM) { list($ID, $Subject, $Status, $Level, $AssignedToUser, $Date, $ResolverID) = $StaffPM; // Get assigned if ($AssignedToUser == '') { // Assigned to class $Assigned = $Level == 0 ? 'First Line Support' : $ClassLevels[$Level]['Name']; // No + on Sysops if ($Assigned != 'Sysop') { $Assigned .= '+'; } } else { // Assigned to user $Assigned = Users::format_username($UserID, true, true, true, true); } if ($ResolverID) { $Resolver = Users::format_username($ResolverID, true, true, true, true); } else { $Resolver = '(unresolved)'; } ?> <tr> <td><a href="staffpm.php?action=viewconv&id=<?php echo $ID; ?> "><?php echo display_str($Subject); ?> </a></td> <td><?php echo time_diff($Date, 2, true); ?>
$Old[$Key]['EndTime'] = $Val['Time']; $Old[$Key]['IP'] = $Val['IP']; $Old[$Key]['ElapsedTime'] = date(time() + strtotime($Old[$Key]['EndTime']) - strtotime($Old[$Key]['StartTime'])); $Old[$Key]['Email'] = $Val['Email']; } else { // Shouldn't have to be here but I'll leave it anyway $Other[$Key]['StartTime'] = isset($History[$Key + $i]) ? $History[$Key + $i]['Time'] : $Joined; $Other[$Key]['EndTime'] = $Val['Time']; $Other[$Key]['IP'] = $Val['IP']; $Other[$Key]['ElapsedTime'] = date(time() + strtotime($Other[$Key]['EndTime']) - strtotime($Other[$Key]['StartTime'])); $Other[$Key]['Email'] = $Val['Email']; } if ($Val['Usernames'] != '') { // Match with old email $OldMatches[$Key]['Email'] = $Val['Email']; $OldMatches[$Key]['Username'] = '******' . Users::format_username($Val['UserIDs'], true, true, true); $OldMatches[$Key]['EndTime'] = $Val['UserSetTimes']; $OldMatches[$Key]['IP'] = $Val['UserIPs']; } } } // Clean up arrays if ($Old) { $Old = array_reverse(array_reverse($Old)); $LastOld = count($Old) - 1; if ($Old[$LastOld]['StartTime'] != $Invite['EndTime']) { // Make sure the timeline is intact (invite email was used as email for the account in the beginning) $Old[$LastOld + 1]['Email'] = $Invite['Email']; $Old[$LastOld + 1]['StartTime'] = $Invite['EndTime']; $Old[$LastOld + 1]['EndTime'] = $Old[$LastOld]['StartTime']; $Old[$LastOld + 1]['ElapsedTime'] = date(time() + strtotime($Old[$LastOld + 1]['EndTime']) - strtotime($Old[$LastOld + 1]['StartTime']));
?> ">Claimed by <?php echo Users::format_username($ClaimerID, false, false, false, false); ?> <a href="#" onclick="unClaim(<?php echo $ReportID; ?> ); return false;" class="brackets">Unclaim</a></span> <?php } elseif ($ClaimerID) { ?> <span id="claimed_<?php echo $ReportID; ?> ">Claimed by <?php echo Users::format_username($ClaimerID, false, false, false, false); ?> </span> <?php } else { ?> <a href="#" id="claim_<?php echo $ReportID; ?> " onclick="claim(<?php echo $ReportID; ?> ); return false;" class="brackets">Claim</a> <?php } ?>
foreach ($Friends as $Friend) { list($FriendID, $Comment, $Username, $Uploaded, $Downloaded, $Class, $Paranoia, $LastAccess, $Avatar) = $Friend; ?> <form class="manage_form" name="friends" action="friends.php" method="post"> <input type="hidden" name="auth" value="<?php echo $LoggedUser['AuthKey']; ?> " /> <table class="friends_table vertical_margin"> <tr class="colhead"> <td colspan="<?php echo Users::has_avatars_enabled() ? 3 : 2; ?> "> <span style="float: left;"><?php echo Users::format_username($FriendID, true, true, true, true); if (check_paranoia('ratio', $Paranoia, $Class, $FriendID)) { ?> Ratio: <strong><?php echo Format::get_ratio_html($Uploaded, $Downloaded); ?> </strong> <?php } if (check_paranoia('uploaded', $Paranoia, $Class, $FriendID)) { ?> Up: <strong><?php echo Format::get_size($Uploaded); ?> </strong> <?php
<form action="forums.php" method="post"> <input type="hidden" name="action" value="take_topic_notes" /> <input type="hidden" name="auth" value="<?php echo $LoggedUser['AuthKey']; ?> " /> <input type="hidden" name="topicid" value="<?php echo $ThreadID; ?> " /> <table cellpadding="6" cellspacing="1" border="0" width="100%" class="layout border hidden" id="thread_notes_table"> <?php foreach ($Notes as $Note) { ?> <tr><td><?php echo Users::format_username($Note['AuthorID']); ?> (<?php echo time_diff($Note['AddedTime'], 2, true, true); ?> )</td><td><?php echo Text::full_format($Note['Body']); ?> </td></tr> <?php } ?> <tr> <td colspan="2" class="center"> <div class="field_div textarea_wrap"><textarea id="topic_notes" name="body" cols="90" rows="3" onkeyup="resize('threadnotes');" style=" margin: 0px; width: 735px;"></textarea></div> <input type="submit" value="Save" />
?> <div id="question<?php echo $Question['ID']; ?> " class="box box2"> <div class="head"> <span> <a class="post_id" href="questions.php#question<?php echo $Question['ID']; ?> ">#<?php echo $Question['ID']; ?> </a> <?php echo Users::format_username($Question['UserID']); ?> - <?php echo time_diff($Question['Date']); ?> </span> <span style="float: right;"> <?php if ($Question['Responses'] > 0) { ?> <a href="#" id="<?php echo $Question['ID']; ?> " class="view_responses brackets"><?php echo $Question['Responses'] == 1 ? "View " . $Question['Responses'] . " response" : "View " . $Question['Responses'] . " responses"; ?>
?> <span style="float: right;" class="last_poster"> by <?php echo Users::format_username($LastAuthorID, false, false, false, false, false, $IsDonorForum); ?> <?php echo time_diff($LastTime, 1); ?> </span> </td> <td class="number_column"><?php echo number_format($PostCount - 1); ?> </td> <td><?php echo Users::format_username($AuthorID, false, false, false, false, false, $IsDonorForum); ?> </td> </tr> <?php } } ?> </table> <!--<div class="breadcrumbs"> <a href="forums.php">Forums</a> > <?php echo $ForumName; ?> </div>--> <div class="linkbox pager"> <?php
default: continue 2; } ?> <table class="forum_post box vertical_margin noavatar"> <tr class="colhead_dark notify_<?php echo $Result['Page']; ?> "> <td colspan="2"> <span style="float: left;"> <?php echo $Links; ?> > Quoted by <?php echo Users::format_username($Result['QuoterID'], false, false, false, false) . ' ' . time_diff($Result['Date']); ?> <?php echo $Result['UnRead'] ? ' <span class="new">(New!)</span>' : ''; ?> </span> <span style="float: left;" class="tooltip last_read" title="Jump to quote"> <a href="<?php echo $JumpLink; ?> "></a> </span> <span style="float: right;"> <a href="#">↑</a> </span> </td>
function contest() { global $DB, $Cache, $LoggedUser; list($Contest, $TotalPoints) = $Cache->get_value('contest'); if (!$Contest) { $DB->query("\n\t\t\tSELECT\n\t\t\t\tUserID,\n\t\t\t\tSUM(Points),\n\t\t\t\tUsername\n\t\t\tFROM users_points AS up\n\t\t\t\tJOIN users_main AS um ON um.ID = up.UserID\n\t\t\tGROUP BY UserID\n\t\t\tORDER BY SUM(Points) DESC\n\t\t\tLIMIT 20"); $Contest = $DB->to_array(); $DB->query("\n\t\t\tSELECT SUM(Points)\n\t\t\tFROM users_points"); list($TotalPoints) = $DB->next_record(); $Cache->cache_value('contest', array($Contest, $TotalPoints), 600); } ?> <!-- Contest Section --> <div class="box box_contest"> <div class="head colhead_dark"><strong>Quality time scoreboard</strong></div> <div class="pad"> <ol style="padding-left: 5px;"> <?php foreach ($Contest as $User) { list($UserID, $Points, $Username) = $User; ?> <li><?php echo Users::format_username($UserID, false, false, false); ?> (<?php echo number_format($Points); ?> )</li> <?php } ?> </ol> Total uploads: <?php echo $TotalPoints; ?> <br /> <a href="index.php?action=scoreboard">Full scoreboard</a> </div> </div> <!-- END contest Section --> <?php }
if (Users::has_avatars_enabled()) { ?> <col class="col_avatar" /> <?php } ?> <col class="col_post_body" /> </colgroup> <tr class="colhead_dark"> <td colspan="<?php echo Users::has_avatars_enabled() ? 2 : 1; ?> "> <div style="float: left;"><a href="#quickreplypreview">#XXXXXX</a> by <strong><?php echo Users::format_username(G::$LoggedUser['ID'], true, true, true, true); ?> </strong> Just now </div> <div style="float: right;"> <a href="#quickreplypreview" class="brackets">Report</a> <a href="#">↑</a> </div> </td> </tr> <tr> <?php if (Users::has_avatars_enabled()) { ?> <td class="avatar" valign="top">