mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-31 10:31:37 +00:00
Empty commit
This commit is contained in:
parent
bef01d5177
commit
e601761312
@ -344,7 +344,7 @@ function show() {
|
||||
<select id="groupremasters" name="groupremasters" onchange="GroupRemaster()"<? if ($UnknownRelease) { echo ' disabled="disabled"';} ?>>
|
||||
<option value="">-------</option>
|
||||
<?
|
||||
$LastLine = "";
|
||||
$LastLine = '';
|
||||
|
||||
foreach ($GroupRemasters as $Index => $Remaster) {
|
||||
$Line = $Remaster['RemasterYear']." / ".$Remaster['RemasterTitle']." / ".$Remaster['RemasterRecordLabel']." / ".$Remaster['RemasterCatalogueNumber'];
|
||||
|
@ -198,13 +198,13 @@ public static function construct_file_name($Artist, $Album, $Year, $Media, $Form
|
||||
$TorrentInfo[] = $Encoding;
|
||||
}
|
||||
if (!empty($TorrentInfo)) {
|
||||
$TorrentInfo = " (" . Misc::file_string(implode(" - ", $TorrentInfo)) . ")";
|
||||
$TorrentInfo = ' (' . Misc::file_string(implode(' - ', $TorrentInfo)) . ')';
|
||||
} else {
|
||||
$TorrentInfo = "";
|
||||
$TorrentInfo = '';
|
||||
}
|
||||
|
||||
if (!$TorrentName) {
|
||||
$TorrentName = "No Name";
|
||||
$TorrentName = 'No Name';
|
||||
} elseif (mb_strlen($TorrentArtist . $TorrentName . $TorrentInfo, 'UTF-8') <= $MaxLength) {
|
||||
$TorrentName = $TorrentArtist . $TorrentName;
|
||||
}
|
||||
@ -222,7 +222,7 @@ public static function construct_file_name($Artist, $Album, $Year, $Media, $Form
|
||||
/**
|
||||
* Convert a stored torrent into a binary file that can be loaded in a torrent client
|
||||
*
|
||||
* @param mixed $TorrentData bencoded torrent without announce url (new format) or TORRENT object (old format)
|
||||
* @param mixed $TorrentData bencoded torrent without announce URL (new format) or TORRENT object (old format)
|
||||
* @return bencoded string
|
||||
*/
|
||||
public static function get_file(&$TorrentData, $AnnounceURL) {
|
||||
|
@ -5,14 +5,19 @@
|
||||
include(SERVER_ROOT.'/sections/torrents/functions.php');
|
||||
|
||||
// The "order by x" links on columns headers
|
||||
function header_link($SortKey,$DefaultWay="desc") {
|
||||
function header_link($SortKey,$DefaultWay = 'desc') {
|
||||
global $OrderBy,$OrderWay;
|
||||
if ($SortKey == $OrderBy) {
|
||||
if($OrderWay=="desc") { $NewWay="asc"; }
|
||||
else { $NewWay="desc"; }
|
||||
} else { $NewWay=$DefaultWay; }
|
||||
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'));
|
||||
return 'torrents.php?order_way='.$NewWay.'&order_by='.$SortKey.'&'.Format::get_url(array('order_way','order_by'));
|
||||
}
|
||||
|
||||
/** Start default parameters and validation **/
|
||||
@ -281,9 +286,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
if (!empty($Tags)) {
|
||||
$QueryParts[] = implode(' ', $Tags);
|
||||
}
|
||||
}
|
||||
// 'Any' tags
|
||||
else {
|
||||
} else { // 'Any' tags
|
||||
$_GET['tags_type'] = '0';
|
||||
if (!empty($Tags['include'])) {
|
||||
$QueryParts[] = '( '.implode(' | ', $Tags['include']).' )';
|
||||
@ -667,8 +670,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
'totalLeechers' => (int) $TotalLeechers,
|
||||
'torrents' => $JsonTorrents
|
||||
);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// Viewing a type that does not require grouping
|
||||
|
||||
list($TorrentID, $Data) = each($Torrents);
|
||||
|
@ -21,8 +21,7 @@
|
||||
|
||||
if (isset($_GET['pp'])) {
|
||||
$PerPage = $_GET['pp'];
|
||||
}
|
||||
else if (isset($LoggedUser['PostsPerPage'])) {
|
||||
} elseif (isset($LoggedUser['PostsPerPage'])) {
|
||||
$PerPage = $LoggedUser['PostsPerPage'];
|
||||
} else {
|
||||
$PerPage = POSTS_PER_PAGE;
|
||||
@ -66,9 +65,13 @@
|
||||
}
|
||||
// Make sure they're allowed to look at the page
|
||||
if (!check_perms('site_moderate_forums')) {
|
||||
if (isset($LoggedUser['CustomForums'][$ForumID]) && $LoggedUser['CustomForums'][$ForumID] === 0) { error(403); }
|
||||
if (isset($LoggedUser['CustomForums'][$ForumID]) && $LoggedUser['CustomForums'][$ForumID] === 0) {
|
||||
error(403);
|
||||
}
|
||||
}
|
||||
if ($LoggedUser['CustomForums'][$ForumID] != 1 && $Forums[$ForumID]['MinClassRead'] > $LoggedUser['Class']) {
|
||||
error(403);
|
||||
}
|
||||
if($LoggedUser['CustomForums'][$ForumID] != 1 && $Forums[$ForumID]['MinClassRead'] > $LoggedUser['Class']) { error(403); }
|
||||
|
||||
$ForumName = display_str($Forums[$ForumID]['Name']);
|
||||
$JsonSpecificRules = array();
|
||||
@ -91,8 +94,7 @@
|
||||
'threads' => array()
|
||||
)
|
||||
);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// forums_last_read_topics is a record of the last post a user read in a topic, and what page that was on
|
||||
$DB->query('SELECT
|
||||
l.TopicID,
|
||||
@ -134,7 +136,7 @@
|
||||
'lastID' => $LastID == null ? 0 : (int) $LastID,
|
||||
'lastTime' => $LastTime,
|
||||
'lastAuthorId' => $LastAuthorID == null ? 0 : (int) $LastAuthorID,
|
||||
'lastAuthorName' => $LastAuthorName == null ? "" : $LastAuthorName,
|
||||
'lastAuthorName' => $LastAuthorName == null ? '' : $LastAuthorName,
|
||||
'lastReadPage' => $LastRead[$TopicID]['Page'] == null ? 0 : (int) $LastRead[$TopicID]['Page'],
|
||||
'lastReadPostId' => $LastRead[$TopicID]['PostID'] == null ? 0 : (int) $LastRead[$TopicID]['PostID'],
|
||||
'read' => $Read == "read"
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?
|
||||
|
||||
|
||||
if (empty($_GET['type']) || $_GET['type'] == 'inbox' || $_GET['type'] == 'sentbox') {
|
||||
require(SERVER_ROOT.'/sections/ajax/inbox/inbox.php');
|
||||
} elseif ($_GET['type'] == 'viewconv') {
|
||||
|
@ -51,43 +51,43 @@
|
||||
$CanVote = (empty($TorrentID) && check_perms('site_vote'));
|
||||
|
||||
if ($CategoryID == 0) {
|
||||
$CategoryName = "Unknown";
|
||||
$CategoryName = 'Unknown';
|
||||
} else {
|
||||
$CategoryName = $Categories[$CategoryID - 1];
|
||||
}
|
||||
|
||||
//Do we need to get artists?
|
||||
if($CategoryName == "Music") {
|
||||
if ($CategoryName == 'Music') {
|
||||
$ArtistForm = get_request_artists($RequestID);
|
||||
$ArtistName = Artists::display_artists($ArtistForm, false, true);
|
||||
$ArtistLink = Artists::display_artists($ArtistForm, true, true);
|
||||
|
||||
if ($IsFilled) {
|
||||
$DisplayLink = $ArtistLink."<a href='torrents.php?torrentid=".$TorrentID."'>".$Title."</a> [".$Year."]";
|
||||
$DisplayLink = $ArtistLink."<a href=\"torrents.php?torrentid=".$TorrentID."\">".$Title."</a> [$Year]";
|
||||
} else {
|
||||
$DisplayLink = $ArtistLink.$Title." [".$Year."]";
|
||||
$DisplayLink = $ArtistLink.$Title." [$Year]";
|
||||
}
|
||||
$FullName = $ArtistName.$Title." [".$Year."]";
|
||||
$FullName = $ArtistName.$Title." [$Year]";
|
||||
|
||||
if($BitrateList != "") {
|
||||
$BitrateString = implode(", ", explode("|", $BitrateList));
|
||||
$FormatString = implode(", ", explode("|", $FormatList));
|
||||
$MediaString = implode(", ", explode("|", $MediaList));
|
||||
if ($BitrateList != '') {
|
||||
$BitrateString = implode(', ', explode('|', $BitrateList));
|
||||
$FormatString = implode(', ', explode('|', $FormatList));
|
||||
$MediaString = implode(', ', explode('|', $MediaList));
|
||||
} else {
|
||||
$BitrateString = "Unknown, please read the description.";
|
||||
$FormatString = "Unknown, please read the description.";
|
||||
$MediaString = "Unknown, please read the description.";
|
||||
$BitrateString = 'Unknown, please read the description.';
|
||||
$FormatString = 'Unknown, please read the description.';
|
||||
$MediaString = 'Unknown, please read the description.';
|
||||
}
|
||||
|
||||
if (empty($ReleaseType)) {
|
||||
$ReleaseName = "Unknown";
|
||||
$ReleaseName = 'Unknown';
|
||||
} else {
|
||||
$ReleaseName = $ReleaseTypes[$ReleaseType];
|
||||
}
|
||||
|
||||
} else if($CategoryName == "Audiobooks" || $CategoryName == "Comedy") {
|
||||
$FullName = $Title." [".$Year."]";
|
||||
$DisplayLink = $Title." [".$Year."]";
|
||||
} elseif ($CategoryName == 'Audiobooks' || $CategoryName == 'Comedy') {
|
||||
$FullName = $Title." [$Year]";
|
||||
$DisplayLink = $Title." [$Year]";
|
||||
} else {
|
||||
$FullName = $Title;
|
||||
$DisplayLink = $Title;
|
||||
@ -152,7 +152,8 @@
|
||||
// Cache catalogue from which the page is selected, allows block caches and future ability to specify posts per page
|
||||
$Catalogue = $Cache->get_value('request_comments_'.$RequestID.'_catalogue_'.$CatalogueID);
|
||||
if ($Catalogue === false) {
|
||||
$DB->query("SELECT
|
||||
$DB->query("
|
||||
SELECT
|
||||
c.ID,
|
||||
c.AuthorID,
|
||||
c.AddedTime,
|
||||
|
@ -2,15 +2,18 @@
|
||||
|
||||
authorize();
|
||||
|
||||
if ($UserID != $LoggedUser['ID'] || !Bookmarks::can_bookmark('torrent')) error(403);
|
||||
if ($UserID != $LoggedUser['ID'] || !Bookmarks::can_bookmark('torrent')) {
|
||||
error(403);
|
||||
}
|
||||
|
||||
if ($_POST['type'] === 'torrents') {
|
||||
// require_once SERVER_ROOT.'/classes/class_mass_user_bookmarks_editor.php'; //Bookmark Updater Class
|
||||
$BU = new MASS_USER_BOOKMARKS_EDITOR;
|
||||
if ($_POST['delete'])
|
||||
if ($_POST['delete']) {
|
||||
$BU->mass_remove();
|
||||
else if ($_POST['update'])
|
||||
} elseif ($_POST['update']) {
|
||||
$BU->mass_update();
|
||||
}
|
||||
}
|
||||
|
||||
header('Location: bookmarks.php?type=torrents');
|
@ -120,7 +120,7 @@
|
||||
if (count($Answers) < 2) {
|
||||
error('You cannot create a poll with only one answer.');
|
||||
} elseif (count($Answers) > 25) {
|
||||
error('You cannot create a poll with greater than 25 answers');
|
||||
error('You cannot create a poll with greater than 25 answers.');
|
||||
}
|
||||
|
||||
$DB->query('INSERT INTO forums_polls (TopicID, Question, Answers) VALUES (\''.$TopicID.'\',\''.db_string($Question).'\',\''.db_string(serialize($Answers)).'\')');
|
||||
@ -141,7 +141,7 @@
|
||||
}
|
||||
|
||||
if ($Stickies > 0) {
|
||||
$Part1 = array_slice($Forum,0,$Stickies,true); //Stikys
|
||||
$Part1 = array_slice($Forum,0,$Stickies,true); //Stickies
|
||||
$Part3 = array_slice($Forum,$Stickies,TOPICS_PER_PAGE-$Stickies-1,true); //Rest of page
|
||||
} else {
|
||||
$Part1 = array();
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
$ReportID = $_POST['reportid'];
|
||||
|
||||
$DB->query("SELECT Type FROM reports WHERE ID = ".$ReportID);
|
||||
$DB->query('SELECT Type FROM reports WHERE ID = '.$ReportID);
|
||||
list($Type) = $DB->next_record();
|
||||
if (!check_perms('admin_reports')) {
|
||||
if (check_perms('site_moderate_forums')) {
|
||||
@ -15,7 +15,7 @@
|
||||
ajax_error();
|
||||
}
|
||||
} elseif (check_perms('project_team')) {
|
||||
if($Type != "request_update") {
|
||||
if ($Type != 'request_update') {
|
||||
ajax_error();
|
||||
}
|
||||
}
|
||||
@ -30,13 +30,13 @@
|
||||
|
||||
$Channels = array();
|
||||
|
||||
if($Type == "request_update") {
|
||||
$Channels[] = "#requestedits";
|
||||
if ($Type == 'request_update') {
|
||||
$Channels[] = '#requestedits';
|
||||
$Cache->decrement('num_update_reports');
|
||||
}
|
||||
|
||||
if (in_array($Type, array('collages_comment', 'post', 'requests_comment', 'thread', 'torrents_comment'))) {
|
||||
$Channels[] = "#forumreports";
|
||||
$Channels[] = '#forumreports';
|
||||
$Cache->decrement('num_forum_reports');
|
||||
}
|
||||
|
||||
@ -45,15 +45,15 @@
|
||||
list($Remaining) = $DB->next_record();
|
||||
|
||||
foreach ($Channels as $Channel) {
|
||||
send_irc("PRIVMSG ".$Channel." :Report ".$ReportID." resolved by ".preg_replace("/^(.{2})/", "$1·", $LoggedUser['Username'])." on site (".(int)$Remaining." remaining).");
|
||||
send_irc("PRIVMSG $Channel :Report $ReportID resolved by ".preg_replace("/^(.{2})/", "$1·", $LoggedUser['Username'])." on site (".(int)$Remaining." remaining).");
|
||||
}
|
||||
|
||||
$Cache->delete_value('num_other_reports');
|
||||
|
||||
ajax_success();
|
||||
|
||||
function ajax_error($Error = "error") {
|
||||
echo json_encode(array("status"=>$Error));
|
||||
function ajax_error($Error = 'error') {
|
||||
echo json_encode(array('status'=>$Error));
|
||||
die();
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
error($Type);
|
||||
}
|
||||
} elseif (check_perms('project_team')) {
|
||||
if($Type != "request_update") {
|
||||
if ($Type != 'request_update') {
|
||||
error(403);
|
||||
}
|
||||
}
|
||||
@ -34,13 +34,13 @@
|
||||
|
||||
$Channels = array();
|
||||
|
||||
if($Type == "request_update") {
|
||||
$Channels[] = "#requestedits";
|
||||
if ($Type == 'request_update') {
|
||||
$Channels[] = '#requestedits';
|
||||
$Cache->decrement('num_update_reports');
|
||||
}
|
||||
|
||||
if (in_array($Type, array('collages_comment', 'post', 'requests_comment', 'thread', 'torrents_comment'))) {
|
||||
$Channels[] = "#forumreports";
|
||||
$Channels[] = '#forumreports';
|
||||
$Cache->decrement('num_forum_reports');
|
||||
}
|
||||
|
||||
|
@ -40,13 +40,13 @@
|
||||
|
||||
if (!$ID) {
|
||||
switch($View) {
|
||||
case "resolved" :
|
||||
$Title = "All the old smelly reports";
|
||||
case 'resolved' :
|
||||
$Title = 'All the old smelly reports';
|
||||
$Where = "WHERE r.Status = 'Resolved'";
|
||||
$Order = "ORDER BY r.LastChangeTime DESC";
|
||||
$Order = 'ORDER BY r.LastChangeTime DESC';
|
||||
break;
|
||||
case "unauto" :
|
||||
$Title = "New reports, not auto assigned!";
|
||||
case 'unauto' :
|
||||
$Title = 'New reports, not auto assigned!';
|
||||
$Where = "WHERE r.Status = 'New'";
|
||||
break;
|
||||
default :
|
||||
@ -55,7 +55,7 @@
|
||||
}
|
||||
} else {
|
||||
switch($View) {
|
||||
case "staff" :
|
||||
case 'staff' :
|
||||
$DB->query("SELECT Username FROM users_main WHERE ID=".$ID);
|
||||
list($Username) = $DB->next_record();
|
||||
if ($Username) {
|
||||
@ -65,7 +65,7 @@
|
||||
}
|
||||
$Where = "WHERE r.Status = 'InProgress' AND r.ResolverID = ".$ID;
|
||||
break;
|
||||
case "resolver" :
|
||||
case 'resolver' :
|
||||
$DB->query("SELECT Username FROM users_main WHERE ID=".$ID);
|
||||
list($Username) = $DB->next_record();
|
||||
if ($Username) {
|
||||
@ -74,43 +74,43 @@
|
||||
$Title = $ID."'s resolved reports";
|
||||
}
|
||||
$Where = "WHERE r.Status = 'Resolved' AND r.ResolverID = ".$ID;
|
||||
$Order = "ORDER BY r.LastChangeTime DESC";
|
||||
$Order = 'ORDER BY r.LastChangeTime DESC';
|
||||
break;
|
||||
case "group" :
|
||||
$Title = "Unresolved reports for the group ".$ID;
|
||||
case 'group' :
|
||||
$Title = "Unresolved reports for the group $ID";
|
||||
$Where = "WHERE r.Status != 'Resolved' AND tg.ID = ".$ID;
|
||||
break;
|
||||
case "torrent" :
|
||||
$Title = "All reports for the torrent ".$ID;
|
||||
$Where = "WHERE r.TorrentID = ".$ID;
|
||||
case 'torrent' :
|
||||
$Title = 'All reports for the torrent '.$ID;
|
||||
$Where = 'WHERE r.TorrentID = '.$ID;
|
||||
break;
|
||||
case "report" :
|
||||
$Title = "Viewing resolution of report ".$ID;
|
||||
$Where = "WHERE r.ID = ".$ID;
|
||||
case 'report' :
|
||||
$Title = 'Viewing resolution of report '.$ID;
|
||||
$Where = 'WHERE r.ID = '.$ID;
|
||||
break;
|
||||
case "reporter" :
|
||||
case 'reporter' :
|
||||
$DB->query("SELECT Username FROM users_main WHERE ID=".$ID);
|
||||
list($Username) = $DB->next_record();
|
||||
if ($Username) {
|
||||
$Title = "All torrents reported by ".$Username;
|
||||
$Title = 'All torrents reported by '.$Username;
|
||||
} else {
|
||||
$Title = "All torrents reported by user ".$ID;
|
||||
$Title = 'All torrents reported by user '.$ID;
|
||||
}
|
||||
$Where = "WHERE r.ReporterID = ".$ID;
|
||||
$Order = "ORDER BY r.ReportedTime DESC";
|
||||
$Where = 'WHERE r.ReporterID = '.$ID;
|
||||
$Order = 'ORDER BY r.ReportedTime DESC';
|
||||
break;
|
||||
case "uploader" :
|
||||
case 'uploader' :
|
||||
$DB->query("SELECT Username FROM users_main WHERE ID=".$ID);
|
||||
list($Username) = $DB->next_record();
|
||||
if ($Username) {
|
||||
$Title = "All reports for torrents uploaded by ".$Username;
|
||||
$Title = 'All reports for torrents uploaded by '.$Username;
|
||||
} else {
|
||||
$Title = "All reports for torrents uploaded by user ".$ID;
|
||||
$Title = 'All reports for torrents uploaded by user '.$ID;
|
||||
}
|
||||
$Where = "WHERE r.Status != 'Resolved' AND t.UserID = ".$ID;
|
||||
break;
|
||||
case "type":
|
||||
$Title = "All new reports for the chosen type";
|
||||
case 'type':
|
||||
$Title = 'All new reports for the chosen type';
|
||||
$Where = "WHERE r.Status = 'New' AND r.Type = '".$ID."'";
|
||||
break;
|
||||
break;
|
||||
@ -194,18 +194,19 @@
|
||||
<? include('header.php'); ?>
|
||||
</div>
|
||||
<div class="buttonbox thin center">
|
||||
<? if($View != "resolved") { ?>
|
||||
<? if ($View != 'resolved') { ?>
|
||||
<span title="Resolves *all* checked reports with their respective resolutions"><input type="button" onclick="MultiResolve();" value="Multi-resolve" /></span>
|
||||
<span title="Assigns all of the reports on the page to you!"><input type="button" onclick="Grab();" value="Claim all" /></span>
|
||||
<? }
|
||||
if ($View == 'staff' && $LoggedUser['ID'] == $ID) { ?>
|
||||
| <span title="Unclaim all of the reports currently displayed"><input type="button" onclick="GiveBack();" value="Unclaim all" /></span>
|
||||
<? } ?>
|
||||
<? if($View == "staff" && $LoggedUser['ID'] == $ID) { ?>| <span title="Unclaim all of the reports currently displayed"><input type="button" onclick="GiveBack();" value="Unclaim all" /></span><? } ?>
|
||||
</div>
|
||||
<br />
|
||||
<div class="linkbox">
|
||||
<?=$PageLinks?>
|
||||
</div>
|
||||
<div id="all_reports" style="width: 80%; margin-left: auto; margin-right: auto">
|
||||
|
||||
<div id="all_reports" style="width: 80%; margin-left: auto; margin-right: auto;">
|
||||
<?
|
||||
if (count($Reports) == 0) {
|
||||
?>
|
||||
@ -227,7 +228,7 @@
|
||||
$ModComment, $Tracks, $Images, $ExtraIDs, $Links, $LogMessage, $GroupName, $GroupID, $ArtistID, $ArtistName, $Year, $CategoryID, $Time, $Remastered, $RemasterTitle,
|
||||
$RemasterYear, $Media, $Format, $Encoding, $Size, $HasCue, $HasLog, $LogScore, $UploaderID, $UploaderName) = Misc::display_array($Report, array("ModComment"));
|
||||
|
||||
if(!$GroupID && $Status != "Resolved") {
|
||||
if (!$GroupID && $Status != 'Resolved') {
|
||||
//Torrent already deleted
|
||||
$DB->query("UPDATE reportsv2 SET
|
||||
Status='Resolved',
|
||||
@ -261,17 +262,23 @@
|
||||
}
|
||||
}
|
||||
if ($ArtistID == 0 && empty($ArtistName)) {
|
||||
$RawName = $GroupName.($Year ? " ($Year)" : "").($Format || $Encoding || $Media ? " [$Format/$Encoding/$Media]" : "").($Remastered ? " <$RemasterTitle - $RemasterYear>" : "").($HasCue ? " (Cue)" : '').($HasLog ? " (Log: $LogScore %)" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
||||
$LinkName = "<a href='torrents.php?id=$GroupID'>$GroupName".($Year ? " ($Year)" : "")."</a> <a href='torrents.php?torrentid=$TorrentID'>".($Format || $Encoding || $Media ? " [$Format/$Encoding/$Media]" : "").($Remastered ? " <$RemasterTitle - $RemasterYear>" : "")."</a> ".($HasCue ? " (Cue)" : '').($HasLog ? " <a href='torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID'>(Log: $LogScore %)</a>" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
||||
$BBName = "[url=torrents.php?id=$GroupID]$GroupName".($Year ? " ($Year)" : "")."[/url] [url=torrents.php?torrentid=$TorrentID][$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "")."[/url] ".($HasCue ? " (Cue)" : '').($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID'](Log: $LogScore %)[/url]" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
||||
$RawName = $GroupName.($Year ? " ($Year)" : '').($Format || $Encoding || $Media ? " [$Format/$Encoding/$Media]" : '').($Remastered ? " <$RemasterTitle - $RemasterYear>" : '').($HasCue ? ' (Cue)' : '').($HasLog ? " (Log: $LogScore %)" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||
|
||||
$LinkName = "<a href=\"torrents.php?id=$GroupID\">$GroupName".($Year ? " ($Year)" : '')."</a> <a href=\"torrents.php?torrentid=$TorrentID\">".($Format || $Encoding || $Media ? " [$Format/$Encoding/$Media]" : '').($Remastered ? " <$RemasterTitle - $RemasterYear>" : '').'</a> '.($HasCue ? ' (Cue)' : '').($HasLog ? " <a href=\"torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID\">(Log: $LogScore %)</a>" : '')." (".number_format($Size/(1024*1024), 2)." MB)";
|
||||
|
||||
$BBName = "[url=torrents.php?id=$GroupID]$GroupName".($Year ? " ($Year)" : '')."[/url] [url=torrents.php?torrentid=$TorrentID][$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : '').'[/url] '.($HasCue ? ' (Cue)' : '').($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID](Log: $LogScore %)[/url]" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||
} elseif ($ArtistID == 0 && $ArtistName == 'Various Artists') {
|
||||
$RawName = "Various Artists - $GroupName".($Year ? " ($Year)" : "")." [$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "").($HasCue ? " (Cue)" : '').($HasLog ? " (Log: $LogScore %)" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
||||
$LinkName = "Various Artists - <a href='torrents.php?id=$GroupID'>$GroupName".($Year ? " ($Year)" : "")."</a> <a href='torrents.php?torrentid=$TorrentID'> [$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "")."</a> ".($HasCue ? " (Cue)" : '').($HasLog ? " <a href='torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID'>(Log: $LogScore %)</a>" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
||||
$BBName = "Various Artists - [url=torrents.php?id=$GroupID]$GroupName".($Year ? " ($Year)" : "")."[/url] [url=torrents.php?torrentid=$TorrentID][$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "")."[/url] ".($HasCue ? " (Cue)" : '').($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID'](Log: $LogScore %)[/url]" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
||||
$RawName = "Various Artists - $GroupName".($Year ? " ($Year)" : '')." [$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : '').($HasCue ? ' (Cue)' : '').($HasLog ? " (Log: $LogScore %)" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||
|
||||
$LinkName = "Various Artists - <a href=\"torrents.php?id=$GroupID\">$GroupName".($Year ? " ($Year)" : '')."</a> <a href=\"torrents.php?torrentid=$TorrentID\"> [$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : '').'</a> '.($HasCue ? ' (Cue)' : '').($HasLog ? " <a href=\"torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID\">(Log: $LogScore %)</a>" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||
|
||||
$BBName = "Various Artists - [url=torrents.php?id=$GroupID]$GroupName".($Year ? " ($Year)" : '')."[/url] [url=torrents.php?torrentid=$TorrentID][$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : '').'[/url] '.($HasCue ? ' (Cue)' : '').($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID](Log: $LogScore %)[/url]" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||
} else {
|
||||
$RawName = "$ArtistName - $GroupName".($Year ? " ($Year)" : "")." [$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "").($HasCue ? " (Cue)" : '').($HasLog ? " (Log: $LogScore %)" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
||||
$LinkName = "<a href='artist.php?id=$ArtistID'>$ArtistName</a> - <a href='torrents.php?id=$GroupID'>$GroupName".($Year ? " ($Year)" : "")."</a> <a href='torrents.php?torrentid=$TorrentID'> [$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "")."</a> ".($HasCue ? " (Cue)" : '').($HasLog ? " <a href='torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID'>(Log: $LogScore %)</a>" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
||||
$BBName = "[url=artist.php?id=$ArtistID]".$ArtistName."[/url] - [url=torrents.php?id=$GroupID]$GroupName".($Year ? " ($Year)" : "")."[/url] [url=torrents.php?torrentid=$TorrentID][$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "")."[/url] ".($HasCue ? " (Cue)" : '').($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID'](Log: $LogScore %)[/url]" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
||||
$RawName = "$ArtistName - $GroupName".($Year ? " ($Year)" : '')." [$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : '').($HasCue ? ' (Cue)' : '').($HasLog ? " (Log: $LogScore %)" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||
|
||||
$LinkName = "<a href='artist.php?id=$ArtistID'>$ArtistName</a> - <a href=\"torrents.php?id=$GroupID\">$GroupName".($Year ? " ($Year)" : '')."</a> <a href=\"torrents.php?torrentid=$TorrentID\"> [$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : '').'</a> '.($HasCue ? ' (Cue)' : '').($HasLog ? " <a href=\"torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID\">(Log: $LogScore %)</a>" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||
|
||||
$BBName = "[url=artist.php?id=$ArtistID]".$ArtistName."[/url] - [url=torrents.php?id=$GroupID]$GroupName".($Year ? " ($Year)" : '')."[/url] [url=torrents.php?torrentid=$TorrentID][$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : '').'[/url] '.($HasCue ? ' (Cue)' : '').($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID](Log: $LogScore %)[/url]" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||
}
|
||||
?>
|
||||
<div id="report<?=$ReportID?>">
|
||||
@ -305,7 +312,9 @@
|
||||
<a href="torrents.php?action=download&id=<?=$TorrentID?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download" class="brackets">DL</a>
|
||||
uploaded by <a href="user.php?id=<?=$UploaderID?>"><?=$UploaderName?></a> <?=time_diff($Time)?>
|
||||
<br />
|
||||
<? if ($ReporterName == "") { $ReporterName = "System"; } ?>
|
||||
<? if ($ReporterName == '') {
|
||||
$ReporterName = 'System';
|
||||
} ?>
|
||||
<div style="text-align: right;">was reported by <a href="user.php?id=<?=$ReporterID?>"><?=$ReporterName?></a> <?=time_diff($ReportedTime)?> for the reason: <strong><?=$ReportType['title']?></strong></div>
|
||||
<? if ($Status != 'Resolved') {
|
||||
|
||||
@ -364,41 +373,37 @@
|
||||
<tr>
|
||||
<td class="label">Relevant tracks:</td>
|
||||
<td colspan="3">
|
||||
<?=str_replace(" ", ", ", $Tracks)?>
|
||||
<?=str_replace(' ', ', ', $Tracks)?>
|
||||
</td>
|
||||
</tr>
|
||||
<? }
|
||||
|
||||
if($Links) {
|
||||
?>
|
||||
if ($Links) { ?>
|
||||
<tr>
|
||||
<td class="label">Relevant links:</td>
|
||||
<td colspan="3">
|
||||
<?
|
||||
$Links = explode(" ", $Links);
|
||||
$Links = explode(' ', $Links);
|
||||
foreach ($Links as $Link) {
|
||||
|
||||
if ($local_url = $Text->local_url($Link)) {
|
||||
$Link = $local_url;
|
||||
}
|
||||
?>
|
||||
} ?>
|
||||
<a href="<?=$Link?>"><?=$Link?></a>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
|
||||
if($ExtraIDs) {
|
||||
?>
|
||||
if ($ExtraIDs) { ?>
|
||||
<tr>
|
||||
<td class="label">Relevant other torrents:</td>
|
||||
<td colspan="3">
|
||||
<?
|
||||
$First = true;
|
||||
$Extras = explode(" ", $ExtraIDs);
|
||||
$Extras = explode(' ', $ExtraIDs);
|
||||
foreach ($Extras as $ExtraID) {
|
||||
|
||||
|
||||
@ -442,54 +447,48 @@
|
||||
|
||||
if ($ExtraGroupName) {
|
||||
if ($ArtistID == 0 && empty($ArtistName)) {
|
||||
$ExtraLinkName = "<a href='torrents.php?id=$ExtraGroupID'>$ExtraGroupName".($ExtraYear ? " ($ExtraYear)" : "")."</a> <a href='torrents.php?torrentid=$ExtraID'> [$ExtraFormat/$ExtraEncoding/$ExtraMedia]".($ExtraRemastered ? " <$ExtraRemasterTitle - $ExtraRemasterYear>" : "")."</a> ".($ExtraHasCue == '1' ? " (Cue)" : '').($ExtraHasLog == '1' ? " <a href='torrents.php?action=viewlog&torrentid=$ExtraID&groupid=$ExtraGroupID'>(Log: $ExtraLogScore %)</a>" : "")." (".number_format($ExtraSize/(1024*1024), 2)." MB)";
|
||||
$ExtraLinkName = "<a href=\"torrents.php?id=$ExtraGroupID\">$ExtraGroupName".($ExtraYear ? " ($ExtraYear)" : '')."</a> <a href=\"torrents.php?torrentid=$ExtraID\"> [$ExtraFormat/$ExtraEncoding/$ExtraMedia]".($ExtraRemastered ? " <$ExtraRemasterTitle - $ExtraRemasterYear>" : '').'</a> '.($ExtraHasCue == '1' ? ' (Cue)' : '').($ExtraHasLog == '1' ? " <a href=\"torrents.php?action=viewlog&torrentid=$ExtraID&groupid=$ExtraGroupID\">(Log: $ExtraLogScore %)</a>" : '').' ('.number_format($ExtraSize / (1024 * 1024), 2).' MB)';
|
||||
} elseif ($ArtistID == 0 && $ArtistName == 'Various Artists') {
|
||||
$ExtraLinkName = "Various Artists - <a href='torrents.php?id=$ExtraGroupID'>$ExtraGroupName".($ExtraYear ? " ($ExtraYear)" : "")."</a> <a href='torrents.php?torrentid=$ExtraID'> [$ExtraFormat/$ExtraEncoding/$ExtraMedia]".($ExtraRemastered ? " <$ExtraRemasterTitle - $ExtraRemasterYear>" : "")."</a> ".($ExtraHasCue == '1' ? " (Cue)" : '').($ExtraHasLog == '1' ? " <a href='torrents.php?action=viewlog&torrentid=$ExtraID&groupid=$ExtraGroupID'>(Log: $ExtraLogScore %)</a>" : "")." (".number_format($ExtraSize/(1024*1024), 2)." MB)";
|
||||
$ExtraLinkName = "Various Artists - <a href=\"torrents.php?id=$ExtraGroupID\">$ExtraGroupName".($ExtraYear ? " ($ExtraYear)" : '')."</a> <a href=\"torrents.php?torrentid=$ExtraID\"> [$ExtraFormat/$ExtraEncoding/$ExtraMedia]".($ExtraRemastered ? " <$ExtraRemasterTitle - $ExtraRemasterYear>" : '').'</a> '.($ExtraHasCue == '1' ? ' (Cue)' : '').($ExtraHasLog == '1' ? " <a href=\"torrents.php?action=viewlog&torrentid=$ExtraID&groupid=$ExtraGroupID\">(Log: $ExtraLogScore %)</a>" : '').' ('.number_format($ExtraSize / (1024 * 1024), 2).' MB)';
|
||||
} else {
|
||||
$ExtraLinkName = "<a href='artist.php?id=$ExtraArtistID'>$ExtraArtistName</a> - <a href='torrents.php?id=$ExtraGroupID'>$ExtraGroupName".($ExtraYear ? " ($ExtraYear)" : "")."</a> <a href='torrents.php?torrentid=$ExtraID'> [$ExtraFormat/$ExtraEncoding/$ExtraMedia]".($ExtraRemastered ? " <$ExtraRemasterTitle - $ExtraRemasterYear>" : "")."</a> ".($ExtraHasCue == '1' ? " (Cue)" : '').($ExtraHasLog == '1' ? " <a href='torrents.php?action=viewlog&torrentid=$ExtraID&groupid=$ExtraGroupID'>(Log: $ExtraLogScore %)</a>" : "")." (".number_format($ExtraSize/(1024*1024), 2)." MB)";
|
||||
$ExtraLinkName = "<a href=\"artist.php?id=$ExtraArtistID\">$ExtraArtistName</a> - <a href=\"torrents.php?id=$ExtraGroupID\">$ExtraGroupName".($ExtraYear ? " ($ExtraYear)" : '')."</a> <a href=\"torrents.php?torrentid=$ExtraID\"> [$ExtraFormat/$ExtraEncoding/$ExtraMedia]".($ExtraRemastered ? " <$ExtraRemasterTitle - $ExtraRemasterYear>" : '').'</a> '.($ExtraHasCue == '1' ? ' (Cue)' : '').($ExtraHasLog == '1' ? " <a href=\"torrents.php?action=viewlog&torrentid=$ExtraID&groupid=$ExtraGroupID\">(Log: $ExtraLogScore %)</a>" : '').' ('.number_format($ExtraSize / (1024 * 1024), 2).' MB)';
|
||||
}
|
||||
?>
|
||||
<?=($First ? "" : "<br />")?>
|
||||
<?=($First ? '' : '<br />')?>
|
||||
<?=$ExtraLinkName?>
|
||||
<a href="torrents.php?action=download&id=<?=$ExtraID?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download" class="brackets">DL</a>
|
||||
uploaded by <a href="user.php?id=<?=$ExtraUploaderID?>"><?=$ExtraUploaderName?></a> <?=time_diff($ExtraTime)?> <a href="#" onclick="Switch(<?=$ReportID?>, <?=$TorrentID?>, <?=$ExtraID?>); return false;" class="brackets">Switch</a>
|
||||
<?
|
||||
$First = false;
|
||||
}
|
||||
}
|
||||
?>
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
|
||||
if($Images) {
|
||||
?>
|
||||
if ($Images) { ?>
|
||||
<tr>
|
||||
<td class="label">Relevant images:</td>
|
||||
<td colspan="3">
|
||||
<?
|
||||
$Images = explode(" ", $Images);
|
||||
$Images = explode(' ', $Images);
|
||||
foreach ($Images as $Image) {
|
||||
$Image = 'http'.($SSL?'s':'').'://'.SITE_URL.'/image.php?c=1&i='.urlencode($Image);
|
||||
?>
|
||||
<img style="max-width: 200px;" onclick="lightbox.init(this,200);" src="<?=$Image?>" alt="Relevant image" />
|
||||
<?
|
||||
}
|
||||
?>
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
} ?>
|
||||
<tr>
|
||||
<td class="label">User comment:</td>
|
||||
<td colspan="3" class="wrap_overflow"><?=$Text->full_format($UserComment)?></td>
|
||||
</tr>
|
||||
<? // END REPORTED STUFF :|: BEGIN MOD STUFF ?>
|
||||
<?
|
||||
if($Status == "InProgress") {
|
||||
?>
|
||||
<? // END REPORTED STUFF :|: BEGIN MOD STUFF
|
||||
if ($Status == 'InProgress') { ?>
|
||||
<tr>
|
||||
<td class="label">In progress by:</td>
|
||||
<td colspan="3">
|
||||
@ -497,8 +496,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<? }
|
||||
if($Status != "Resolved") {
|
||||
?>
|
||||
if ($Status != 'Resolved') { ?>
|
||||
<tr>
|
||||
<td class="label">Report comment:</td>
|
||||
<td colspan="3">
|
||||
@ -520,8 +518,7 @@
|
||||
}
|
||||
array_multisort($Priorities, SORT_ASC, $TypeList);
|
||||
|
||||
foreach($TypeList as $Type => $Data) {
|
||||
?>
|
||||
foreach ($TypeList as $Type => $Data) { ?>
|
||||
<option value="<?=$Type?>"><?=$Data['title']?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
@ -536,12 +533,10 @@
|
||||
<strong>Warning</strong>
|
||||
<select name="warning" id="warning<?=$ReportID?>">
|
||||
<?
|
||||
for($i = 0; $i < 9; $i++) {
|
||||
?>
|
||||
for($i = 0; $i < 9; $i++) { ?>
|
||||
<option value="<?=$i?>"><?=$i?></option>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
} ?>
|
||||
</select>
|
||||
</span>
|
||||
<span title="Remove upload privileges?">
|
||||
@ -574,8 +569,8 @@
|
||||
<td class="label"><strong>Extra</strong> log message:</td>
|
||||
<td>
|
||||
<input type="text" name="log_message" id="log_message<?=$ReportID?>" size="40" <? if ($ExtraIDs) {
|
||||
$Extras = explode(" ", $ExtraIDs);
|
||||
$Value = "";
|
||||
$Extras = explode(' ', $ExtraIDs);
|
||||
$Value = '';
|
||||
foreach ($Extras as $ExtraID) {
|
||||
$Value .= 'https://'.SSL_SITE_URL.'/torrents.php?torrentid='.$ExtraID.' ';
|
||||
}
|
||||
@ -591,7 +586,7 @@
|
||||
<td colspan="4" style="text-align: center;">
|
||||
<input type="button" value="Invalidate report" onclick="Dismiss(<?=$ReportID?>);" />
|
||||
<input type="button" value="Resolve report manually" onclick="ManualResolve(<?=$ReportID?>);" />
|
||||
<? if($Status == "InProgress" && $LoggedUser['ID'] == $ResolverID) { ?>
|
||||
<? if ($Status == 'InProgress' && $LoggedUser['ID'] == $ResolverID) { ?>
|
||||
| <input type="button" value="Unclaim" onclick="GiveBack(<?=$ReportID?>);" />
|
||||
<? } else { ?>
|
||||
| <input id="grab<?=$ReportID?>" type="button" value="Claim" onclick="Grab(<?=$ReportID?>);" />
|
||||
|
@ -31,43 +31,43 @@
|
||||
$CanVote = (empty($TorrentID) && check_perms('site_vote'));
|
||||
|
||||
if ($CategoryID == 0) {
|
||||
$CategoryName = "Unknown";
|
||||
$CategoryName = 'Unknown';
|
||||
} else {
|
||||
$CategoryName = $Categories[$CategoryID - 1];
|
||||
}
|
||||
|
||||
//Do we need to get artists?
|
||||
if($CategoryName == "Music") {
|
||||
if ($CategoryName == 'Music') {
|
||||
$ArtistForm = get_request_artists($RequestID);
|
||||
$ArtistName = Artists::display_artists($ArtistForm, false, true);
|
||||
$ArtistLink = Artists::display_artists($ArtistForm, true, true);
|
||||
|
||||
if ($IsFilled) {
|
||||
$DisplayLink = $ArtistLink."<a href='torrents.php?torrentid=".$TorrentID."'>".$Title."</a> [".$Year."]";
|
||||
$DisplayLink = $ArtistLink."<a href='torrents.php?torrentid=".$TorrentID."'>$Title</a> [$Year]";
|
||||
} else {
|
||||
$DisplayLink = $ArtistLink.$Title." [".$Year."]";
|
||||
$DisplayLink = $ArtistLink.$Title." [$Year]";
|
||||
}
|
||||
$FullName = $ArtistName.$Title." [".$Year."]";
|
||||
$FullName = $ArtistName.$Title." [$Year]";
|
||||
|
||||
if($BitrateList != "") {
|
||||
$BitrateString = implode(", ", explode("|", $BitrateList));
|
||||
$FormatString = implode(", ", explode("|", $FormatList));
|
||||
$MediaString = implode(", ", explode("|", $MediaList));
|
||||
if ($BitrateList != '') {
|
||||
$BitrateString = implode(', ', explode('|', $BitrateList));
|
||||
$FormatString = implode(', ', explode('|', $FormatList));
|
||||
$MediaString = implode(', ', explode('|', $MediaList));
|
||||
} else {
|
||||
$BitrateString = "Unknown, please read the description.";
|
||||
$FormatString = "Unknown, please read the description.";
|
||||
$MediaString = "Unknown, please read the description.";
|
||||
$BitrateString = 'Unknown, please read the description.';
|
||||
$FormatString = 'Unknown, please read the description.';
|
||||
$MediaString = 'Unknown, please read the description.';
|
||||
}
|
||||
|
||||
if (empty($ReleaseType)) {
|
||||
$ReleaseName = "Unknown";
|
||||
$ReleaseName = 'Unknown';
|
||||
} else {
|
||||
$ReleaseName = $ReleaseTypes[$ReleaseType];
|
||||
}
|
||||
|
||||
} else if($CategoryName == "Audiobooks" || $CategoryName == "Comedy") {
|
||||
$FullName = $Title." [".$Year."]";
|
||||
$DisplayLink = $Title." [".$Year."]";
|
||||
} elseif ($CategoryName == 'Audiobooks' || $CategoryName == 'Comedy') {
|
||||
$FullName = "$Title [$Year]";
|
||||
$DisplayLink = "$Title [$Year]";
|
||||
} else {
|
||||
$FullName = $Title;
|
||||
$DisplayLink = $Title;
|
||||
@ -76,7 +76,7 @@
|
||||
//Votes time
|
||||
$RequestVotes = get_votes_array($RequestID);
|
||||
$VoteCount = count($RequestVotes['Voters']);
|
||||
$ProjectCanEdit = (check_perms('project_team') && !$IsFilled && (($CategoryID == 0) || ($CategoryName == "Music" && $Year == 0)));
|
||||
$ProjectCanEdit = (check_perms('project_team') && !$IsFilled && (($CategoryID == 0) || ($CategoryName == 'Music' && $Year == 0)));
|
||||
$UserCanEdit = (!$IsFilled && $LoggedUser['ID'] == $RequestorID && $VoteCount < 2);
|
||||
$CanEdit = ($UserCanEdit || $ProjectCanEdit || check_perms('site_moderate_requests'));
|
||||
|
||||
@ -92,8 +92,8 @@
|
||||
<? }
|
||||
if ($UserCanEdit || check_perms('users_mod')) { //check_perms('site_moderate_requests')) { ?>
|
||||
<a href="requests.php?action=delete&id=<?=$RequestID?>" class="brackets">Delete</a>
|
||||
<? } ?>
|
||||
<? if(Bookmarks::has_bookmarked('request', $RequestID)) { ?>
|
||||
<? }
|
||||
if (Bookmarks::has_bookmarked('request', $RequestID)) { ?>
|
||||
<a href="#" id="bookmarklink_request_<?=$RequestID?>" onclick="Unbookmark('request', <?=$RequestID?>,'Bookmark');return false;" class="brackets">Remove bookmark</a>
|
||||
<? } else { ?>
|
||||
<a href="#" id="bookmarklink_request_<?=$RequestID?>" onclick="Bookmark('request', <?=$RequestID?>,'Remove bookmark');return false;" class="brackets">Bookmark</a>
|
||||
@ -102,7 +102,7 @@
|
||||
<? if (!$IsFilled) { ?>
|
||||
<a href="upload.php?requestid=<?=$RequestID?><?= ($GroupID ? "&groupid=$GroupID" : '') ?>" class="brackets">Upload request</a>
|
||||
<? }
|
||||
if(!$IsFilled && (($CategoryID == 0) || ($CategoryName == "Music" && $Year == 0))) { ?>
|
||||
if (!$IsFilled && (($CategoryID == 0) || ($CategoryName == 'Music' && $Year == 0))) { ?>
|
||||
<a href="reports.php?action=report&type=request_update&id=<?=$RequestID?>" class="brackets">Request update</a>
|
||||
<? } ?>
|
||||
|
||||
@ -138,7 +138,7 @@
|
||||
<? } ?>
|
||||
</div>
|
||||
<? }
|
||||
if($CategoryName == "Music") { ?>
|
||||
if ($CategoryName == 'Music') { ?>
|
||||
<div class="box box_artists">
|
||||
<div class="head"><strong>Artists</strong></div>
|
||||
<ul class="stats nobullet">
|
||||
@ -378,8 +378,8 @@
|
||||
<?=time_diff($LastVote)?>
|
||||
</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<? if($CanVote) { ?>
|
||||
<? }
|
||||
if ($CanVote) { ?>
|
||||
<tr id="voting">
|
||||
<td class="label" title="These units are in base 2, not base 10. For example, there are 1,024 MB in 1 GB.">Custom vote (MB)</td>
|
||||
<td>
|
||||
@ -445,7 +445,8 @@
|
||||
<strong>Should be the permalink (PL) to the torrent (e.g. https://<?=SSL_SITE_URL?>/torrents.php?torrentid=xxxx).</strong>
|
||||
<br />
|
||||
<br />
|
||||
<? if(check_perms('site_moderate_requests')) { ?> For user: <input type="text" size="25" name="user" <?=(!empty($FillerUsername) ? "value='$FillerUsername' " : '')?>/>
|
||||
<? if (check_perms('site_moderate_requests')) { ?>
|
||||
For user: <input type="text" size="25" name="user"<?=(!empty($FillerUsername) ? " value=\"$FillerUsername\"" : '')?> />
|
||||
<br />
|
||||
<? } ?>
|
||||
<input type="submit" value="Fill request" />
|
||||
@ -533,7 +534,7 @@
|
||||
</colgroup>
|
||||
<tr class="colhead_dark">
|
||||
<td colspan="<?=Users::has_avatars_enabled() ? 2 : 1?>">
|
||||
<div style="float:left;"><a href='#post<?=$PostID?>'>#<?=$PostID?></a>
|
||||
<div style="float: left;"><a href="#post<?=$PostID?>">#<?=$PostID?></a>
|
||||
by <strong><?=Users::format_username($AuthorID, true, true, true, true)?></strong> <?=time_diff($AddedTime)?>
|
||||
- <a href="#quickpost" onclick="Quote('<?=$PostID?>','<?=$Username?>');" class="brackets">Quote</a>
|
||||
<? if ($AuthorID == $LoggedUser['ID'] || check_perms('site_moderate_forums')) { ?>
|
||||
@ -556,7 +557,7 @@
|
||||
<input type="hidden" name="userid" value="<?=$AuthorID?>" />
|
||||
<input type="hidden" name="key" value="<?=$Key?>" />
|
||||
</form>
|
||||
- <a href="#" onclick="$('#warn<?=$PostID?>').raw().submit(); return false;">[Warn]</a>
|
||||
- <a href="#" onclick="$('#warn<?=$PostID?>').raw().submit(); return false;" class="brackets">Warn</a>
|
||||
<? }
|
||||
}
|
||||
?>
|
||||
|
@ -381,7 +381,7 @@
|
||||
<tr id="include_filled">
|
||||
<td class="label">Include filled:</td>
|
||||
<td>
|
||||
<input type="checkbox" name="show_filled" <? if(!$Submitted || !empty($_GET['show_filled']) || (!$Submitted && !empty($_GET['type']) && $_GET['type'] == "filled")) { ?>checked="checked"<? } ?> />
|
||||
<input type="checkbox" name="show_filled"<? if (!$Submitted || !empty($_GET['show_filled']) || (!$Submitted && !empty($_GET['type']) && $_GET['type'] == 'filled')) { ?> checked="checked"<? } ?> />
|
||||
</td>
|
||||
</tr>
|
||||
<? if (check_perms('site_see_old_requests')){ ?>
|
||||
@ -430,7 +430,9 @@
|
||||
<input type="checkbox" id="toggle_releases" onchange="Toggle('releases', 0)"<?=(!$Submitted || !empty($ReleaseArray) && count($ReleaseArray) == count($ReleaseTypes) ? ' checked="checked"' : '') ?> /> <label for="toggle_releases">All</label>
|
||||
<? $i = 0;
|
||||
foreach ($ReleaseTypes as $Key => $Val) {
|
||||
if($i % 8 == 0) echo "<br />";?>
|
||||
if ($i % 8 == 0) {
|
||||
echo '<br />';
|
||||
} ?>
|
||||
<input type="checkbox" name="releases[]" value="<?=$Key?>" id="release_<?=$Key?>"
|
||||
<?=(((!$Submitted) || !empty($ReleaseArray) && in_array($Key, $ReleaseArray)) ? ' checked="checked" ' : '')?>
|
||||
/> <label for="release_<?=$Key?>"><?=$Val?></label>
|
||||
@ -446,7 +448,9 @@
|
||||
<input type="checkbox" id="formats_strict" name="formats_strict"<?=(!empty($_GET['formats_strict']) ? ' checked="checked"' : '')?> />
|
||||
<label for="formats_strict">Only specified</label>
|
||||
<? foreach ($Formats as $Key => $Val) {
|
||||
if($Key % 8 == 0) echo "<br />";?>
|
||||
if ($Key % 8 == 0) {
|
||||
echo '<br />';
|
||||
} ?>
|
||||
<input type="checkbox" name="formats[]" value="<?=$Key?>" id="format_<?=$Key?>"
|
||||
<?=(((!$Submitted) || !empty($FormatArray) && in_array($Key, $FormatArray)) ? ' checked="checked" ' : '')?>
|
||||
/> <label for="format_<?=$Key?>"><?=$Val?></label>
|
||||
@ -461,7 +465,9 @@
|
||||
<input type="checkbox" id="bitrate_strict" name="bitrate_strict"<?=(!empty($_GET['bitrate_strict']) ? ' checked="checked"' : '') ?> />
|
||||
<label for="bitrate_strict">Only specified</label>
|
||||
<? foreach ($Bitrates as $Key => $Val) {
|
||||
if($Key % 8 == 0) echo "<br />";?>
|
||||
if ($Key % 8 == 0) {
|
||||
echo '<br />';
|
||||
} ?>
|
||||
<input type="checkbox" name="bitrates[]" value="<?=$Key?>" id="bitrate_<?=$Key?>"
|
||||
<?=(((!$Submitted) || !empty($BitrateArray) && in_array($Key, $BitrateArray)) ? ' checked="checked" ' : '')?>
|
||||
/> <label for="bitrate_<?=$Key?>"><?=$Val?></label>
|
||||
@ -476,7 +482,9 @@
|
||||
<input type="checkbox" id="media_strict" name="media_strict"<?=(!empty($_GET['media_strict']) ? ' checked="checked"' : '')?> />
|
||||
<label for="media_strict">Only specified</label>
|
||||
<? foreach ($Media as $Key => $Val) {
|
||||
if($Key % 8 == 0) echo "<br />";?>
|
||||
if ($Key % 8 == 0) {
|
||||
echo '<br />';
|
||||
} ?>
|
||||
<input type="checkbox" name="media[]" value="<?=$Key?>" id="media_<?=$Key?>"
|
||||
<?=(((!$Submitted) || !empty($MediaArray) && in_array($Key, $MediaArray)) ? ' checked="checked" ' : '')?>
|
||||
/> <label for="media_<?=$Key?>"><?=$Val?></label>
|
||||
@ -577,21 +585,21 @@
|
||||
$VoteCount = count($RequestVotes['Voters']);
|
||||
|
||||
if ($CategoryID == 0) {
|
||||
$CategoryName = "Unknown";
|
||||
$CategoryName = 'Unknown';
|
||||
} else {
|
||||
$CategoryName = $Categories[$CategoryID - 1];
|
||||
}
|
||||
|
||||
$IsFilled = ($TorrentID != 0);
|
||||
|
||||
if($CategoryName == "Music") {
|
||||
if ($CategoryName == 'Music') {
|
||||
$ArtistForm = get_request_artists($RequestID);
|
||||
$ArtistLink = Artists::display_artists($ArtistForm, true, true);
|
||||
$FullName = $ArtistLink."<a href='requests.php?action=view&id=".$RequestID."'>".$Title." [".$Year."]</a>";
|
||||
} else if($CategoryName == "Audiobooks" || $CategoryName == "Comedy") {
|
||||
$FullName = "<a href='requests.php?action=view&id=".$RequestID."'>".$Title." [".$Year."]</a>";
|
||||
$FullName = $ArtistLink."<a href=\"requests.php?action=view&id=".$RequestID."\">$Title [$Year]</a>";
|
||||
} elseif ($CategoryName == 'Audiobooks' || $CategoryName == 'Comedy') {
|
||||
$FullName = "<a href=\"requests.php?action=view&id=".$RequestID."\">$Title [$Year]</a>";
|
||||
} else {
|
||||
$FullName ="<a href='requests.php?action=view&id=".$RequestID."'>".$Title."</a>";
|
||||
$FullName ="<a href=\"requests.php?action=view&id=".$RequestID."\">$Title</a>";
|
||||
}
|
||||
|
||||
$Row = ($Row == 'a') ? 'b' : 'a';
|
||||
@ -605,7 +613,7 @@
|
||||
<?
|
||||
$TagList = array();
|
||||
foreach ($Tags as $TagID => $TagName) {
|
||||
$TagList[] = "<a href='?tags=".$TagName.($BookmarkView ? "&type=requests" : "")."'>".display_str($TagName)."</a>";
|
||||
$TagList[] = '<a href="?tags='.$TagName.($BookmarkView ? '&type=requests' : '').'\">'.display_str($TagName).'</a>';
|
||||
}
|
||||
$TagList = implode(', ', $TagList);
|
||||
?>
|
||||
|
@ -94,29 +94,29 @@
|
||||
|
||||
|
||||
if (!empty($OldTorrentID)) {
|
||||
$Err = "This request has already been filled.";
|
||||
$Err = 'This request has already been filled.';
|
||||
}
|
||||
if ($RequestCategoryID != 0 && $TorrentCategoryID != $RequestCategoryID) {
|
||||
$Err = "This torrent is of a different category than the request. If the request is actually miscategorized, please contact staff.";
|
||||
$Err = 'This torrent is of a different category than the request. If the request is actually miscategorized, please contact staff.';
|
||||
}
|
||||
|
||||
$CategoryName = $Categories[$RequestCategoryID - 1];
|
||||
|
||||
if($CategoryName == "Music") {
|
||||
if ($CategoryName == 'Music') {
|
||||
//Commenting out as it's causing some issues with some users being unable to fill, unsure what it is, etc
|
||||
/*if ($RequestCatalogueNumber) {
|
||||
if ($TorrentCatalogueNumber != $RequestCatalogueNumber) {
|
||||
$Err = "This request requires the catalogue number ".$RequestCatalogueNumber;
|
||||
$Err = "This request requires the catalogue number $RequestCatalogueNumber";
|
||||
}
|
||||
}*/
|
||||
|
||||
//WEB has no ripping log. Ditto Vinyl - Actually ditto everything but CD
|
||||
//$WEBOverride = ((strpos($MediaList, "WEB") !== false) && $Media == "WEB");
|
||||
//$VinylOverride = ((strpos($MediaList, "Vinyl") !== false) && $Media == "Vinyl");
|
||||
//if($Format == "FLAC" && $LogCue && !$WEBOverride && !$VinylOverride) {
|
||||
if($Format == "FLAC" && $LogCue && $Media == 'CD') {
|
||||
if(strpos($LogCue, "Log") && !$HasLog) {
|
||||
$Err = "This request requires a log.";
|
||||
//$WEBOverride = ((strpos($MediaList, 'WEB') !== false) && $Media == "WEB");
|
||||
//$VinylOverride = ((strpos($MediaList, 'Vinyl') !== false) && $Media == "Vinyl");
|
||||
//if ($Format == 'FLAC' && $LogCue && !$WEBOverride && !$VinylOverride) {
|
||||
if ($Format == 'FLAC' && $LogCue && $Media == 'CD') {
|
||||
if (strpos($LogCue, 'Log') && !$HasLog) {
|
||||
$Err = 'This request requires a log.';
|
||||
}
|
||||
|
||||
/*
|
||||
@ -127,30 +127,30 @@
|
||||
// $Err = "This request requires a cue.";
|
||||
//}
|
||||
|
||||
if(strpos($LogCue, "%")) {
|
||||
preg_match("/\d+/", $LogCue, $Matches);
|
||||
if (strpos($LogCue, '%')) {
|
||||
preg_match('/\d+/', $LogCue, $Matches);
|
||||
if ((int) $LogScore < (int) $Matches[0]) {
|
||||
$Err = "This torrent's log score is too low.";
|
||||
$Err = 'This torrent\'s log score is too low.';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($BitrateList === "Other") {
|
||||
if ($Bitrate === "Lossless" || $Bitrate === "APS (VBR)" || $Bitrate === "V2 (VBR)" || $Bitrate === "V1 (VBR)" || $Bitrate === "256" || $Bitrate === "APX (VBR)" || $Bitrate === "V0 (VBR)" || $Bitrate === "q8.x (VBR)" || $Bitrate === "320" || $Bitrate === "24bit Lossless")
|
||||
$Err = $Bitrate." is not an allowed bitrate for this request.";
|
||||
} else if($BitrateList && $BitrateList != "Any") {
|
||||
if ($BitrateList === 'Other') {
|
||||
if ($Bitrate === 'Lossless' || $Bitrate === 'APS (VBR)' || $Bitrate === 'V2 (VBR)' || $Bitrate === 'V1 (VBR)' || $Bitrate === '256' || $Bitrate === 'APX (VBR)' || $Bitrate === 'V0 (VBR)' || $Bitrate === 'q8.x (VBR)' || $Bitrate === '320' || $Bitrate === '24bit Lossless')
|
||||
$Err = "$Bitrate is not an allowed bitrate for this request.";
|
||||
} elseif ($BitrateList && $BitrateList != 'Any') {
|
||||
if (strpos($BitrateList, $Bitrate) === false) {
|
||||
$Err = $Bitrate." is not an allowed bitrate for this request.";
|
||||
$Err = "$Bitrate is not an allowed bitrate for this request.";
|
||||
}
|
||||
}
|
||||
if ($FormatList && $FormatList != "Any") {
|
||||
if (strpos($FormatList, $Format) === false) {
|
||||
$Err = $Format." is not an allowed format for this request.";
|
||||
$Err = "$Format is not an allowed format for this request.";
|
||||
}
|
||||
}
|
||||
if ($MediaList && $MediaList != "Any") {
|
||||
if (strpos($MediaList, $Media) === false) {
|
||||
$Err = $Media." is not allowed media for this request.";
|
||||
$Err = "$Media is not allowed media for this request.";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -164,12 +164,12 @@
|
||||
|
||||
//We're all good! Fill!
|
||||
$DB->query("UPDATE requests SET
|
||||
FillerID = ".$FillerID.",
|
||||
TorrentID = ".$TorrentID.",
|
||||
FillerID = $FillerID,
|
||||
TorrentID = $TorrentID,
|
||||
TimeFilled = '".sqltime()."'
|
||||
WHERE ID = ".$RequestID);
|
||||
WHERE ID = $RequestID");
|
||||
|
||||
if($CategoryName == "Music") {
|
||||
if ($CategoryName == 'Music') {
|
||||
$ArtistForm = get_request_artists($RequestID);
|
||||
$ArtistName = Artists::display_artists($ArtistForm, false, true);
|
||||
$FullName = $ArtistName.$Title;
|
||||
@ -177,20 +177,20 @@
|
||||
$FullName = $Title;
|
||||
}
|
||||
|
||||
$DB->query("SELECT UserID FROM requests_votes WHERE RequestID = ".$RequestID);
|
||||
$DB->query("SELECT UserID FROM requests_votes WHERE RequestID = $RequestID");
|
||||
$UserIDs = $DB->to_array();
|
||||
foreach ($UserIDs as $User) {
|
||||
list($VoterID) = $User;
|
||||
Misc::send_pm($VoterID, 0, "The request '".$FullName."' has been filled", "One of your requests - [url=https://".SSL_SITE_URL."/requests.php?action=view&id=".$RequestID."]".$FullName."[/url] - has been filled. You can view it at [url]https://".SSL_SITE_URL."/torrents.php?torrentid=".$TorrentID."[/url]");
|
||||
Misc::send_pm($VoterID, 0, "The request \"$FullName\" has been filled", 'One of your requests — [url=https://'.SSL_SITE_URL.'/requests.php?action=view&id='.$RequestID.']'.$FullName.'[/url] — has been filled. You can view it here: [url]https://'.SSL_SITE_URL.'/torrents.php?torrentid='.$TorrentID.'[/url]');
|
||||
}
|
||||
|
||||
$RequestVotes = get_votes_array($RequestID);
|
||||
Misc::write_log("Request ".$RequestID." (".$FullName.") was filled by user ".$FillerID." (".$FillerUsername.") with the torrent ".$TorrentID.", for a ".Format::get_size($RequestVotes['TotalBounty'])." bounty.");
|
||||
Misc::write_log("Request $RequestID (".$FullName.") was filled by user $FillerID (".$FillerUsername.") with the torrent $TorrentID for a ".Format::get_size($RequestVotes['TotalBounty']).' bounty.');
|
||||
|
||||
// Give bounty
|
||||
$DB->query("UPDATE users_main
|
||||
SET Uploaded = (Uploaded + ".$RequestVotes['TotalBounty'].")
|
||||
WHERE ID = ".$FillerID);
|
||||
WHERE ID = $FillerID");
|
||||
|
||||
|
||||
|
||||
@ -202,10 +202,10 @@
|
||||
|
||||
|
||||
|
||||
$DB->query("SELECT ArtistID FROM requests_artists WHERE RequestID = ".$RequestID);
|
||||
$DB->query("SELECT ArtistID FROM requests_artists WHERE RequestID = $RequestID");
|
||||
$ArtistIDs = $DB->to_array();
|
||||
foreach ($ArtistIDs as $ArtistID) {
|
||||
$Cache->delete_value('artists_requests_'.$ArtistID);
|
||||
$Cache->delete_value("artists_requests_$ArtistID");
|
||||
}
|
||||
|
||||
$SS->UpdateAttributes('requests', array('torrentid','fillerid'), array($RequestID => array((int)$TorrentID,(int)$FillerID)));
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?
|
||||
if(!check_perms('users_view_invites')) { error(403); }
|
||||
if (!check_perms('users_view_invites')) {
|
||||
error(403);
|
||||
}
|
||||
View::show_header('Invite Pool');
|
||||
define('INVITES_PER_PAGE', 50);
|
||||
list($Page, $Limit) = Format::page_limit(INVITES_PER_PAGE);
|
||||
@ -19,6 +21,7 @@
|
||||
$sql = "SELECT
|
||||
SQL_CALC_FOUND_ROWS
|
||||
um.ID,
|
||||
um.IP,
|
||||
i.InviteKey,
|
||||
i.Expires,
|
||||
i.Email
|
||||
@ -64,6 +67,7 @@
|
||||
<tr class="colhead">
|
||||
<td>Inviter</td>
|
||||
<td>Email</td>
|
||||
<td>IP</td>
|
||||
<td>InviteCode</td>
|
||||
<td>Expires</td>
|
||||
<? if(check_perms('users_edit_invites')){ ?>
|
||||
@ -72,12 +76,13 @@
|
||||
</tr>
|
||||
<?
|
||||
$Row = 'b';
|
||||
while(list($UserID, $InviteKey, $Expires, $Email)=$DB->next_record()) {
|
||||
while (list($UserID, $IP, $InviteKey, $Expires, $Email) = $DB->next_record()) {
|
||||
$Row = ($Row == 'b') ? 'a' : 'b';
|
||||
?>
|
||||
<tr class="row<?=$Row?>">
|
||||
<td><?=Users::format_username($UserID, true, true, true, true)?></td>
|
||||
<td><?=display_str($Email)?></td>
|
||||
<td><?=Tools::display_ip($IP)?></td>
|
||||
<td><?=display_str($InviteKey)?></td>
|
||||
<td><?=time_diff($Expires)?></td>
|
||||
<? if (check_perms('users_edit_invites')) { ?>
|
||||
|
@ -1,6 +1,8 @@
|
||||
<?
|
||||
$TorrentID = $_GET['torrentid'];
|
||||
if (!$TorrentID || !is_number($TorrentID)) { error(404); }
|
||||
if (!$TorrentID || !is_number($TorrentID)) {
|
||||
error(404);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -230,7 +232,9 @@
|
||||
foreach ($TypeList as $IType => $Data) {
|
||||
?>
|
||||
<option value="<?=$IType?>"<?=(($Type == $IType) ? ' selected="selected"' : '') ?>><?=$Data['title']?></option>
|
||||
<? } ?>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<span id="options<?=$ReportID?>">
|
||||
<span title="Delete torrent?">
|
||||
|
@ -241,7 +241,7 @@
|
||||
|
||||
if (!is_uploaded_file($TorrentName) || !filesize($TorrentName)) {
|
||||
$Err='No torrent file uploaded, or file is empty.';
|
||||
} else if(substr(strtolower($File['name']), strlen($File['name']) - strlen(".torrent")) !== ".torrent") {
|
||||
} elseif (substr(strtolower($File['name']), strlen($File['name']) - strlen('.torrent')) !== '.torrent') {
|
||||
$Err = "You seem to have put something other than a torrent file into the upload field. (".$File['name'].").";
|
||||
}
|
||||
|
||||
@ -251,13 +251,13 @@
|
||||
|
||||
$LogScoreAverage = 0;
|
||||
$SendPM = 0;
|
||||
$LogMessage = "";
|
||||
$CheckStamp="";
|
||||
$LogMessage = '';
|
||||
$CheckStamp='';
|
||||
|
||||
if (!$Err && $Properties['Format'] == 'FLAC') {
|
||||
foreach ($_FILES['logfiles']['name'] as $FileName) {
|
||||
if(!empty($FileName) && substr(strtolower($FileName), strlen($FileName) - strlen(".log")) !== ".log") {
|
||||
$Err = "You seem to have put something other than an EAC or XLD log file into an upload field. (".$FileName.").";
|
||||
if (!empty($FileName) && substr(strtolower($FileName), strlen($FileName) - strlen('.log')) !== '.log') {
|
||||
$Err = 'You seem to have put something other than an EAC or XLD log file into an upload field. ('.$FileName.').';
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -267,7 +267,8 @@
|
||||
$Err = "You seem to have put something other than an EAC or XLD log file into an upload field. (".$FileType.")";
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@ -287,7 +288,7 @@
|
||||
6 => array()
|
||||
);
|
||||
for($i = 0, $il = count($Artists); $i < $il; $i++) {
|
||||
if(trim($Artists[$i]) != "") {
|
||||
if (trim($Artists[$i]) != '') {
|
||||
if (!in_array($Artists[$i], trim($ArtistNames))) {
|
||||
$ArtistForm[$Importance[$i]][] = array('name' => Artists::normalise_artist_name($Artists[$i]));
|
||||
if ($Importance[$i] == 1) {
|
||||
@ -298,11 +299,11 @@
|
||||
}
|
||||
}
|
||||
if ($MainArtistCount < 1) {
|
||||
$Err = "Please enter at least one main artist";
|
||||
$Err = 'Please enter at least one main artist';
|
||||
$ArtistForm = array();
|
||||
}
|
||||
$LogName .= Artists::display_artists($ArtistForm, false, true, false);
|
||||
} elseif($Type == "Music" && empty($ArtistForm)) {
|
||||
} elseif ($Type == 'Music' && empty($ArtistForm)) {
|
||||
$DB->query("SELECT ta.ArtistID,aa.Name,ta.Importance FROM torrents_artists AS ta JOIN artists_alias AS aa ON ta.AliasID = aa.AliasID WHERE ta.GroupID = ".$Properties['GroupID']." ORDER BY ta.Importance ASC, aa.Name ASC;");
|
||||
while (list($ArtistID,$ArtistName,$ArtistImportance) = $DB->next_record(MYSQLI_BOTH, false)) {
|
||||
$ArtistForm[$ArtistImportance][] = array('id' => $ArtistID, 'name' => display_str($ArtistName));
|
||||
@ -668,12 +669,14 @@
|
||||
//******************************************************************************//
|
||||
//--------------- Stupid Recent Uploads ----------------------------------------//
|
||||
|
||||
if(trim($Properties['Image']) != "") {
|
||||
if (trim($Properties['Image']) != '') {
|
||||
$RecentUploads = $Cache->get_value('recent_uploads_'.$UserID);
|
||||
if (is_array($RecentUploads)) {
|
||||
do {
|
||||
foreach ($RecentUploads as $Item) {
|
||||
if ($Item['ID'] == $GroupID) { break 2; }
|
||||
if ($Item['ID'] == $GroupID) {
|
||||
break 2;
|
||||
}
|
||||
}
|
||||
|
||||
// Only reached if no matching GroupIDs in the cache already.
|
||||
@ -688,9 +691,9 @@
|
||||
|
||||
//******************************************************************************//
|
||||
//--------------- Contest ------------------------------------------------------//
|
||||
if ($Properties['LibraryImage'] != "") {
|
||||
if ($Properties['LibraryImage'] != '') {
|
||||
$DB->query("INSERT INTO reportsv2 (ReporterID, TorrentID, Type, UserComment, Status, ReportedTime, Track, Image, ExtraID, Link)
|
||||
VALUES (0, ".$TorrentID.", 'library', '".db_string(($Properties['MultiDisc'] ? "Multi-disc" : ""))."', 'New', '".sqltime()."', '', '".db_string($Properties['LibraryImage'])."', '', '')");
|
||||
VALUES (0, ".$TorrentID.", 'library', '".db_string(($Properties['MultiDisc'] ? 'Multi-disc' : ''))."', 'New', '".sqltime()."', '', '".db_string($Properties['LibraryImage'])."', '', '')");
|
||||
}
|
||||
|
||||
//******************************************************************************//
|
||||
@ -723,21 +726,35 @@
|
||||
|
||||
//******************************************************************************//
|
||||
//--------------- IRC announce and feeds ---------------------------------------//
|
||||
$Announce = "";
|
||||
$Announce = '';
|
||||
|
||||
if($Type == 'Music'){ $Announce .= Artists::display_artists($ArtistForm, false); }
|
||||
if ($Type == 'Music') {
|
||||
$Announce .= Artists::display_artists($ArtistForm, false);
|
||||
}
|
||||
$Announce .= trim($Properties['Title'])." ";
|
||||
if ($Type == 'Music') {
|
||||
$Announce .= '['.trim($Properties['Year']).']';
|
||||
if (($Type == 'Music') && ($Properties['ReleaseType'] > 0)) { $Announce .= ' ['.$ReleaseTypes[$Properties['ReleaseType']].']'; }
|
||||
$Announce .= " - ";
|
||||
if (($Type == 'Music') && ($Properties['ReleaseType'] > 0)) {
|
||||
$Announce .= ' ['.$ReleaseTypes[$Properties['ReleaseType']].']';
|
||||
}
|
||||
$Announce .= ' - ';
|
||||
$Announce .= trim($Properties['Format'])." / ".trim($Properties['Bitrate']);
|
||||
if ($HasLog == 1) { $Announce .= " / Log"; }
|
||||
if ($LogInDB) { $Announce .= " / ".$LogScoreAverage.'%'; }
|
||||
if ($HasCue == 1) { $Announce .= " / Cue"; }
|
||||
$Announce .= " / ".trim($Properties['Media']);
|
||||
if ($Properties['Scene'] == "1") { $Announce .= " / Scene"; }
|
||||
if ($T['FreeLeech'] == "1") { $Announce .= " / Freeleech!"; }
|
||||
if ($HasLog == 1) {
|
||||
$Announce .= ' / Log';
|
||||
}
|
||||
if ($LogInDB) {
|
||||
$Announce .= ' / '.$LogScoreAverage.'%';
|
||||
}
|
||||
if ($HasCue == 1) {
|
||||
$Announce .= ' / Cue';
|
||||
}
|
||||
$Announce .= ' / '.trim($Properties['Media']);
|
||||
if ($Properties['Scene'] == '1') {
|
||||
$Announce .= ' / Scene';
|
||||
}
|
||||
if ($T['FreeLeech'] == '1') {
|
||||
$Announce .= ' / Freeleech!';
|
||||
}
|
||||
}
|
||||
$Title = $Announce;
|
||||
|
||||
@ -880,7 +897,7 @@
|
||||
$SQL .= "AND (NOT($FormatReq AND $BitrateReq)) ";
|
||||
}
|
||||
|
||||
$SQL .= "))";
|
||||
$SQL .= '))';
|
||||
|
||||
|
||||
if ($Properties['Year'] && $Properties['RemasterYear']) {
|
||||
@ -903,7 +920,7 @@
|
||||
$UserArray = $DB->to_array('UserID');
|
||||
$FilterArray = $DB->to_array('ID');
|
||||
|
||||
$InsertSQL = "INSERT IGNORE INTO users_notify_torrents (UserID, GroupID, TorrentID, FilterID) VALUES ";
|
||||
$InsertSQL = 'INSERT IGNORE INTO users_notify_torrents (UserID, GroupID, TorrentID, FilterID) VALUES ';
|
||||
$Rows = array();
|
||||
foreach ($UserArray as $User) {
|
||||
list($FilterID, $UserID, $Passkey) = $User;
|
||||
@ -934,18 +951,40 @@
|
||||
$Debug->set_flag('upload: notifications handled');
|
||||
if ($Type == 'Music'){
|
||||
$Feed->populate('torrents_music',$Item);
|
||||
if($Properties['Media'] == 'Vinyl') { $Feed->populate('torrents_vinyl',$Item); }
|
||||
if($Properties['Bitrate'] == 'Lossless') { $Feed->populate('torrents_lossless',$Item); }
|
||||
if($Properties['Bitrate'] == '24bit Lossless') { $Feed->populate('torrents_lossless24',$Item); }
|
||||
if($Properties['Format'] == 'MP3') { $Feed->populate('torrents_mp3',$Item); }
|
||||
if($Properties['Format'] == 'FLAC') { $Feed->populate('torrents_flac',$Item); }
|
||||
if ($Properties['Media'] == 'Vinyl') {
|
||||
$Feed->populate('torrents_vinyl',$Item);
|
||||
}
|
||||
if ($Properties['Bitrate'] == 'Lossless') {
|
||||
$Feed->populate('torrents_lossless',$Item);
|
||||
}
|
||||
if ($Properties['Bitrate'] == '24bit Lossless') {
|
||||
$Feed->populate('torrents_lossless24',$Item);
|
||||
}
|
||||
if ($Properties['Format'] == 'MP3') {
|
||||
$Feed->populate('torrents_mp3',$Item);
|
||||
}
|
||||
if ($Properties['Format'] == 'FLAC') {
|
||||
$Feed->populate('torrents_flac',$Item);
|
||||
}
|
||||
}
|
||||
if ($Type == 'Applications') {
|
||||
$Feed->populate('torrents_apps',$Item);
|
||||
}
|
||||
if ($Type == 'E-Books') {
|
||||
$Feed->populate('torrents_ebooks',$Item);
|
||||
}
|
||||
if ($Type == 'Audiobooks') {
|
||||
$Feed->populate('torrents_abooks',$Item);
|
||||
}
|
||||
if ($Type == 'E-Learning Videos') {
|
||||
$Feed->populate('torrents_evids',$Item);
|
||||
}
|
||||
if ($Type == 'Comedy') {
|
||||
$Feed->populate('torrents_comedy',$Item);
|
||||
}
|
||||
if ($Type == 'Comics') {
|
||||
$Feed->populate('torrents_comics',$Item);
|
||||
}
|
||||
if($Type == 'Applications') { $Feed->populate('torrents_apps',$Item); }
|
||||
if($Type == 'E-Books') { $Feed->populate('torrents_ebooks',$Item); }
|
||||
if($Type == 'Audiobooks') { $Feed->populate('torrents_abooks',$Item); }
|
||||
if($Type == 'E-Learning Videos'){ $Feed->populate('torrents_evids',$Item); }
|
||||
if($Type == 'Comedy') { $Feed->populate('torrents_comedy',$Item); }
|
||||
if($Type == 'Comics') { $Feed->populate('torrents_comics',$Item); }
|
||||
|
||||
// Clear Cache
|
||||
$Cache->delete('torrents_details_'.$GroupID);
|
||||
|
@ -704,14 +704,14 @@ function check_paranoia_here($Setting) {
|
||||
|
||||
$CategoryName = $Categories[$CategoryID - 1];
|
||||
|
||||
if ($CategoryName == "Music") {
|
||||
if ($CategoryName == 'Music') {
|
||||
$ArtistForm = get_request_artists($RequestID);
|
||||
$ArtistLink = Artists::display_artists($ArtistForm, true, true);
|
||||
$FullName = $ArtistLink."<a href='requests.php?action=view&id=".$RequestID."'>".$Title." [".$Year."]</a>";
|
||||
} else if ($CategoryName == "Audiobooks" || $CategoryName == "Comedy") {
|
||||
$FullName = "<a href='requests.php?action=view&id=".$RequestID."'>".$Title." [".$Year."]</a>";
|
||||
$FullName = $ArtistLink."<a href=\"requests.php?action=view&id=".$RequestID."\">$Title [$Year]</a>";
|
||||
} elseif ($CategoryName == 'Audiobooks' || $CategoryName == 'Comedy') {
|
||||
$FullName = "<a href=\"requests.php?action=view&id=".$RequestID."\">$Title [$Year]</a>";
|
||||
} else {
|
||||
$FullName ="<a href='requests.php?action=view&id=".$RequestID."'>".$Title."</a>";
|
||||
$FullName ="<a href=\"requests.php?action=view&id=".$RequestID."\">$Title</a>";
|
||||
}
|
||||
|
||||
$Row = (empty($Row) || $Row == 'a') ? 'b' : 'a';
|
||||
|
Loading…
Reference in New Issue
Block a user