mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-31 02:21:36 +00:00
Empty commit
This commit is contained in:
parent
7c7573eb48
commit
a49bc32a52
@ -139,7 +139,7 @@ function foot() {
|
||||
<td colspan="2" style="text-align: center;">
|
||||
<p>Be sure that your torrent is approved by the <a href="rules.php?p=upload" target="_blank">rules</a>. Not doing this will result in a <strong class="important_text">warning</strong> or <strong class="important_text">worse</strong>.</p>
|
||||
<? if($this->NewTorrent) { ?>
|
||||
<p>After uploading the torrent, you will have a one hour grace period during which no one other than you can fill requests with this torrent. Make use of this time wisely, and search the requests.</p>
|
||||
<p>After uploading the torrent, you will have a one hour grace period during which no one other than you can fill requests with this torrent. Make use of this time wisely, and <a href="requests.php">search the list of requests</a>.</p>
|
||||
<? } ?>
|
||||
<input id="post" type="submit" <? if($this->NewTorrent) { echo "value=\"Upload torrent\""; } else { echo "value=\"Edit torrent\"";} ?> />
|
||||
</td>
|
||||
@ -588,17 +588,17 @@ function show() {
|
||||
<? } ?>
|
||||
<input type="text" id="tags" name="tags" size="40" value="<?=display_str($Torrent['TagList']) ?>" <?=$this->Disabled?>/>
|
||||
<br />
|
||||
Tags should be comma separated, and you should use a period ('.') to separate words inside a tag - eg. '<strong class="important_text_alt">hip.hop</strong>'.
|
||||
Tags should be comma-separated, and you should use a period (".") to separate words inside a tag — e.g. "<strong class="important_text_alt">hip.hop</strong>".
|
||||
<br /><br />
|
||||
There is a list of official tags to the left of the text box. Please use these tags instead of 'unofficial' tags (e.g. use the official '<strong class="important_text_alt">drum.and.bass</strong>' tag, instead of an unofficial '<strong class="important_text">dnb</strong>' tag). <strong>Please note that the '2000s' tag refers to music produced between 2000 and 2009.</strong>
|
||||
There is a list of official tags to the left of the text box. Please use these tags instead of "unofficial" tags (e.g. use the official "<strong class="important_text_alt">drum.and.bass</strong>" tag, instead of an unofficial "<strong class="important_text">dnb</strong>" tag). <strong>Please note that the "<strong class="important_text_alt">2000s</strong>" tag refers to music produced between 2000 and 2009.</strong>
|
||||
<br /><br />
|
||||
Avoid abbreviations if at all possible. So instead of tagging an album as '<strong class="important_text">alt</strong>', tag it as '<strong class="important_text_alt">alternative</strong>'. Make sure that you use correct spelling.
|
||||
Avoid abbreviations if at all possible. So instead of tagging an album as "<strong class="important_text">alt</strong>", tag it as "<strong class="important_text_alt">alternative</strong>". Make sure that you use correct spelling.
|
||||
<br /><br />
|
||||
Avoid using multiple synonymous tags. Using both '<strong class="important_text">prog.rock</strong>' and '<strong class="important_text_alt">progressive.rock</strong>' is redundant and annoying - just use the official '<strong class="important_text_alt">progressive.rock</strong>' tag.
|
||||
Avoid using multiple synonymous tags. Using both "<strong class="important_text">prog.rock</strong>" and "<strong class="important_text_alt">progressive.rock</strong>" is redundant and annoying—just use the official "<strong class="important_text_alt">progressive.rock</strong>" tag.
|
||||
<br /><br />
|
||||
Don't use 'useless' tags, such as '<strong class="important_text">seen.live</strong>', '<strong class="important_text">awesome</strong>', '<strong class="important_text">rap</strong>' (is encompassed by '<strong class="important_text_alt">hip.hop</strong>'), etc. If an album is live, you can tag it as '<strong class="important_text_alt">live</strong>'.
|
||||
Do not add "useless" tags, such as "<strong class="important_text">seen.live</strong>", "<strong class="important_text">awesome</strong>", "<strong class="important_text">rap</strong>" (is encompassed by "<strong class="important_text_alt">hip.hop</strong>"), etc. If an album is live, you can tag it as "<strong class="important_text_alt">live</strong>".
|
||||
<br /><br />
|
||||
Only tag information on the album itself - NOT THE INDIVIDUAL RELEASE. Tags such as '<strong class="important_text">v0</strong>', '<strong class="important_text">eac</strong>', '<strong class="important_text">vinyl</strong>', '<strong class="important_text">from.oink</strong>' etc. are strictly forbidden. Remember that these tags will be used for other versions of the same album.
|
||||
Only tag information on the album itself—NOT THE INDIVIDUAL RELEASE. Tags such as "<strong class="important_text">v0</strong>", "<strong class="important_text">eac</strong>", "<strong class="important_text">vinyl</strong>", "<strong class="important_text">from.oink</strong>", etc. are strictly forbidden. Remember that these tags will be used for other versions of the same album.
|
||||
<br /><br />
|
||||
<strong>You should be able to build up a list of tags using only the official tags to the left of the text box. If you are in any doubt about whether or not a tag is acceptable, do not add it.</strong>
|
||||
</td>
|
||||
|
@ -10,16 +10,16 @@ public static function vote_link($GroupID, $Vote = '') {
|
||||
global $LoggedUser;
|
||||
if (!$LoggedUser['NoVoteLinks'] && check_perms('site_album_votes')) { ?>
|
||||
<span class="votespan brackets" style="white-space: nowrap">
|
||||
Vote:
|
||||
<a href="#" onclick="UpVoteGroup(<?=$GroupID?>, '<?=$LoggedUser['AuthKey']?>'); return false;" class="small_upvote vote_link_<?=$GroupID?><?=(!empty($Vote)?' hidden':'')?>">↑</a>
|
||||
<span class="voted_type small_upvoted voted_up_<?=$GroupID?><?=(($Vote == 'Down' || empty($Vote))?' hidden':'')?>">↑</span>
|
||||
<a href="#" onclick="DownVoteGroup(<?=$GroupID?>, '<?=$LoggedUser['AuthKey']?>'); return false;" class="small_downvote vote_link_<?=$GroupID?><?=(!empty($Vote)?' hidden':'')?>">↓</a>
|
||||
<span class="voted_type small_downvoted voted_down_<?=$GroupID?><?=(($Vote == 'Up'|| empty($Vote))?' hidden':'')?>">↓</span>
|
||||
<a href="#" onclick="UnvoteGroup(<?=$GroupID?>, '<?=$LoggedUser['AuthKey']?>'); return false;" class="small_clearvote vote_clear_<?=$GroupID?><?=(empty($Vote)?' hidden':'')?>">x</a>
|
||||
Vote:
|
||||
<a href="#" onclick="UpVoteGroup(<?=$GroupID?>, '<?=$LoggedUser['AuthKey']?>'); return false;" class="small_upvote vote_link_<?=$GroupID?><?=(!empty($Vote)?' hidden':'')?>" title="Upvote">↑</a>
|
||||
<span class="voted_type small_upvoted voted_up_<?=$GroupID?><?=(($Vote == 'Down' || empty($Vote))?' hidden':'')?>" title="Upvoted">↑</span>
|
||||
<a href="#" onclick="DownVoteGroup(<?=$GroupID?>, '<?=$LoggedUser['AuthKey']?>'); return false;" class="small_downvote vote_link_<?=$GroupID?><?=(!empty($Vote)?' hidden':'')?>" title="Downvote">↓</a>
|
||||
<span class="voted_type small_downvoted voted_down_<?=$GroupID?><?=(($Vote == 'Up'|| empty($Vote))?' hidden':'')?>" title="Downvoted">↓</span>
|
||||
<a href="#" onclick="UnvoteGroup(<?=$GroupID?>, '<?=$LoggedUser['AuthKey']?>'); return false;" class="small_clearvote vote_clear_<?=$GroupID?><?=(empty($Vote)?' hidden':'')?>" title="Clear your vote">x</a>
|
||||
</span>
|
||||
<? }
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns an array with User Vote data: GroupID and vote type
|
||||
* @global CACHE $Cache
|
||||
@ -29,11 +29,11 @@ public static function vote_link($GroupID, $Vote = '') {
|
||||
*/
|
||||
public static function get_user_votes($UserID) {
|
||||
global $DB, $Cache;
|
||||
|
||||
|
||||
if ((int)$UserID == 0) {
|
||||
return array();
|
||||
}
|
||||
|
||||
|
||||
$UserVotes = $Cache->get_value('voted_albums_'.$UserID);
|
||||
if ($UserVotes === FALSE) {
|
||||
$DB->query('SELECT GroupID, Type FROM users_votes WHERE UserID='.$UserID);
|
||||
@ -42,7 +42,7 @@ public static function get_user_votes($UserID) {
|
||||
}
|
||||
return $UserVotes;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns an array with torrent group vote data
|
||||
* @global CACHE $Cache
|
||||
@ -52,7 +52,7 @@ public static function get_user_votes($UserID) {
|
||||
*/
|
||||
public static function get_group_votes($GroupID) {
|
||||
global $DB, $Cache;
|
||||
|
||||
|
||||
$GroupVotes = $Cache->get_value('votes_'.$GroupID);
|
||||
if ($GroupVotes === FALSE) {
|
||||
$DB->query("SELECT Ups AS Ups, Total AS Total FROM torrents_votes WHERE GroupID=$GroupID");
|
||||
@ -65,7 +65,7 @@ public static function get_group_votes($GroupID) {
|
||||
}
|
||||
return $GroupVotes;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Computes the inverse normal CDF of a p-value
|
||||
* @param float $GroupID
|
||||
@ -157,12 +157,12 @@ private function inverse_ncdf($p) {
|
||||
* @param int $Total Number of total votes
|
||||
* @return float Ranking score
|
||||
*/
|
||||
public static function binomial_score($Ups, $Total) {
|
||||
public static function binomial_score($Ups, $Total) {
|
||||
// Confidence level for binomial scoring (p-value .95)
|
||||
//define(Z_VAL, 1.645211440143815);
|
||||
// Confidence level for binomial scoring (p-value .90)
|
||||
define(Z_VAL, 1.281728756502709);
|
||||
|
||||
|
||||
if (($Total <= 0) || ($Ups < 0)) {
|
||||
return 0;
|
||||
}
|
||||
@ -187,7 +187,7 @@ public static function get_ranking($GroupID, $Year) {
|
||||
'year' =>Votes::get_rank_year($GroupID, $Year),
|
||||
'decade' =>Votes::get_rank_decade($GroupID, $Year));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets where this album ranks overall.
|
||||
* @global CACHE $Cache
|
||||
@ -197,12 +197,12 @@ public static function get_ranking($GroupID, $Year) {
|
||||
*/
|
||||
public static function get_rank_all($GroupID) {
|
||||
global $Cache, $DB;
|
||||
|
||||
|
||||
$GroupID = (int)$GroupID;
|
||||
if ($GroupID <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$Rankings = $Cache->get_value('voting_ranks_overall');
|
||||
if ($Rankings === FALSE) {
|
||||
$Rankings = array();
|
||||
@ -213,10 +213,10 @@ public static function get_rank_all($GroupID) {
|
||||
}
|
||||
$Cache->cache_value('voting_ranks_overall', $Rankings);
|
||||
}
|
||||
|
||||
|
||||
return isset($Rankings[$GroupID])?$Rankings[$GroupID]:false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets where this album ranks in its year.
|
||||
* @global CACHE $Cache
|
||||
@ -227,18 +227,18 @@ public static function get_rank_all($GroupID) {
|
||||
*/
|
||||
public static function get_rank_year($GroupID, $Year) {
|
||||
global $Cache, $DB;
|
||||
|
||||
|
||||
$GroupID = (int)$GroupID;
|
||||
$Year = (int)$Year;
|
||||
if ($GroupID <= 0 || $Year <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$Rankings = $Cache->get_value('voting_ranks_year_'.$Year);
|
||||
if ($Rankings === FALSE) {
|
||||
$Rankings = array();
|
||||
$i = 0;
|
||||
$DB->query("SELECT GroupID
|
||||
$DB->query("SELECT GroupID
|
||||
FROM torrents_votes AS v
|
||||
JOIN torrents_group AS g ON g.ID = v.GroupID
|
||||
WHERE g.Year = $Year
|
||||
@ -248,7 +248,7 @@ public static function get_rank_year($GroupID, $Year) {
|
||||
}
|
||||
$Cache->cache_value('voting_ranks_year_'.$Year , $Rankings);
|
||||
}
|
||||
|
||||
|
||||
return isset($Rankings[$GroupID])?$Rankings[$GroupID]:false;
|
||||
}
|
||||
|
||||
@ -262,22 +262,22 @@ public static function get_rank_year($GroupID, $Year) {
|
||||
*/
|
||||
public static function get_rank_decade($GroupID, $Year) {
|
||||
global $Cache, $DB;
|
||||
|
||||
|
||||
$GroupID = (int)$GroupID;
|
||||
$Year = (int)$Year;
|
||||
$Year = (int)$Year;
|
||||
if ((int)$GroupID <= 0 || (int)$Year <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// First year of the decade
|
||||
$Year = $Year - ($Year % 10);
|
||||
|
||||
|
||||
$Rankings = $Cache->get_value('voting_ranks_decade_'.$Year);
|
||||
if ($Rankings === FALSE) {
|
||||
$Rankings = array();
|
||||
$i = 0;
|
||||
$DB->query("SELECT GroupID
|
||||
$DB->query("SELECT GroupID
|
||||
FROM torrents_votes AS v
|
||||
JOIN torrents_group AS g ON g.ID = v.GroupID
|
||||
WHERE g.Year BETWEEN $Year AND ".($Year+9)."
|
||||
@ -288,8 +288,8 @@ public static function get_rank_decade($GroupID, $Year) {
|
||||
}
|
||||
$Cache->cache_value('voting_ranks_decade_'.$Year , $Rankings);
|
||||
}
|
||||
|
||||
|
||||
return isset($Rankings[$GroupID])?$Rankings[$GroupID]:false;
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
@ -11,7 +11,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
if($OrderWay=="desc") { $NewWay="asc"; }
|
||||
else { $NewWay="desc"; }
|
||||
} else { $NewWay=$DefaultWay; }
|
||||
|
||||
|
||||
return "torrents.php?order_way=".$NewWay."&order_by=".$SortKey."&".Format::get_url(array('order_way','order_by'));
|
||||
}
|
||||
|
||||
@ -113,7 +113,6 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
foreach ($SearchBitrates as $ID=>$Val) {
|
||||
$SearchBitrates[$ID] = strtolower($Val);
|
||||
}
|
||||
|
||||
foreach ($Formats as $ID => $Val) {
|
||||
$SearchFormats[$ID] = strtolower($Val);
|
||||
}
|
||||
@ -490,12 +489,12 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
|
||||
if($TorrentCount == 0) {
|
||||
|
||||
$DB->query("SELECT
|
||||
$DB->query("SELECT
|
||||
tags.Name,
|
||||
((COUNT(tags.Name)-2)*(SUM(tt.PositiveVotes)-SUM(tt.NegativeVotes)))/(tags.Uses*0.8) AS Score
|
||||
FROM xbt_snatched AS s
|
||||
INNER JOIN torrents AS t ON t.ID=s.fid
|
||||
INNER JOIN torrents_group AS g ON t.GroupID=g.ID
|
||||
FROM xbt_snatched AS s
|
||||
INNER JOIN torrents AS t ON t.ID=s.fid
|
||||
INNER JOIN torrents_group AS g ON t.GroupID=g.ID
|
||||
INNER JOIN torrents_tags AS tt ON tt.GroupID=g.ID
|
||||
INNER JOIN tags ON tags.ID=tt.TagID
|
||||
WHERE s.uid='$LoggedUser[ID]'
|
||||
@ -557,7 +556,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
} else {
|
||||
$Torrents = array($Result['id'] => $GroupInfo['Torrents'][$Result['id']]);
|
||||
}
|
||||
|
||||
|
||||
$TagList = explode(' ',str_replace('_','.',$GroupInfo['TagList']));
|
||||
$JsonArtists = array();
|
||||
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) {
|
||||
@ -590,14 +589,14 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
$LastRemasterRecordLabel = '';
|
||||
$LastRemasterCatalogueNumber = '';
|
||||
$LastMedia = '';
|
||||
|
||||
|
||||
$EditionID = 0;
|
||||
unset($FirstUnknown);
|
||||
|
||||
$JsonTorrents = array();
|
||||
foreach($Torrents as $TorrentID => $Data) {
|
||||
// All of the individual torrents in the group
|
||||
|
||||
|
||||
// If they're using the advanced search and have chosen enabled grouping, we just skip the torrents that don't check out
|
||||
if (!isset($TorrentIDs[$TorrentID])) {
|
||||
continue;
|
||||
@ -606,7 +605,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
if ($Data['Remastered'] && !$Data['RemasterYear']) {
|
||||
$FirstUnknown = !isset($FirstUnknown);
|
||||
}
|
||||
|
||||
|
||||
if (isset($GroupedCategories[$CategoryID-1])
|
||||
&& ($Data['RemasterTitle'] != $LastRemasterTitle
|
||||
|| $Data['RemasterYear'] != $LastRemasterYear
|
||||
@ -617,7 +616,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
$EditionID++;
|
||||
|
||||
if ($Data['Remastered'] && $Data['RemasterYear'] != 0) {
|
||||
|
||||
|
||||
$RemasterName = $Data['RemasterYear'];
|
||||
$AddExtra = " - ";
|
||||
if ($Data['RemasterRecordLabel']) { $RemasterName .= $AddExtra.display_str($Data['RemasterRecordLabel']); $AddExtra=' / '; }
|
||||
@ -641,7 +640,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
$LastRemasterRecordLabel = $Data['RemasterRecordLabel'];
|
||||
$LastRemasterCatalogueNumber = $Data['RemasterCatalogueNumber'];
|
||||
$LastMedia = $Data['Media'];
|
||||
|
||||
|
||||
$JsonTorrents[] = array(
|
||||
'torrentId' => (int) $TorrentID,
|
||||
'editionId' => (int) $EditionID,
|
||||
@ -671,7 +670,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
'hasSnatched' => $Data['IsSnatched']
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$JsonGroups[] = array(
|
||||
'groupId' => (int) $GroupID,
|
||||
'groupName' => $GroupName,
|
||||
@ -691,9 +690,9 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
}
|
||||
else {
|
||||
// Viewing a type that does not require grouping
|
||||
|
||||
|
||||
list($TorrentID, $Data) = each($Torrents);
|
||||
|
||||
|
||||
$JsonGroups[] = array(
|
||||
'groupId' => (int) $GroupID,
|
||||
'groupName' => $GroupName,
|
||||
|
@ -57,6 +57,7 @@
|
||||
|
||||
$JsonTorrentList = array();
|
||||
foreach ($TorrentList as $Torrent) {
|
||||
$Userinfo = Users::user_info($Torrent['UserID']);
|
||||
$JsonTorrentList[] = array(
|
||||
'id' => (int) $Torrent['ID'],
|
||||
'media' => $Torrent['Media'],
|
||||
@ -82,7 +83,7 @@
|
||||
'fileList' => $Torrent['FileList'],
|
||||
'filePath' => $Torrent['FilePath'],
|
||||
'userId' => (int) $Torrent['UserID'],
|
||||
'username' => $Torrent['Username']
|
||||
'username' => $Userinfo['Username']
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,37 +1,36 @@
|
||||
<?
|
||||
//TODO: freeleech in ratio hit calculations, in addition to a warning of whats freeleech in the Summary.txt
|
||||
/*
|
||||
This page is something of a hack so those
|
||||
easily scared off by funky solutions, don't
|
||||
/*
|
||||
This page is something of a hack so those
|
||||
easily scared off by funky solutions, don't
|
||||
touch it! :P
|
||||
|
||||
There is a central problem to this page, it's
|
||||
There is a central problem to this page, it's
|
||||
impossible to order before grouping in SQL, and
|
||||
it's slow to run sub queries, so we had to get
|
||||
it's slow to run sub queries, so we had to get
|
||||
creative for this one.
|
||||
|
||||
The solution I settled on abuses the way
|
||||
$DB->to_array() works. What we've done, is
|
||||
The solution I settled on abuses the way
|
||||
$DB->to_array() works. What we've done, is
|
||||
backwards ordering. The results returned by the
|
||||
query have the best one for each GroupID last,
|
||||
and while to_array traverses the results, it
|
||||
query have the best one for each GroupID last,
|
||||
and while to_array traverses the results, it
|
||||
overwrites the keys and leaves us with only the
|
||||
desired result. This does mean however, that
|
||||
the SQL has to be done in a somewhat backwards
|
||||
desired result. This does mean however, that
|
||||
the SQL has to be done in a somewhat backwards
|
||||
fashion.
|
||||
|
||||
Thats all you get for a disclaimer, just
|
||||
remember, this page isn't for the faint of
|
||||
Thats all you get for a disclaimer, just
|
||||
remember, this page isn't for the faint of
|
||||
heart. -A9
|
||||
|
||||
SQL template:
|
||||
SELECT
|
||||
CASE
|
||||
WHEN t.Format='Ogg Vorbis' THEN 0
|
||||
WHEN t.Format='MP3' AND t.Encoding='V0 (VBR)' THEN 1
|
||||
WHEN t.Format='MP3' AND t.Encoding='V2 (VBR)' THEN 2
|
||||
ELSE 100
|
||||
END AS Rank,
|
||||
SELECT
|
||||
CASE
|
||||
WHEN t.Format='MP3' AND t.Encoding='V0 (VBR)' THEN 1
|
||||
WHEN t.Format='MP3' AND t.Encoding='V2 (VBR)' THEN 2
|
||||
ELSE 100
|
||||
END AS Rank,
|
||||
t.GroupID,
|
||||
t.Media,
|
||||
t.Format,
|
||||
@ -40,7 +39,7 @@
|
||||
tg.Name,
|
||||
a.Name,
|
||||
t.Size
|
||||
FROM torrents AS t
|
||||
FROM torrents AS t
|
||||
INNER JOIN torrents_group AS tg ON tg.ID=t.GroupID AND tg.CategoryID='1'
|
||||
INNER JOIN artists_group AS a ON a.ArtistID=tg.ArtistID AND a.ArtistID='59721'
|
||||
LEFT JOIN torrents_files AS f ON t.ID=f.TorrentID
|
||||
@ -48,10 +47,10 @@
|
||||
*/
|
||||
|
||||
if(
|
||||
!isset($_REQUEST['artistid']) ||
|
||||
!isset($_REQUEST['preference']) ||
|
||||
!is_number($_REQUEST['preference']) ||
|
||||
!is_number($_REQUEST['artistid']) ||
|
||||
!isset($_REQUEST['artistid']) ||
|
||||
!isset($_REQUEST['preference']) ||
|
||||
!is_number($_REQUEST['preference']) ||
|
||||
!is_number($_REQUEST['artistid']) ||
|
||||
$_REQUEST['preference'] > 2 ||
|
||||
count($_REQUEST['list']) == 0
|
||||
) { error(0); }
|
||||
@ -100,7 +99,6 @@
|
||||
case '36': $SQL .= "t.Format='FLAC' AND t.Encoding='Lossless' AND HasLog='1'"; break;
|
||||
case '37': $SQL .= "t.Format='FLAC' AND t.Encoding='Lossless'"; break;
|
||||
case '40': $SQL .= "t.Format='DTS'"; break;
|
||||
case '41': $SQL .= "t.Format='Ogg Vorbis'"; break;
|
||||
case '42': $SQL .= "t.Format='AAC' AND t.Encoding='320'"; break;
|
||||
case '43': $SQL .= "t.Format='AAC' AND t.Encoding='256'"; break;
|
||||
case '44': $SQL .= "t.Format='AAC' AND t.Encoding='q5.5'"; break;
|
||||
@ -120,7 +118,7 @@
|
||||
IF(t.RemasterYear=0,tg.Year,t.RemasterYear),
|
||||
tg.Name,
|
||||
t.Size
|
||||
FROM torrents AS t
|
||||
FROM torrents AS t
|
||||
JOIN torrents_group AS tg ON tg.ID=t.GroupID AND tg.CategoryID='1' AND tg.ID IN (".implode(',',$GroupIDs).")
|
||||
ORDER BY t.GroupID ASC, Rank DESC, t.$Preference";
|
||||
|
||||
@ -159,7 +157,7 @@
|
||||
$Tor = new TORRENT($Contents, true);
|
||||
$Tor->set_announce_url(ANNOUNCE_URL.'/'.$LoggedUser['torrent_pass'].'/announce');
|
||||
unset($Tor->Val['announce-list']);
|
||||
|
||||
|
||||
// We need this section for long file names :/
|
||||
$TorrentName='';
|
||||
$TorrentInfo='';
|
||||
@ -179,7 +177,7 @@
|
||||
$TorrentName = Misc::file_string($Album).(($Year>0)?(' - '.Misc::file_string($Year)):'');
|
||||
}
|
||||
$FileName = Format::cut_string($TorrentName.$TorrentInfo, 180, true, false);
|
||||
|
||||
|
||||
$Zip->add_file($Tor->enc(), $ReleaseTypeName.'/'.$FileName.'.torrent');
|
||||
}
|
||||
$Analyzed = count($Downloads);
|
||||
|
@ -101,7 +101,7 @@ function compare($X, $Y){
|
||||
<span style="float:left;"><strong><?=$DisplayName?></strong></span>
|
||||
<span style="float:right;text-align:right">
|
||||
<? if(!$Sneaky){ ?>
|
||||
<a href="#group_<?=$GroupID?>" class="remove_bookmark" title="Remove bookmark" onclick="Unbookmark('torrent', <?=$GroupID?>, '');return false;">Unbookmark</a>
|
||||
<a href="#group_<?=$GroupID?>" class="brackets remove_bookmark" title="Remove bookmark" onclick="Unbookmark('torrent', <?=$GroupID?>, '');return false;">Unbookmark</a>
|
||||
<br />
|
||||
<? } ?>
|
||||
<?=time_diff($AddedTime);?>
|
||||
@ -220,7 +220,7 @@ function compare($X, $Y){
|
||||
<strong><?=$DisplayName?></strong>
|
||||
<?=$TorrentTags?>
|
||||
<? if(!$Sneaky){ ?>
|
||||
<span style="float:left;"><a href="#group_<?=$GroupID?>" class="remove_bookmark" title="Remove bookmark" onclick="Unbookmark('torrent', <?=$GroupID?>, '');return false;">Unbookmark</a></span>
|
||||
<span style="float:left;"><a href="#group_<?=$GroupID?>" class="brackets remove_bookmark" title="Remove bookmark" onclick="Unbookmark('torrent', <?=$GroupID?>, '');return false;">Unbookmark</a></span>
|
||||
<? } ?>
|
||||
<span style="float:right;"><?=time_diff($AddedTime);?></span>
|
||||
|
||||
|
@ -50,6 +50,10 @@ function AddTorrent($CollageID, $GroupID) {
|
||||
if ($MaxGroups > 0 && $NumTorrents >= $MaxGroups) {
|
||||
$Err = "This collage already holds its maximum allowed number of torrents";
|
||||
}
|
||||
|
||||
if (isset($Err)) {
|
||||
error($Err);
|
||||
}
|
||||
}
|
||||
|
||||
if ($MaxGroupsPerUser > 0) {
|
||||
@ -134,4 +138,4 @@ function AddTorrent($CollageID, $GroupID) {
|
||||
AddTorrent($CollageID, $GroupID);
|
||||
}
|
||||
}
|
||||
header('Location: collages.php?id='.$CollageID);
|
||||
header('Location: collages.php?id='.$CollageID);
|
||||
|
@ -1,36 +1,35 @@
|
||||
<?
|
||||
/*
|
||||
This page is something of a hack so those
|
||||
easily scared off by funky solutions, don't
|
||||
/*
|
||||
This page is something of a hack so those
|
||||
easily scared off by funky solutions, don't
|
||||
touch it! :P
|
||||
|
||||
There is a central problem to this page, it's
|
||||
There is a central problem to this page, it's
|
||||
impossible to order before grouping in SQL, and
|
||||
it's slow to run sub queries, so we had to get
|
||||
it's slow to run sub queries, so we had to get
|
||||
creative for this one.
|
||||
|
||||
The solution I settled on abuses the way
|
||||
$DB->to_array() works. What we've done, is
|
||||
The solution I settled on abuses the way
|
||||
$DB->to_array() works. What we've done, is
|
||||
backwards ordering. The results returned by the
|
||||
query have the best one for each GroupID last,
|
||||
and while to_array traverses the results, it
|
||||
query have the best one for each GroupID last,
|
||||
and while to_array traverses the results, it
|
||||
overwrites the keys and leaves us with only the
|
||||
desired result. This does mean however, that
|
||||
the SQL has to be done in a somewhat backwards
|
||||
desired result. This does mean however, that
|
||||
the SQL has to be done in a somewhat backwards
|
||||
fashion.
|
||||
|
||||
Thats all you get for a disclaimer, just
|
||||
remember, this page isn't for the faint of
|
||||
Thats all you get for a disclaimer, just
|
||||
remember, this page isn't for the faint of
|
||||
heart. -A9
|
||||
|
||||
SQL template:
|
||||
SELECT
|
||||
CASE
|
||||
WHEN t.Format='Ogg Vorbis' THEN 0
|
||||
WHEN t.Format='MP3' AND t.Encoding='V0 (VBR)' THEN 1
|
||||
WHEN t.Format='MP3' AND t.Encoding='V2 (VBR)' THEN 2
|
||||
ELSE 100
|
||||
END AS Rank,
|
||||
SELECT
|
||||
CASE
|
||||
WHEN t.Format='MP3' AND t.Encoding='V0 (VBR)' THEN 1
|
||||
WHEN t.Format='MP3' AND t.Encoding='V2 (VBR)' THEN 2
|
||||
ELSE 100
|
||||
END AS Rank,
|
||||
t.GroupID,
|
||||
t.Media,
|
||||
t.Format,
|
||||
@ -39,7 +38,7 @@
|
||||
tg.Name,
|
||||
a.Name,
|
||||
t.Size
|
||||
FROM torrents AS t
|
||||
FROM torrents AS t
|
||||
INNER JOIN collages_torrents AS c ON t.GroupID=c.GroupID AND c.CollageID='8'
|
||||
INNER JOIN torrents_group AS tg ON tg.ID=t.GroupID AND tg.CategoryID='1'
|
||||
LEFT JOIN artists_group AS a ON a.ArtistID=tg.ArtistID
|
||||
@ -48,10 +47,10 @@
|
||||
*/
|
||||
|
||||
if(
|
||||
!isset($_REQUEST['collageid']) ||
|
||||
!isset($_REQUEST['preference']) ||
|
||||
!is_number($_REQUEST['preference']) ||
|
||||
!is_number($_REQUEST['collageid']) ||
|
||||
!isset($_REQUEST['collageid']) ||
|
||||
!isset($_REQUEST['preference']) ||
|
||||
!is_number($_REQUEST['preference']) ||
|
||||
!is_number($_REQUEST['collageid']) ||
|
||||
$_REQUEST['preference'] > 2 ||
|
||||
count($_REQUEST['list']) == 0
|
||||
) { error(0); }
|
||||
@ -95,7 +94,6 @@
|
||||
case '36': $SQL .= "t.Format='FLAC' AND t.Encoding='Lossless' AND HasLog='1'"; break;
|
||||
case '37': $SQL .= "t.Format='FLAC' AND t.Encoding='Lossless'"; break;
|
||||
case '40': $SQL .= "t.Format='DTS'"; break;
|
||||
case '41': $SQL .= "t.Format='Ogg Vorbis'"; break;
|
||||
case '42': $SQL .= "t.Format='AAC' AND t.Encoding='320'"; break;
|
||||
case '43': $SQL .= "t.Format='AAC' AND t.Encoding='256'"; break;
|
||||
case '44': $SQL .= "t.Format='AAC' AND t.Encoding='q5.5'"; break;
|
||||
@ -114,7 +112,7 @@
|
||||
IF(t.RemasterYear=0,tg.Year,t.RemasterYear),
|
||||
tg.Name,
|
||||
t.Size
|
||||
FROM torrents AS t
|
||||
FROM torrents AS t
|
||||
INNER JOIN collages_torrents AS c ON t.GroupID=c.GroupID AND c.CollageID='$CollageID'
|
||||
INNER JOIN torrents_group AS tg ON tg.ID=t.GroupID AND tg.CategoryID='1'
|
||||
ORDER BY t.GroupID ASC, Rank DESC, t.$Preference";
|
||||
@ -148,7 +146,7 @@
|
||||
$Tor = new TORRENT($Contents, true);
|
||||
$Tor->set_announce_url(ANNOUNCE_URL.'/'.$LoggedUser['torrent_pass'].'/announce');
|
||||
unset($Tor->Val['announce-list']);
|
||||
|
||||
|
||||
// We need this section for long file names :/
|
||||
$TorrentName='';
|
||||
$TorrentInfo='';
|
||||
@ -169,7 +167,7 @@
|
||||
}
|
||||
$FileName = $TorrentName.$TorrentInfo;
|
||||
$FileName = Format::cut_string($FileName, 192, true, false);
|
||||
|
||||
|
||||
$Zip->add_file($Tor->enc(), $FileName.'.torrent');
|
||||
}
|
||||
$Analyzed = count($Downloads);
|
||||
|
@ -53,22 +53,26 @@
|
||||
}
|
||||
|
||||
// Searching for posts in a specific thread
|
||||
if(!empty($_GET['threadid'])) {
|
||||
$ThreadID = db_string($_GET['threadid']);
|
||||
$Type='body';
|
||||
if (!empty($_GET['threadid']) && is_number($_GET['threadid'])) {
|
||||
$ThreadID = $_GET['threadid'];
|
||||
$Type = 'body';
|
||||
$SQL = "SELECT Title FROM forums_topics AS t
|
||||
JOIN forums AS f ON f.ID=t.ForumID
|
||||
WHERE f.MinClassRead <= '$LoggedUser[Class]'
|
||||
AND t.ID=$ThreadID";
|
||||
if(!empty($RestrictedForums)) {
|
||||
$SQL .= " AND f.ID NOT IN ('".$RestrictedForums."')";
|
||||
WHERE t.ID=$ThreadID
|
||||
AND ((f.MinClassRead <= '$LoggedUser[Class]'";
|
||||
if (!empty($RestrictedForums)) {
|
||||
$SQL .= " AND f.ID NOT IN ('$RestrictedForums')";
|
||||
}
|
||||
$SQL .= ")";
|
||||
if (!empty($PermittedForums)) {
|
||||
$SQL .= " OR f.ID IN ('$PermittedForums')";
|
||||
}
|
||||
$SQL .= ")";
|
||||
$DB->query($SQL);
|
||||
if (list($Title) = $DB->next_record()) {
|
||||
$Title = " > <a href=\"forums.php?action=viewthread&threadid=$ThreadID\">$Title</a>";
|
||||
} else {
|
||||
$Title = '';
|
||||
$ThreadID = '';
|
||||
error(404);
|
||||
}
|
||||
} else {
|
||||
$ThreadID = '';
|
||||
|
@ -456,26 +456,6 @@
|
||||
</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<?
|
||||
//<strip>
|
||||
if(check_perms("users_mod")) {
|
||||
$RequestLog = Requests::get_request_log($RequestID);
|
||||
if($RequestLog) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="2" class="center"><strong><a href="#" onclick="$('#request_log').toggle(); return false;">Request log</a></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div id="request_log" class="hidden padding">
|
||||
<?=$Text->full_format($RequestLog)?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<? }
|
||||
}
|
||||
//<strip>
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="2" class="center"><strong>Description</strong></td>
|
||||
</tr>
|
||||
|
@ -491,9 +491,9 @@ function generate_torrent_table($Caption, $Tag, $Details, $Limit) {
|
||||
<?
|
||||
if($IsBookmarked) {
|
||||
?>
|
||||
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="brackets remove_bookmark" title="Remove bookmark" onclick="Unbookmark('torrent',<?=$GroupID?>,'Bookmark');return false;">Unbookmark</a>
|
||||
<a href="#" class="bookmarklink_torrent_<?=$GroupID?> brackets remove_bookmark" title="Remove bookmark" onclick="Unbookmark('torrent',<?=$GroupID?>,'Bookmark');return false;">Unbookmark</a>
|
||||
<? } else { ?>
|
||||
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="brackets add_bookmark" title="Add bookmark" onclick="Bookmark('torrent',<?=$GroupID?>,'Unbookmark');return false;">Bookmark</a>
|
||||
<a href="#" class="bookmarklink_torrent_<?=$GroupID?> brackets add_bookmark" title="Add bookmark" onclick="Bookmark('torrent',<?=$GroupID?>,'Unbookmark');return false;">Bookmark</a>
|
||||
<? } ?>
|
||||
</span>
|
||||
|
||||
|
@ -221,9 +221,9 @@
|
||||
<td>
|
||||
<strong><?=$DisplayName?></strong> <!--<?Votes::vote_link($GroupID,$UserVotes[$GroupID]['Type']);?>-->
|
||||
<? if($IsBookmarked) { ?>
|
||||
<span class="bookmark" style="float:right;"><a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="brackets remove_bookmark" title="Remove bookmark" onclick="Unbookmark('torrent',<?=$GroupID?>,'Bookmark');return false;">Unbookmark</a></span>
|
||||
<span class="bookmark" style="float:right;"><a href="#" class="bookmarklink_torrent_<?=$GroupID?> brackets remove_bookmark" title="Remove bookmark" onclick="Unbookmark('torrent',<?=$GroupID?>,'Bookmark');return false;">Unbookmark</a></span>
|
||||
<? } else { ?>
|
||||
<span class="bookmark" style="float:right;"><a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="brackets add_bookmark" title="Add bookmark" onclick="Bookmark('torrent',<?=$GroupID?>,'Unbookmark');return false;">Bookmark</a></span>
|
||||
<span class="bookmark" style="float:right;"><a href="#" class="bookmarklink_torrent_<?=$GroupID?> brackets add_bookmark" title="Add bookmark" onclick="Bookmark('torrent',<?=$GroupID?>,'Unbookmark');return false;">Bookmark</a></span>
|
||||
<? } ?>
|
||||
<?=$TorrentTags?>
|
||||
</td>
|
||||
|
@ -151,7 +151,6 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
foreach ($SearchBitrates as $ID=>$Val) {
|
||||
$SearchBitrates[$ID] = strtolower($Val);
|
||||
}
|
||||
|
||||
foreach ($Formats as $ID => $Val) {
|
||||
$SearchFormats[$ID] = strtolower($Val);
|
||||
}
|
||||
@ -595,7 +594,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
<td colspan="4" class="center ft_edition_expand"><a href="#" class="brackets" onclick="ToggleEditionRows();return false;">Click here to toggle searching for specific remaster information</a></td>
|
||||
</tr>
|
||||
<?
|
||||
if (Format::form('remastertitle', true) == "" && Format::form('remasteryear', true) == "" &&
|
||||
if (Format::form('remastertitle', true) == "" && Format::form('remasteryear', true) == "" &&
|
||||
Format::form('remasterrecordlabel', true) == "" && Format::form('remastercataloguenumber', true) == "") {
|
||||
$Hidden = 'hidden';
|
||||
} else {
|
||||
@ -999,7 +998,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
$FirstUnknown = !isset($FirstUnknown);
|
||||
}
|
||||
$SnatchedTorrentClass = $Data['IsSnatched'] ? ' snatched_torrent' : '';
|
||||
|
||||
|
||||
if (isset($GroupedCategories[$CategoryID-1])
|
||||
&& ($Data['RemasterTitle'] != $LastRemasterTitle
|
||||
|| $Data['RemasterYear'] != $LastRemasterYear
|
||||
@ -1098,7 +1097,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
[ <a href="torrents.php?action=download&id=<?=$TorrentID?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download">DL</a>
|
||||
<? if (Torrents::can_use_token($Data)) { ?>
|
||||
| <a href="torrents.php?action=download&id=<?=$TorrentID ?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>&usetoken=1" title="Use a FL Token" onclick="return confirm('Are you sure you want to use a freeleech token here?');">FL</a>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
| <a href="reportsv2.php?action=report&id=<?=$TorrentID?>" title="Report">RP</a> ]
|
||||
</span>
|
||||
<?=$DisplayName?>
|
||||
|
@ -79,8 +79,6 @@
|
||||
$Properties['FreeLeechType'] = $FreeType;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//******************************************************************************//
|
||||
//--------------- Validate data in edit form -----------------------------------//
|
||||
|
||||
@ -120,7 +118,7 @@
|
||||
header("Location: torrents.php?action=edit&id=$TorrentID");
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
$Validate->SetFields('remaster_title',
|
||||
'0','string','Remaster title must be between 2 and 80 characters.',array('maxlength'=>80, 'minlength'=>2));
|
||||
|
||||
@ -129,43 +127,43 @@
|
||||
header("Location: torrents.php?action=edit&id=$TorrentID");
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
$Validate->SetFields('remaster_record_label',
|
||||
'0','string','Remaster record label must be between 2 and 80 characters.',array('maxlength'=>80, 'minlength'=>2));
|
||||
|
||||
|
||||
$Validate->SetFields('remaster_catalogue_number',
|
||||
'0','string','Remaster catalogue number must be between 2 and 80 characters.',array('maxlength'=>80, 'minlength'=>2));
|
||||
|
||||
|
||||
|
||||
|
||||
$Validate->SetFields('format',
|
||||
'1','inarray','Not a valid format.',array('inarray'=>$Formats));
|
||||
|
||||
|
||||
$Validate->SetFields('bitrate',
|
||||
'1','inarray','You must choose a bitrate.', array('inarray'=>$Bitrates));
|
||||
|
||||
|
||||
|
||||
|
||||
// Handle 'other' bitrates
|
||||
if($Properties['Encoding'] == 'Other') {
|
||||
$Validate->SetFields('other_bitrate',
|
||||
'1','text','You must enter the other bitrate (max length: 9 characters).', array('maxlength'=>9));
|
||||
$enc = trim($_POST['other_bitrate']);
|
||||
if(isset($_POST['vbr'])) { $enc.=' (VBR)'; }
|
||||
|
||||
|
||||
$Properties['Encoding'] = $enc;
|
||||
$Properties['Bitrate'] = $enc;
|
||||
} else {
|
||||
$Validate->SetFields('bitrate',
|
||||
'1','inarray','You must choose a bitrate.', array('inarray'=>$Bitrates));
|
||||
}
|
||||
|
||||
|
||||
$Validate->SetFields('media',
|
||||
'1','inarray','Not a valid media.',array('inarray'=>$Media));
|
||||
|
||||
|
||||
$Validate->SetFields('release_desc',
|
||||
'0','string','Invalid release description.',array('maxlength'=>1000000, 'minlength'=>0));
|
||||
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case 'Audiobooks':
|
||||
case 'Comedy':
|
||||
/*$Validate->SetFields('title',
|
||||
@ -173,33 +171,33 @@
|
||||
^ this is commented out because there is no title field on these pages*/
|
||||
$Validate->SetFields('year',
|
||||
'1','number','The year of the release must be entered.');
|
||||
|
||||
|
||||
$Validate->SetFields('format',
|
||||
'1','inarray','Not a valid format.',array('inarray'=>$Formats));
|
||||
|
||||
|
||||
$Validate->SetFields('bitrate',
|
||||
'1','inarray','You must choose a bitrate.', array('inarray'=>$Bitrates));
|
||||
|
||||
|
||||
|
||||
|
||||
// Handle 'other' bitrates
|
||||
if($Properties['Encoding'] == 'Other') {
|
||||
$Validate->SetFields('other_bitrate',
|
||||
'1','text','You must enter the other bitrate (max length: 9 characters).', array('maxlength'=>9));
|
||||
$enc = trim($_POST['other_bitrate']);
|
||||
if(isset($_POST['vbr'])) { $enc.=' (VBR)'; }
|
||||
|
||||
|
||||
$Properties['Encoding'] = $enc;
|
||||
$Properties['Bitrate'] = $enc;
|
||||
} else {
|
||||
$Validate->SetFields('bitrate',
|
||||
'1','inarray','You must choose a bitrate.', array('inarray'=>$Bitrates));
|
||||
}
|
||||
|
||||
|
||||
$Validate->SetFields('release_desc',
|
||||
'0','string','The release description has a minimum length of 10 characters.',array('maxlength'=>1000000, 'minlength'=>10));
|
||||
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case 'Applications':
|
||||
case 'Comics':
|
||||
case 'E-Books':
|
||||
@ -278,15 +276,15 @@
|
||||
// Update info for the torrent
|
||||
$SQL = "
|
||||
UPDATE torrents SET
|
||||
Media=$T[Media],
|
||||
Format=$T[Format],
|
||||
Media=$T[Media],
|
||||
Format=$T[Format],
|
||||
Encoding=$T[Encoding],
|
||||
RemasterYear=$T[RemasterYear],
|
||||
Remastered=$T[Remastered],
|
||||
RemasterTitle=$T[RemasterTitle],
|
||||
RemasterRecordLabel=$T[RemasterRecordLabel],
|
||||
RemasterYear=$T[RemasterYear],
|
||||
Remastered=$T[Remastered],
|
||||
RemasterTitle=$T[RemasterTitle],
|
||||
RemasterRecordLabel=$T[RemasterRecordLabel],
|
||||
RemasterCatalogueNumber=$T[RemasterCatalogueNumber],
|
||||
Scene=$T[Scene],
|
||||
Scene=$T[Scene],
|
||||
Description=$T[TorrentDescription],";
|
||||
|
||||
if(check_perms('torrents_freeleech')) {
|
||||
@ -357,7 +355,7 @@
|
||||
if ($caID && !$Properties['CassetteApproved']) {
|
||||
$DB->query("DELETE FROM torrents_cassette_approved WHERE TorrentID='$TorrentID'");
|
||||
}
|
||||
|
||||
|
||||
$DB->query("SELECT TorrentID FROM torrents_lossymaster_approved WHERE TorrentID='$TorrentID'");
|
||||
list($lmaID) = $DB->next_record();
|
||||
|
||||
|
@ -27,6 +27,31 @@
|
||||
if(!empty($_GET['action']) && $_GET['action'] == 'revert') { // if we're reverting to a previous revision
|
||||
$RevisionID=$_GET['revisionid'];
|
||||
if(!is_number($RevisionID)) { error(0); }
|
||||
|
||||
// to cite from merge: "Everything is legit, let's just confim they're not retarded"
|
||||
if(empty($_GET['confirm'])) {
|
||||
View::show_header();
|
||||
?>
|
||||
<div class="center thin">
|
||||
<div class="header">
|
||||
<h2>Revert Confirm!</h2>
|
||||
</div>
|
||||
<div class="box pad">
|
||||
<form class="confirm_form" name="torrent_group" action="torrents.php" method="get">
|
||||
<input type="hidden" name="action" value="revert" />
|
||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
<input type="hidden" name="confirm" value="true" />
|
||||
<input type="hidden" name="groupid" value="<?=$GroupID?>" />
|
||||
<input type="hidden" name="revisionid" value="<?=$RevisionID?>" />
|
||||
<h3>You are attempting to revert to the revision <a href="torrents.php?id=<?=$GroupID?>&revisionid=<?=$RevisionID?>"><?=$RevisionID?></a>.</h3>
|
||||
<input type="submit" value="Confirm" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
View::show_footer();
|
||||
die();
|
||||
}
|
||||
} else { // with edit, the variables are passed with POST
|
||||
$Body = $_POST['body'];
|
||||
$Image = $_POST['image'];
|
||||
|
@ -19,47 +19,75 @@
|
||||
error(0);
|
||||
}
|
||||
|
||||
$DB->query("SELECT ArtistID, AliasID, Redirect, Name FROM artists_alias WHERE Name = '$ArtistName'");
|
||||
if($DB->record_count() == 0) {
|
||||
$Redirect = 0;
|
||||
$DB->query("INSERT INTO artists_group (Name) VALUES ('$ArtistName')");
|
||||
$ArtistID = $DB->inserted_id();
|
||||
$DB->query("INSERT INTO artists_alias (ArtistID, Name) VALUES ('$ArtistID', '$ArtistName')");
|
||||
list($AliasID) = $DB->next_record();
|
||||
} else {
|
||||
list($ArtistID, $AliasID, $Redirect, $ArtistName) = $DB->next_record();
|
||||
if($Redirect) {
|
||||
$AliasID = $Redirect;
|
||||
}
|
||||
}
|
||||
|
||||
$DB->query("INSERT INTO torrents_group
|
||||
(ArtistID, NumArtists, CategoryID, Name, Year, Time, WikiBody, WikiImage, SearchText)
|
||||
VALUES
|
||||
($ArtistID, '1', '1', '$Title', '$Year', '".sqltime()."', '', '', '$SearchText')");
|
||||
$GroupID = $DB->inserted_id();
|
||||
|
||||
$DB->query("INSERT INTO torrents_artists
|
||||
(GroupID, ArtistID, AliasID, Importance, UserID) VALUES
|
||||
('$GroupID', '$ArtistID', '$AliasID', '1', '$LoggedUser[ID]')");
|
||||
|
||||
$DB->query("UPDATE torrents SET
|
||||
GroupID='$GroupID'
|
||||
WHERE ID='$TorrentID'");
|
||||
|
||||
// Delete old group if needed
|
||||
$DB->query("SELECT ID FROM torrents WHERE GroupID='$OldGroupID'");
|
||||
if($DB->record_count() == 0) {
|
||||
Torrents::delete_group($OldGroupID);
|
||||
} else {
|
||||
Torrents::update_hash($OldGroupID);
|
||||
}
|
||||
|
||||
Torrents::update_hash($GroupID);
|
||||
|
||||
$Cache->delete_value('torrent_download_'.$TorrentID);
|
||||
|
||||
Misc::write_log("Torrent $TorrentID was edited by " . $LoggedUser['Username']);
|
||||
|
||||
header("Location: torrents.php?id=$GroupID");
|
||||
//Everything is legit, let's just confim they're not retarded
|
||||
if(empty($_POST['confirm'])) {
|
||||
View::show_header();
|
||||
?>
|
||||
<div class="center thin">
|
||||
<div class="header">
|
||||
<h2>Split Confirm!</h2>
|
||||
</div>
|
||||
<div class="box pad">
|
||||
<form class="confirm_form" name="torrent_group" action="torrents.php" method="post">
|
||||
<input type="hidden" name="action" value="newgroup" />
|
||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
<input type="hidden" name="confirm" value="true" />
|
||||
<input type="hidden" name="torrentid" value="<?=$TorrentID?>" />
|
||||
<input type="hidden" name="oldgroupid" value="<?=$OldGroupID?>" />
|
||||
<input type="hidden" name="artist" value="<?=display_str($_POST['artist'])?>" />
|
||||
<input type="hidden" name="title" value="<?=display_str($_POST['title'])?>" />
|
||||
<input type="hidden" name="year" value="<?=$Year?>" />
|
||||
<h3>You are attempting to split the torrent <a href="torrents.php?torrentid=<?=$TorrentID?>"><?=$TorrentID?></a> off into a new group:</h3>
|
||||
<ul><li><?=display_str($_POST['artist'])?> - <?=display_str($_POST['title'])?> [<?=$Year?>]</li></ul>
|
||||
<input type="submit" value="Confirm" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
View::show_footer();
|
||||
} else {
|
||||
$DB->query("SELECT ArtistID, AliasID, Redirect, Name FROM artists_alias WHERE Name = '$ArtistName'");
|
||||
if($DB->record_count() == 0) {
|
||||
$Redirect = 0;
|
||||
$DB->query("INSERT INTO artists_group (Name) VALUES ('$ArtistName')");
|
||||
$ArtistID = $DB->inserted_id();
|
||||
$DB->query("INSERT INTO artists_alias (ArtistID, Name) VALUES ('$ArtistID', '$ArtistName')");
|
||||
$AliasID = $DB->inserted_id();
|
||||
} else {
|
||||
list($ArtistID, $AliasID, $Redirect, $ArtistName) = $DB->next_record();
|
||||
if($Redirect) {
|
||||
$AliasID = $Redirect;
|
||||
}
|
||||
}
|
||||
|
||||
$DB->query("INSERT INTO torrents_group
|
||||
(ArtistID, NumArtists, CategoryID, Name, Year, Time, WikiBody, WikiImage, SearchText)
|
||||
VALUES
|
||||
($ArtistID, '1', '1', '$Title', '$Year', '".sqltime()."', '', '', '$SearchText')");
|
||||
$GroupID = $DB->inserted_id();
|
||||
|
||||
$DB->query("INSERT INTO torrents_artists
|
||||
(GroupID, ArtistID, AliasID, Importance, UserID) VALUES
|
||||
('$GroupID', '$ArtistID', '$AliasID', '1', '$LoggedUser[ID]')");
|
||||
|
||||
$DB->query("UPDATE torrents SET
|
||||
GroupID='$GroupID'
|
||||
WHERE ID='$TorrentID'");
|
||||
|
||||
// Delete old group if needed
|
||||
$DB->query("SELECT ID FROM torrents WHERE GroupID='$OldGroupID'");
|
||||
if($DB->record_count() == 0) {
|
||||
Torrents::delete_group($OldGroupID);
|
||||
} else {
|
||||
Torrents::update_hash($OldGroupID);
|
||||
}
|
||||
|
||||
Torrents::update_hash($GroupID);
|
||||
|
||||
$Cache->delete_value('torrent_download_'.$TorrentID);
|
||||
|
||||
Misc::write_log("Torrent $TorrentID was edited by " . $LoggedUser['Username']);
|
||||
|
||||
header("Location: torrents.php?id=$GroupID");
|
||||
}
|
||||
?>
|
||||
|
@ -11,7 +11,7 @@ function header_link($SortKey,$DefaultWay="DESC") {
|
||||
if($Way=="DESC") { $NewWay="ASC"; }
|
||||
else { $NewWay="DESC"; }
|
||||
} else { $NewWay=$DefaultWay; }
|
||||
|
||||
|
||||
return "torrents.php?way=".$NewWay."&order=".$SortKey."&".Format::get_url(array('way','order'));
|
||||
}
|
||||
|
||||
@ -40,7 +40,6 @@ function header_link($SortKey,$DefaultWay="DESC") {
|
||||
}
|
||||
|
||||
$SearchWhere = array();
|
||||
|
||||
if(!empty($_GET['format'])) {
|
||||
if(in_array($_GET['format'], $Formats)) {
|
||||
$SearchWhere[]="t.Format='".db_string($_GET['format'])."'";
|
||||
@ -222,9 +221,9 @@ function header_link($SortKey,$DefaultWay="DESC") {
|
||||
Size bigint(12) unsigned,
|
||||
PRIMARY KEY (TorrentID)) CHARSET=utf8");
|
||||
$DB->query("INSERT IGNORE INTO temp_sections_torrents_user SELECT
|
||||
t.GroupID,
|
||||
t.ID AS TorrentID,
|
||||
$Time AS Time,
|
||||
t.GroupID,
|
||||
t.ID AS TorrentID,
|
||||
$Time AS Time,
|
||||
tg.CategoryID,
|
||||
t.Seeders,
|
||||
t.Leechers,
|
||||
@ -235,14 +234,14 @@ function header_link($SortKey,$DefaultWay="DESC") {
|
||||
JOIN torrents_group AS tg ON tg.ID=t.GroupID
|
||||
LEFT JOIN torrents_artists AS ta ON ta.GroupID=tg.ID
|
||||
LEFT JOIN artists_alias AS aa ON aa.AliasID=ta.AliasID
|
||||
WHERE $UserField='$UserID' $ExtraWhere $SearchWhere
|
||||
WHERE $UserField='$UserID' $ExtraWhere $SearchWhere
|
||||
GROUP BY TorrentID, Time");
|
||||
|
||||
|
||||
if(!empty($_GET['search']) && trim($_GET['search']) != '') {
|
||||
$Words = array_unique(explode(' ', db_string($_GET['search'])));
|
||||
}
|
||||
|
||||
$SQL = "SELECT SQL_CALC_FOUND_ROWS
|
||||
$SQL = "SELECT SQL_CALC_FOUND_ROWS
|
||||
GroupID, TorrentID, Time, CategoryID
|
||||
FROM temp_sections_torrents_user";
|
||||
if(!empty($Words)) {
|
||||
@ -294,12 +293,12 @@ function header_link($SortKey,$DefaultWay="DESC") {
|
||||
<? foreach($Bitrates as $BitrateName) { ?>
|
||||
<option value="<?=display_str($BitrateName); ?>" <?Format::selected('bitrate', $BitrateName)?>><?=display_str($BitrateName); ?></option>
|
||||
<? } ?> </select>
|
||||
|
||||
|
||||
<select name="format" class="ft_format">
|
||||
<option value="">Format</option>
|
||||
<? foreach($Formats as $FormatName) { ?>
|
||||
<option value="<?=display_str($FormatName); ?>" <?Format::selected('format', $FormatName)?>><?=display_str($FormatName); ?></option>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
<option value="perfectflac" <?Format::selected('filter', 'perfectflac')?>>Perfect FLACs</option>
|
||||
</select>
|
||||
<select name="media" class="ft_media">
|
||||
@ -351,7 +350,7 @@ function header_link($SortKey,$DefaultWay="DESC") {
|
||||
<input type="radio" name="tags_type" id="tags_type1" value="1" <?Format::selected('tags_type',1,'checked')?> /><label for="tags_type1"> All</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="label"><strong>Order by</strong></td>
|
||||
<td>
|
||||
@ -368,7 +367,7 @@ function header_link($SortKey,$DefaultWay="DESC") {
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<table class="layout cat_list">
|
||||
<?
|
||||
$x=0;
|
||||
@ -424,10 +423,10 @@ function header_link($SortKey,$DefaultWay="DESC") {
|
||||
$Results = $Results['matches'];
|
||||
foreach($TorrentsInfo as $TorrentID=>$Info) {
|
||||
list($GroupID,, $Time, $CategoryID) = array_values($Info);
|
||||
|
||||
|
||||
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists, $ExtendedArtists, $GroupFlags) = array_values($Results[$GroupID]);
|
||||
$Torrent = $Torrents[$TorrentID];
|
||||
|
||||
|
||||
$TagList = explode(' ',str_replace('_','.',$TagList));
|
||||
|
||||
$TorrentTags = array();
|
||||
@ -435,7 +434,7 @@ function header_link($SortKey,$DefaultWay="DESC") {
|
||||
$TorrentTags[]='<a href="torrents.php?type='.$Action.'&userid='.$UserID.'&tags='.$Tag.'">'.$Tag.'</a>';
|
||||
}
|
||||
$TorrentTags = implode(', ', $TorrentTags);
|
||||
|
||||
|
||||
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5])) {
|
||||
unset($ExtendedArtists[2]);
|
||||
unset($ExtendedArtists[3]);
|
||||
@ -448,7 +447,7 @@ function header_link($SortKey,$DefaultWay="DESC") {
|
||||
$DisplayName.='<a href="torrents.php?id='.$GroupID.'&torrentid='.$TorrentID.'" title="View Torrent">'.$GroupName.'</a>';
|
||||
if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; }
|
||||
if($GroupVanityHouse) { $DisplayName .= ' [<abbr title="This is a vanity house release">VH</abbr>]'; }
|
||||
|
||||
|
||||
$ExtraInfo = Torrents::torrent_info($Torrent);
|
||||
if($ExtraInfo) {
|
||||
$DisplayName.=' - '.$ExtraInfo;
|
||||
|
@ -8,6 +8,10 @@
|
||||
$ExtraFile = fopen($Name, 'rb'); // open file for reading
|
||||
$ExtraContents = fread($ExtraFile, 10000000);
|
||||
$ExtraTor = new TORRENT($ExtraContents); // New TORRENT object
|
||||
if (isset($ExtraTor->Val['info']->Val['encrypted_files'])) {
|
||||
$Err = "At least one of the torrents contain an encrypted file list which is not supported here";
|
||||
break;
|
||||
}
|
||||
|
||||
// Remove uploader's passkey from the torrent.
|
||||
// We put the downloader's passkey in on download, so it doesn't matter what's in there now,
|
||||
@ -36,14 +40,13 @@
|
||||
}
|
||||
|
||||
// Add file and size to array
|
||||
$ExtraTmpFileList[] = $ExtraName . '{{{' . $ExtraSize . '}}}'; // Name {{{Size}}}
|
||||
$ExtraTmpFileList[] = Torrents::filelist_format_file($ExtraFile);
|
||||
}
|
||||
|
||||
// To be stored in the database
|
||||
$ExtraFilePath = isset($ExtraTor->Val['info']->Val['files']) ? db_string(Format::make_utf8($ExtraDirName)) : "";
|
||||
$ExtraTorrentsInsert[$Name]['FilePath'] = $ExtraFilePath;
|
||||
// Name {{{Size}}}|||Name {{{Size}}}|||Name {{{Size}}}|||Name {{{Size}}}
|
||||
$ExtraFileString = "'" . db_string(Format::make_utf8(implode('|||', $ExtraTmpFileList))) . "'";
|
||||
$ExtraFileString = db_string(implode("\n", $ExtraTmpFileList));
|
||||
$ExtraTorrentsInsert[$Name]['FileString'] = $ExtraFileString;
|
||||
// Number of files described in torrent
|
||||
$ExtraNumFiles = count($ExtraFileList);
|
||||
|
@ -12,7 +12,7 @@
|
||||
Description, LogScore, FreeTorrent, FreeLeechType)
|
||||
VALUES
|
||||
(" . $GroupID . ", " . $LoggedUser['ID'] . ", " . $T['Media'] . ", " . $ExtraTorrent['Format'] . ", " . $ExtraTorrent['Encoding'] . ",
|
||||
" . $T['Remastered'] . ", " . $T['RemasterYear'] . ", " . $T['RemasterTitle'] . ", " . $T['RemasterRecordLabel'] . ", " . $T['RemasterCatalogueNumber'] . ", " . $ExtraHasLog . ", " . $ExtraHasCue . ", '" . db_string($ExtraTorrent['InfoHash']) . "', " . $ExtraTorrent['NumFiles'] . ", " . $ExtraTorrent['FileString'] . ", '" . $ExtraTorrent['FilePath'] . "', " . $ExtraTorrent['TotalSize'] . ", '" . sqltime() . "',
|
||||
" . $T['Remastered'] . ", " . $T['RemasterYear'] . ", " . $T['RemasterTitle'] . ", " . $T['RemasterRecordLabel'] . ", " . $T['RemasterCatalogueNumber'] . ", " . $ExtraHasLog . ", " . $ExtraHasCue . ", '" . db_string($ExtraTorrent['InfoHash']) . "', " . $ExtraTorrent['NumFiles'] . ", '" . $ExtraTorrent['FileString'] . "', '" . $ExtraTorrent['FilePath'] . "', " . $ExtraTorrent['TotalSize'] . ", '" . sqltime() . "',
|
||||
" . $ExtraTorrent['TorrentDescription'] . ", '" . (($HasLog == "'1'") ? $LogScoreAverage : 0) . "', '" . $T['FreeLeech'] . "', '" . $T['FreeLeechType'] . "')");
|
||||
|
||||
$Cache->increment('stats_torrent_count');
|
||||
|
@ -351,6 +351,9 @@
|
||||
$Contents = fread($File, 10000000);
|
||||
$Tor = new TORRENT($Contents); // New TORRENT object
|
||||
|
||||
if (isset($Tor->Val['info']->Val['encrypted_files'])) {
|
||||
$Err = "This torrent contains an encrypted file list which is not supported here";
|
||||
}
|
||||
// Remove uploader's passkey from the torrent.
|
||||
// We put the downloader's passkey in on download, so it doesn't matter what's in there now,
|
||||
// so long as it's not useful to any leet hax0rs looking in an unprotected /torrents/ directory
|
||||
|
@ -51,7 +51,7 @@
|
||||
<? if (($Override=check_paranoia_here('collagecontribs+'))) { ?>
|
||||
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?>>Collages contributed to: <? echo number_format($NumCollageContribs); ?>
|
||||
<? if (($Override=check_paranoia_here('collagecontribs'))) { ?>
|
||||
<a href="collages.php?userid=<?$UserID?>&contrib=1" class="brackets<?= ($Override===2) ? ' paranoia_override' : '' ?>" title="View">View</a>
|
||||
<a href="collages.php?userid=<?=$UserID?>&contrib=1" class="brackets<?= ($Override===2) ? ' paranoia_override' : '' ?>" title="View">View</a>
|
||||
<? } ?>
|
||||
</li>
|
||||
<? } ?>
|
||||
|
@ -4,7 +4,10 @@
|
||||
?>
|
||||
<div class="thin">
|
||||
<div class="header">
|
||||
<h2>Notify me of all new torrents with...<a href="torrents.php?action=notify">(View)</a></h2>
|
||||
<h2>Notify me of all new torrents with...</h2>
|
||||
<div class="linkbox">
|
||||
<a href="torrents.php?action=notify" class="brackets">View notifications</a>
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
$DB->query("SELECT ID, Label, Artists, ExcludeVA, NewGroupsOnly, Tags, NotTags, ReleaseTypes, Categories, Formats, Encodings, Media, FromYear, ToYear FROM users_notify_filters WHERE UserID='$LoggedUser[ID]' UNION ALL SELECT NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL");
|
||||
@ -15,7 +18,7 @@
|
||||
|
||||
foreach($Notifications as $N) { //$N stands for Notifications
|
||||
$N['Artists'] = implode(', ', explode('|', substr($N['Artists'],1,-1)));
|
||||
$N['Tags'] = implode(', ', explode('|', substr($N['Tags'],1,-1)));
|
||||
$N['Tags'] = implode(', ', explode('|', substr($N['Tags'],1,-1)));
|
||||
$N['NotTags'] = implode(', ', explode('|', substr($N['NotTags'],1,-1)));
|
||||
$N['ReleaseTypes'] = explode('|', substr($N['ReleaseTypes'],1,-1));
|
||||
$N['Categories'] = explode('|', substr($N['Categories'],1,-1));
|
||||
@ -46,7 +49,7 @@
|
||||
<td class="label"><strong>Label</strong></td>
|
||||
<td>
|
||||
<input type="text" name="label<?=$i?>" style="width: 100%" />
|
||||
<p class="min_padding">A label for the filter set, to tell different filters apart.</p>
|
||||
<p class="min_padding">A label/name for the filter set to tell different filters apart.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -61,7 +64,7 @@
|
||||
<td class="label"><strong>One of these artists</strong></td>
|
||||
<td>
|
||||
<textarea name="artists<?=$i?>" style="width:100%" rows="5"><?=display_str($N['Artists'])?></textarea>
|
||||
<p class="min_padding">Comma-separated list - eg. <em>Pink Floyd, Led Zeppelin, Neil Young</em></p>
|
||||
<p class="min_padding">Comma-separated list — e.g. <em>Pink Floyd, Led Zeppelin, Neil Young</em></p>
|
||||
<input type="checkbox" name="excludeva<?=$i?>" id="excludeva_<?=$N['ID']?>"<? if($N['ExcludeVA']=="1") { echo ' checked="checked"';} ?> />
|
||||
<label for="excludeva_<?=$N['ID']?>">Exclude Various Artists releases</label>
|
||||
</td>
|
||||
@ -70,14 +73,14 @@
|
||||
<td class="label"><strong>At least one of these tags</strong></td>
|
||||
<td>
|
||||
<textarea name="tags<?=$i?>" style="width:100%" rows="2"><?=display_str($N['Tags'])?></textarea>
|
||||
<p class="min_padding">Comma-separated list - eg. <em>rock, jazz, pop</em></p>
|
||||
<p class="min_padding">Comma-separated list — e.g. <em>rock, jazz, pop</em></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><strong>None of these tags</strong></td>
|
||||
<td>
|
||||
<textarea name="nottags<?=$i?>" style="width:100%" rows="2"><?=display_str($N['NotTags'])?></textarea>
|
||||
<p class="min_padding">Comma-separated list - eg. <em>rock, jazz, pop</em></p>
|
||||
<p class="min_padding">Comma-separated list — e.g. <em>rock, jazz, pop</em></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -152,4 +155,4 @@
|
||||
<? }
|
||||
} ?>
|
||||
</div>
|
||||
<? View::show_footer(); ?>
|
||||
<? View::show_footer(); ?>
|
||||
|
@ -199,11 +199,11 @@ function check_paranoia_here($Setting) {
|
||||
<? }
|
||||
if (check_perms('users_mod')) {
|
||||
?>
|
||||
<a href="userhistory.php?action=token_history&userid=<?=$UserID?>" class="brackets">FL Tokens</a>
|
||||
<a href="userhistory.php?action=token_history&userid=<?=$UserID?>" class="brackets">FL tokens</a>
|
||||
<? }
|
||||
if (check_perms('admin_clear_cache') && check_perms('users_override_paranoia')) {
|
||||
?>
|
||||
<a href="user.php?action=clearcache&id=<?=$UserID?>" class="brackets">Clear Cache</a>
|
||||
<a href="user.php?action=clearcache&id=<?=$UserID?>" class="brackets">Clear cache</a>
|
||||
<? } ?>
|
||||
</div>
|
||||
|
||||
@ -311,17 +311,17 @@ function check_paranoia_here($Setting) {
|
||||
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?> title="<?=Format::get_size($Downloaded)?>">Data downloaded: <?=$DownloadedRank === false ? 'Server busy' : number_format($DownloadedRank)?></li>
|
||||
<? } ?>
|
||||
<? if (($Override=check_paranoia_here('uploads+'))) { ?>
|
||||
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?> title="<?=$Uploads?>">Torrents uploaded: <?=$UploadsRank === false ? 'Server busy' : number_format($UploadsRank)?></li>
|
||||
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?> title="<?=number_format($Uploads)?>">Torrents uploaded: <?=$UploadsRank === false ? 'Server busy' : number_format($UploadsRank)?></li>
|
||||
<? } ?>
|
||||
<? if (($Override=check_paranoia_here('requestsfilled_count'))) { ?>
|
||||
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?> title="<?=$RequestsFilled?>">Requests filled: <?=$RequestRank === false ? 'Server busy' : number_format($RequestRank)?></li>
|
||||
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?> title="<?=number_format($RequestsFilled)?>">Requests filled: <?=$RequestRank === false ? 'Server busy' : number_format($RequestRank)?></li>
|
||||
<? } ?>
|
||||
<? if (($Override=check_paranoia_here('requestsvoted_bounty'))) { ?>
|
||||
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?> title="<?=Format::get_size($TotalSpent)?>">Bounty spent: <?=$BountyRank === false ? 'Server busy' : number_format($BountyRank)?></li>
|
||||
<? } ?>
|
||||
<li title="<?=$ForumPosts?>">Posts made: <?=$PostRank === false ? 'Server busy' : number_format($PostRank)?></li>
|
||||
<li title="<?=number_format($ForumPosts)?>">Posts made: <?=$PostRank === false ? 'Server busy' : number_format($PostRank)?></li>
|
||||
<? if (($Override=check_paranoia_here('artistsadded'))) { ?>
|
||||
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?> title="<?=$ArtistsAdded?>">Artists added: <?=$ArtistsRank === false ? 'Server busy' : number_format($ArtistsRank)?></li>
|
||||
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?> title="<?=number_format($ArtistsAdded)?>">Artists added: <?=$ArtistsRank === false ? 'Server busy' : number_format($ArtistsRank)?></li>
|
||||
<? } ?>
|
||||
<? if (check_paranoia_here(array('uploaded', 'downloaded', 'uploads+', 'requestsfilled_count', 'requestsvoted_bounty', 'artistsadded'))) { ?>
|
||||
<li><strong>Overall rank: <?=$OverallRank === false ? 'Server busy' : number_format($OverallRank)?></strong></li>
|
||||
|
Loading…
Reference in New Issue
Block a user