123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666 |
- <?php
- #declare(strict_types=1);
-
- $Where = [];
-
- if (!empty($_GET['advanced']) && check_perms('site_advanced_top10')) {
- $Details = 'all';
- $Limit = 10;
-
- if ($_GET['tags']) {
- $TagWhere = [];
- $Tags = explode(',', str_replace('.', '_', trim($_GET['tags'])));
- foreach ($Tags as $Tag) {
- $Tag = preg_replace('/[^a-z0-9_]/', '', $Tag);
- if ($Tag !== '') {
- $TagWhere[] = "g.TagList REGEXP '[[:<:]]".db_string($Tag)."[[:>:]]'";
- }
- }
- if (!empty($TagWhere)) {
- if ($_GET['anyall'] === 'any') {
- $Where[] = '('.implode(' OR ', $TagWhere).')';
- } else {
- $Where[] = '('.implode(' AND ', $TagWhere).')';
- }
- }
- }
-
- if ($_GET['category']) {
- if (in_array($_GET['category'], $Categories)) {
- $Where[] = "g.CategoryID = '".(array_search($_GET['category'], $Categories)+1)."'";
- }
- }
- } else {
- // Error out on invalid requests (before caching)
- if (isset($_GET['details'])) {
- if (in_array($_GET['details'], array('day', 'week', 'overall', 'snatched', 'data', 'seeded', 'month', 'year'))) {
- $Details = $_GET['details'];
- } else {
- error(404);
- }
- } else {
- $Details = 'all';
- }
-
- // Defaults to 10 (duh)
- $Limit = (isset($_GET['limit']) ? intval($_GET['limit']) : 10);
- $Limit = (in_array($Limit, array(10, 100, 250)) ? $Limit : 10);
- }
- $Filtered = !empty($Where);
- View::show_header("Top $Limit Torrents", 'browse');
- ?>
-
- <div>
- <div class="header">
- <h2>Top <?=$Limit?> Torrents</h2>
- <?php Top10View::render_linkbox("torrents"); ?>
- </div>
- <?php
-
- if (check_perms('site_advanced_top10')) {
- ?>
- <div class="box pad">
- <form class="search_form" name="torrents" action="" method="get">
- <input type="hidden" name="advanced" value="1" />
- <table cellpadding="6" cellspacing="1" border="0" class="layout" width="100%">
- <tr id="tagfilter">
- <td class="label">Tags (comma-separated)</td>
- <td class="ft_taglist">
- <input type="text" name="tags" id="tags" size="65" value="<?php if (!empty($_GET['tags'])) {
- echo display_str($_GET['tags']);
- } ?>" <?php Users::has_autocomplete_enabled('other'); ?>
- />
- <input type="radio" id="rdoAll" name="anyall" value="all" <?=((!isset($_GET['anyall'])||$_GET['anyall']!=='any')?' checked="checked"':'')?>
- /><label for="rdoAll"> All</label>
- <input type="radio" id="rdoAny" name="anyall" value="any" <?=((!isset($_GET['anyall'])||$_GET['anyall']==='any')?' checked="checked"':'')?>
- /><label for="rdoAny"> Any</label>
- </td>
- </tr>
- <tr>
- <td class="label">Category</td>
- <td>
- <select name="category" style="width: auto;" class="ft_format">
- <option value="">Any</option>
- <?php foreach ($Categories as $CategoryName) { ?>
- <option
- value="<?=display_str($CategoryName)?>"
- <?=(($CategoryName===($_GET['category']??false))?'selected="selected"':'')?>><?=display_str($CategoryName)?>
- </option>
- <?php } ?>
- </select>
- </td>
- </tr>
- <tr>
- <td colspan="2" class="center">
- <input type="submit" value="Search" />
- </td>
- </tr>
- </table>
- </form>
- </div>
- <?php
- }
-
- // Default setting to have them shown
- $DisableFreeTorrentTop10 = (isset($LoggedUser['DisableFreeTorrentTop10']) ? $LoggedUser['DisableFreeTorrentTop10'] : 0);
- // Did they just toggle it?
- if (isset($_GET['freeleech'])) {
- // What did they choose?
- $NewPref = (($_GET['freeleech'] === 'hide') ? 1 : 0);
-
- // Pref id different
- if ($NewPref !== $DisableFreeTorrentTop10) {
- $DisableFreeTorrentTop10 = $NewPref;
- Users::update_site_options($LoggedUser['ID'], array('DisableFreeTorrentTop10' => $DisableFreeTorrentTop10));
- }
- }
-
- // Modify the Where query
- if ($DisableFreeTorrentTop10) {
- $Where[] = "t.FreeTorrent='0'";
- }
-
- // The link should say the opposite of the current setting
- $FreeleechToggleName = ($DisableFreeTorrentTop10 ? 'show' : 'hide');
- $FreeleechToggleQuery = Format::get_url(array('freeleech', 'groups'));
-
- if (!empty($FreeleechToggleQuery)) {
- $FreeleechToggleQuery .= '&';
- }
-
- $FreeleechToggleQuery .= 'freeleech=' . $FreeleechToggleName;
-
- $GroupByToggleName = ((isset($_GET['groups']) && $_GET['groups'] === 'show') ? 'hide' : 'show');
- $GroupByToggleQuery = Format::get_url(array('freeleech', 'groups'));
-
- if (!empty($GroupByToggleQuery)) {
- $GroupByToggleQuery .= '&';
- }
-
- $GroupByToggleQuery .= 'groups=' . $GroupByToggleName;
-
- $GroupBySum = '';
- $GroupBy = '';
- if (isset($_GET['groups']) && $_GET['groups'] === 'show') {
- $GroupBy = ' GROUP BY g.ID ';
- $GroupBySum = md5($GroupBy);
- } ?>
- <div style="text-align: right;" class="linkbox">
- <a href="top10.php?<?=$FreeleechToggleQuery?>"
- class="brackets"><?=ucfirst($FreeleechToggleName)?>
- freeleech in Top 10</a>
- <?php if (check_perms('users_mod')) { ?>
- <a href="top10.php?<?=$GroupByToggleQuery?>"
- class="brackets"><?=ucfirst($GroupByToggleName)?>
- top groups</a>
- <?php } ?>
- </div>
- <?php
-
- if (!empty($Where)) {
- $Where = '('.implode(' AND ', $Where).')';
- $WhereSum = md5($Where);
- } else {
- $WhereSum = '';
- }
-
- $BaseQuery = "
- SELECT
- t.`ID`,
- g.`id`,
- g.`title`,
- g.`subject`,
- g.`object`,
- g.`category_id`,
- g.`picture`,
- g.`tag_list`,
- t.`Media`,
- g.`published`,
- g.`workgroup`,
- t.`Snatched`,
- t.`Seeders`,
- t.`Leechers`,
- (
- (t.`Size` * t.`Snatched`) +(t.`Size` * 0.5 * t.`Leechers`)
- ) AS `Data`,
- t.`Size`
- FROM
- `torrents` AS t
- LEFT JOIN `torrents_group` AS g
- ON
- g.`id` = t.`GroupID`
- ";
-
- if ($Details === 'all' || $Details === 'day') {
- $TopTorrentsActiveLastDay = $Cache->get_value('top10tor_day_'.$Limit.$WhereSum.$GroupBySum);
- if ($TopTorrentsActiveLastDay === false) {
- if ($Cache->get_query_lock('top10')) {
- $DayAgo = time_minus(86400);
- $Query = $BaseQuery.' WHERE t.Seeders>0 AND ';
-
- if (!empty($Where)) {
- $Query .= $Where.' AND ';
- }
-
- $Query .= "
- t.Time>'$DayAgo'
- $GroupBy
- ORDER BY (t.Seeders + t.Leechers) DESC
- LIMIT $Limit;";
-
- $DB->query($Query);
- $TopTorrentsActiveLastDay = $DB->to_array(false, MYSQLI_NUM);
- $Cache->cache_value('top10tor_day_'.$Limit.$WhereSum.$GroupBySum, $TopTorrentsActiveLastDay, 3600 * 2);
- $Cache->clear_query_lock('top10');
- } else {
- $TopTorrentsActiveLastDay = false;
- }
- }
- generate_torrent_table('Most Active Torrents Uploaded in the Past Day', 'day', $TopTorrentsActiveLastDay, $Limit);
- }
- if ($Details === 'all' || $Details === 'week') {
- $TopTorrentsActiveLastWeek = $Cache->get_value('top10tor_week_'.$Limit.$WhereSum.$GroupBySum);
- if ($TopTorrentsActiveLastWeek === false) {
- if ($Cache->get_query_lock('top10')) {
- $WeekAgo = time_minus(604800);
- $Query = $BaseQuery.' WHERE ';
-
- if (!empty($Where)) {
- $Query .= $Where.' AND ';
- }
-
- $Query .= "
- t.Time>'$WeekAgo'
- $GroupBy
- ORDER BY (t.Seeders + t.Leechers) DESC
- LIMIT $Limit;";
-
- $DB->query($Query);
- $TopTorrentsActiveLastWeek = $DB->to_array(false, MYSQLI_NUM);
- $Cache->cache_value('top10tor_week_'.$Limit.$WhereSum.$GroupBySum, $TopTorrentsActiveLastWeek, 3600 * 6);
- $Cache->clear_query_lock('top10');
- } else {
- $TopTorrentsActiveLastWeek = false;
- }
- }
- generate_torrent_table('Most Active Torrents Uploaded in the Past Week', 'week', $TopTorrentsActiveLastWeek, $Limit);
- }
-
- if ($Details === 'all' || $Details === 'month') {
- $TopTorrentsActiveLastMonth = $Cache->get_value('top10tor_month_'.$Limit.$WhereSum.$GroupBySum);
- if ($TopTorrentsActiveLastMonth === false) {
- if ($Cache->get_query_lock('top10')) {
- $Query = $BaseQuery.' WHERE ';
-
- if (!empty($Where)) {
- $Query .= $Where.' AND ';
- }
-
- $Query .= "
- t.Time > NOW() - INTERVAL 1 MONTH
- $GroupBy
- ORDER BY (t.Seeders + t.Leechers) DESC
- LIMIT $Limit;";
-
- $DB->query($Query);
- $TopTorrentsActiveLastMonth = $DB->to_array(false, MYSQLI_NUM);
- $Cache->cache_value('top10tor_month_'.$Limit.$WhereSum.$GroupBySum, $TopTorrentsActiveLastMonth, 3600 * 6);
- $Cache->clear_query_lock('top10');
- } else {
- $TopTorrentsActiveLastMonth = false;
- }
- }
- generate_torrent_table('Most Active Torrents Uploaded in the Past Month', 'month', $TopTorrentsActiveLastMonth, $Limit);
- }
-
- if ($Details === 'all' || $Details === 'year') {
- $TopTorrentsActiveLastYear = $Cache->get_value('top10tor_year_'.$Limit.$WhereSum.$GroupBySum);
- if ($TopTorrentsActiveLastYear === false) {
- if ($Cache->get_query_lock('top10')) {
- // IMPORTANT NOTE - we use WHERE t.Seeders>200 in order to speed up this query. You should remove it!
- $Query = $BaseQuery.' WHERE ';
- if ($Details === 'all' && !$Filtered) {
- // $Query .= 't.Seeders>=200 AND ';
- if (!empty($Where)) {
- $Query .= $Where.' AND ';
- }
- } elseif (!empty($Where)) {
- $Query .= $Where.' AND ';
- }
-
- $Query .= "
- t.Time > NOW() - INTERVAL 1 YEAR
- $GroupBy
- ORDER BY (t.Seeders + t.Leechers) DESC
- LIMIT $Limit;";
-
- $DB->query($Query);
- $TopTorrentsActiveLastYear = $DB->to_array(false, MYSQLI_NUM);
- $Cache->cache_value('top10tor_year_'.$Limit.$WhereSum.$GroupBySum, $TopTorrentsActiveLastYear, 3600 * 6);
- $Cache->clear_query_lock('top10');
- } else {
- $TopTorrentsActiveLastYear = false;
- }
- }
- generate_torrent_table('Most Active Torrents Uploaded in the Past Year', 'year', $TopTorrentsActiveLastYear, $Limit);
- }
-
- if ($Details === 'all' || $Details === 'overall') {
- $TopTorrentsActiveAllTime = $Cache->get_value('top10tor_overall_'.$Limit.$WhereSum.$GroupBySum);
- if ($TopTorrentsActiveAllTime === false) {
- if ($Cache->get_query_lock('top10')) {
- // IMPORTANT NOTE - we use WHERE t.Seeders>500 in order to speed up this query. You should remove it!
- $Query = $BaseQuery;
- if ($Details === 'all' && !$Filtered) {
- //$Query .= "t.Seeders>=500 ";
- if (!empty($Where)) {
- $Query .= ' WHERE '.$Where;
- }
- } elseif (!empty($Where)) {
- $Query .= ' WHERE '.$Where;
- }
-
- $Query .= "
- $GroupBy
- ORDER BY (t.Seeders + t.Leechers) DESC
- LIMIT $Limit;";
-
- $DB->query($Query);
- $TopTorrentsActiveAllTime = $DB->to_array(false, MYSQLI_NUM);
- $Cache->cache_value('top10tor_overall_'.$Limit.$WhereSum.$GroupBySum, $TopTorrentsActiveAllTime, 3600 * 6);
- $Cache->clear_query_lock('top10');
- } else {
- $TopTorrentsActiveAllTime = false;
- }
- }
- generate_torrent_table('Most Active Torrents of All Time', 'overall', $TopTorrentsActiveAllTime, $Limit);
- }
-
- if (($Details === 'all' || $Details === 'snatched') && !$Filtered) {
- $TopTorrentsSnatched = $Cache->get_value('top10tor_snatched_'.$Limit.$WhereSum.$GroupBySum);
- if ($TopTorrentsSnatched === false) {
- if ($Cache->get_query_lock('top10')) {
- $Query = $BaseQuery;
-
- if (!empty($Where)) {
- $Query .= ' WHERE '.$Where;
- }
-
- $Query .= "
- $GroupBy
- ORDER BY t.Snatched DESC
- LIMIT $Limit;";
-
- $DB->query($Query);
- $TopTorrentsSnatched = $DB->to_array(false, MYSQLI_NUM);
- $Cache->cache_value('top10tor_snatched_'.$Limit.$WhereSum.$GroupBySum, $TopTorrentsSnatched, 3600 * 6);
- $Cache->clear_query_lock('top10');
- } else {
- $TopTorrentsSnatched = false;
- }
- }
- generate_torrent_table('Most Snatched Torrents', 'snatched', $TopTorrentsSnatched, $Limit);
- }
-
- if (($Details === 'all' || $Details === 'data') && !$Filtered) {
- $TopTorrentsTransferred = $Cache->get_value('top10tor_data_'.$Limit.$WhereSum.$GroupBySum);
- if ($TopTorrentsTransferred === false) {
- if ($Cache->get_query_lock('top10')) {
- // IMPORTANT NOTE - we use WHERE t.Snatched>100 in order to speed up this query. You should remove it!
- $Query = $BaseQuery;
- if ($Details === 'all') {
- //$Query .= " WHERE t.Snatched>=100 ";
- if (!empty($Where)) {
- $Query .= ' WHERE '.$Where;
- }
- }
-
- $Query .= "
- $GroupBy
- ORDER BY Data DESC
- LIMIT $Limit;";
-
- $DB->query($Query);
- $TopTorrentsTransferred = $DB->to_array(false, MYSQLI_NUM);
- $Cache->cache_value('top10tor_data_'.$Limit.$WhereSum.$GroupBySum, $TopTorrentsTransferred, 3600 * 6);
- $Cache->clear_query_lock('top10');
- } else {
- $TopTorrentsTransferred = false;
- }
- }
- generate_torrent_table('Most Data Transferred Torrents', 'data', $TopTorrentsTransferred, $Limit);
- }
-
- if (($Details === 'all' || $Details === 'seeded') && !$Filtered) {
- $TopTorrentsSeeded = $Cache->get_value('top10tor_seeded_'.$Limit.$WhereSum.$GroupBySum);
- if ($TopTorrentsSeeded === false) {
- if ($Cache->get_query_lock('top10')) {
- $Query = $BaseQuery;
- if (!empty($Where)) {
- $Query .= ' WHERE '.$Where;
- }
-
- $Query .= "
- $GroupBy
- ORDER BY t.Seeders DESC
- LIMIT $Limit;";
-
- $DB->query($Query);
- $TopTorrentsSeeded = $DB->to_array(false, MYSQLI_NUM);
- $Cache->cache_value('top10tor_seeded_'.$Limit.$WhereSum.$GroupBySum, $TopTorrentsSeeded, 3600 * 6);
- $Cache->clear_query_lock('top10');
- } else {
- $TopTorrentsSeeded = false;
- }
- }
- generate_torrent_table('Best Seeded Torrents', 'seeded', $TopTorrentsSeeded, $Limit);
- }
- ?>
- </div>
-
- <?php
- View::show_footer();
-
- // Generate a table based on data from most recent query to $DB
- function generate_torrent_table($Caption, $Tag, $Details, $Limit)
- {
- global $LoggedUser, $Categories, $ReleaseTypes, $GroupBy; ?>
- <h3>Top <?="$Limit $Caption"?>
- <?php if (empty($_GET['advanced'])) { ?>
- <small class="top10_quantity_links">
- <?php
- switch ($Limit) {
- case 100: ?>
- – <a href="top10.php?details=<?=$Tag?>"
- class="brackets">Top
- 10</a>
- – <span class="brackets">Top 100</span>
- – <a
- href="top10.php?type=torrents&limit=250&details=<?=$Tag?>"
- class="brackets">Top 250</a>
- <?php break;
-
- case 250: ?>
- – <a href="top10.php?details=<?=$Tag?>"
- class="brackets">Top
- 10</a>
- – <a
- href="top10.php?type=torrents&limit=100&details=<?=$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=torrents&limit=100&details=<?=$Tag?>"
- class="brackets">Top 100</a>
- – <a
- href="top10.php?type=torrents&limit=250&details=<?=$Tag?>"
- class="brackets">Top 250</a>
- <?php } ?>
- </small>
- <?php } ?>
- </h3>
-
- <table class="torrent_table cats numbering border">
- <tr class="colhead">
- <td class="center" style="width: 15px;"></td>
- <td class="cats_col"></td>
- <td>Name</td>
- <td style="text-align: right;">Size</td>
- <td style="text-align: right;">Data</td>
- <td style="text-align: right;" class="sign snatches">
- ↻
- </td>
- <td style="text-align: right;" class="sign seeders">
- ↑
- </td>
- <td style="text-align: right;" class="sign leechers">
- ↓
- </td>
- <td style="text-align: right;">Peers</td>
- </tr>
-
- <?php
- // Server is already processing a top10 query. Starting another one will make things slow
- if ($Details === false) {
- ?>
- <tr class="row">
- <td colspan="9" class="center">
- Server is busy processing another top list request. Please try again in a minute
- </td>
- </tr>
- </table>
- <br />
- <?php
- return;
- }
- // In the unlikely event that query finds 0 rows...
- if (empty($Details)) { ?>
- <tr class="row">
- <td colspan="9" class="center">
- Found no torrents matching the criteria
- </td>
- </tr>
- </table>
- <br />
- <?php
- return;
- }
-
- $Rank = 0;
- foreach ($Details as $Detail) {
- $GroupIDs[] = $Detail[1];
- }
-
- $Artists = Artists::get_artists($GroupIDs);
-
- foreach ($Details as $Detail) {
- list($TorrentID, $GroupID, $GroupName, $GroupTitle2, $GroupNameJP, $GroupCategoryID, $WikiImage, $TagsList,
- $Media, $Year, $Studio, $Snatched, $Seeders, $Leechers, $Data, $Size) = $Detail;
-
- /*
- list($TorrentID, $GroupID, $GroupName, $GroupTitle2, $GroupNameJP, $GroupCategoryID, $WikiImage, $TagsList,
- $Media, $Year, $Snatched, $Seeders, $Leechers, $Data, $Size) = $Detail;
- */
-
- $IsBookmarked = Bookmarks::has_bookmarked('torrent', $GroupID);
- $IsSnatched = Torrents::has_snatched($TorrentID);
-
- $Rank++;
-
- // Generate torrent's title
- $DisplayName = '';
-
- $DisplayName .= "<a class='torrent_title' href='torrents.php?id=$GroupID&torrentid=$TorrentID' ";
- if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
- $DisplayName .= 'data-cover="'.ImageTools::process($WikiImage, 'thumb').'" ';
- }
-
-
- $Name = empty($GroupName) ? (empty($GroupTitle2) ? $GroupNameJP : $GroupTitle2) : $GroupName;
- $DisplayName .= "dir='ltr'>$Name</a>";
-
- // Append extra info to torrent title
- $ExtraInfo = '';
- $AddExtra = ' | '; # breaking
-
- if (empty($GroupBy)) {
- # Year
- if ($Year) {
- $Label = '<br />📅 ';
- $DisplayName .= $Label."<a href='torrents.php?action=search&year=$Year'>$Year</a>";
- }
-
- # Studio
- if ($Studio) {
- $DisplayName .= " 📍 <a href='torrents.php?action=search&location=$Studio'>$Studio</a>";
- }
-
- # Authors
- if ($Artists) {
- # Emoji in classes/astists.class.php
- $Label = ' '; # breaking
- $DisplayName .= $Label.Artists::display_artists($Artists[$GroupID], true, true);
- }
-
- # Catalogue Number
- if ($CatalogueNumber) {
- $Label = ' 🔑 ';
- $DisplayName .= $Label."<a href='torrents.php?action=search&numbers=$CatalogueNumber'>$CatalogueNumber</a>";
- }
-
- /*
- if ($Year > 0) {
- $ExtraInfo .= $Year;
- }
- */
-
- /*
- if ($Media) {
- $ExtraInfo .= " / $Media";
- }
- */
-
- /*
- if ($IsSnatched) {
- $ExtraInfo .= ' / ';
- $ExtraInfo .= Format::torrent_label('Snatched!', 'bold');
- }
- */
-
- /*
- if ($ExtraInfo !== '') {
- $ExtraInfo = "<br />$ExtraInfo";
- }
- */
- }
-
- $TorrentTags = new Tags($TagsList);
-
- // Get report info, use the cache if available. If not, add to it
- $Reported = false;
- $Reports = Torrents::get_reports($TorrentID);
- if (count($Reports) > 0) {
- $Reported = true;
- }
-
- // Print row?>
- <tr
- class="torrent row<?=($IsBookmarked ? ' bookmarked' : '') . ($IsSnatched ? ' snatched_torrent' : '')?>">
- <td style="padding: 8px; text-align: center;"><strong><?=$Rank?></strong></td>
- <td class="center cats_col">
- <div title="<?=Format::pretty_category($GroupCategoryID)?>"
- class="tooltip <?=Format::css_category($GroupCategoryID)?>">
- </div>
- </td>
- <td class="big_info">
- <div class="group_info clear">
-
- <span><a href="torrents.php?action=download&id=<?=$TorrentID?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>"
- title="Download" class="brackets tooltip">DL</a></span>
-
- <?=$DisplayName?> <?=$ExtraInfo?><?php if ($Reported) { ?> - <strong
- class="torrent_label tl_reported">Reported</strong><?php } ?>
- <?php
- if ($IsBookmarked) {
- ?>
- <span class="remove_bookmark float_right">
- <a href="#" id="bookmarklink_torrent_<?=$GroupID?>"
- class="bookmarklink_torrent_<?=$GroupID?> brackets"
- onclick="Unbookmark('torrent', <?=$GroupID?>, 'Bookmark'); return false;">Remove
- bookmark</a>
- </span>
- <?php
- } else { ?>
- <span class="add_bookmark float_right">
- <a href="#" id="bookmarklink_torrent_<?=$GroupID?>"
- class="bookmarklink_torrent_<?=$GroupID?> brackets"
- onclick="Bookmark('torrent', <?=$GroupID?>, 'Remove bookmark'); return false;">Bookmark</a>
- </span>
- <?php } ?>
- <div class="tags"><?=$TorrentTags->format()?>
- </div>
- </div>
- </td>
- <td class="number_column nobr"><?=Format::get_size($Size)?>
- </td>
- <td class="number_column nobr"><?=Format::get_size($Data)?>
- </td>
- <td class="number_column"><?=number_format((double)$Snatched)?>
- </td>
- <td class="number_column"><?=number_format((double)$Seeders)?>
- </td>
- <td class="number_column"><?=number_format((double)$Leechers)?>
- </td>
- <td class="number_column"><?=number_format($Seeders + $Leechers)?>
- </td>
- </tr>
- <?php
- } // foreach ($Details as $Detail)
- ?>
- </table>
- <br />
- <?php
- }
|