function display_array($Array, $Escape = array()) { foreach ($Array as $Key => $Val) { if((!is_array($Escape) && $Escape == true) || !in_array($Key, $Escape)) { $Array[$Key] = display_str($Val); } } return $Array; }
function strip_bbcode($Str) { $Str = display_str($Str); //Inline links $Str = preg_replace('/(?<!(\\[url\\]|\\[url\\=|\\[img\\=|\\[img\\]))http(s)?:\\/\\//i', '$1[inlineurl]http$2://', $Str); $Str = $this->parse($Str); $Str = $this->raw_text($Str); $Str = nl2br($Str); return $Str; }
function retrieve($CacheKey,$AuthKey,$PassKey) { global $Cache; $Entries = $Cache->get_value($CacheKey); if(!$Entries){ $Entries = array(); } else { foreach($Entries as $Item){ echo str_replace(array('[[PASSKEY]]','[[AUTHKEY]]'),array(display_str($PassKey),display_str($AuthKey)),$Item); } } }
function make_concert_link($Event) { // The event doesn't have a start date (this should never happen) if ($Event['startDate'] == '') { return; } $Date = get_date_title($Event['startDate']); $ConcertTitle = $Date . ' - ' . $Event['venue']['name'] . ' at ' . $Event['venue']['location']['city'] . ', ' . $Event['venue']['location']['country']; $Concert = "<a href=\"" . $Event['url'] . "\">{$ConcertTitle}</a>"; ?> <form class="hidden" action="" id="concert<?php echo $Event['id']; ?> " method="post"> <input type="hidden" name="action" value="concert_thread" /> <input type="hidden" name="concert_title" value="<?php echo '[Concert] ' . display_str($Name) . " - {$ConcertTitle}"; ?> " /> <input type="hidden" name="concert_id" value="<?php echo $Event['id']; ?> " /> <input type="hidden" name="concert_template" value="<?php echo get_concert_post_template($Name, $Event); ?> " /> </form> <li><?php echo $Concert; ?> - <a href="#" class="brackets" onclick="$('#concert<?php echo $Event['id']; ?> ').raw().submit(); return false;">Go to thread</a></li> <?php }
break; case 'torrents_vinyl': $Feed->channel('Vinyl Sourced Torrents', 'RSS feed for all new vinyl sourced torrents.'); $Feed->retrieve('torrents_vinyl',$_GET['authkey'],$_GET['passkey']); break; case 'torrents_lossless': $Feed->channel('Lossless Torrents', 'RSS feed for all new lossless uploads.'); $Feed->retrieve('torrents_lossless',$_GET['authkey'],$_GET['passkey']); break; case 'torrents_lossless24': $Feed->channel('24bit Lossless Torrents', 'RSS feed for all new 24bit uploads.'); $Feed->retrieve('torrents_lossless24',$_GET['authkey'],$_GET['passkey']); break; default: // Personalized torrents if(empty($_GET['name']) && substr($_GET['feed'], 0, 16) == 'torrents_notify_'){ // All personalized torrent notifications $Feed->channel('Personalized torrent notifications', 'RSS feed for personalized torrent notifications.'); $Feed->retrieve($_GET['feed'],$_GET['authkey'],$_GET['passkey']); } elseif(!empty($_GET['name']) && substr($_GET['feed'], 0, 16) == 'torrents_notify_'){ // Specific personalized torrent notification channel $Feed->channel(display_str($_GET['name']), 'Personal RSS feed: '.display_str($_GET['name'])); $Feed->retrieve($_GET['feed'],$_GET['authkey'],$_GET['passkey']); } else { $Feed->channel('All Torrents', 'RSS feed for all new torrent uploads.'); $Feed->retrieve('torrents_all',$_GET['authkey'],$_GET['passkey']); } } $Feed->close_feed(); ?>
<td><?php echo format_username($UserID, $Username, $Donor, $Warned, $Enabled, $PermissionID); ?> </td> <td><span style="float:left;"><?php echo display_str($IP); ?> </span><span style="float:right;">[<a href="userhistory.php?action=ips&userid=<?php echo $UserID; ?> " title="History">H</a>|<a href="user.php?action=search&ip_history=on&ip=<?php echo display_str($IP); ?> " title="Search">S</a>]</span></td> <td><?php echo display_str($Uses); ?> </td> <td><?php echo time_diff($Joined); ?> </td> </tr> <? } ?> </table> <div class="linkbox"> <? echo $Pages; ?> </div> <? } else { ?> <h2 align="center">There are currently no users with more then <?php echo IP_OVERLAPS;
<div class="thin"> <h3>Search results</h3> <div class="linkbox"> <?php $Pages = get_pages($Page, $NumResults, USERS_PER_PAGE, 9); echo $Pages; ?> </div> <form action="user.php" method="get"> <input type="hidden" name="action" value="search" /> <table width="100%"> <tr> <td class="label nobr">Username:</td> <td> <input type="text" name="username" size="60" value="<?php echo display_str($_GET['username']); ?> " /> <input type="submit" value="Search users" /> </td> </tr> </table> </form> <br /> <div class="box pad center"> <table style="width:400px;margin:0px auto;"> <tr class="colhead"> <td width="50%">Username</td> <td>Class</td> </tr>
public static function edition_string(array $Torrent, array $Group) { if ($Torrent['Remastered'] && $Torrent['RemasterYear'] != 0) { $EditionName = $Torrent['RemasterYear']; $AddExtra = ' - '; if ($Torrent['RemasterRecordLabel']) { $EditionName .= $AddExtra . display_str($Torrent['RemasterRecordLabel']); $AddExtra = ' / '; } if ($Torrent['RemasterCatalogueNumber']) { $EditionName .= $AddExtra . display_str($Torrent['RemasterCatalogueNumber']); $AddExtra = ' / '; } if ($Torrent['RemasterTitle']) { $EditionName .= $AddExtra . display_str($Torrent['RemasterTitle']); $AddExtra = ' / '; } $EditionName .= $AddExtra . display_str($Torrent['Media']); } else { $AddExtra = ' / '; if (!$Torrent['Remastered']) { $EditionName = 'Original Release'; if ($Group['RecordLabel']) { $EditionName .= $AddExtra . $Group['RecordLabel']; $AddExtra = ' / '; } if ($Group['CatalogueNumber']) { $EditionName .= $AddExtra . $Group['CatalogueNumber']; $AddExtra = ' / '; } } else { $EditionName = 'Unknown Release(s)'; } $EditionName .= $AddExtra . display_str($Torrent['Media']); } return $EditionName; }
?> "> <?php $OpenGroup = true; } ?> <option value="<?php echo $Forum['ID']; ?> "<?php if ($ThreadInfo['ForumID'] == $Forum['ID']) { echo ' selected="selected"'; } ?> ><?php echo display_str($Forum['Name']); ?> </option> <?php } ?> </optgroup> </select> </td> </tr> <?php if (check_perms('site_admin_forums')) { ?> <tr> <td class="label"><label for="delete_thread_checkbox">Delete thread</label></td> <td>
case 'collage': $DB->query("\n\t\t\t\t\t\t\t\t\t\tSELECT Name\n\t\t\t\t\t\t\t\t\t\tFROM collages\n\t\t\t\t\t\t\t\t\t\tWHERE ID = {$ThingID}"); if (!$DB->has_results()) { echo 'No collage with the reported ID found'; } else { list($Name) = $DB->next_record(); echo "<a href=\"collages.php?id={$ThingID}\">" . display_str($Name) . '</a>'; } break; case 'thread': $DB->query("\n\t\t\t\t\t\t\t\t\t\tSELECT Title\n\t\t\t\t\t\t\t\t\t\tFROM forums_topics\n\t\t\t\t\t\t\t\t\t\tWHERE ID = {$ThingID}"); if (!$DB->has_results()) { echo 'No forum thread with the reported ID found'; } else { list($Title) = $DB->next_record(); echo "<a href=\"forums.php?action=viewthread&threadid={$ThingID}\">" . display_str($Title) . '</a>'; } break; case 'post': if (isset($LoggedUser['PostsPerPage'])) { $PerPage = $LoggedUser['PostsPerPage']; } else { $PerPage = POSTS_PER_PAGE; } $DB->query("\n\t\t\t\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\t\t\t\tp.ID,\n\t\t\t\t\t\t\t\t\t\t\tp.Body,\n\t\t\t\t\t\t\t\t\t\t\tp.TopicID,\n\t\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\tSELECT COUNT(p2.ID)\n\t\t\t\t\t\t\t\t\t\t\t\tFROM forums_posts AS p2\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE p2.TopicID = p.TopicID\n\t\t\t\t\t\t\t\t\t\t\t\t\tAND p2.ID <= p.ID\n\t\t\t\t\t\t\t\t\t\t\t) AS PostNum\n\t\t\t\t\t\t\t\t\t\tFROM forums_posts AS p\n\t\t\t\t\t\t\t\t\t\tWHERE p.ID = {$ThingID}"); if (!$DB->has_results()) { echo 'No forum post with the reported ID found'; } else { list($PostID, $Body, $TopicID, $PostNum) = $DB->next_record(); echo "<a href=\"forums.php?action=viewthread&threadid={$TopicID}&post={$PostNum}#post{$PostID}\">FORUM POST ID #{$PostID}</a>"; }
list($UserID, $Amount, $Email, $Username, $PermissionID, $Enabled, $Donor, $Warned, $DonationTime) = $Donation; ?> <tr> <td><?php echo format_username($UserID, $Username, $Donor, $Warned, $Enabled, $PermissionID); ?> </td> <td><?php echo PAYPAL_SYMBOL; ?> <?php echo display_str($Amount); ?> </td> <td><?php echo display_str($Email); ?> </td> <td><?php echo time_diff($DonationTime); ?> </td> </tr> <? } ?> </table> <div class="linkbox"> <?php echo $Pages; ?> </div> <? show_footer(); ?>
<input type="hidden" name="auth" value="<?php echo $LoggedUser['AuthKey']; ?> " /> <input type="hidden" name="id" value="<?php echo $ID; ?> " /> <input type="text" name="email" value="<?php echo display_str($Email); ?> " size="30" /> </td> <td> <input type="text" name="comment" value="<?php echo display_str($Comment); ?> " size="60" /> </td> <td> <?php echo format_username($UserID, $Username); ?> <br /> <?php echo time_diff($Time, 1); ?> </td> <td> <input type="submit" name="submit" value="Edit" /> <input type="submit" name="submit" value="Delete" />
$TorrentTable .= ob_get_clean(); // Album art ob_start(); $DisplayName = ''; if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) { unset($ExtendedArtists[2]); unset($ExtendedArtists[3]); $DisplayName .= Artists::display_artists($ExtendedArtists, false); } elseif (count($GroupArtists) > 0) { $DisplayName .= Artists::display_artists(array('1' => $GroupArtists), false); } $DisplayName .= $GroupName; if ($GroupYear > 0) { $DisplayName = "{$DisplayName} [{$GroupYear}]"; } $Tags = display_str($TorrentTags->format()); $PlainTags = implode(', ', $TorrentTags->get_tags()); ?> <li class="image_group_<?php echo $GroupID; ?> "> <a href="torrents.php?id=<?php echo $GroupID; ?> "> <?php if ($WikiImage) { ?> <img class="tooltip_interactive" src="<?php echo ImageTools::process($WikiImage, true);
/** * Format an IP address with links to IP history. * * @param string IP * @return string The HTML */ public static function display_ip($IP) { $Line = display_str($IP) . ' (' . Tools::get_country_code_by_ajax($IP) . ') '; $Line .= '<a href="user.php?action=search&ip_history=on&ip=' . display_str($IP) . '&matchtype=strict" title="Search" class="brackets tooltip">S</a>'; return $Line; }
?> </a></h2> <table width="100%"> <tr class="colhead"> <td>Changed</td> <td>IP [<a href="/userhistory.php?action=ips&userid=<?php echo $UserID; ?> ">H</a>]</td> </tr> <? while(list($ChangeTime, $ChangerIP) = $DB->next_record()){ ?> <tr class="rowa"> <td><?php echo time_diff($ChangeTime); ?> </td> <td><?php echo display_str($ChangerIP); ?> [<a href="/user.php?action=search&ip_history=on&ip=<?php echo display_str($ChangerIP); ?> " title="Search">S</a>]<br /><?php echo get_host($ChangerIP); ?> </td> </tr> <? } ?> </table> <? show_footer(); ?>
<input type="hidden" name="action" value="<?php echo empty($_GET['action']) ? 'takenewblog' : 'takeeditblog'; ?> " /> <? if(!empty($_GET['action']) && $_GET['action'] == 'editblog'){?> <input type="hidden" name="blogid" value="<?php echo $BlogID; ?> " /> <? }?> <h3>Title</h3> <input type="text" name="title" size="95" <? if(!empty($Title)) { echo 'value="'.display_str($Title).'"'; } ?> /><br /> <h3>Body</h3> <textarea name="body" cols="95" rows="15"><? if(!empty($Body)) { echo display_str($Body); } ?></textarea> <br /> <h3>Thread ID</h3> <input type="text" name="thread" size="8"<? if(!empty($ThreadID)) { echo 'value="'.display_str($ThreadID).'"'; } ?> /> (Leave blank to create thread automatically) <br /><br /> <div class="center"> <input type="submit" value="<?php echo !isset($_GET['action']) ? 'Create blog post' : 'Edit blog post'; ?> " /> </div> </div> </form> </div> <br /> <? } ?>
private static function render_list($Url, $Name, $Image) { if (!empty($Image)) { $UseTooltipster = !isset(G::$LoggedUser['Tooltipster']) || G::$LoggedUser['Tooltipster']; $Image = ImageTools::process($Image); $Title = "title=\"<img class="large_tile" src="{$Image}" alt="" />\""; $Name = display_str($Name); ?> <li> <a class="tooltip_image" data-title-plain="<?php echo $Name; ?> " <?php echo $Title; ?> href="<?php echo $Url; echo $Name; ?> "><?php echo $Name; ?> </a> </li> <?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 }
<td><input type="checkbox" name="displaystaff" value="1"<?php echo !empty($DisplayStaff) ? ' checked="checked"' : ''; ?> /></td> </tr> <tr> <td class="label">Maximum number of personal collages</td> <td><input type="text" name="maxcollages" size="5" value="<?php echo $Values['MaxCollages']; ?> " /></td> </tr> <tr> <td class="label">Additional forums</td> <td><input type="text" size="30" name="forums" value="<?php echo display_str($Forums); ?> " /></td> </tr> <?php if (is_numeric($_REQUEST['id'])) { ?> <tr> <td class="label">Current users in this class</td> <td><?php echo number_format($UserCount); ?> </td> </tr> <?php }
} $Tags = $Request['Tags']; ?> <tr class="row<?php echo $i % 2 ? 'b' : 'a'; ?> "> <td> <?php echo $FullName; ?> <div class="tags"> <?php $TagList = array(); foreach ($Request['Tags'] as $TagID => $TagName) { $TagList[] = '<a href="?tags=' . $TagName . ($BookmarkView ? '&type=requests' : '') . '">' . display_str($TagName) . '</a>'; } $TagList = implode(', ', $TagList); ?> <?php echo $TagList; ?> </div> </td> <td class="nobr"> <span id="vote_count_<?php echo $RequestID; ?> "><?php echo number_format($VoteCount); ?>
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 } }
function simple_form($CategoryID) { $Torrent = $this->Torrent; ?> <table cellpadding="3" cellspacing="1" border="0" class="layout border slice" width="100%"> <tr id="name"> <?php if ($this->NewTorrent) { if ($this->Categories[$CategoryID] == 'E-Books') { ?> <td class="label">Author - Title:</td> <?php } else { ?> <td class="label">Title:</td> <?php } ?> <td><input type="text" id="title" name="title" size="60" value="<?php echo display_str($Torrent['Title']); ?> " /></td> </tr> <tr> <td class="label">Tags:</td> <td><input type="text" id="tags" name="tags" size="60" value="<?php echo display_str($Torrent['TagList']); ?> "<?php Users::has_autocomplete_enabled('other'); ?> /></td> </tr> <tr> <td class="label">Image (optional):</td> <td><input type="text" id="image" name="image" size="60" value="<?php echo display_str($Torrent['Image']); ?> "<?php echo $this->Disabled; ?> /></td> </tr> <tr> <td class="label">Description:</td> <td> <?php new TEXTAREA_PREVIEW('desc', 'desc', display_str($Torrent['GroupDescription']), 60, 8); TEXTAREA_PREVIEW::JavaScript(false); ?> </td> </tr> <?php } ?> </table> <?php }
<td class="<?php echo $Read; ?> <?php echo $Tooltip; ?> " title="<?php echo ucwords(str_replace('_', ' ', $Read)); ?> "></td> <td> <span style="float: left;" class="last_topic"> <?php $TopicLength = 75 - 2 * count($PageLinks); unset($PageLinks); $Title = display_str($Title); $DisplayTitle = $Title; ?> <strong> <a href="forums.php?action=viewthread&threadid=<?php echo $TopicID; ?> " class="tooltip" data-title-plain="<?php echo $Title; ?> "><?php echo Format::cut_string($DisplayTitle, $TopicLength); ?> </a> </strong> <?php
"> <?php if ($ViewString != 'Resolved' && $IsStaff) { ?> <td class="center"><input type="checkbox" name="id[]" value="<?php echo $ID; ?> " /></td> <?php } ?> <td><a href="staffpm.php?action=viewconv&id=<?php echo $ID; ?> "><?php echo display_str($Subject); ?> </a></td> <td><?php echo $UserStr; ?> </td> <td><?php echo time_diff($Date, 2, true); ?> </td> <td><?php echo $Assigned; ?> </td> <?php
$LastRemasterYear = '-'; $LastRemasterTitle = ''; $LastRemasterRecordLabel = ''; $LastRemasterCatalogueNumber = ''; foreach ($Torrents as $TorrentID => $Torrent) { if($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear || $Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber) { if($Torrent['RemasterTitle'] || $Torrent['RemasterYear'] || $Torrent['RemasterRecordLabel'] || $Torrent['RemasterCatalogueNumber']) { $RemasterName = $Torrent['RemasterYear']; $AddExtra = " - "; if($Torrent['RemasterRecordLabel']) { $RemasterName .= $AddExtra.display_str($Torrent['RemasterRecordLabel']); $AddExtra=' / '; } if($Torrent['RemasterCatalogueNumber']) { $RemasterName .= $AddExtra.display_str($Torrent['RemasterCatalogueNumber']); $AddExtra=' / '; } if($Torrent['RemasterTitle']) { $RemasterName .= $AddExtra.display_str($Torrent['RemasterTitle']); $AddExtra=' / '; } ?> <tr class="group_torrent groupid_<?php echo $GroupID; ?> <? if(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping']==1) { echo ' hidden'; } ?>"> <td colspan="7" class="edition_info"><strong><?php echo $RemasterName; ?> </strong></td> </tr> <? } else { $MasterName = "Original Release"; $AddExtra = " / ";
</td> </tr> <tr> <td class="label tooltip" title="Enter a comma-delimited list of forum IDs.">Restricted forums:</td> <td> <input type="text" class="wide_input_text" name="RestrictedForums" value="<?php echo display_str($RestrictedForums); ?> " /> </td> </tr> <tr> <td class="label tooltip" title="Enter a comma-delimited list of forum IDs.">Extra forums:</td> <td> <input type="text" class="wide_input_text" name="PermittedForums" value="<?php echo display_str($PermittedForums); ?> " /> </td> </tr> <?php } ?> </table> <?php if (check_perms('users_logout')) { ?> <table class="layout" id="session_box"> <tr class="colhead"> <td colspan="2">
} ?> <h3>Title</h3> <input type="text" name="title" size="95"<?php echo !empty($Title) ? ' value="' . display_str($Title) . '"' : ''; ?> /><br /> <h3>Body</h3> <textarea name="body" cols="95" rows="15"><?php echo !empty($Body) ? display_str($Body) : ''; ?> </textarea> <br /> <input type="checkbox" value="1" name="important" id="important" checked="checked" /><label for="important">Important</label><br /> <h3>Thread ID</h3> <input type="text" name="thread" size="8"<?php echo !empty($ThreadID) ? ' value="' . display_str($ThreadID) . '"' : ''; ?> /> (Leave blank to create thread automatically) <br /><br /> <input id="subscribebox" type="checkbox" name="subscribe"<?php echo !empty($HeavyInfo['AutoSubscribe']) ? ' checked="checked"' : ''; ?> tabindex="2" /> <label for="subscribebox">Subscribe</label> <div class="center"> <input type="submit" value="<?php echo !isset($_GET['action']) ? 'Create blog post' : 'Edit blog post'; ?> " />
show_header('Recover Password','validate'); echo $Validate->GenerateJS('recoverform'); ?> <form name="recoverform" id="recoverform" method="post" action="" onsubmit="return formVal();"> <input type="hidden" name="key" value="<?php echo display_str($_REQUEST['key']); ?> " /> <div style="width:320px;"> <font class="titletext">Reset your password - Final Step</font><br /><br /> <? if(empty($Reset)) { if(!empty($Err)) { ?> <font color="red"><strong><?php echo display_str($Err); ?> </strong></font><br /><br /> <? } ?> Please choose a password between 6 and 15 characters long<br /><br /> <table cellpadding="2" cellspacing="1" border="0" align="center"> <tr valign="top"> <td align="right">Password </td> <td align="left"><input type="password" name="password" id="password" class="inputtext" /></td> </tr> <tr valign="top"> <td align="right">Confirm Password </td> <td align="left"><input type="password" name="verifypassword" id="verifypassword" class="inputtext" /></td> </tr> <tr> <td colspan="2" align="right"><input type="submit" name="reset" value="Reset!" class="submit" /></td>
" /> <?php foreach ($Answers as $i => $Answer) { ?> <input type="radio" name="vote" id="answer_<?php echo $i; ?> " value="<?php echo $i; ?> " /> <label for="answer_<?php echo $i; ?> "><?php echo display_str($Answers[$i]); ?> </label><br /> <?php } ?> <br /><input type="radio" name="vote" id="answer_0" value="0" /> <label for="answer_0">Blank — Show the results!</label><br /><br /> <input type="button" onclick="ajax.post('index.php', 'poll', function(response) { $('#poll_container').raw().innerHTML = response } );" value="Vote" /> </form> </div> <?php } ?> <br /><strong>Topic:</strong> <a href="forums.php?action=viewthread&threadid=<?php echo $TopicID; ?>
</ul> </div> <div class="box box_votes"> <div class="head"><strong>Top Contributors</strong></div> <table> <? $VoteMax = ($VoteCount < 5 ? $VoteCount : 5); for($i = 0; $i < $VoteMax; $i++) { $User = array_shift($RequestVotes['Voters']); ?> <tr> <td> <a href="user.php?id=<?php echo $User['UserID']; ?> "><?php echo display_str($User['Username']); ?> </a> </td> <td> <?php echo get_size($User['Bounty']); ?> </td> </tr> <? } reset($RequestVotes['Voters']); ?> </table> </div> </div>