mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 02:46:30 +00:00
Empty commit
This commit is contained in:
parent
792f5077cb
commit
ba33634e19
35
api.php
35
api.php
@ -1,10 +1,10 @@
|
||||
<?
|
||||
/*-- API Start Class -----------------------------------*/
|
||||
/*------------------------------------------------------*/
|
||||
/*-- API Start Class -------------------------------*/
|
||||
/*--------------------------------------------------*/
|
||||
/* Simplified version of script_start, used for the */
|
||||
/* site API calls */
|
||||
/*------------------------------------------------------*/
|
||||
/********************************************************/
|
||||
/*--------------------------------------------------*/
|
||||
/****************************************************/
|
||||
|
||||
$ScriptStartTime=microtime(true); //To track how long a page takes to create
|
||||
|
||||
@ -49,13 +49,15 @@ function make_secret($Length = 32) {
|
||||
}
|
||||
|
||||
function is_number($Str) {
|
||||
if ($Str < 0) { return false; }
|
||||
if ($Str < 0) {
|
||||
return false;
|
||||
}
|
||||
// We're converting input to a int, then string and comparing to original
|
||||
return ($Str == strval(intval($Str)) ? true : false);
|
||||
}
|
||||
|
||||
function display_str($Str) {
|
||||
if ($Str!="") {
|
||||
if ($Str != '') {
|
||||
$Str = make_utf8($Str);
|
||||
$Str = mb_convert_encoding($Str,"HTML-ENTITIES","UTF-8");
|
||||
$Str = preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,5};)/m","&",$Str);
|
||||
@ -76,12 +78,21 @@ function display_str($Str) {
|
||||
}
|
||||
|
||||
function make_utf8($Str) {
|
||||
if ($Str!="") {
|
||||
if (is_utf8($Str)) { $Encoding="UTF-8"; }
|
||||
if (empty($Encoding)) { $Encoding=mb_detect_encoding($Str,'UTF-8, ISO-8859-1'); }
|
||||
if (empty($Encoding)) { $Encoding="ISO-8859-1"; }
|
||||
if ($Encoding=="UTF-8") { return $Str; }
|
||||
else { return @mb_convert_encoding($Str,"UTF-8",$Encoding); }
|
||||
if ($Str != '') {
|
||||
if (is_utf8($Str)) {
|
||||
$Encoding = 'UTF-8';
|
||||
}
|
||||
if (empty($Encoding)) {
|
||||
$Encoding = mb_detect_encoding($Str,'UTF-8, ISO-8859-1');
|
||||
}
|
||||
if (empty($Encoding)) {
|
||||
$Encoding = 'ISO-8859-1';
|
||||
}
|
||||
if ($Encoding == 'UTF-8') {
|
||||
return $Str;
|
||||
} else {
|
||||
return @mb_convert_encoding($Str,'UTF-8',$Encoding);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@ class IRC_DB extends DB_MYSQL {
|
||||
function halt($Msg) {
|
||||
global $Bot;
|
||||
global $DB;
|
||||
$Bot->send_to($Bot->get_channel(),'The database is currently unavailable try again later');
|
||||
$Bot->send_to($Bot->get_channel(),'The database is currently unavailable; try again later.');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ function query($Query,$AutoHandle=1) {
|
||||
global $LoggedUser, $Debug;
|
||||
$QueryStartTime = microtime(true);
|
||||
$this->connect();
|
||||
//In the event of a mysql deadlock, we sleep allowing mysql time to unlock then attempt again for a maximum of 5 tries
|
||||
// In the event of a MySQL deadlock, we sleep allowing MySQL time to unlock, then attempt again for a maximum of 5 tries
|
||||
for ($i = 1; $i < 6; $i++) {
|
||||
$this->QueryID = mysqli_query($this->LinkID, $Query);
|
||||
if (!in_array(mysqli_errno($this->LinkID), array(1213, 1205))) {
|
||||
@ -234,7 +234,9 @@ function query($Query,$AutoHandle=1) {
|
||||
}
|
||||
*/
|
||||
$this->Row = 0;
|
||||
if ($AutoHandle) { return $this->QueryID; }
|
||||
if ($AutoHandle) {
|
||||
return $this->QueryID;
|
||||
}
|
||||
}
|
||||
|
||||
function query_unb($Query) {
|
||||
|
@ -34,7 +34,7 @@ public static function site_ban_ip($IP) {
|
||||
* @return string the long it represents.
|
||||
*/
|
||||
public static function ip_to_unsigned($IP) {
|
||||
return sprintf("%u", ip2long($IP));
|
||||
return sprintf('%u', ip2long($IP));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -71,8 +71,7 @@ public static function geoip($IP) {
|
||||
* @param $IP the IP to get the hostname for
|
||||
* @return hostname fetched
|
||||
*/
|
||||
public static function get_host_by_ip($IP)
|
||||
{
|
||||
public static function get_host_by_ip($IP) {
|
||||
$testar = explode('.',$IP);
|
||||
if (count($testar) != 4) {
|
||||
return $IP;
|
||||
@ -206,7 +205,9 @@ public static function disable_users($UserIDs, $AdminComment, $BanReason = 1) {
|
||||
public static function warn_user($UserID, $Duration, $Reason) {
|
||||
global $LoggedUser, $DB, $Cache, $Time;
|
||||
|
||||
$DB->query("SELECT Warned FROM users_info
|
||||
$DB->query("
|
||||
SELECT Warned
|
||||
FROM users_info
|
||||
WHERE UserID=".$UserID."
|
||||
AND Warned <> '0000-00-00 00:00:00'");
|
||||
if ($DB->record_count() > 0) {
|
||||
@ -215,10 +216,10 @@ public static function warn_user($UserID, $Duration, $Reason) {
|
||||
$NewExpDate = date('Y-m-d H:i:s', strtotime($OldDate) + $Duration);
|
||||
|
||||
Misc::send_pm($UserID, 0,
|
||||
"You have received multiple warnings.",
|
||||
"When you received your latest warning (Set to expire on ".date("Y-m-d", (time() + $Duration))."), you already had a different warning (Set to expire on ".date("Y-m-d", strtotime($OldDate)).").\n\n Due to this collision, your warning status will now expire at ".$NewExpDate.".");
|
||||
'You have received multiple warnings.',
|
||||
"When you received your latest warning (set to expire on ".date('Y-m-d', (time() + $Duration)).'), you already had a different warning (set to expire on '.date('Y-m-d', strtotime($OldDate)).").\n\n Due to this collision, your warning status will now expire at ".$NewExpDate.'.');
|
||||
|
||||
$AdminComment = date("Y-m-d").' - Warning (Clash) extended to expire at '.$NewExpDate.' by '.$LoggedUser['Username']."\nReason: $Reason\n\n";
|
||||
$AdminComment = date('Y-m-d').' - Warning (Clash) extended to expire at '.$NewExpDate.' by '.$LoggedUser['Username']."\nReason: $Reason\n\n";
|
||||
|
||||
$DB->query('UPDATE users_info SET
|
||||
Warned=\''.db_string($NewExpDate).'\',
|
||||
@ -233,7 +234,7 @@ public static function warn_user($UserID, $Duration, $Reason) {
|
||||
$Cache->update_row(false, array('Warned' => $WarnTime));
|
||||
$Cache->commit_transaction(0);
|
||||
|
||||
$AdminComment = date("Y-m-d").' - Warned until '.$WarnTime.' by '.$LoggedUser['Username']."\nReason: $Reason\n\n";
|
||||
$AdminComment = date('Y-m-d').' - Warned until '.$WarnTime.' by '.$LoggedUser['Username']."\nReason: $Reason\n\n";
|
||||
|
||||
$DB->query('UPDATE users_info SET
|
||||
Warned=\''.db_string($WarnTime).'\',
|
||||
@ -254,6 +255,5 @@ public static function update_user_notes($UserID, $AdminComment) {
|
||||
AdminComment=CONCAT(\''.db_string($AdminComment).'\',AdminComment)
|
||||
WHERE UserID=\''.db_string($UserID).'\'');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
@ -534,7 +534,7 @@ public static function get_bookmarks ($UserID)
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate HTML for a user's avatar or just return the avatar url
|
||||
* Generate HTML for a user's avatar or just return the avatar URL
|
||||
* @param unknown $Avatar
|
||||
* @param unknown $Username
|
||||
* @param unknown $Setting
|
||||
@ -548,10 +548,10 @@ public static function show_avatar($Avatar, $Username, $Setting, $Size=150, $Ret
|
||||
switch ($Setting) {
|
||||
case 0:
|
||||
if (!empty($Avatar)) {
|
||||
$ToReturn = $ReturnHTML ? "<img src='$Avatar' width='$Size' style='max-height:400px;' alt='$Username avatar' />" : $Avatar;
|
||||
$ToReturn = $ReturnHTML ? "<img src=\"$Avatar\" width=\"$Size\" style=\"max-height: 400px;\" alt=\"$Username avatar\" />" : $Avatar;
|
||||
} else {
|
||||
$URL = STATIC_SERVER."common/avatars/default.png";
|
||||
$ToReturn = $ReturnHTML ? "<img src='$URL' width='$Size' style='max-height:400px;' alt='Default Avatar'/>" : $URL;
|
||||
$URL = STATIC_SERVER.'common/avatars/default.png';
|
||||
$ToReturn = $ReturnHTML ? "<img src=\"$URL\" width=\"$Size\" style=\"max-height: 400px;\" alt=\"Default avatar\" />" : $URL;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
@ -559,47 +559,47 @@ public static function show_avatar($Avatar, $Username, $Setting, $Size=150, $Ret
|
||||
case 3:
|
||||
switch ($LoggedUser['Identicons']) {
|
||||
case 0:
|
||||
$Type = "identicon";
|
||||
$Type = 'identicon';
|
||||
break;
|
||||
case 1:
|
||||
$Type = "monsterid";
|
||||
$Type = 'monsterid';
|
||||
break;
|
||||
case 2:
|
||||
$Type = "wavatar";
|
||||
$Type = 'wavatar';
|
||||
break;
|
||||
case 3:
|
||||
$Type = "retro";
|
||||
$Type = 'retro';
|
||||
break;
|
||||
case 4:
|
||||
$Type = "1";
|
||||
$Type = '1';
|
||||
$Robot = True;
|
||||
break;
|
||||
case 5:
|
||||
$Type = "2";
|
||||
$Type = '2';
|
||||
$Robot = True;
|
||||
break;
|
||||
case 6:
|
||||
$Type = "3";
|
||||
$Type = '3';
|
||||
$Robot = True;
|
||||
break;
|
||||
default:
|
||||
$Type = "identicon";
|
||||
$Type = 'identicon';
|
||||
}
|
||||
$Rating = "pg";
|
||||
$Rating = 'pg';
|
||||
if (!$Robot) {
|
||||
$URL = "https://secure.gravatar.com/avatar/".md5(strtolower(trim($Username)))."?s=$Size&d=$Type&r=$Rating";
|
||||
$URL = 'https://secure.gravatar.com/avatar/'.md5(strtolower(trim($Username)))."?s=$Size&d=$Type&r=$Rating";
|
||||
} else {
|
||||
$URL = "https://static1.robohash.org/".md5($Username)."?set=set".$Type."&size=".$Size."x".$Size;
|
||||
$URL = 'https://robohash.org/'.md5($Username).'?set=set'.$Type.'&size='.$Size.'x'.$Size;
|
||||
}
|
||||
if ($ShowAvatar == True && !empty($Avatar)) {
|
||||
$ToReturn = $ReturnHTML ? "<img src='$Avatar' width='$Size' style='max-height:400px;' alt='$Username avatar' />" : $Avatar;
|
||||
$ToReturn = $ReturnHTML ? "<img src=\"$Avatar\" width=\"$Size\" style=\"max-height: 400px;\" alt=\"$Username avatar\" />" : $Avatar;
|
||||
} else {
|
||||
$ToReturn = $ReturnHTML ? "<img src='$URL' width='$Size' style='max-height:400px;' alt='Default Avatar'/>" : $URL;
|
||||
$ToReturn = $ReturnHTML ? "<img src=\"$URL\" width=\"$Size\" style=\"max-height: 400px;\" alt=\"Default avatar\" />" : $URL;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$URL = STATIC_SERVER."common/avatars/default.png";
|
||||
$ToReturn = $ReturnHTML ? "<img src='$URL' width='$Size' style='max-height:400px;' alt='Default Avatar'/>" : $URL;
|
||||
$URL = STATIC_SERVER.'common/avatars/default.png';
|
||||
$ToReturn = $ReturnHTML ? "<img src=\"$URL\" width=\"$Size\" style=\"max-height: 400px;\" alt=\"Default avatar\" />" : $URL;
|
||||
}
|
||||
return $ToReturn;
|
||||
}
|
||||
|
@ -539,7 +539,7 @@ function _Send ( $handle, $data, $length )
|
||||
/// enter mbstring workaround mode
|
||||
function _MBPush ()
|
||||
{
|
||||
$this->_mbenc = "";
|
||||
$this->_mbenc = '';
|
||||
if ( ini_get ( "mbstring.func_overload" ) & 2 )
|
||||
{
|
||||
$this->_mbenc = mb_internal_encoding();
|
||||
@ -931,10 +931,10 @@ function ResetFilters ()
|
||||
/// clear groupby settings (for multi-queries)
|
||||
function ResetGroupBy ()
|
||||
{
|
||||
$this->_groupby = "";
|
||||
$this->_groupby = '';
|
||||
$this->_groupfunc = SPH_GROUPBY_DAY;
|
||||
$this->_groupsort = "@group desc";
|
||||
$this->_groupdistinct= "";
|
||||
$this->_groupdistinct= '';
|
||||
}
|
||||
|
||||
/// clear all attribute value overrides (for multi-queries)
|
||||
|
@ -47,7 +47,8 @@ function compare($X, $Y){
|
||||
|
||||
} else {
|
||||
if ($RevisionID) {
|
||||
$sql = "SELECT
|
||||
$sql = "
|
||||
SELECT
|
||||
a.Name,
|
||||
wiki.Image,
|
||||
wiki.body,
|
||||
@ -56,7 +57,8 @@ function compare($X, $Y){
|
||||
LEFT JOIN artists_group AS a ON wiki.RevisionID=a.RevisionID
|
||||
WHERE wiki.RevisionID='$RevisionID' ";
|
||||
} else {
|
||||
$sql = "SELECT
|
||||
$sql = "
|
||||
SELECT
|
||||
a.Name,
|
||||
wiki.Image,
|
||||
wiki.body,
|
||||
@ -78,7 +80,8 @@ function compare($X, $Y){
|
||||
// Requests
|
||||
$Requests = $Cache->get_value('artists_requests_'.$ArtistID);
|
||||
if (!is_array($Requests)) {
|
||||
$DB->query("SELECT
|
||||
$DB->query("
|
||||
SELECT
|
||||
r.ID,
|
||||
r.CategoryID,
|
||||
r.Title,
|
||||
@ -104,7 +107,8 @@ function compare($X, $Y){
|
||||
$NumRequests = count($Requests);
|
||||
|
||||
if (($Importances = $Cache->get_value('artist_groups_'.$ArtistID)) === false) {
|
||||
$DB->query("SELECT
|
||||
$DB->query("
|
||||
SELECT
|
||||
DISTINCTROW ta.GroupID, ta.Importance, tg.VanityHouse, tg.Year
|
||||
FROM torrents_artists AS ta
|
||||
JOIN torrents_group AS tg ON tg.ID=ta.GroupID
|
||||
|
@ -146,8 +146,7 @@
|
||||
print json_encode(array('status' => 'failure'));
|
||||
}
|
||||
|
||||
function pullmediainfo($Array)
|
||||
{
|
||||
function pullmediainfo($Array) {
|
||||
$NewArray = array();
|
||||
foreach ($Array as $Item) {
|
||||
$NewArray[] = array(
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?
|
||||
|
||||
//calculate ratio
|
||||
//returns 0 for DNE and -1 for infiinity, because we dont want strings being returned for a numeric value in our java
|
||||
//returns 0 for DNE and -1 for infinity, because we don't want strings being returned for a numeric value in our java
|
||||
$Ratio = 0;
|
||||
if ($LoggedUser['BytesUploaded'] == 0 && $LoggedUser['BytesDownloaded'] == 0) {
|
||||
$Ratio = 0;
|
||||
@ -23,7 +22,6 @@
|
||||
$Cache->cache_value('news_latest_id', $CurrentNews, 0);
|
||||
}
|
||||
|
||||
|
||||
$NewMessages = $Cache->get_value('inbox_new_' . $LoggedUser['ID']);
|
||||
if ($NewMessages === false) {
|
||||
$DB->query("SELECT COUNT(UnRead) FROM pm_conversations_users WHERE UserID='" . $LoggedUser['ID'] . "' AND UnRead = '1' AND InInbox = '1'");
|
||||
@ -78,7 +76,8 @@
|
||||
$RestrictedForums = implode("','", array_keys($LoggedUser['CustomForums'], 0));
|
||||
$PermittedForums = implode("','", array_keys($LoggedUser['CustomForums'], 1));
|
||||
}
|
||||
$DB->query("SELECT COUNT(s.TopicID)
|
||||
$DB->query("
|
||||
SELECT COUNT(s.TopicID)
|
||||
FROM users_subscriptions AS s
|
||||
JOIN forums_last_read_topics AS l ON s.UserID = l.UserID AND s.TopicID = l.TopicID
|
||||
JOIN forums_topics AS t ON l.TopicID = t.ID
|
||||
@ -87,7 +86,7 @@
|
||||
AND l.PostID < t.LastPostID
|
||||
AND s.UserID = " . $LoggedUser['ID'] .
|
||||
(!empty($RestrictedForums) ? "
|
||||
AND f.ID NOT IN ('" . $RestrictedForums . "')" : ""));
|
||||
AND f.ID NOT IN ('" . $RestrictedForums . "')" : ''));
|
||||
list($NewSubscriptions) = $DB->next_record();
|
||||
$Cache->cache_value('subscriptions_user_new_' . $LoggedUser['ID'], $NewSubscriptions, 0);
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?
|
||||
|
||||
|
||||
$RequestTax = 0.1;
|
||||
|
||||
// Minimum and default amount of upload to remove from the user when they vote.
|
||||
@ -96,7 +95,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'));
|
||||
|
||||
|
@ -9,14 +9,17 @@
|
||||
die();
|
||||
}
|
||||
// Make sure the recipient is on your friends list and not some random dude.
|
||||
$DB->query("SELECT
|
||||
f.FriendID, u.Username
|
||||
$DB->query("
|
||||
SELECT
|
||||
f.FriendID,
|
||||
u.Username
|
||||
FROM friends AS f
|
||||
RIGHT JOIN users_enable_recommendations AS r
|
||||
ON r.ID = f.FriendID AND r.Enable = 1
|
||||
RIGHT JOIN users_main AS u
|
||||
ON u.ID = f.FriendID
|
||||
WHERE f.UserID = '$LoggedUser[ID]' AND f.FriendID = '$FriendID'");
|
||||
WHERE f.UserID = '$LoggedUser[ID]'
|
||||
AND f.FriendID = '$FriendID'");
|
||||
|
||||
if ($DB->record_count() == 0) {
|
||||
echo json_encode(array("status" => "error", "response" => "Not on friend list."));
|
||||
@ -24,10 +27,10 @@
|
||||
}
|
||||
|
||||
$Type = strtolower($Type);
|
||||
$Link = "";
|
||||
$Link = '';
|
||||
// "a" vs "an", english language is so confusing.
|
||||
// http://en.wikipedia.org/wiki/English_articles#Distinction_between_a_and_an
|
||||
$Article = "a";
|
||||
$Article = 'a';
|
||||
switch ($Type) {
|
||||
case 'torrent':
|
||||
$Link = "torrents.php?id=".$ID;
|
||||
@ -45,7 +48,7 @@
|
||||
}
|
||||
list($Name) = $DB->next_record();
|
||||
$Subject = $LoggedUser['Username'] . " recommended you $Article " . $Type . "!";
|
||||
$Body = $LoggedUser['Username'] . " recommended you the ".$Type." [url=https://".NONSSL_SITE_URL."/".$Link."]".$Name."[/url].";
|
||||
$Body = $LoggedUser['Username'] . " recommended you the ".$Type." [url=https://".SSL_SITE_URL."/$Link]$Name".'[/url].';
|
||||
if (!empty($Note)) {
|
||||
$Body = $Body . "\n\n". $Note;
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
|
||||
|
||||
require(SERVER_ROOT.'/sections/torrents/functions.php');
|
||||
|
||||
include(SERVER_ROOT.'/classes/class_text.php'); // Text formatting class
|
||||
@ -11,19 +10,21 @@
|
||||
|
||||
$GroupID = (int)$_GET['id'];
|
||||
|
||||
if ($GroupID == 0) { error('bad id parameter', true); }
|
||||
if ($GroupID == 0) {
|
||||
error('bad id parameter', true);
|
||||
}
|
||||
|
||||
$TorrentCache = get_group_info($GroupID, true, 0);
|
||||
list($TorrentDetails, $TorrentList) = $TorrentCache;
|
||||
|
||||
$ArtistForm = Artists::get_artist($GroupID);
|
||||
if ($TorrentDetails['CategoryID'] == 0) {
|
||||
$CategoryName = "Unknown";
|
||||
$CategoryName = 'Unknown';
|
||||
} else {
|
||||
$CategoryName = $Categories[$TorrentDetails['CategoryID'] - 1];
|
||||
}
|
||||
$JsonMusicInfo = array();
|
||||
if ($CategoryName == "Music") {
|
||||
if ($CategoryName == 'Music') {
|
||||
$JsonMusicInfo = array(
|
||||
'composers' => $ArtistForm[4] == null ? array() : pullmediainfo($ArtistForm[4]),
|
||||
'dj' => $ArtistForm[6] == null ? array() : pullmediainfo($ArtistForm[6]),
|
||||
@ -33,8 +34,7 @@
|
||||
'remixedBy' => $ArtistForm[3] == null ? array() : pullmediainfo($ArtistForm[3]),
|
||||
'producer' => $ArtistForm[7] == null ? array() : pullmediainfo($ArtistForm[7])
|
||||
);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$JsonMusicInfo = NULL;
|
||||
}
|
||||
|
||||
|
@ -501,8 +501,7 @@ function compare($X, $Y) {
|
||||
<?
|
||||
}
|
||||
?>
|
||||
<!-- <a href="#" id="recommend" class="brackets">Recommend</a>
|
||||
-->
|
||||
<!-- <a href="#" id="recommend" class="brackets">Recommend</a> -->
|
||||
<?
|
||||
if (check_perms('site_edit_wiki')) {
|
||||
?>
|
||||
|
@ -7,7 +7,8 @@
|
||||
WHERE t.Format='FLAC'
|
||||
GROUP BY x.fid
|
||||
HAVING COUNT(x.uid) = 1
|
||||
ORDER BY t.LogScore DESC, t.Time ASC LIMIT 30");
|
||||
ORDER BY t.LogScore DESC, t.Time ASC
|
||||
LIMIT 30");
|
||||
|
||||
$GroupIDs = $DB->to_array('GroupID');
|
||||
$Cache->cache_value('better_single_groupids', $GroupIDs, 30*60);
|
||||
@ -41,8 +42,12 @@
|
||||
$FlacID = $GroupIDs[$GroupID]['TorrentID'];
|
||||
|
||||
$DisplayName.='<a href="torrents.php?id='.$GroupID.'&torrentid='.$FlacID.'" title="View Torrent">'.$GroupName.'</a>';
|
||||
if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; }
|
||||
if($ReleaseType>0) { $DisplayName.=" [".$ReleaseTypes[$ReleaseType]."]"; }
|
||||
if ($GroupYear > 0) {
|
||||
$DisplayName.=" [$GroupYear]";
|
||||
}
|
||||
if ($ReleaseType > 0) {
|
||||
$DisplayName.=" [".$ReleaseTypes[$ReleaseType]."]";
|
||||
}
|
||||
|
||||
$ExtraInfo = Torrents::torrent_info($Torrents[$FlacID]);
|
||||
if ($ExtraInfo) {
|
||||
|
@ -66,7 +66,7 @@
|
||||
'".db_string($_POST['title'])."',
|
||||
'".db_string($_POST['body'])."',
|
||||
'".sqltime()."',
|
||||
".$ThreadID.",
|
||||
$ThreadID,
|
||||
'".(($_POST['important'] == '1') ? '1' : '0')."')");
|
||||
$Cache->delete_value('blog');
|
||||
if ($_POST['important'] == '1') {
|
||||
@ -98,7 +98,7 @@
|
||||
<input type="text" name="title" size="95"<? if (!empty($Title)) { echo ' value="'.display_str($Title).'"'; } ?> /><br />
|
||||
<h3>Body</h3>
|
||||
<textarea name="body" cols="95" rows="15"><? if (!empty($Body)) { echo display_str($Body); } ?></textarea> <br />
|
||||
<input type="checkbox" value='1' name="important" id="important" <?=$Important?'checked="checked" ':''?>/><label for="important">Important</label><br />
|
||||
<input type="checkbox" value="1" name="important" id="important"<?=$Important ? ' checked="checked"' : '' ?> /><label for="important">Important</label><br />
|
||||
<h3>Thread ID</h3>
|
||||
<input type="text" name="thread" size="8"<? if (!empty($ThreadID)) { echo ' value="'.display_str($ThreadID).'"'; } ?> />
|
||||
(Leave blank to create thread automatically)
|
||||
@ -126,7 +126,8 @@
|
||||
b.Body,
|
||||
b.Time,
|
||||
b.ThreadID
|
||||
FROM blog AS b LEFT JOIN users_main AS um ON b.UserID=um.ID
|
||||
FROM blog AS b
|
||||
LEFT JOIN users_main AS um ON b.UserID=um.ID
|
||||
ORDER BY Time DESC
|
||||
LIMIT 20");
|
||||
$Blog = $DB->to_array();
|
||||
|
@ -39,7 +39,9 @@
|
||||
if (!empty($_GET['cats'])) {
|
||||
$Categories = $_GET['cats'];
|
||||
foreach ($Categories as $Cat=>$Accept) {
|
||||
if(empty($CollageCats[$Cat]) || !$Accept) { unset($Categories[$Cat]); }
|
||||
if (empty($CollageCats[$Cat]) || !$Accept) {
|
||||
unset($Categories[$Cat]);
|
||||
}
|
||||
}
|
||||
$Categories = array_keys($Categories);
|
||||
} else {
|
||||
@ -118,7 +120,9 @@
|
||||
|
||||
$UserLink = '<a href="user.php?id='.$UserID.'">'.$User['Username'].'</a>';
|
||||
if (!empty($_GET['contrib'])) {
|
||||
if (!check_paranoia('collagecontribs', $User['Paranoia'], $UserClass, $UserID)) { error(403); }
|
||||
if (!check_paranoia('collagecontribs', $User['Paranoia'], $UserClass, $UserID)) {
|
||||
error(403);
|
||||
}
|
||||
$DB->query("SELECT DISTINCT CollageID FROM collages_torrents WHERE UserID = $UserID");
|
||||
$CollageIDs = $DB->collect('CollageID');
|
||||
if (empty($CollageIDs)) {
|
||||
@ -242,14 +246,11 @@
|
||||
<?
|
||||
if (check_perms('site_collages_recover')) { ?>
|
||||
<a href="collages.php?action=recover" class="brackets">Recover collage</a>
|
||||
<?
|
||||
}
|
||||
<? }
|
||||
if (check_perms('site_collages_create') || check_perms('site_collages_personal') || check_perms('site_collages_recover')) {
|
||||
?>
|
||||
<br />
|
||||
<?
|
||||
}
|
||||
?>
|
||||
<? } ?>
|
||||
<a href="collages.php?userid=<?=$LoggedUser['ID']?>" class="brackets">Collages you started</a>
|
||||
<a href="collages.php?userid=<?=$LoggedUser['ID']?>&contrib=1" class="brackets">Collages you contributed to</a>
|
||||
<? } else { ?>
|
||||
@ -274,7 +275,8 @@
|
||||
<? } ?>
|
||||
</div><!--box-->
|
||||
</div><!--content-->
|
||||
<? View::show_footer(); die();
|
||||
<? View::show_footer();
|
||||
die();
|
||||
} ?>
|
||||
<table width="100%" class="collage_table">
|
||||
<tr class="colhead">
|
||||
@ -299,7 +301,7 @@
|
||||
<td>
|
||||
<a href="collages.php?id=<?=$ID?>"><?=$Name?></a>
|
||||
<? if ($BookmarkView) { ?>
|
||||
<span style="float:right">
|
||||
<span style="float: right;">
|
||||
<a href="#" onclick="Unbookmark('collage', <?=$ID?>,'');return false;" class="brackets">Remove bookmark</a>
|
||||
</span>
|
||||
<? } ?>
|
||||
@ -308,7 +310,8 @@
|
||||
<td><?=number_format((int)$NumTorrents)?></td>
|
||||
<td><?=Users::format_username($UserID, false, false, false)?></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<?
|
||||
} ?>
|
||||
</table>
|
||||
<div class="linkbox"><?=$Pages?></div>
|
||||
</div>
|
||||
|
@ -279,7 +279,7 @@ function compare($X, $Y){
|
||||
}
|
||||
$DisplayName .= $GroupName;
|
||||
if ($GroupYear > 0) {
|
||||
$DisplayName = $DisplayName. ' ['. $GroupYear .']';
|
||||
$DisplayName = $DisplayName. " [$GroupYear]";
|
||||
}
|
||||
?>
|
||||
<li class="image_group_<?=$GroupID?>">
|
||||
@ -350,8 +350,7 @@ function compare($X, $Y){
|
||||
<a href="#" id="bookmarklink_collage_<?=$CollageID?>" class="brackets" onclick="Bookmark('collage', <?=$CollageID?>,'Remove bookmark');return false;">Bookmark</a>
|
||||
<? }
|
||||
?>
|
||||
<!-- <a href="#" id="recommend" class="brackets">Recommend</a>
|
||||
-->
|
||||
<!-- <a href="#" id="recommend" class="brackets">Recommend</a> -->
|
||||
<?
|
||||
if (check_perms('site_collages_manage') && !$Locked) { ?>
|
||||
<a href="collages.php?action=manage&collageid=<?=$CollageID?>" class="brackets">Manage torrents</a>
|
||||
|
@ -1,36 +1,52 @@
|
||||
<?
|
||||
enforce_login();
|
||||
|
||||
if(empty($_REQUEST['action'])) { $_REQUEST['action']=''; }
|
||||
if (empty($_REQUEST['action'])) {
|
||||
$_REQUEST['action'] = '';
|
||||
}
|
||||
|
||||
switch ($_REQUEST['action']) {
|
||||
case 'new':
|
||||
if(!check_perms('site_collages_create')) { error(403); }
|
||||
if (!check_perms('site_collages_create')) {
|
||||
error(403);
|
||||
}
|
||||
require(SERVER_ROOT.'/sections/collages/new.php');
|
||||
break;
|
||||
case 'new_handle':
|
||||
if(!check_perms('site_collages_create')) { error(403); }
|
||||
if (!check_perms('site_collages_create')) {
|
||||
error(403);
|
||||
}
|
||||
require(SERVER_ROOT.'/sections/collages/new_handle.php');
|
||||
break;
|
||||
case 'add_torrent':
|
||||
case 'add_torrent_batch':
|
||||
if(!check_perms('site_collages_manage')) { error(403); }
|
||||
if (!check_perms('site_collages_manage')) {
|
||||
error(403);
|
||||
}
|
||||
require(SERVER_ROOT.'/sections/collages/add_torrent.php');
|
||||
break;
|
||||
case 'manage':
|
||||
if(!check_perms('site_collages_manage')) { error(403); }
|
||||
if (!check_perms('site_collages_manage')) {
|
||||
error(403);
|
||||
}
|
||||
require(SERVER_ROOT.'/sections/collages/manage.php');
|
||||
break;
|
||||
case 'manage_handle':
|
||||
if(!check_perms('site_collages_manage')) { error(403); }
|
||||
if (!check_perms('site_collages_manage')) {
|
||||
error(403);
|
||||
}
|
||||
require(SERVER_ROOT.'/sections/collages/manage_handle.php');
|
||||
break;
|
||||
case 'edit':
|
||||
if(!check_perms('site_edit_wiki')) { error(403); }
|
||||
if (!check_perms('site_edit_wiki')) {
|
||||
error(403);
|
||||
}
|
||||
require(SERVER_ROOT.'/sections/collages/edit.php');
|
||||
break;
|
||||
case 'edit_handle':
|
||||
if(!check_perms('site_edit_wiki')) { error(403); }
|
||||
if (!check_perms('site_edit_wiki')) {
|
||||
error(403);
|
||||
}
|
||||
require(SERVER_ROOT.'/sections/collages/edit_handle.php');
|
||||
break;
|
||||
case 'delete':
|
||||
@ -59,7 +75,9 @@
|
||||
require(SERVER_ROOT.'/sections/collages/download.php');
|
||||
break;
|
||||
case 'recover':
|
||||
//if(!check_perms('')) { error(403); }
|
||||
//if (!check_perms('')) {
|
||||
// error(403);
|
||||
//}
|
||||
require(SERVER_ROOT.'/sections/collages/recover.php');
|
||||
break;
|
||||
case 'create_personal':
|
||||
@ -67,7 +85,13 @@
|
||||
error(403);
|
||||
}
|
||||
|
||||
$DB->query("SELECT COUNT(ID) FROM collages WHERE UserID='$LoggedUser[ID]' AND CategoryID='0' AND Deleted='0'");
|
||||
$DB->query("
|
||||
SELECT
|
||||
COUNT(ID)
|
||||
FROM collages
|
||||
WHERE UserID='$LoggedUser[ID]'
|
||||
AND CategoryID='0'
|
||||
AND Deleted='0'");
|
||||
list($CollageCount) = $DB->next_record();
|
||||
|
||||
if ($CollageCount >= $LoggedUser['Permissions']['MaxCollages']) {
|
||||
@ -76,7 +100,11 @@
|
||||
die();
|
||||
}
|
||||
$NameStr = ($CollageCount > 0)?" no. " . ($CollageCount + 1):'';
|
||||
$DB->query("INSERT INTO collages (Name, Description, CategoryID, UserID) VALUES ('$LoggedUser[Username]\'s personal collage$NameStr', 'Personal collage for $LoggedUser[Username]. The first 5 albums will appear on his or her [url=http:\/\/".NONSSL_SITE_URL."\/user.php?id=$LoggedUser[ID]]profile[\/url].', '0', $LoggedUser[ID])");
|
||||
$DB->query("
|
||||
INSERT INTO collages
|
||||
(Name, Description, CategoryID, UserID)
|
||||
VALUES
|
||||
('$LoggedUser[Username]\'s personal collage$NameStr', 'Personal collage for $LoggedUser[Username]. The first 5 albums will appear on his or her [url=https:\/\/".SSL_SITE_URL."\/user.php?id=$LoggedUser[ID]]profile[\/url].', '0', $LoggedUser[ID])");
|
||||
$CollageID = $DB->inserted_id();
|
||||
header('Location: collage.php?id='.$CollageID);
|
||||
die();
|
||||
|
@ -20,7 +20,8 @@
|
||||
if (!empty($Error)) { ?>
|
||||
<div class="save_message error"><?=$Error?></div>
|
||||
<br />
|
||||
<? } ?>
|
||||
<?
|
||||
} ?>
|
||||
<form class="create_form" name="collage" action="collages.php" method="post">
|
||||
<input type="hidden" name="action" value="new_handle" />
|
||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
@ -28,8 +29,8 @@
|
||||
<tr id="collagename">
|
||||
<td class="label"><strong>Name</strong></td>
|
||||
<td>
|
||||
<input type="text" class="<?=$NoName?'hidden':''?>" name="name" size="60" id="namebox" value="<?=display_str($Name)?>" />
|
||||
<span id="personal" class="<?=$NoName?'':'hidden'?>" style="font-style: oblique"><strong><?=$LoggedUser['Username']?>'s personal collage</strong></span>
|
||||
<input type="text"<?=$NoName ? ' class="hidden"' : '' ?> name="name" size="60" id="namebox" value="<?=display_str($Name)?>" />
|
||||
<span id="personal"<?=$NoName ? '' : ' class="hidden"' ?> style="font-style: oblique;"><strong><?=$LoggedUser['Username']?>'s personal collage</strong></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -39,26 +40,29 @@
|
||||
<?
|
||||
array_shift($CollageCats);
|
||||
|
||||
foreach($CollageCats as $CatID=>$CatName) { ?>
|
||||
foreach ($CollageCats as $CatID=>$CatName) : ?>
|
||||
<option value="<?=$CatID + 1 ?>"<?=(($CatID + 1 == $Category) ? ' selected="selected"' : '')?>><?=$CatName?></option>
|
||||
<? }
|
||||
<?
|
||||
endforeach;
|
||||
|
||||
$DB->query("SELECT COUNT(ID) FROM collages WHERE UserID='$LoggedUser[ID]' AND CategoryID='0' AND Deleted='0'");
|
||||
list($CollageCount) = $DB->next_record();
|
||||
if (($CollageCount < $LoggedUser['Permissions']['MaxCollages']) && check_perms('site_collages_personal')) { ?>
|
||||
<option value="0"<?=(($Category === '0') ? ' selected="selected"' : '')?>>Personal</option>
|
||||
<? } ?>
|
||||
<?
|
||||
} ?>
|
||||
</select>
|
||||
<br />
|
||||
<ul>
|
||||
<li><strong>Theme</strong> - A collage containing releases that all relate to a certain theme (e.g. "Searching for the Perfect Beat", "Concept Albums", "Funky Groove", etc.).</li>
|
||||
<li><strong>Genre introduction</strong> - A subjective introduction to a genre composed by our own users.</li>
|
||||
<li><strong>Discography</strong> - A collage containing all the releases of an artist. Useful for keeping track of side-projects.</li>
|
||||
<li><strong>Discography</strong> - A collage containing all the releases of an artist, which can be useful for keeping track of side projects.</li>
|
||||
<li><strong>Label</strong> - A collage containing all the releases of a particular record label.</li>
|
||||
<li><strong>Staff picks</strong> - A listing of recommendations picked by the staff on special occasions.</li>
|
||||
<li><strong>Charts</strong> - Contains all the releases that comprise a certain type of chart (e.g. Billboard Top 100, Pitchfork Top 100, What.cd Top 10, etc.).</li>
|
||||
<li><strong>Charts</strong> - Contains all the releases that comprise a certain type of chart (e.g. Billboard Top 100, Pitchfork Top 100, What.CD Top 10, etc.).</li>
|
||||
<?
|
||||
if (($CollageCount < $LoggedUser['Permissions']['MaxCollages']) && check_perms('site_collages_personal')) { ?>
|
||||
<li><strong>Personal</strong> - You can put whatever you want here. It's your own personal collage.</li>
|
||||
<li><strong>Personal</strong> - You can put whatever you want here. It is your own personal collage.</li>
|
||||
<? } ?>
|
||||
</ul>
|
||||
</td>
|
||||
|
@ -5,7 +5,8 @@
|
||||
$Title = 'Artist comments made by '.($Self ? 'you' : $Username);
|
||||
$Header = 'Artist comments left by '.($Self ? 'you' : Users::format_username($UserID, false, false, false)).'';
|
||||
|
||||
$Comments = $DB->query("SELECT
|
||||
$Comments = $DB->query("
|
||||
SELECT
|
||||
SQL_CALC_FOUND_ROWS
|
||||
ac.AuthorID,
|
||||
a.ArtistID,
|
||||
@ -15,16 +16,11 @@
|
||||
ac.AddedTime,
|
||||
ac.EditedTime,
|
||||
ac.EditedUserID as EditorID
|
||||
|
||||
FROM artists_group as a
|
||||
JOIN artist_comments as ac ON ac.ArtistID = a.ArtistID
|
||||
|
||||
WHERE ac.AuthorId = $UserID
|
||||
|
||||
GROUP BY ac.ID
|
||||
|
||||
ORDER BY ac.AddedTime DESC
|
||||
|
||||
LIMIT $Limit;
|
||||
");
|
||||
|
||||
@ -55,7 +51,7 @@
|
||||
|
||||
while (list($UserID, $ArtistID, $ArtistName, $PostID, $Body, $AddedTime, $EditedTime, $EditorID) = $DB->next_record()) {
|
||||
$permalink = "artist.php?id=$ArtistID&postid=$PostID#post$PostID";
|
||||
$postheader = " on " . "<a href=\"artist.php?id=$ArtistID\">$ArtistName</a>";
|
||||
$postheader = ' on ' . "<a href=\"artist.php?id=$ArtistID\">$ArtistName</a>";
|
||||
|
||||
comment_body($UserID, $PostID, $postheader, $permalink, $Body, $EditorID, $AddedTime, $EditedTime);
|
||||
|
||||
@ -63,6 +59,5 @@
|
||||
<div class="linkbox"><?= $Pages; ?></div>
|
||||
</div>
|
||||
<?
|
||||
|
||||
View::show_footer();
|
||||
|
||||
|
@ -15,35 +15,35 @@
|
||||
function comment_body($UserID, $PostID, $postheader, $permalink, $Body, $EditorID, $AddedTime, $EditedTime) {
|
||||
global $Text,$HeavyInfo;
|
||||
$UserInfo = Users::user_info($UserID);
|
||||
$postheader = "by <strong>" . Users::format_username($UserID, true, true, true, true, false) . "</strong> "
|
||||
$postheader = 'by <strong>' . Users::format_username($UserID, true, true, true, true, false) . '</strong> '
|
||||
. time_diff($AddedTime) . $postheader;
|
||||
|
||||
?>
|
||||
<table class='forum_post box vertical_margin<?=$noavatar ? ' noavatar' : ''?>' id="post<?=$PostID?>">
|
||||
<table class="forum_post box vertical_margin<?=$noavatar ? ' noavatar' : '' ?>" id="post<?=$PostID?>">
|
||||
<colgroup>
|
||||
<? if (empty($UserInfo['DisableAvatars'])) { ?>
|
||||
<col class="col_avatar" />
|
||||
<? } ?>
|
||||
<col class="col_post_body" />
|
||||
</colgroup>
|
||||
<tr class='colhead_dark'>
|
||||
<tr class="colhead_dark">
|
||||
<td colspan="<?=empty($UserInfo['DisableAvatars']) ? 2 : 1 ?>">
|
||||
<span style="float:left;"><a href='<?=$permalink ?>'>#<?=$PostID?></a>
|
||||
<span style="float: left;"><a href="<?=$permalink ?>">#<?=$PostID?></a>
|
||||
<?=$postheader ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<? if (empty($HeavyInfo['DisableAvatars'])) { ?>
|
||||
<td class='avatar' valign="top">
|
||||
<td class="avatar" valign="top">
|
||||
<? if ($UserInfo['Avatar']) { ?>
|
||||
<img src='<?=$UserInfo['Avatar']?>' width='150' alt="<?=$UserInfo['Username']?>'s avatar" />
|
||||
<img src="<?=$UserInfo['Avatar']?>" width="150" alt="<?=$UserInfo['Username']?>'s avatar" />
|
||||
<? } else { ?>
|
||||
<img src="<?=STATIC_SERVER?>common/avatars/default.png" width="150" alt="Default avatar" />
|
||||
<? } ?>
|
||||
</td>
|
||||
<? } ?>
|
||||
<td class='body' valign="top">
|
||||
<td class="body" valign="top">
|
||||
<?=$Text->full_format($Body) ?>
|
||||
<? if ($EditorID) { ?>
|
||||
<br /><br />
|
||||
|
@ -21,8 +21,7 @@
|
||||
if ($Self) {
|
||||
$OtherLink .= '<a href="comments.php?action=torrents" class="brackets">Display comments you have made</a>';
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$Conditions = "WHERE tc.AuthorID = $UserID";
|
||||
$Title = 'Comments made by '.($Self?'you':$Username);
|
||||
$Header = 'Torrent comments left by '.($Self?'you':Users::format_username($UserID, false, false, false)).'';
|
||||
@ -42,17 +41,12 @@
|
||||
tc.AddedTime,
|
||||
tc.EditedTime,
|
||||
tc.EditedUserID as EditorID
|
||||
|
||||
FROM torrents as t
|
||||
JOIN torrents_comments as tc ON tc.GroupID = t.GroupID
|
||||
JOIN torrents_group as tg ON t.GroupID = tg.ID
|
||||
|
||||
$Conditions
|
||||
|
||||
GROUP BY tc.ID
|
||||
|
||||
ORDER BY tc.AddedTime DESC
|
||||
|
||||
LIMIT $Limit;
|
||||
");
|
||||
|
||||
@ -81,10 +75,9 @@
|
||||
<?=$Pages?>
|
||||
</div>
|
||||
<?
|
||||
|
||||
while (list($UserID, $TorrentID, $GroupID, $Title, $PostID, $Body, $AddedTime, $EditedTime, $EditorID) = $DB->next_record()) {
|
||||
$permalink = "torrents.php?id=$GroupID&postid=$PostID#post$PostID";
|
||||
$postheader = " on " . Artists::display_artists($Artists[$GroupID]) . " <a href=\"torrents.php?id=$GroupID\">$Title</a>";
|
||||
$postheader = ' on ' . Artists::display_artists($Artists[$GroupID]) . " <a href=\"torrents.php?id=$GroupID\">$Title</a>";
|
||||
|
||||
comment_body($UserID, $PostID, $postheader, $permalink, $Body, $EditorID, $AddedTime, $EditedTime);
|
||||
|
||||
|
@ -55,9 +55,9 @@
|
||||
<input type="hidden" name="rm" value="2" />
|
||||
<input type="hidden" name="cmd" value="_donations" />
|
||||
<input type="hidden" name="business" value="<?=PAYPAL_ADDRESS?>" />
|
||||
<input type="hidden" name="return" value="http://<?=SITE_URL?>/donate.php?action=complete" />
|
||||
<input type="hidden" name="cancel_return" value="http://<?=SITE_URL?>/donate.php?action=cancel" />
|
||||
<input type="hidden" name="notify_url" value="http://<?=NONSSL_SITE_URL?>/donate.php?action=ipn" />
|
||||
<input type="hidden" name="return" value="https://<?=SSL_SITE_URL?>/donate.php?action=complete" />
|
||||
<input type="hidden" name="cancel_return" value="https://<?=SSL_SITE_URL?>/donate.php?action=cancel" />
|
||||
<input type="hidden" name="notify_url" value="https://<?=SSL_SITE_URL?>/donate.php?action=ipn" />
|
||||
<input type="hidden" name="item_name" value="Donation" />
|
||||
<input type="hidden" name="amount" value="" />
|
||||
<input type="hidden" name="custom" value="<?=$LoggedUser['ID']?>" />
|
||||
|
@ -56,9 +56,9 @@
|
||||
<input type="hidden" name="rm" value="2" />
|
||||
<input type="hidden" name="cmd" value="_donations" />
|
||||
<input type="hidden" name="business" value="<?=PAYPAL_ADDRESS?>" />
|
||||
<input type="hidden" name="return" value="http://<?=SITE_URL?>/donate.php?action=complete" />
|
||||
<input type="hidden" name="cancel_return" value="http://<?=SITE_URL?>/donate.php?action=cancel" />
|
||||
<input type="hidden" name="notify_url" value="http://<?=NONSSL_SITE_URL?>/donate.php?action=ipn" />
|
||||
<input type="hidden" name="return" value="https://<?=SSL_SITE_URL?>/donate.php?action=complete" />
|
||||
<input type="hidden" name="cancel_return" value="https://<?=SSL_SITE_URL?>/donate.php?action=cancel" />
|
||||
<input type="hidden" name="notify_url" value="https://<?=SSL_SITE_URL?>/donate.php?action=ipn" />
|
||||
<input type="hidden" name="item_name" value="Donation" />
|
||||
<input type="hidden" name="amount" value="" />
|
||||
<input type="hidden" name="custom" value="<?=$LoggedUser['ID']?>" />
|
||||
|
@ -63,7 +63,7 @@
|
||||
Misc::send_pm($_POST['custom'], 0, 'Thank you for your donation', 'Your donation from '.$_POST['payer_email'].' of '.$_POST['mc_gross'].' '.PAYPAL_CURRENCY.' has been successfully processed. Unfortunately however this donation was less than the specified minimum donation of '.PAYPAL_MINIMUM.' '.PAYPAL_CURRENCY.' and while we are grateful, no special privileges have been awarded to you.');
|
||||
} else {
|
||||
//Failed pending donation
|
||||
$Message = "User http://".NONSSL_SITE_URL."/user.php?id=".$_POST['custom']." had donation of ".$TotalDonated." ".PAYPAL_CURRENCY." at ".$DonationTime." UTC from ".$_POST['payer_email']." returned.";
|
||||
$Message = "User https://".SSL_SITE_URL."/user.php?id=".$_POST['custom']." had donation of ".$TotalDonated." ".PAYPAL_CURRENCY." at ".$DonationTime." UTC from ".$_POST['payer_email']." returned.";
|
||||
$DB->query('SELECT SUM(Amount), MIN(Time) FROM donations WHERE UserID=\''.$_POST['custom'].'\';');
|
||||
list($TotalDonated,$DonationTime) = $DB->next_record();
|
||||
if ($TotalDonated+$_POST['mc_gross'] == 0) {
|
||||
|
@ -32,7 +32,8 @@
|
||||
list($Forum,,,$Stickies) = $Cache->get_value('forums_'.$ForumID);
|
||||
}
|
||||
if (!isset($Forum) || !is_array($Forum)) {
|
||||
$DB->query("SELECT
|
||||
$DB->query("
|
||||
SELECT
|
||||
t.ID,
|
||||
t.Title,
|
||||
t.AuthorID,
|
||||
@ -56,16 +57,22 @@
|
||||
}
|
||||
|
||||
|
||||
if(!isset($Forums[$ForumID])) { error(404); }
|
||||
if (!isset($Forums[$ForumID])) {
|
||||
error(404);
|
||||
}
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$ForumName = display_str($Forums[$ForumID]['Name']);
|
||||
if($LoggedUser['CustomForums'][$ForumID] != 1 && $Forums[$ForumID]['MinClassRead'] > $LoggedUser['Class']) { error(403); }
|
||||
if ($LoggedUser['CustomForums'][$ForumID] != 1 && $Forums[$ForumID]['MinClassRead'] > $LoggedUser['Class']) {
|
||||
error(403);
|
||||
}
|
||||
|
||||
// Start printing
|
||||
View::show_header('Forums > '. $Forums[$ForumID]['Name']);
|
||||
@ -106,7 +113,7 @@
|
||||
<td><input type="text" id="username" name="user" size="70" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" style="text-align: center"><input type="submit" name="submit" value="Search" /></td>
|
||||
<td colspan="2" style="text-align: center;"><input type="submit" name="submit" value="Search" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
@ -170,13 +177,18 @@
|
||||
<?
|
||||
} 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
|
||||
$DB->query('
|
||||
SELECT
|
||||
l.TopicID,
|
||||
l.PostID,
|
||||
CEIL((SELECT COUNT(ID) FROM forums_posts WHERE forums_posts.TopicID = l.TopicID AND forums_posts.ID<=l.PostID)/'.$PerPage.') AS Page
|
||||
CEIL(( SELECT COUNT(ID)
|
||||
FROM forums_posts
|
||||
WHERE forums_posts.TopicID = l.TopicID
|
||||
AND forums_posts.ID<=l.PostID)/'.$PerPage.'
|
||||
) AS Page
|
||||
FROM forums_last_read_topics AS l
|
||||
WHERE TopicID IN('.implode(', ', array_keys($Forum)).') AND
|
||||
UserID=\''.$LoggedUser['ID'].'\'');
|
||||
WHERE TopicID IN('.implode(', ', array_keys($Forum)).')
|
||||
AND UserID=\''.$LoggedUser['ID'].'\'');
|
||||
|
||||
// Turns the result set into a multi-dimensional array, with
|
||||
// forums_last_read_topics.TopicID as the key.
|
||||
@ -219,8 +231,12 @@
|
||||
} else {
|
||||
$Read = 'read';
|
||||
}
|
||||
if($Locked) { $Read .= "_locked"; }
|
||||
if($Sticky) { $Read .= "_sticky"; }
|
||||
if ($Locked) {
|
||||
$Read .= '_locked';
|
||||
}
|
||||
if ($Sticky) {
|
||||
$Read .= '_sticky';
|
||||
}
|
||||
?>
|
||||
<tr class="row<?=$Row?>">
|
||||
<td class="<?=$Read?>" title="<?=ucwords(str_replace('_',' ',$Read))?>"></td>
|
||||
|
@ -12,7 +12,7 @@
|
||||
unset($ForumCats);
|
||||
$ForumCats = $Cache->get_value('forums_categories');
|
||||
if ($ForumCats === false) {
|
||||
$DB->query("SELECT ID, Name FROM forums_categories");
|
||||
$DB->query('SELECT ID, Name FROM forums_categories');
|
||||
$ForumCats = array();
|
||||
while (list($ID, $Name) = $DB->next_record()) {
|
||||
$ForumCats[$ID] = $Name;
|
||||
@ -22,7 +22,8 @@
|
||||
|
||||
//This variable contains all our lovely forum data
|
||||
if (!$Forums = $Cache->get_value('forums_list')) {
|
||||
$DB->query("SELECT
|
||||
$DB->query('
|
||||
SELECT
|
||||
f.ID,
|
||||
f.CategoryID,
|
||||
f.Name,
|
||||
@ -45,11 +46,11 @@
|
||||
LEFT JOIN forums_topics as t ON t.ID = f.LastPostTopicID
|
||||
LEFT JOIN forums_specific_rules AS sr ON sr.ForumID = f.ID
|
||||
GROUP BY f.ID
|
||||
ORDER BY fc.Sort, fc.Name, f.CategoryID, f.Sort");
|
||||
ORDER BY fc.Sort, fc.Name, f.CategoryID, f.Sort');
|
||||
$Forums = $DB->to_array('ID', MYSQLI_ASSOC, false);
|
||||
foreach ($Forums as $ForumID => $Forum) {
|
||||
if (count($Forum['SpecificRules'])) {
|
||||
$DB->query("SELECT ThreadID FROM forums_specific_rules WHERE ForumID = ".$ForumID);
|
||||
$DB->query('SELECT ThreadID FROM forums_specific_rules WHERE ForumID = '.$ForumID);
|
||||
$ThreadIDs = $DB->collect('ThreadID');
|
||||
$Forums[$ForumID]['SpecificRules'] = $ThreadIDs;
|
||||
}
|
||||
|
@ -12,11 +12,17 @@
|
||||
\*********************************************************************/
|
||||
|
||||
// Quick SQL injection check
|
||||
if(!is_number($_POST['threadid'])) { error(404); }
|
||||
if($_POST['title'] == ''){ error(0); }
|
||||
if (!is_number($_POST['threadid'])) {
|
||||
error(404);
|
||||
}
|
||||
if ($_POST['title'] == ''){
|
||||
error(0);
|
||||
}
|
||||
// End injection check
|
||||
// Make sure they are moderators
|
||||
if(!check_perms('site_moderate_forums')) { error(403); }
|
||||
if (!check_perms('site_moderate_forums')) {
|
||||
error(403);
|
||||
}
|
||||
authorize();
|
||||
|
||||
// Variables for database input
|
||||
@ -36,7 +42,8 @@
|
||||
$DB->query("DELETE FROM forums_last_read_topics WHERE TopicID='$TopicID'");
|
||||
}
|
||||
|
||||
$DB->query("SELECT
|
||||
$DB->query("
|
||||
SELECT
|
||||
t.ForumID,
|
||||
f.MinClassWrite,
|
||||
COUNT(p.ID) AS Posts
|
||||
@ -47,7 +54,9 @@
|
||||
GROUP BY p.TopicID");
|
||||
list($OldForumID, $MinClassWrite, $Posts) = $DB->next_record();
|
||||
|
||||
if($MinClassWrite > $LoggedUser['Class']) { error(403); }
|
||||
if ($MinClassWrite > $LoggedUser['Class']) {
|
||||
error(403);
|
||||
}
|
||||
|
||||
// If we're moving
|
||||
$Cache->delete_value('forums_'.$ForumID);
|
||||
@ -59,14 +68,18 @@
|
||||
$DB->query("DELETE FROM forums_posts WHERE TopicID='$TopicID'");
|
||||
$DB->query("DELETE FROM forums_topics WHERE ID='$TopicID'");
|
||||
|
||||
$DB->query("SELECT
|
||||
$DB->query("
|
||||
SELECT
|
||||
t.ID,
|
||||
t.LastPostID,
|
||||
t.Title,
|
||||
p.AuthorID,
|
||||
um.Username,
|
||||
p.AddedTime,
|
||||
(SELECT COUNT(pp.ID) FROM forums_posts AS pp JOIN forums_topics AS tt ON pp.TopicID=tt.ID WHERE tt.ForumID='$ForumID'),
|
||||
( SELECT COUNT(pp.ID)
|
||||
FROM forums_posts AS pp
|
||||
JOIN forums_topics AS tt ON pp.TopicID=tt.ID
|
||||
WHERE tt.ForumID='$ForumID'),
|
||||
t.IsLocked,
|
||||
t.IsSticky
|
||||
FROM forums_topics AS t
|
||||
@ -74,10 +87,13 @@
|
||||
LEFT JOIN users_main AS um ON um.ID=p.AuthorID
|
||||
WHERE t.ForumID='$ForumID'
|
||||
GROUP BY t.ID
|
||||
ORDER BY t.LastPostID DESC LIMIT 1");
|
||||
ORDER BY t.LastPostID DESC
|
||||
LIMIT 1");
|
||||
list($NewLastTopic, $NewLastPostID, $NewLastTitle, $NewLastAuthorID, $NewLastAuthorName, $NewLastAddedTime, $NumPosts, $NewLocked, $NewSticky) = $DB->next_record(MYSQLI_NUM, false);
|
||||
|
||||
$DB->query("UPDATE forums SET
|
||||
$DB->query("
|
||||
UPDATE forums
|
||||
SET
|
||||
NumTopics=NumTopics-1,
|
||||
NumPosts=NumPosts-'$Posts',
|
||||
LastPostTopicID='$NewLastTopic',
|
||||
@ -123,7 +139,9 @@
|
||||
$Cache->update_row(false, $UpdateArray);
|
||||
$Cache->commit_transaction(0);
|
||||
|
||||
$DB->query("UPDATE forums_topics SET
|
||||
$DB->query("
|
||||
UPDATE forums_topics
|
||||
SET
|
||||
IsSticky = '$Sticky',
|
||||
IsLocked = '$Locked',
|
||||
Title = '$Title',
|
||||
@ -148,24 +166,31 @@
|
||||
|
||||
|
||||
// Forum we're moving from
|
||||
$DB->query("SELECT
|
||||
$DB->query("
|
||||
SELECT
|
||||
t.ID,
|
||||
t.LastPostID,
|
||||
t.Title,
|
||||
p.AuthorID,
|
||||
um.Username,
|
||||
p.AddedTime,
|
||||
(SELECT COUNT(pp.ID) FROM forums_posts AS pp JOIN forums_topics AS tt ON pp.TopicID=tt.ID WHERE tt.ForumID='$OldForumID'),
|
||||
( SELECT COUNT(pp.ID)
|
||||
FROM forums_posts AS pp
|
||||
JOIN forums_topics AS tt ON pp.TopicID=tt.ID
|
||||
WHERE tt.ForumID='$OldForumID'),
|
||||
t.IsLocked,
|
||||
t.IsSticky
|
||||
FROM forums_topics AS t
|
||||
JOIN forums_posts AS p ON p.ID=t.LastPostID
|
||||
LEFT JOIN users_main AS um ON um.ID=p.AuthorID
|
||||
WHERE t.ForumID='$OldForumID'
|
||||
ORDER BY t.LastPostID DESC LIMIT 1");
|
||||
ORDER BY t.LastPostID DESC
|
||||
LIMIT 1");
|
||||
list($NewLastTopic, $NewLastPostID, $NewLastTitle, $NewLastAuthorID, $NewLastAuthorName, $NewLastAddedTime, $NumPosts, $NewLocked, $NewSticky) = $DB->next_record(MYSQLI_NUM, false);
|
||||
|
||||
$DB->query("UPDATE forums SET
|
||||
$DB->query("
|
||||
UPDATE forums
|
||||
SET
|
||||
NumTopics=NumTopics-1,
|
||||
NumPosts=NumPosts-'$Posts',
|
||||
LastPostTopicID='$NewLastTopic',
|
||||
@ -192,22 +217,29 @@
|
||||
|
||||
// Forum we're moving to
|
||||
|
||||
$DB->query("SELECT
|
||||
$DB->query("
|
||||
SELECT
|
||||
t.ID,
|
||||
t.LastPostID,
|
||||
t.Title,
|
||||
p.AuthorID,
|
||||
um.Username,
|
||||
p.AddedTime,
|
||||
(SELECT COUNT(pp.ID) FROM forums_posts AS pp JOIN forums_topics AS tt ON pp.TopicID=tt.ID WHERE tt.ForumID='$ForumID')
|
||||
( SELECT COUNT(pp.ID)
|
||||
FROM forums_posts AS pp
|
||||
JOIN forums_topics AS tt ON pp.TopicID=tt.ID
|
||||
WHERE tt.ForumID='$ForumID')
|
||||
FROM forums_topics AS t
|
||||
JOIN forums_posts AS p ON p.ID=t.LastPostID
|
||||
LEFT JOIN users_main AS um ON um.ID=p.AuthorID
|
||||
WHERE t.ForumID='$ForumID'
|
||||
ORDER BY t.LastPostID DESC LIMIT 1");
|
||||
ORDER BY t.LastPostID DESC
|
||||
LIMIT 1");
|
||||
list($NewLastTopic, $NewLastPostID, $NewLastTitle, $NewLastAuthorID, $NewLastAuthorName, $NewLastAddedTime, $NumPosts) = $DB->next_record(MYSQLI_NUM, false);
|
||||
|
||||
$DB->query("UPDATE forums SET
|
||||
$DB->query("
|
||||
UPDATE forums
|
||||
SET
|
||||
NumTopics=NumTopics+1,
|
||||
NumPosts=NumPosts+'$Posts',
|
||||
LastPostTopicID='$NewLastTopic',
|
||||
@ -227,7 +259,6 @@
|
||||
'Title' => $NewLastTitle
|
||||
);
|
||||
|
||||
|
||||
$Cache->update_row($ForumID, $UpdateArray);
|
||||
|
||||
$Cache->commit_transaction(0);
|
||||
@ -248,9 +279,9 @@
|
||||
if ($Locked) {
|
||||
$CatalogueID = floor($NumPosts / THREAD_CATALOGUE);
|
||||
for ($i = 0; $i <= $CatalogueID; $i++) {
|
||||
$Cache->expire_value('thread_'.$TopicID.'_catalogue_'.$i,3600*24*7);
|
||||
$Cache->expire_value('thread_'.$TopicID.'_catalogue_'.$i, 3600 * 24 * 7); // 7 days
|
||||
}
|
||||
$Cache->expire_value('thread_'.$TopicID.'_info',3600*24*7);
|
||||
$Cache->expire_value('thread_'.$TopicID.'_info', 3600 * 24 * 7); // 7 days
|
||||
|
||||
$DB->query('UPDATE forums_polls SET Closed=\'0\' WHERE TopicID=\''.$TopicID.'\'');
|
||||
$Cache->delete_value('polls_'.$TopicID);
|
||||
|
@ -19,7 +19,9 @@
|
||||
}
|
||||
|
||||
|
||||
if(!check_forumperm($ForumID, 'Write') || !check_forumperm($ForumID, 'Create')) { error(403); }
|
||||
if (!check_forumperm($ForumID, 'Write') || !check_forumperm($ForumID, 'Create')) {
|
||||
error(403);
|
||||
}
|
||||
View::show_header('Forums > '.$Forum['Name'].' > New Topic','comments,bbcode');
|
||||
?>
|
||||
<div class="thin">
|
||||
@ -51,7 +53,7 @@
|
||||
</colgroup>
|
||||
<tr class="colhead_dark">
|
||||
<td colspan="<?=empty($HeavyInfo['DisableAvatars']) ? 2 : 1 ?>">
|
||||
<span style="float:left;"><a href='#newthreadpreview'>#XXXXXX</a>
|
||||
<span style="float: left;"><a href="#newthreadpreview">#XXXXXX</a>
|
||||
by <strong><?=Users::format_username($LoggedUser['ID'], true, true, true, true, true)?></strong>
|
||||
Just now
|
||||
</span>
|
||||
@ -105,7 +107,9 @@
|
||||
var AnswerCount = 1;
|
||||
|
||||
function AddAnswerField() {
|
||||
if (AnswerCount >= 25) { return; }
|
||||
if (AnswerCount >= 25) {
|
||||
return;
|
||||
}
|
||||
var AnswerField = document.createElement("input");
|
||||
AnswerField.type = "text";
|
||||
AnswerField.id = "answer_"+AnswerCount;
|
||||
@ -119,9 +123,13 @@ function AddAnswerField() {
|
||||
}
|
||||
|
||||
function RemoveAnswerField() {
|
||||
if (AnswerCount == 1) { return; }
|
||||
if (AnswerCount == 1) {
|
||||
return;
|
||||
}
|
||||
var x = $('#answer_block').raw();
|
||||
for (i=0; i<2; i++) { x.removeChild(x.lastChild); }
|
||||
for (i = 0; i < 2; i++) {
|
||||
x.removeChild(x.lastChild);
|
||||
}
|
||||
AnswerCount--;
|
||||
}
|
||||
//]]>
|
||||
|
@ -29,7 +29,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Searching for posts by a specific user
|
||||
if (!empty($_GET['user'])) {
|
||||
$User = trim($_GET['user']);
|
||||
@ -61,7 +60,10 @@
|
||||
if (!empty($_GET['threadid']) && is_number($_GET['threadid'])) {
|
||||
$ThreadID = $_GET['threadid'];
|
||||
$Type = 'body';
|
||||
$SQL = "SELECT Title FROM forums_topics AS t
|
||||
$SQL = "
|
||||
SELECT
|
||||
Title
|
||||
FROM forums_topics AS t
|
||||
JOIN forums AS f ON f.ID=t.ForumID
|
||||
WHERE t.ID=$ThreadID
|
||||
AND ((f.MinClassRead <= '$LoggedUser[Class]'";
|
||||
@ -185,9 +187,11 @@
|
||||
|
||||
if ($Type == 'body') {
|
||||
|
||||
$sql = "SELECT SQL_CALC_FOUND_ROWS
|
||||
$sql = "
|
||||
SELECT
|
||||
SQL_CALC_FOUND_ROWS
|
||||
t.ID,
|
||||
".(!empty($ThreadID) ? "SUBSTRING_INDEX(p.Body, ' ', 40)":"t.Title").",
|
||||
".(!empty($ThreadID) ? "SUBSTRING_INDEX(p.Body, ' ', 40)" : 't.Title').",
|
||||
t.ForumID,
|
||||
f.Name,
|
||||
p.AddedTime,
|
||||
@ -196,8 +200,7 @@
|
||||
FROM forums_posts AS p
|
||||
JOIN forums_topics AS t ON t.ID=p.TopicID
|
||||
JOIN forums AS f ON f.ID=t.ForumID
|
||||
WHERE
|
||||
((f.MinClassRead<='$LoggedUser[Class]'";
|
||||
WHERE ((f.MinClassRead<='$LoggedUser[Class]'";
|
||||
if (!empty($RestrictedForums)) {
|
||||
$sql.=" AND f.ID NOT IN ('".$RestrictedForums."')";
|
||||
}
|
||||
@ -229,7 +232,9 @@
|
||||
$sql .= "ORDER BY p.AddedTime DESC LIMIT $Limit";
|
||||
|
||||
} else {
|
||||
$sql = "SELECT SQL_CALC_FOUND_ROWS
|
||||
$sql = "
|
||||
SELECT
|
||||
SQL_CALC_FOUND_ROWS
|
||||
t.ID,
|
||||
t.Title,
|
||||
t.ForumID,
|
||||
@ -239,8 +244,7 @@
|
||||
''
|
||||
FROM forums_topics AS t
|
||||
JOIN forums AS f ON f.ID=t.ForumID
|
||||
WHERE
|
||||
((f.MinClassRead<='$LoggedUser[Class]'";
|
||||
WHERE ((f.MinClassRead<='$LoggedUser[Class]'";
|
||||
if (!empty($RestrictedForums)) {
|
||||
$sql.=" AND f.ID NOT IN ('".$RestrictedForums."')";
|
||||
}
|
||||
|
@ -38,7 +38,7 @@
|
||||
$Body = $_POST['body'];
|
||||
|
||||
if ($LoggedUser['DisablePosting']) {
|
||||
error('Your posting rights have been removed');
|
||||
error('Your posting privileges have been removed');
|
||||
}
|
||||
|
||||
$Title = Format::cut_string(trim($_POST['title']), 150, 1, 0);
|
||||
@ -46,27 +46,33 @@
|
||||
|
||||
$ForumID = $_POST['forum'];
|
||||
|
||||
if (!isset($Forums[$ForumID])) { error(404); }
|
||||
if (!isset($Forums[$ForumID])) {
|
||||
error(404);
|
||||
}
|
||||
|
||||
if (!check_forumperm($ForumID, 'Write') || !check_forumperm($ForumID, 'Create')) {
|
||||
error(403);
|
||||
}
|
||||
|
||||
|
||||
$DB->query("INSERT INTO forums_topics
|
||||
$DB->query("
|
||||
INSERT INTO forums_topics
|
||||
(Title, AuthorID, ForumID, LastPostTime, LastPostAuthorID)
|
||||
Values
|
||||
('".db_string($Title)."', '".$LoggedUser['ID']."', '$ForumID', '".sqltime()."', '".$LoggedUser['ID']."')");
|
||||
$TopicID = $DB->inserted_id();
|
||||
|
||||
$DB->query("INSERT INTO forums_posts
|
||||
$DB->query("
|
||||
INSERT INTO forums_posts
|
||||
(TopicID, AuthorID, AddedTime, Body)
|
||||
VALUES
|
||||
('$TopicID', '".$LoggedUser['ID']."', '".sqltime()."', '".db_string($Body)."')");
|
||||
|
||||
$PostID = $DB->inserted_id();
|
||||
|
||||
$DB->query("UPDATE forums SET
|
||||
$DB->query("
|
||||
UPDATE forums
|
||||
SET
|
||||
NumPosts = NumPosts+1,
|
||||
NumTopics = NumTopics+1,
|
||||
LastPostID = '$PostID',
|
||||
@ -75,7 +81,9 @@
|
||||
LastPostTime = '".sqltime()."'
|
||||
WHERE ID = '$ForumID'");
|
||||
|
||||
$DB->query("UPDATE forums_topics SET
|
||||
$DB->query("
|
||||
UPDATE forums_topics
|
||||
SET
|
||||
NumPosts = NumPosts+1,
|
||||
LastPostID = '$PostID',
|
||||
LastPostAuthorID = '".$LoggedUser['ID']."',
|
||||
@ -127,7 +135,7 @@
|
||||
$Cache->cache_value('polls_'.$TopicID, array($Question,$Answers,$Votes,'0000-00-00 00:00:00','0'), 0);
|
||||
|
||||
if ($ForumID == STAFF_FORUM) {
|
||||
send_irc("PRIVMSG ".ADMIN_CHAN." :!mod Poll created by ".$LoggedUser['Username'].": '".$Question."' https://".SSL_SITE_URL."/forums.php?action=viewthread&threadid=".$TopicID);
|
||||
send_irc("PRIVMSG ".ADMIN_CHAN." :!mod Poll created by ".$LoggedUser['Username'].': "'.$Question.'" https://'.SSL_SITE_URL.'/forums.php?action=viewthread&threadid='.$TopicID);
|
||||
}
|
||||
}
|
||||
|
||||
@ -189,7 +197,7 @@
|
||||
'AddedTime' => sqltime(),
|
||||
'Body' => $Body,
|
||||
'EditedUserID' => 0,
|
||||
'EditedTime'=>'0000-00-00 00:00:00',
|
||||
'EditedTime' => '0000-00-00 00:00:00'
|
||||
);
|
||||
$Cache->insert('', $Post);
|
||||
$Cache->commit_transaction(0);
|
||||
|
@ -1,6 +1,10 @@
|
||||
<?
|
||||
authorize();
|
||||
$FriendID = db_string($_GET['friendid']);
|
||||
$DB->query("INSERT IGNORE INTO friends (UserID, FriendID) VALUES ('$LoggedUser[ID]', '$FriendID')");
|
||||
$DB->query("
|
||||
INSERT IGNORE INTO friends
|
||||
(UserID, FriendID)
|
||||
VALUES ('$LoggedUser[ID]', '$FriendID')");
|
||||
|
||||
header('Location: friends.php');
|
||||
?>
|
@ -1,4 +1,9 @@
|
||||
<?
|
||||
$DB->query("UPDATE friends SET Comment='$P[comment]' WHERE UserID='$LoggedUser[ID]' AND FriendID='$P[friendid]'");
|
||||
$DB->query("
|
||||
UPDATE friends
|
||||
SET Comment='$P[comment]'
|
||||
WHERE UserID='$LoggedUser[ID]'
|
||||
AND FriendID='$P[friendid]'");
|
||||
|
||||
header('Location: friends.php');
|
||||
?>
|
@ -22,7 +22,8 @@
|
||||
list($Page,$Limit) = Format::page_limit(FRIENDS_PER_PAGE);
|
||||
|
||||
// Main query
|
||||
$DB->query("SELECT
|
||||
$DB->query("
|
||||
SELECT
|
||||
SQL_CALC_FOUND_ROWS
|
||||
f.FriendID,
|
||||
f.Comment,
|
||||
|
@ -10,7 +10,7 @@
|
||||
case 'add':
|
||||
include(SERVER_ROOT.'/sections/friends/add.php');
|
||||
break;
|
||||
case 'Defriend':
|
||||
case 'Remove friend':
|
||||
authorize();
|
||||
include(SERVER_ROOT.'/sections/friends/remove.php');
|
||||
break;
|
||||
|
@ -1,4 +1,8 @@
|
||||
<?
|
||||
$DB->query("DELETE FROM friends WHERE UserID='$LoggedUser[ID]' AND FriendID='$P[friendid]'");
|
||||
$DB->query("
|
||||
DELETE FROM friends
|
||||
WHERE UserID='$LoggedUser[ID]'
|
||||
AND FriendID='$P[friendid]'");
|
||||
|
||||
header('Location: friends.php');
|
||||
?>
|
@ -63,7 +63,7 @@
|
||||
$UserInfo['Avatar'] = '';
|
||||
$Cache->cache_value('user_info_'.$UserID, $UserInfo, 2592000);
|
||||
|
||||
$DB->query("UPDATE users_info SET Avatar='', AdminComment=CONCAT('".sqltime()." - Avatar reset automatically (Size: ".number_format((strlen($Data))/1024)."kb, Height: ".$Height."px). Used to be $DBURL\n\n', AdminComment) WHERE UserID='$UserID'");
|
||||
$DB->query("UPDATE users_info SET Avatar='', AdminComment=CONCAT('".sqltime()." - Avatar reset automatically (Size: ".number_format((strlen($Data)) / 1024)." kB, Height: ".$Height."px). Used to be $DBURL\n\n', AdminComment) WHERE UserID='$UserID'");
|
||||
|
||||
// Send PM
|
||||
|
||||
|
@ -40,13 +40,15 @@
|
||||
<div class="head colhead_dark"><strong><a href="staffblog.php">Latest staff blog posts</a></strong></div>
|
||||
<?
|
||||
if (($Blog = $Cache->get_value('staff_blog')) === false) {
|
||||
$DB->query("SELECT
|
||||
$DB->query("
|
||||
SELECT
|
||||
b.ID,
|
||||
um.Username,
|
||||
b.Title,
|
||||
b.Body,
|
||||
b.Time
|
||||
FROM staff_blog AS b LEFT JOIN users_main AS um ON b.UserID=um.ID
|
||||
FROM staff_blog AS b
|
||||
LEFT JOIN users_main AS um ON b.UserID=um.ID
|
||||
ORDER BY Time DESC");
|
||||
$Blog = $DB->to_array(false, MYSQLI_NUM);
|
||||
$Cache->cache_value('staff_blog', $Blog, 1209600);
|
||||
@ -124,7 +126,6 @@
|
||||
<ul class="stats nobullet">
|
||||
<? if (USER_LIMIT > 0) { ?>
|
||||
<li>Maximum users: <?=number_format(USER_LIMIT) ?></li>
|
||||
|
||||
<?
|
||||
}
|
||||
|
||||
@ -175,9 +176,17 @@
|
||||
}
|
||||
|
||||
if (($PerfectCount = $Cache->get_value('stats_perfect_count')) === false) {
|
||||
$DB->query("SELECT COUNT(ID) FROM torrents WHERE ((LogScore = 100 AND Format = 'FLAC') OR (Media = 'Vinyl' AND Format = 'FLAC') OR (Media = 'WEB' AND Format = 'FLAC') OR (Media = 'DVD' AND Format = 'FLAC') OR (Media = 'Soundboard' AND Format = 'FLAC'))");
|
||||
$DB->query("
|
||||
SELECT COUNT(ID)
|
||||
FROM torrents
|
||||
WHERE ((LogScore = 100 AND Format = 'FLAC')
|
||||
OR (Media = 'Vinyl' AND Format = 'FLAC')
|
||||
OR (Media = 'WEB' AND Format = 'FLAC')
|
||||
OR (Media = 'DVD' AND Format = 'FLAC')
|
||||
OR (Media = 'Soundboard' AND Format = 'FLAC')
|
||||
)");
|
||||
list($PerfectCount) = $DB->next_record();
|
||||
$Cache->cache_value('stats_perfect_count', $PerfectCount, 0);
|
||||
$Cache->cache_value('stats_perfect_count', $PerfectCount, 0); //inf cache
|
||||
}
|
||||
?>
|
||||
<li>Torrents: <?=number_format($TorrentCount)?></li>
|
||||
@ -236,7 +245,7 @@
|
||||
<li>Peers: <?=$PeerCount?></li>
|
||||
<li>Seeders: <?=$SeederCount?></li>
|
||||
<li>Leechers: <?=$LeecherCount?></li>
|
||||
<li>Seeder/Leecher ratio: <?=$Ratio?></li>
|
||||
<li>Seeder/leecher ratio: <?=$Ratio?></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?
|
||||
@ -338,7 +347,8 @@
|
||||
$Recommend_artists = $Cache->get_value('recommend_artists');
|
||||
|
||||
if (!is_array($Recommend) || !is_array($Recommend_artists)) {
|
||||
$DB->query("SELECT
|
||||
$DB->query("
|
||||
SELECT
|
||||
tr.GroupID,
|
||||
tr.UserID,
|
||||
u.Username,
|
||||
@ -347,8 +357,8 @@
|
||||
FROM torrents_recommended AS tr
|
||||
JOIN torrents_group AS tg ON tg.ID=tr.GroupID
|
||||
LEFT JOIN users_main AS u ON u.ID=tr.UserID
|
||||
ORDER BY tr.Time DESC LIMIT 10
|
||||
");
|
||||
ORDER BY tr.Time DESC
|
||||
LIMIT 10");
|
||||
$Recommend = $DB->to_array();
|
||||
$Cache->cache_value('recommend',$Recommend,1209600);
|
||||
|
||||
@ -433,7 +443,8 @@ function contest() {
|
||||
|
||||
list($Contest, $TotalPoints) = $Cache->get_value('contest');
|
||||
if (!$Contest) {
|
||||
$DB->query("SELECT
|
||||
$DB->query("
|
||||
SELECT
|
||||
UserID,
|
||||
SUM(Points),
|
||||
Username
|
||||
|
@ -15,7 +15,7 @@
|
||||
$ID = $_GET['id'];
|
||||
|
||||
switch ($Short) {
|
||||
case "user" :
|
||||
case 'user' :
|
||||
$DB->query("SELECT Username FROM users_main WHERE ID=".$ID);
|
||||
if ($DB->record_count() < 1) {
|
||||
error(404);
|
||||
@ -23,19 +23,19 @@
|
||||
list($Username) = $DB->next_record();
|
||||
break;
|
||||
|
||||
case "request_update" :
|
||||
case 'request_update' :
|
||||
$NoReason = true;
|
||||
$DB->query("SELECT Title, Description, TorrentID, CategoryID, Year FROM requests WHERE ID=".$ID);
|
||||
if ($DB->record_count() < 1) {
|
||||
error(404);
|
||||
}
|
||||
list($Name, $Desc, $Filled, $CategoryID, $Year) = $DB->next_record();
|
||||
if ($Filled || ($CategoryID != 0 && ($Categories[$CategoryID-1] != "Music" || $Year != 0))) {
|
||||
if ($Filled || ($CategoryID != 0 && ($Categories[$CategoryID-1] != 'Music' || $Year != 0))) {
|
||||
error(403);
|
||||
}
|
||||
break;
|
||||
|
||||
case "request" :
|
||||
case 'request' :
|
||||
$DB->query("SELECT Title, Description, TorrentID FROM requests WHERE ID=".$ID);
|
||||
if ($DB->record_count() < 1) {
|
||||
error(404);
|
||||
@ -43,7 +43,7 @@
|
||||
list($Name, $Desc, $Filled) = $DB->next_record();
|
||||
break;
|
||||
|
||||
case "collage" :
|
||||
case 'collage' :
|
||||
$DB->query("SELECT Name, Description FROM collages WHERE ID=".$ID);
|
||||
if ($DB->record_count() < 1) {
|
||||
error(404);
|
||||
@ -51,7 +51,7 @@
|
||||
list($Name, $Desc) = $DB->next_record();
|
||||
break;
|
||||
|
||||
case "thread" :
|
||||
case 'thread' :
|
||||
$DB->query("SELECT ft.Title, ft.ForumID, um.Username FROM forums_topics AS ft JOIN users_main AS um ON um.ID=ft.AuthorID WHERE ft.ID=".$ID);
|
||||
if ($DB->record_count() < 1) {
|
||||
error(404);
|
||||
@ -66,15 +66,15 @@
|
||||
}
|
||||
break;
|
||||
|
||||
case "post" :
|
||||
$DB->query("SELECT fp.Body, fp.TopicID, um.Username FROM forums_posts AS fp JOIN users_main AS um ON um.ID=fp.AuthorID WHERE fp.ID=".$ID);
|
||||
case 'post' :
|
||||
$DB->query('SELECT fp.Body, fp.TopicID, um.Username FROM forums_posts AS fp JOIN users_main AS um ON um.ID=fp.AuthorID WHERE fp.ID='.$ID);
|
||||
if ($DB->record_count() < 1) {
|
||||
error(404);
|
||||
}
|
||||
list($Body, $TopicID, $Username) = $DB->next_record();
|
||||
$DB->query("SELECT ForumID FROM forums_topics WHERE ID = ".$TopicID);
|
||||
$DB->query('SELECT ForumID FROM forums_topics WHERE ID = '.$TopicID);
|
||||
list($ForumID) = $DB->next_record();
|
||||
$DB->query("SELECT MinClassRead FROM forums WHERE ID = ".$ForumID);
|
||||
$DB->query('SELECT MinClassRead FROM forums WHERE ID = '.$ForumID);
|
||||
list($MinClassRead) = $DB->next_record();
|
||||
if (!empty($LoggedUser['DisableForums']) ||
|
||||
($MinClassRead > $LoggedUser['EffectiveClass'] && (!isset($LoggedUser['CustomForums'][$ForumID]) || $LoggedUser['CustomForums'][$ForumID] == 0)) ||
|
||||
@ -83,17 +83,17 @@
|
||||
}
|
||||
break;
|
||||
|
||||
case "requests_comment" :
|
||||
case "torrents_comment" :
|
||||
case "artist_comment":
|
||||
case "collages_comment" :
|
||||
case 'requests_comment' :
|
||||
case 'torrents_comment' :
|
||||
case 'artist_comment':
|
||||
case 'collages_comment' :
|
||||
$Table = $Short.'s';
|
||||
if ($Short == "collages_comment") {
|
||||
$Column = "UserID";
|
||||
if ($Short == 'collages_comment') {
|
||||
$Column = 'UserID';
|
||||
} else {
|
||||
$Column = "AuthorID";
|
||||
$Column = 'AuthorID';
|
||||
}
|
||||
$DB->query("SELECT ".$Short.".Body, um.Username FROM ".$Table." AS ".$Short." JOIN users_main AS um ON um.ID=".$Short.".".$Column." WHERE ".$Short.".ID=".$ID);
|
||||
$DB->query('SELECT '.$Short.".Body, um.Username FROM ".$Table." AS ".$Short." JOIN users_main AS um ON um.ID=".$Short.".".$Column." WHERE ".$Short.".ID=".$ID);
|
||||
if ($DB->record_count() < 1) {
|
||||
error(404);
|
||||
}
|
||||
@ -126,12 +126,12 @@
|
||||
|
||||
|
||||
switch ($Short) {
|
||||
case "user" :
|
||||
case 'user' :
|
||||
?>
|
||||
<p>You are reporting the user <strong><?=display_str($Username)?></strong></p>
|
||||
<?
|
||||
break;
|
||||
case "request_update" :
|
||||
case 'request_update' :
|
||||
?>
|
||||
<p>You are reporting the request:</p>
|
||||
<table>
|
||||
@ -163,13 +163,13 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Release Type</td>
|
||||
<td class="label">Release type</td>
|
||||
<td>
|
||||
<select id="releasetype" name="releasetype">
|
||||
<option value='0'>---</option>
|
||||
<option value="0">---</option>
|
||||
<?
|
||||
foreach ($ReleaseTypes as $Key => $Val) {
|
||||
?> <option value='<?=$Key?>' <?=(!empty($ReleaseType) ? ($Key == $ReleaseType ?" selected='selected'" : "") : '') ?>><?=$Val?></option>
|
||||
?> <option value="<?=$Key?>"<?=(!empty($ReleaseType) ? ($Key == $ReleaseType ? ' selected="selected"' : '') : '') ?>><?=$Val?></option>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
@ -190,7 +190,7 @@
|
||||
</div>
|
||||
<?
|
||||
break;
|
||||
case "request" :
|
||||
case 'request' :
|
||||
?>
|
||||
<p>You are reporting the request:</p>
|
||||
<table>
|
||||
@ -207,7 +207,7 @@
|
||||
</table>
|
||||
<?
|
||||
break;
|
||||
case "collage" :
|
||||
case 'collage' :
|
||||
?>
|
||||
<p>You are reporting the collage:</p>
|
||||
<table>
|
||||
@ -222,7 +222,7 @@
|
||||
</table>
|
||||
<?
|
||||
break;
|
||||
case "thread" :
|
||||
case 'thread' :
|
||||
?>
|
||||
<p>You are reporting the thread:</p>
|
||||
<table>
|
||||
@ -237,7 +237,7 @@
|
||||
</table>
|
||||
<?
|
||||
break;
|
||||
case "post" :
|
||||
case 'post' :
|
||||
?>
|
||||
<p>You are reporting the post:</p>
|
||||
<table>
|
||||
@ -252,10 +252,10 @@
|
||||
</table>
|
||||
<?
|
||||
break;
|
||||
case "requests_comment" :
|
||||
case "torrents_comment" :
|
||||
case "artist_comment":
|
||||
case "collages_comment" :
|
||||
case 'requests_comment' :
|
||||
case 'torrents_comment' :
|
||||
case 'artist_comment':
|
||||
case 'collages_comment' :
|
||||
?>
|
||||
<p>You are reporting the <?=$Types[$Short]['title']?>:</p>
|
||||
<table>
|
||||
|
@ -32,7 +32,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '0',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#h2.2]2.2[/url]. Your torrent was reported because it was a duplicate of another torrent.'
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#h2.2]2.2[/url]. Your torrent was reported because it was a duplicate of another torrent.'
|
||||
)
|
||||
),
|
||||
'banned' => array(
|
||||
@ -48,7 +48,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '4',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#h1.2]1.2[/url]. You have uploaded material that is currently forbidden. Items on the Do Not Upload list (at the top of the [url=http://'.NONSSL_SITE_URL.'/upload.php]upload page[/url]) and in the [url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#h1.2]Specifically Banned[/url] portion of the uploading rules cannot be uploaded to the site. Do not upload them unless your torrent meets a condition specified in the comments of the DNU list.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#h1.2]1.2[/url]. You have uploaded material that is currently forbidden. Items on the Do Not Upload list (at the top of the [url=https://'.SSL_SITE_URL.'/upload.php]upload page[/url]) and in the [url=https://'.SSL_SITE_URL.'/rules.php?p=upload#h1.2]Specifically Banned[/url] portion of the uploading rules cannot be uploaded to the site. Do not upload them unless your torrent meets a condition specified in the comments of the DNU list.
|
||||
Your torrent was reported because it contained material from the DNU list or from the Specifically Banned section of the rules.'
|
||||
)
|
||||
),
|
||||
@ -106,7 +106,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '0',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#h2.2]2.2[/url]. Your torrent was reported because it was trumped by another torrent.'
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#h2.2]2.2[/url]. Your torrent was reported because it was trumped by another torrent.'
|
||||
)
|
||||
),
|
||||
'private_trump' => array(
|
||||
@ -146,7 +146,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '0',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.3.16]2.3.16[/url]. Properly tag your music files. Certain meta tags (e.g., ID3, Vorbis) are required on all music uploads. Make sure to use the appropriate tag format for your files (e.g., no ID3 tags for FLAC - see [url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.2.10.8]2.2.10.8[/url]). ID3v2 tags for files are highly recommended over ID3v1. ID3 are recommended for AC3 torrents but are not mandatory because the format does not natively support file metadata tagging (for AC3, the file names become the vehicle for correctly labeling media files). Torrents uploaded with both good ID3v1 tags and blank ID3v2 tags (a dual set of tags) are trumpable by torrents with either just good ID3v1 tags or good ID3v2 tags (a single set of tags). If you upload an album missing one or more of the required tags, then another user may add the tags, re-upload, and report your torrent for deletion.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.3.16]2.3.16[/url]. Properly tag your music files. Certain meta tags (e.g., ID3, Vorbis) are required on all music uploads. Make sure to use the appropriate tag format for your files (e.g., no ID3 tags for FLAC - see [url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.2.10.8]2.2.10.8[/url]). ID3v2 tags for files are highly recommended over ID3v1. ID3 are recommended for AC3 torrents but are not mandatory because the format does not natively support file metadata tagging (for AC3, the file names become the vehicle for correctly labeling media files). Torrents uploaded with both good ID3v1 tags and blank ID3v2 tags (a dual set of tags) are trumpable by torrents with either just good ID3v1 tags or good ID3v2 tags (a single set of tags). If you upload an album missing one or more of the required tags, then another user may add the tags, re-upload, and report your torrent for deletion.
|
||||
Your torrent was reported because it was trumped by another torrent with improved metadata tags.'
|
||||
)
|
||||
),
|
||||
@ -166,7 +166,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '0',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.5.5]2.5.5[/url]. Vinyl rips may be trumped by better-sounding rips of the same bit depth, regardless of lineage information (see [url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.3.9]2.3.9[/url]).
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.5.5]2.5.5[/url]. Vinyl rips may be trumped by better-sounding rips of the same bit depth, regardless of lineage information (see [url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.3.9]2.3.9[/url]).
|
||||
Your torrent was reported as it was trumped by a better-sounding vinyl rip.'
|
||||
)
|
||||
),
|
||||
@ -185,8 +185,8 @@
|
||||
'upload' => '0',
|
||||
'warn' => '0',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.3.2]2.3.2[/url]. Name your directories with meaningful titles, such as "Artist - Album (Year) - Format." The minimum acceptable is "Album" although it is preferable to include more information. If the directory name does not include this minimum then another user can rename the directory, re-upload, and report your torrent for deletion. In addition, torrent folders that are named using the scene convention will be trumpable if the Scene label is absent from the torrent.
|
||||
[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.3.3]2.3.3[/url]. Avoid creating unnecessary nested folders (such as an extra folder for the actual album) inside your properly named directory. A torrent with unnecessary nested folders is trumpable by a torrent with such folders removed. For single disc albums, all audio files must be included in the main torrent folder. For multi-disc albums, the main torrent folder may include one sub-folder that holds the audio file contents for each disc in the box set, i.e., the main torrent folder is "Adele - 19 (2008) - FLAC" while appropriate sub-folders may include "19 (Disc 1of2)" or "19" and "Live From The Hotel Cafe (Disc 2of2)" or "Acoustic Set Live From The Hotel Cafe, Los Angeles." Additional folders are unnecessary because they do nothing to improve the organization of the torrent. If you are uncertain about what to do for other cases, PM a staff member for guidance.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.3.2]2.3.2[/url]. Name your directories with meaningful titles, such as "Artist - Album (Year) - Format." The minimum acceptable is "Album" although it is preferable to include more information. If the directory name does not include this minimum then another user can rename the directory, re-upload, and report your torrent for deletion. In addition, torrent folders that are named using the scene convention will be trumpable if the Scene label is absent from the torrent.
|
||||
[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.3.3]2.3.3[/url]. Avoid creating unnecessary nested folders (such as an extra folder for the actual album) inside your properly named directory. A torrent with unnecessary nested folders is trumpable by a torrent with such folders removed. For single disc albums, all audio files must be included in the main torrent folder. For multi-disc albums, the main torrent folder may include one sub-folder that holds the audio file contents for each disc in the box set, i.e., the main torrent folder is "Adele - 19 (2008) - FLAC" while appropriate sub-folders may include "19 (Disc 1of2)" or "19" and "Live From The Hotel Cafe (Disc 2of2)" or "Acoustic Set Live From The Hotel Cafe, Los Angeles." Additional folders are unnecessary because they do nothing to improve the organization of the torrent. If you are uncertain about what to do for other cases, PM a staff member for guidance.
|
||||
Your torrent was reported because it was trumped by another torrent with an improved folder name and directory structure.'
|
||||
)
|
||||
),
|
||||
@ -205,7 +205,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '0',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.3.11]2.3.11[/url]. File names must accurately reflect the song titles. You may not have file names like 01track.mp3, 02track.mp3, etc. Torrents containing files that are named with incorrect song titles can be trumped by properly labeled torrents. Also, torrents that are sourced from the scene but do not have the Scene label must comply with site naming rules (no release group names in the file names, no advertisements in the file names, etc.). If all the letters in the track titles are capitalized, the torrent is trumpable. If you upload an album with improper file names, then another user may fix the file names, re-upload, and report yours for deletion.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.3.11]2.3.11[/url]. File names must accurately reflect the song titles. You may not have file names like 01track.mp3, 02track.mp3, etc. Torrents containing files that are named with incorrect song titles can be trumped by properly labeled torrents. Also, torrents that are sourced from the scene but do not have the Scene label must comply with site naming rules (no release group names in the file names, no advertisements in the file names, etc.). If all the letters in the track titles are capitalized, the torrent is trumpable. If you upload an album with improper file names, then another user may fix the file names, re-upload, and report yours for deletion.
|
||||
Your torrent was reported because it was trumped by another torrent with improved file names.'
|
||||
)
|
||||
),
|
||||
@ -225,8 +225,8 @@
|
||||
'upload' => '0',
|
||||
'warn' => '1',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.1.19]2.1.19[/url]. All music torrents must represent a complete release, and may not be missing tracks (or discs in the case of a multi-disc release).
|
||||
[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.1.19.2]2.1.19.2[/url]. A single track (e.g., one MP3 file) cannot be uploaded on its own unless it is an officially released single. If a specific track can only be found on an album, the entire album must be uploaded in the torrent.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.1.19]2.1.19[/url]. All music torrents must represent a complete release, and may not be missing tracks (or discs in the case of a multi-disc release).
|
||||
[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.1.19.2]2.1.19.2[/url]. A single track (e.g., one MP3 file) cannot be uploaded on its own unless it is an officially released single. If a specific track can only be found on an album, the entire album must be uploaded in the torrent.
|
||||
Your torrent was reported because it was missing tracks.'
|
||||
)
|
||||
),
|
||||
@ -245,8 +245,8 @@
|
||||
'upload' => '0',
|
||||
'warn' => '1',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.1.19]2.1.19[/url]. All music torrents must represent a complete release, and may not be missing tracks (or discs in the case of a multi-disc release).
|
||||
[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.1.19.1]2.1.19.1[/url]. If an album is released as a multi-disc set (or box set) of CDs or vinyl discs, then it must be uploaded as a single torrent. Preferably, each individual CD rip in a multi-disc set should be organized in its own folder (see [url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.3.12]2.3.12[/url]).
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.1.19]2.1.19[/url]. All music torrents must represent a complete release, and may not be missing tracks (or discs in the case of a multi-disc release).
|
||||
[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.1.19.1]2.1.19.1[/url]. If an album is released as a multi-disc set (or box set) of CDs or vinyl discs, then it must be uploaded as a single torrent. Preferably, each individual CD rip in a multi-disc set should be organized in its own folder (see [url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.3.12]2.3.12[/url]).
|
||||
Your torrent was reported because it was missing discs.'
|
||||
)
|
||||
),
|
||||
@ -266,7 +266,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '1',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.1.19.3]2.1.19.3[/url]. Bonus discs may be uploaded separately in accordance with [url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#h2.4]2.4[/url]. Please note that individual bonus tracks cannot be uploaded without the rest of the album. Bonus tracks are not bonus discs. Enhanced audio CDs with data or video tracks must be uploaded without the non-audio tracks. If you want to share the videos or data, you may host the files off-site with a file sharing service and include the link to that service in your torrent description.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.1.19.3]2.1.19.3[/url]. Bonus discs may be uploaded separately in accordance with [url=https://'.SSL_SITE_URL.'/rules.php?p=upload#h2.4]2.4[/url]. Please note that individual bonus tracks cannot be uploaded without the rest of the album. Bonus tracks are not bonus discs. Enhanced audio CDs with data or video tracks must be uploaded without the non-audio tracks. If you want to share the videos or data, you may host the files off-site with a file sharing service and include the link to that service in your torrent description.
|
||||
Your torrent was reported because it contained only bonus tracks without the full album.'
|
||||
)
|
||||
),
|
||||
@ -286,7 +286,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '2',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.1.2]2.1.2[/url]. No transcodes or re-encodes of lossy releases are acceptable here.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.1.2]2.1.2[/url]. No transcodes or re-encodes of lossy releases are acceptable here.
|
||||
Your torrent was reported because it contained transcoded audio files.'
|
||||
)
|
||||
),
|
||||
@ -304,8 +304,8 @@
|
||||
'upload' => '0',
|
||||
'warn' => '2',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.1.3]2.1.3[/url]. Music releases must have an average bitrate of at least 192 kbps regardless of the format. Exceptions: The following VBR encodes may go under the 192 kbps limit: LAME V2 (VBR), V1 (VBR), V0 (VBR), APS (VBR), APX (VBR), MP3 192 (VBR), and AAC ~192 (VBR) to AAC ~256 (VBR) releases.
|
||||
Your torrent was reported because it contained one of more audio files that did not meet the minimum bitrate requirement.'
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.1.3]2.1.3[/url]. Music releases must have an average bitrate of at least 192 kbps regardless of the format. Exceptions: The following VBR encodes may go under the 192 kbps limit: LAME V2 (VBR), V1 (VBR), V0 (VBR), APS (VBR), APX (VBR), MP3 192 (VBR), and AAC ~192 (VBR) to AAC ~256 (VBR) releases.
|
||||
Your torrent was reported because it contained one or more audio files that did not meet the minimum bitrate requirement.'
|
||||
)
|
||||
),
|
||||
'mutt' => array(
|
||||
@ -322,7 +322,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '2',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.1.6]2.1.6[/url]. All music torrents must be encoded with a single encoder using the same settings.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.1.6]2.1.6[/url]. All music torrents must be encoded with a single encoder using the same settings.
|
||||
Your torrent was reported because it contained one or more audio files that were encoded by different audio encoders or with different encoder settings.'
|
||||
)
|
||||
),
|
||||
@ -342,8 +342,8 @@
|
||||
'upload' => '0',
|
||||
'warn' => '1',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.1.5]2.1.5[/url]. Albums must not be ripped or uploaded as a single track.
|
||||
[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.1.5.1]2.1.5.1[/url]. If the tracks on the original CD were separate, you must rip them to separate files. Any unsplit FLAC rips lacking a cue sheet will be deleted outright. Any unsplit FLAC rip that includes a cue sheet will be trumpable by a properly split FLAC torrent. CDs with single tracks can be uploaded without prior splitting.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.1.5]2.1.5[/url]. Albums must not be ripped or uploaded as a single track.
|
||||
[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.1.5.1]2.1.5.1[/url]. If the tracks on the original CD were separate, you must rip them to separate files. Any unsplit FLAC rips lacking a cue sheet will be deleted outright. Any unsplit FLAC rip that includes a cue sheet will be trumpable by a properly split FLAC torrent. CDs with single tracks can be uploaded without prior splitting.
|
||||
Your torrent was reported because it contained a single-track rip instead of a rip consisting of separate audio files.'
|
||||
)
|
||||
),
|
||||
@ -362,9 +362,9 @@
|
||||
'upload' => '0',
|
||||
'warn' => '0',
|
||||
'delete' => '0',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.3.16]2.3.16[/url]. Properly tag your music files.
|
||||
The Uploading Rules require that all uploads be properly tagged. Your torrent has been marked as having poor tags. It is now listed on [url=http://'.NONSSL_SITE_URL.'/better.php]Better.php[/url] and is eligible for trumping. You are of course free to fix this torrent yourself. Add or fix the required tags and upload the replacement torrent to the site. Then, report (RP) the older torrent using the category "Tag Trump" and indicate in the report comments that you have fixed the tags. Be sure to provide a link (PL) to the new replacement torrent.
|
||||
Your torrent has been labeled as having bad tags and is now eligible for trumping through the [url=http://'.NONSSL_SITE_URL.'/better.php]Better.php[/url] listing.'
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.3.16]2.3.16[/url]. Properly tag your music files.
|
||||
The Uploading Rules require that all uploads be properly tagged. Your torrent has been marked as having poor tags. It is now listed on [url=https://'.SSL_SITE_URL.'/better.php]Better.php[/url] and is eligible for trumping. You are of course free to fix this torrent yourself. Add or fix the required tags and upload the replacement torrent to the site. Then, report (RP) the older torrent using the category "Tag Trump" and indicate in the report comments that you have fixed the tags. Be sure to provide a link (PL) to the new replacement torrent.
|
||||
Your torrent has been labeled as having bad tags and is now eligible for trumping through the [url=https://'.SSL_SITE_URL.'/better.php]Better.php[/url] listing.'
|
||||
)
|
||||
),
|
||||
'folders_bad' => array(
|
||||
@ -380,9 +380,9 @@
|
||||
'upload' => '0',
|
||||
'warn' => '0',
|
||||
'delete' => '0',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.3.2]2.3.2[/url]. Name your directories with meaningful titles, such as "Artist - Album (Year) - Format."
|
||||
The Uploading Rules require that all uploads contain torrent directories with meaningful names. Your torrent has been marked as having a poorly named torrent directory. It is now listed on [url=http://'.NONSSL_SITE_URL.'/better.php]Better.php[/url] and is eligible for trumping. You are of course free to fix this torrent yourself. Add or fix the folder/directory name(s) and upload the replacement torrent to the site. Then, report (RP) the older torrent using the category "Folder Trump" and indicate in the report comments that you have fixed the directory name(s). Be sure to provide a link (PL) to the new replacement torrent.
|
||||
Your torrent has been labeled as having a bad folder name (or directory structure) and is now eligible for trumping through the [url=http://'.NONSSL_SITE_URL.'/better.php]Better.php[/url] listing.'
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.3.2]2.3.2[/url]. Name your directories with meaningful titles, such as "Artist - Album (Year) - Format."
|
||||
The Uploading Rules require that all uploads contain torrent directories with meaningful names. Your torrent has been marked as having a poorly named torrent directory. It is now listed on [url=https://'.SSL_SITE_URL.'/better.php]Better.php[/url] and is eligible for trumping. You are of course free to fix this torrent yourself. Add or fix the folder/directory name(s) and upload the replacement torrent to the site. Then, report (RP) the older torrent using the category "Folder Trump" and indicate in the report comments that you have fixed the directory name(s). Be sure to provide a link (PL) to the new replacement torrent.
|
||||
Your torrent has been labeled as having a bad folder name (or directory structure) and is now eligible for trumping through the [url=https://'.SSL_SITE_URL.'/better.php]Better.php[/url] listing.'
|
||||
)
|
||||
),
|
||||
'wrong_format' => array(
|
||||
@ -398,7 +398,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '0',
|
||||
'delete' => '0',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.1.4]2.1.4[/url]. Bitrates must accurately reflect encoder presets or the average bitrate of the audio files. You are responsible for supplying correct format and bitrate information on the upload page.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.1.4]2.1.4[/url]. Bitrates must accurately reflect encoder presets or the average bitrate of the audio files. You are responsible for supplying correct format and bitrate information on the upload page.
|
||||
Your torrent has now been labeled using the appropriate format and bitrate.'
|
||||
)
|
||||
),
|
||||
@ -432,7 +432,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '1',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.1.1]2.1.1[/url]. The only formats allowed for music are:
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.1.1]2.1.1[/url]. The only formats allowed for music are:
|
||||
Lossy: MP3, AAC, AC3, DTS
|
||||
Lossless: FLAC
|
||||
Your torrent was reported because it contained a disallowed format.'
|
||||
@ -454,7 +454,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '0',
|
||||
'delete' => '0',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.1.4]2.1.4[/url]. Bitrates must accurately reflect encoder presets or the average bitrate of the audio files. You are responsible for supplying correct format and bitrate information on the upload page.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.1.4]2.1.4[/url]. Bitrates must accurately reflect encoder presets or the average bitrate of the audio files. You are responsible for supplying correct format and bitrate information on the upload page.
|
||||
Your torrent was reported because the bitrates of one or more audio files had been misrepresented.'
|
||||
)
|
||||
),
|
||||
@ -472,7 +472,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '1',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.1.11]2.1.11[/url]. Music ripped from the radio (Satellite or FM), television, the web, or podcasts are not allowed.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.1.11]2.1.11[/url]. Music ripped from the radio (Satellite or FM), television, the web, or podcasts are not allowed.
|
||||
The only allowable media formats are CD, DVD, Vinyl, Soundboard, SACD, DAT, Cassette, WEB, and Blu-ray.'
|
||||
)
|
||||
),
|
||||
@ -490,7 +490,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '1',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.1.20]2.1.20[/url]. User made discographies may not be uploaded. Multi-album torrents are not allowed on the site under any circumstances. That means no discographies, Pitchfork compilations, etc. If releases (e.g., CD singles) were never released as a bundled set, do not upload them together. Live Soundboard material should be uploaded as one torrent per night, per show, or per venue. Including more than one show in a torrent results in a multi-album torrent.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.1.20]2.1.20[/url]. User made discographies may not be uploaded. Multi-album torrents are not allowed on the site under any circumstances. That means no discographies, Pitchfork compilations, etc. If releases (e.g., CD singles) were never released as a bundled set, do not upload them together. Live Soundboard material should be uploaded as one torrent per night, per show, or per venue. Including more than one show in a torrent results in a multi-album torrent.
|
||||
Your torrent was reported because it consisted of a discography.'
|
||||
)
|
||||
),
|
||||
@ -508,8 +508,8 @@
|
||||
'upload' => '0',
|
||||
'warn' => '1',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.1.16]2.1.16[/url]. User-made compilations are not allowed.
|
||||
[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.1.16.1]2.1.16.1[/url]. These are defined as compilations made by the uploader or anyone else who does not officially represent the artist or the label. Compilations must be reasonably official. User-made and unofficial multichannel mixes are also not allowed.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.1.16]2.1.16[/url]. User-made compilations are not allowed.
|
||||
[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.1.16.1]2.1.16.1[/url]. These are defined as compilations made by the uploader or anyone else who does not officially represent the artist or the label. Compilations must be reasonably official. User-made and unofficial multichannel mixes are also not allowed.
|
||||
Your torrent was reported because it was a user compilation.'
|
||||
)
|
||||
),
|
||||
@ -526,7 +526,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '0',
|
||||
'delete' => '0',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.3.9]2.3.9[/url]. All lossless analog rips should include clear information about source lineage. All lossless SACD digital layer analog rips and vinyl rips must include clear information about recording equipment used (see [url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#h2.8]2.8[/url]). If you used a USB turntable for a vinyl rip, clearly indicate this in your lineage information. Also include all intermediate steps up to lossless encoding, such as the program used for mastering, sound card used, etc. Lossless analog rips missing rip information can be trumped by better documented lossless analog rips of equal or better quality. In order to trump a lossless analog rip without a lineage, this lineage must be included as a .txt or .log file within the new torrent.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.3.9]2.3.9[/url]. All lossless analog rips should include clear information about source lineage. All lossless SACD digital layer analog rips and vinyl rips must include clear information about recording equipment used (see [url=https://'.SSL_SITE_URL.'/rules.php?p=upload#h2.8]2.8[/url]). If you used a USB turntable for a vinyl rip, clearly indicate this in your lineage information. Also include all intermediate steps up to lossless encoding, such as the program used for mastering, sound card used, etc. Lossless analog rips missing rip information can be trumped by better documented lossless analog rips of equal or better quality. In order to trump a lossless analog rip without a lineage, this lineage must be included as a .txt or .log file within the new torrent.
|
||||
Your torrent is now eligible for trumping by a better-sounding rip with complete lineage information.'
|
||||
)
|
||||
),
|
||||
@ -544,8 +544,8 @@
|
||||
'upload' => '0',
|
||||
'warn' => '4',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.2.10.9]2.2.10.9[/url]. No log editing is permitted.
|
||||
[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.2.10.9.1]2.2.10.9.1[/url]. Forging log data is a serious misrepresentation of quality, and will result in a warning and the loss of your uploading privileges when the edited log is found. We recommend that you do not open the rip log file for any reason. However, if you must open the rip log, do not edit anything in the file for any reason. If you discover that one of your software settings is incorrect in the ripping software preferences, you must rip the CD again with the proper settings. Do not consolidate logs under any circumstances. If you must re-rip specific tracks or an entire disc and the rip results happen to have the new log appended to the original, leave them as is. Do not remove any part of either log, and never copy/paste parts of a new log over an old log.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.2.10.9]2.2.10.9[/url]. No log editing is permitted.
|
||||
[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.2.10.9.1]2.2.10.9.1[/url]. Forging log data is a serious misrepresentation of quality, and will result in a warning and the loss of your uploading privileges when the edited log is found. We recommend that you do not open the rip log file for any reason. However, if you must open the rip log, do not edit anything in the file for any reason. If you discover that one of your software settings is incorrect in the ripping software preferences, you must rip the CD again with the proper settings. Do not consolidate logs under any circumstances. If you must re-rip specific tracks or an entire disc and the rip results happen to have the new log appended to the original, leave them as is. Do not remove any part of either log, and never copy/paste parts of a new log over an old log.
|
||||
Your torrent was reported because it contained an edited log (either edited by you or someone else). For questions about your uploading privileges, you must PM the staff member who handled this log case.'
|
||||
)
|
||||
),
|
||||
@ -563,7 +563,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '1',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.1.12]2.1.12[/url]. No unofficial audience recordings may be uploaded. These include but are not limited to AUD (Audience), IEM (In Ear Monitor), ALD (Assistive Listening Device), Mini-Disc, and Matrix-sourced recordings (see [url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.6.3]2.6.3[/url]).
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.1.12]2.1.12[/url]. No unofficial audience recordings may be uploaded. These include but are not limited to AUD (Audience), IEM (In Ear Monitor), ALD (Assistive Listening Device), Mini-Disc, and Matrix-sourced recordings (see [url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.6.3]2.6.3[/url]).
|
||||
Your torrent was reported because it was sourced from an audience recording.'
|
||||
)
|
||||
),
|
||||
@ -580,10 +580,10 @@
|
||||
'upload' => '0',
|
||||
'warn' => '0',
|
||||
'delete' => '0',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.3.11]2.3.11[/url]. File names must accurately reflect the song titles. You may not have file names like 01track.mp3, 02track.mp3, etc. Torrents containing files that are named with incorrect song titles can be trumped by properly labeled torrents. Also, torrents that are sourced from the scene but do not have the Scene label must comply with site naming rules (no release group names in the file names, no advertisements in the file names, etc.). If all the letters in the track titles are capitalized, the torrent is trumpable.
|
||||
[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.3.13]2.3.13[/url]. Track numbers are required in file names (e.g., "01 - TrackName.mp3"). If a torrent without track numbers in the file names is uploaded, then a torrent with the track numbers in the file names can take its place. When formatted properly, file names will sort in order by track number or playing order. Also see [url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.3.14]2.3.14[/url].
|
||||
The Uploading Rules require that all uploads contain audio tracks with accurate file names. Your torrent has been marked as having incorrect or incomplete file names. It is now listed on [url=http://'.NONSSL_SITE_URL.'/better.php]Better.php[/url] and is eligible for trumping. You are of course free to fix this torrent yourself. Add or fix the file names and upload the replacement torrent to the site. Then, report (RP) the older torrent using the category "Bad File Names Trump" and indicate in the report comments that you have fixed the file names. Be sure to provide a link (PL) to the new replacement torrent.
|
||||
Your torrent has been labeled as having bad file names and is now eligible for trumping through the [url=http://'.NONSSL_SITE_URL.'/better.php]Better.php[/url] listing.'
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.3.11]2.3.11[/url]. File names must accurately reflect the song titles. You may not have file names like 01track.mp3, 02track.mp3, etc. Torrents containing files that are named with incorrect song titles can be trumped by properly labeled torrents. Also, torrents that are sourced from the scene but do not have the Scene label must comply with site naming rules (no release group names in the file names, no advertisements in the file names, etc.). If all the letters in the track titles are capitalized, the torrent is trumpable.
|
||||
[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.3.13]2.3.13[/url]. Track numbers are required in file names (e.g., "01 - TrackName.mp3"). If a torrent without track numbers in the file names is uploaded, then a torrent with the track numbers in the file names can take its place. When formatted properly, file names will sort in order by track number or playing order. Also see [url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.3.14]2.3.14[/url].
|
||||
The Uploading Rules require that all uploads contain audio tracks with accurate file names. Your torrent has been marked as having incorrect or incomplete file names. It is now listed on [url=https://'.SSL_SITE_URL.'/better.php]better.php[/url] and is eligible for trumping. You are of course free to fix this torrent yourself. Add or fix the file names and upload the replacement torrent to the site. Then, report (RP) the older torrent using the category "Bad File Names Trump" and indicate in the report comments that you have fixed the file names. Be sure to provide a link (PL) to the new replacement torrent.
|
||||
Your torrent has been labeled as having bad file names and is now eligible for trumping through the [url=https://'.SSL_SITE_URL.'/better.php]better.php[/url] listing.'
|
||||
)
|
||||
),
|
||||
'cassette' => array(
|
||||
@ -591,7 +591,7 @@
|
||||
'reason' => '17',
|
||||
'title' => 'Unapproved Cassette',
|
||||
'report_messages' => array(
|
||||
"If the album was never released other than on cassette, please include a source."
|
||||
'If the album was never released other than on cassette, please include a source.'
|
||||
),
|
||||
'report_fields' => array(
|
||||
'link' => '0'
|
||||
@ -600,10 +600,10 @@
|
||||
'upload' => '0',
|
||||
'warn' => '1',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.10.1]2.10.1[/url]. Cassettes are allowed under strict conditions.
|
||||
[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.10.1.1]2.10.1.1[/url]. Releases available only on cassette may be uploaded under special strict conditions (see [url=http://'.NONSSL_SITE_URL.'/wiki.php?action=article&id=593]this wiki[/url] for information on cassette ripping). Cassette-sourced uploads must be approved by staff first (see [url=http://'.NONSSL_SITE_URL.'/wiki.php?action=article&id=681]this wiki[/url] for details on the approval process). This also applies to soundboard releases where a tape generation can be found in the lineage (either the tape is not in the first generation or there are multiple tape generations). See [url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.6.6]2.6.6[/url] for more information.
|
||||
[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.10.1.2]2.10.1.2[/url]. You must contact a moderator privately for approval before uploading. Include proof in the form of discography information from a reputable source as well as the spectrals for 2 songs in your message.
|
||||
Your torrent was reported because it contains an unapproved cassette rip.'
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.10.1]2.10.1[/url]. Cassettes are allowed under strict conditions.
|
||||
[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.10.1.1]2.10.1.1[/url]. Releases available only on cassette may be uploaded under special strict conditions (see [url=https://'.SSL_SITE_URL.'/wiki.php?action=article&id=593]this wiki[/url] for information on cassette ripping).
|
||||
[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.10.1.2]2.10.1.2[/url]. Rips must be made from official cassette sources. Bootlegs are often from unofficial sources and may be deleted if they do not meet high quality audio standards (see rule [rule]2.10.8[/rule]).
|
||||
When uploading new cassette-sourced torrents, be sure to include in the release description evidence of its uniqueness in the form of discography information from a reputable source as well as pictures of the cassette you ripped.'
|
||||
)
|
||||
),
|
||||
'skips' => array(
|
||||
@ -611,8 +611,8 @@
|
||||
'reason' => '13',
|
||||
'title' => 'Skips / Encode Errors',
|
||||
'report_messages' => array(
|
||||
"Please tell us which track(s) we should check.",
|
||||
"Telling us where precisely in the song the skip/encode error can be heard will help us deal with your torrent."
|
||||
'Please tell us which track(s) we should check.',
|
||||
'Telling us where precisely in the song the skip/encode error can be heard will help us deal with your torrent.'
|
||||
),
|
||||
'report_fields' => array(
|
||||
'track' => '2'
|
||||
@ -621,7 +621,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '0',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.1.8]2.1.8[/url]. Music not sourced from vinyl must not contain pops, clicks, or skips. They will be deleted for rip/encode errors if reported.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.1.8]2.1.8[/url]. Music not sourced from vinyl must not contain pops, clicks, or skips. They will be deleted for rip/encode errors if reported.
|
||||
Your torrent was reported because one or more tracks contain encoding errors.'
|
||||
)
|
||||
),
|
||||
@ -639,10 +639,10 @@
|
||||
'upload' => '0',
|
||||
'warn' => '0',
|
||||
'delete' => '0',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.2.10.3]2.2.10.3[/url]. A FLAC upload with an EAC or XLD rip log that scores 100% on the log checker replaces one with a lower score... . Note: A FLAC upload with a log that scores 95% for not defeating the audio cache may be rescored to 100% following the procedure outlined in [url=http://'.NONSSL_SITE_URL.'/wiki.php?action=article&id=219]this wiki[/url].
|
||||
[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.2.10.5]2.2.10.5[/url]. XLD and EAC logs in languages other than English require a manual log checker score adjustment by staff.
|
||||
[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.2.10.6.2]2.2.10.6.2[/url]. If you created a CD range rip that has matching CRCs for test and copy, and where every track has an AccurateRip score of 2 or more, then you may submit your torrent for manual score adjustment.
|
||||
[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.2.10.9.2]2.2.10.9.2[/url]. If you find that an appended log has not been scored properly, please report the torrent and use the log rescore option.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.2.10.3]2.2.10.3[/url]. A FLAC upload with an EAC or XLD rip log that scores 100% on the log checker replaces one with a lower score... . Note: A FLAC upload with a log that scores 95% for not defeating the audio cache may be rescored to 100% following the procedure outlined in [url=https://'.SSL_SITE_URL.'/wiki.php?action=article&id=219]this wiki[/url].
|
||||
[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.2.10.5]2.2.10.5[/url]. XLD and EAC logs in languages other than English require a manual log checker score adjustment by staff.
|
||||
[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.2.10.6.2]2.2.10.6.2[/url]. If you created a CD range rip that has matching CRCs for test and copy, and where every track has an AccurateRip score of 2 or more, then you may submit your torrent for manual score adjustment.
|
||||
[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.2.10.9.2]2.2.10.9.2[/url]. If you find that an appended log has not been scored properly, please report the torrent and use the log rescore option.
|
||||
Your torrent has now been properly scored by the staff.'
|
||||
)
|
||||
)
|
||||
@ -662,7 +662,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '1',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r4.1.2]4.1.2[/url]. All applications must come with a crack, keygen, or other method of ensuring that downloaders can install them easily. App torrents with keygens, cracks, or patches that do not work or torrents missing clear installation instructions will be deleted if reported. No exceptions.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r4.1.2]4.1.2[/url]. All applications must come with a crack, keygen, or other method of ensuring that downloaders can install them easily. App torrents with keygens, cracks, or patches that do not work or torrents missing clear installation instructions will be deleted if reported. No exceptions.
|
||||
Your torrent was reported because it was missing an installation method.'
|
||||
)
|
||||
),
|
||||
@ -680,8 +680,8 @@
|
||||
'upload' => '0',
|
||||
'warn' => '4',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r1.2.5]1.2.5[/url]. Games of any kind. No games of any kind for PC, Mac, Linux, mobile devices, or any other platform are allowed.
|
||||
[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r4.1.7]4.1.7[/url]. Games of any kind are prohibited (see [url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r1.2.5]1.2.5[/url]).
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r1.2.5]1.2.5[/url]. Games of any kind. No games of any kind for PC, Mac, Linux, mobile devices, or any other platform are allowed.
|
||||
[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r4.1.7]4.1.7[/url]. Games of any kind are prohibited (see [url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r1.2.5]1.2.5[/url]).
|
||||
Your torrent was reported because it contained a game disc rip.'
|
||||
)
|
||||
),
|
||||
@ -699,7 +699,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '1',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r4.1.3]4.1.3[/url]. App releases must not be freely available tools. Application releases cannot be freely downloaded anywhere from any official source. Nor may you upload open source applications where the source code is available for free.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r4.1.3]4.1.3[/url]. App releases must not be freely available tools. Application releases cannot be freely downloaded anywhere from any official source. Nor may you upload open source applications where the source code is available for free.
|
||||
Your torrent was reported because it contained a freely available application.'
|
||||
)
|
||||
),
|
||||
@ -717,7 +717,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '1',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r4.1.4]4.1.4[/url]. Release descriptions for applications must contain good information about the application. You should either have a small description of the program (either taken from its web site or from an NFO file) or a link to the information -- but ideally both. Torrents missing this information will be deleted when reported.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r4.1.4]4.1.4[/url]. Release descriptions for applications must contain good information about the application. You should either have a small description of the program (either taken from its web site or from an NFO file) or a link to the information -- but ideally both. Torrents missing this information will be deleted when reported.
|
||||
Your torrent was reported because it lacked adequate release information.'
|
||||
)
|
||||
),
|
||||
@ -735,8 +735,8 @@
|
||||
'upload' => '0',
|
||||
'warn' => '1',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.1.18]2.1.18[/url]. Sound Sample Packs must be uploaded as applications.
|
||||
[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r4.1.9]4.1.9[/url]. Sound sample packs, template collections, and font collections are allowed if they are official releases, not freely available, and unarchived. Sound sample packs, template collections, and font collections must be official compilations and they must not be uploaded as an archive. The files contained inside the torrent must not be archived so that users can see what the pack contains. That means if sound sample packs are in WAV format, they must be uploaded as WAV. If the font collection, template collection, or sound sample pack was originally released as an archive, you must unpack the files before uploading them in a torrent. None of the contents in these packs and collections may be freely available.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.1.18]2.1.18[/url]. Sound Sample Packs must be uploaded as applications.
|
||||
[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r4.1.9]4.1.9[/url]. Sound sample packs, template collections, and font collections are allowed if they are official releases, not freely available, and unarchived. Sound sample packs, template collections, and font collections must be official compilations and they must not be uploaded as an archive. The files contained inside the torrent must not be archived so that users can see what the pack contains. That means if sound sample packs are in WAV format, they must be uploaded as WAV. If the font collection, template collection, or sound sample pack was originally released as an archive, you must unpack the files before uploading them in a torrent. None of the contents in these packs and collections may be freely available.
|
||||
Your torrent was reported because it was an archived collection.'
|
||||
)
|
||||
),
|
||||
@ -754,7 +754,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '1',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r4.1.11]4.1.11[/url]. Collections of cracks, keygens or serials are not allowed. The crack, keygen, or serial for an application must be in a torrent with its corresponding application. It cannot be uploaded separately from the application.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r4.1.11]4.1.11[/url]. Collections of cracks, keygens or serials are not allowed. The crack, keygen, or serial for an application must be in a torrent with its corresponding application. It cannot be uploaded separately from the application.
|
||||
Your torrent was reported because it contained a collection of serials, keygens, or cracks.'
|
||||
)
|
||||
),
|
||||
@ -772,7 +772,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '1',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r4.1.12]4.1.12[/url]. Torrents containing hacking or cracking tools are prohibited.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r4.1.12]4.1.12[/url]. Torrents containing hacking or cracking tools are prohibited.
|
||||
Your torrent was reported because it contained a hacking tool.'
|
||||
)
|
||||
),
|
||||
@ -790,7 +790,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '1',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r4.1.14]4.1.14[/url]. All applications must be complete.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r4.1.14]4.1.14[/url]. All applications must be complete.
|
||||
The torrent was determined to be infected with a virus or trojan. In the future, please scan all potential uploads with an antivirus program such as AVG, Avast, or MS Security Essentials.
|
||||
Your torrent was reported because it contained a virus or trojan.'
|
||||
)
|
||||
@ -809,7 +809,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '0',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r4.1.14]4.1.14[/url]. All applications must be complete.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r4.1.14]4.1.14[/url]. All applications must be complete.
|
||||
This program was determined to be not fully functional.
|
||||
Your torrent was reported because it contained a program that did not work or no longer works.'
|
||||
)
|
||||
@ -829,7 +829,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '0',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r6.5]6.5[/url]. Collections/packs of ebooks are prohibited, even if each title is somehow related to other ebook titles in some way. All ebooks must be uploaded individually and cannot be archived (users must be able to see the ebook format in the torrent).
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r6.5]6.5[/url]. Collections/packs of ebooks are prohibited, even if each title is somehow related to other ebook titles in some way. All ebooks must be uploaded individually and cannot be archived (users must be able to see the ebook format in the torrent).
|
||||
Your torrent was reported because it contained a collection or pack of ebooks.'
|
||||
)
|
||||
)
|
||||
@ -850,7 +850,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '0',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r2.1.8]2.1.8[/url]. Music not sourced from vinyl must not contain pops, clicks, or skips. They will be deleted for rip/encode errors if reported.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r2.1.8]2.1.8[/url]. Music not sourced from vinyl must not contain pops, clicks, or skips. They will be deleted for rip/encode errors if reported.
|
||||
Your torrent was reported because one or more audiobook tracks contain encoding errors.'
|
||||
)
|
||||
)
|
||||
@ -870,7 +870,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '1',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r7.3]7.3[/url]. Tutorials on how to use musical instruments, vocal training, producing music, or otherwise learning the theory and practice of music are the only allowed topics. No material outside of these topics is allowed. For example, instruction videos about Kung Fu training, dance lessons, beer brewing, or photography are not permitted here. What is considered allowable under these topics is ultimately at the discretion of the staff.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r7.3]7.3[/url]. Tutorials on how to use musical instruments, vocal training, producing music, or otherwise learning the theory and practice of music are the only allowed topics. No material outside of these topics is allowed. For example, instruction videos about Kung Fu training, dance lessons, beer brewing, or photography are not permitted here. What is considered allowable under these topics is ultimately at the discretion of the staff.
|
||||
Your torrent was reported because it contained a video that has no relevance to the allowed music-related topics on the site.'
|
||||
)
|
||||
)
|
||||
@ -890,7 +890,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '1',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r3.3]3.3[/url]. No radio talk shows or podcasts are allowed. What.CD is primarily a music site, and those recordings do not belong in any torrent category.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r3.3]3.3[/url]. No radio talk shows or podcasts are allowed. What.CD is primarily a music site, and those recordings do not belong in any torrent category.
|
||||
Your torrent was reported because it contained audio files sourced from a talk show or podcast.'
|
||||
)
|
||||
)
|
||||
@ -910,7 +910,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r5.2.3]5.2.3[/url]. Collections may not span more than one comic title. You may not include multiple, different comic titles in a single collection, e.g., "The Amazing Spider-Man #1" and "The Incredible Hulk #1."
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r5.2.3]5.2.3[/url]. Collections may not span more than one comic title. You may not include multiple, different comic titles in a single collection, e.g., "The Amazing Spider-Man #1" and "The Incredible Hulk #1."
|
||||
Your torrent was reported because it contained comics from multiple unrelated series.'
|
||||
)
|
||||
),
|
||||
@ -928,7 +928,7 @@
|
||||
'upload' => '0',
|
||||
'warn' => '',
|
||||
'delete' => '1',
|
||||
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#r5.2.6]5.2.6[/url]. Torrents spanning multiple volumes are too large and must be uploaded as separate volumes.
|
||||
'pm' => '[url=https://'.SSL_SITE_URL.'/rules.php?p=upload#r5.2.6]5.2.6[/url]. Torrents spanning multiple volumes are too large and must be uploaded as separate volumes.
|
||||
Your torrent was reported because it contained multiple comic volumes.'
|
||||
)
|
||||
)
|
||||
|
@ -25,8 +25,8 @@
|
||||
// Resolve the torrentlist to the one specific torrent being reported
|
||||
foreach ($TorrentList as &$Torrent) {
|
||||
// Remove unneeded entries
|
||||
if ($Torrent["ID"] != $TorrentID)
|
||||
unset($TorrentList[$Torrent["ID"]]);
|
||||
if ($Torrent['ID'] != $TorrentID)
|
||||
unset($TorrentList[$Torrent['ID']]);
|
||||
}
|
||||
// Group details
|
||||
list($WikiBody, $WikiImage, $GroupID, $GroupName, $GroupYear,
|
||||
@ -47,9 +47,9 @@
|
||||
$Title = $AltName;
|
||||
}
|
||||
if ($GroupYear > 0) {
|
||||
$DisplayName.=' [' . $GroupYear . ']';
|
||||
$AltName.=' [' . $GroupYear . ']';
|
||||
$Title.= ' [' . $GroupYear . ']';
|
||||
$DisplayName.= " [$GroupYear]";
|
||||
$AltName.= " [$GroupYear]";
|
||||
$Title.= " [$GroupYear]";
|
||||
}
|
||||
if ($GroupVanityHouse) {
|
||||
$DisplayName.=' [Vanity House]';
|
||||
@ -68,7 +68,6 @@
|
||||
<div class="header">
|
||||
<h2>Report a torrent</h2>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<h3><?=$DisplayName?></h3>
|
||||
</div>
|
||||
@ -141,7 +140,6 @@
|
||||
|
||||
<script type="text/javascript">ChangeReportType();</script>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<input type="submit" value="Submit report" />
|
||||
</form>
|
||||
|
@ -48,16 +48,16 @@
|
||||
}
|
||||
|
||||
if (!empty($_POST['sitelink'])) {
|
||||
if(preg_match_all('/((https?:\/\/)?([a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*\.)?'.NONSSL_SITE_URL.'\/torrents.php\?(id=[0-9]+\&)?torrentid=([0-9]+))/is', $_POST['sitelink'], $Matches)) {
|
||||
if (preg_match_all('/((https?:\/\/)?([a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*\.)?'.SSL_SITE_URL.'\/torrents.php\?(id=[0-9]+\&)?torrentid=([0-9]+))/is', $_POST['sitelink'], $Matches)) {
|
||||
$ExtraIDs = implode(' ', $Matches[6]);
|
||||
if (in_array($TorrentID, $Matches[6])) {
|
||||
$Err = "The extra permalinks you gave included the link to the torrent you're reporting!";
|
||||
}
|
||||
} else {
|
||||
$Err = "Permalink was incorrect, should look like http://".NONSSL_SITE_URL."/torrents.php?torrentid=12345";
|
||||
$Err = "The permalink was incorrect. It should look like https://".SSL_SITE_URL."/torrents.php?torrentid=12345";
|
||||
}
|
||||
} else {
|
||||
$ExtraIDs = "";
|
||||
$ExtraIDs = '';
|
||||
}
|
||||
|
||||
if (!empty($_POST['link'])) {
|
||||
@ -69,7 +69,7 @@
|
||||
$Err = "The extra links you provided weren't links...";
|
||||
}
|
||||
} else {
|
||||
$Links = "";
|
||||
$Links = '';
|
||||
}
|
||||
|
||||
if (!empty($_POST['image'])) {
|
||||
@ -79,23 +79,23 @@
|
||||
$Err = "The extra image links you provided weren't links to images...";
|
||||
}
|
||||
} else {
|
||||
$Images = "";
|
||||
$Images = '';
|
||||
}
|
||||
|
||||
if (!empty($_POST['track'])) {
|
||||
if (preg_match('/([0-9]+( [0-9]+)*)|All/is', $_POST['track'], $Matches)) {
|
||||
$Tracks = $Matches[0];
|
||||
} else {
|
||||
$Err = "Tracks should be given in a space separated list of numbers (no other characters)";
|
||||
$Err = 'Tracks should be given in a space separated list of numbers (no other characters)';
|
||||
}
|
||||
} else {
|
||||
$Tracks = "";
|
||||
$Tracks = '';
|
||||
}
|
||||
|
||||
if (!empty($_POST['extra'])) {
|
||||
$Extra = db_string($_POST['extra']);
|
||||
} else {
|
||||
$Err = "As useful as blank reports are, could you be a tiny bit more helpful? (Leave a comment)";
|
||||
$Err = 'As useful as blank reports are, could you be a tiny bit more helpful? (Leave a comment)';
|
||||
}
|
||||
|
||||
$DB->query("SELECT ID FROM torrents WHERE ID=".$TorrentID);
|
||||
|
@ -215,7 +215,7 @@
|
||||
Tools::warn_user($UploaderID, $WarnLength, $Reason);
|
||||
} else {
|
||||
//This is a bitch for people that don't warn but do other things, it makes me sad.
|
||||
$AdminComment = "";
|
||||
$AdminComment = '';
|
||||
if($Upload) {
|
||||
//They removed upload
|
||||
$AdminComment .= "Upload privileges removed by ".$LoggedUser['Username'];
|
||||
@ -237,9 +237,9 @@
|
||||
//PM
|
||||
if($Escaped['uploader_pm'] || $Warning > 0 || isset($Escaped['delete']) || $SendPM) {
|
||||
if(isset($Escaped['delete'])) {
|
||||
$PM = "[url=http://".NONSSL_SITE_URL."/torrents.php?torrentid=".$TorrentID."]Your above torrent[/url] was reported and has been deleted.\n\n";
|
||||
$PM = '[url=https://'.SSL_SITE_URL."/torrents.php?torrentid=".$TorrentID."]Your above torrent[/url] was reported and has been deleted.\n\n";
|
||||
} else {
|
||||
$PM = "[url=http://".NONSSL_SITE_URL."/torrents.php?torrentid=".$TorrentID."]Your above torrent[/url] was reported but not deleted.\n\n";
|
||||
$PM = '[url=https://'.SSL_SITE_URL."/torrents.php?torrentid=".$TorrentID."]Your above torrent[/url] was reported but not deleted.\n\n";
|
||||
}
|
||||
|
||||
$Preset = $ResolveType['resolve_options']['pm'];
|
||||
@ -249,7 +249,7 @@
|
||||
}
|
||||
|
||||
if($Warning > 0) {
|
||||
$PM .= "\nThis has resulted in a [url=http://".NONSSL_SITE_URL."/wiki.php?action=article&id=218]".$Warning." week warning.[/url]\n";
|
||||
$PM .= "\nThis has resulted in a [url=https://".SSL_SITE_URL."/wiki.php?action=article&id=218]".$Warning." week warning.[/url]\n";
|
||||
}
|
||||
|
||||
if($Upload) {
|
||||
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
|
||||
$NewRequest = ($_GET['action'] == "new" ? true : false);
|
||||
$NewRequest = ($_GET['action'] == 'new' ? true : false);
|
||||
|
||||
if (!$NewRequest) {
|
||||
$RequestID = $_GET['id'];
|
||||
@ -35,11 +35,11 @@
|
||||
$VoteArray = get_votes_array($RequestID);
|
||||
$VoteCount = count($VoteArray['Voters']);
|
||||
|
||||
$NeedCue = (strpos($LogCue, "Cue") !== false);
|
||||
$NeedLog = (strpos($LogCue, "Log") !== false);
|
||||
$NeedCue = (strpos($LogCue, 'Cue') !== false);
|
||||
$NeedLog = (strpos($LogCue, 'Log') !== false);
|
||||
if ($NeedLog) {
|
||||
if(strpos($LogCue, "%")) {
|
||||
preg_match("/\d+/", $LogCue, $Matches);
|
||||
if (strpos($LogCue, '%')) {
|
||||
preg_match('/\d+/', $LogCue, $Matches);
|
||||
$MinLogScore = (int) $Matches[0];
|
||||
}
|
||||
}
|
||||
@ -47,25 +47,25 @@
|
||||
$IsFilled = !empty($TorrentID);
|
||||
$CategoryName = $Categories[$CategoryID - 1];
|
||||
|
||||
$ProjectCanEdit = (check_perms('project_team') && !$IsFilled && (($CategoryID == 0) || ($CategoryName == "Music" && $Year == 0)));
|
||||
$ProjectCanEdit = (check_perms('project_team') && !$IsFilled && (($CategoryID == 0) || ($CategoryName == 'Music' && $Year == 0)));
|
||||
$CanEdit = ((!$IsFilled && $LoggedUser['ID'] == $RequestorID && $VoteCount < 2) || $ProjectCanEdit || check_perms('site_moderate_requests'));
|
||||
|
||||
if (!$CanEdit) {
|
||||
error(403);
|
||||
}
|
||||
|
||||
if($CategoryName == "Music") {
|
||||
if ($CategoryName == 'Music') {
|
||||
$ArtistForm = get_request_artists($RequestID);
|
||||
|
||||
$BitrateArray = array();
|
||||
if($BitrateList == "Any") {
|
||||
if ($BitrateList == 'Any') {
|
||||
$BitrateArray = array_keys($Bitrates);
|
||||
} else {
|
||||
$BitrateArray = array_keys(array_intersect($Bitrates,explode('|', $BitrateList)));
|
||||
}
|
||||
|
||||
$FormatArray = array();
|
||||
if($FormatList == "Any") {
|
||||
if ($FormatList == 'Any') {
|
||||
$FormatArray = array_keys($Formats);
|
||||
} else {
|
||||
foreach ($Formats as $Key => $Val) {
|
||||
@ -77,7 +77,7 @@
|
||||
|
||||
|
||||
$MediaArray = array();
|
||||
if($MediaList == "Any") {
|
||||
if ($MediaList == 'Any') {
|
||||
$MediaArray = array_keys($Media);
|
||||
} else {
|
||||
$MediaTemp = explode('|', $MediaList);
|
||||
@ -193,7 +193,6 @@
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="label">Title</td>
|
||||
<td>
|
||||
@ -262,7 +261,7 @@
|
||||
<td class="label">Release type</td>
|
||||
<td>
|
||||
<select id="releasetype" name="releasetype">
|
||||
<option value='0'>---</option>
|
||||
<option value="0">---</option>
|
||||
<?
|
||||
foreach ($ReleaseTypes as $Key => $Val) {
|
||||
//echo '<h1>'.$ReleaseType.'</h1>'; die();
|
||||
@ -279,7 +278,9 @@
|
||||
<input type="checkbox" name="all_formats" id="toggle_formats" onchange="Toggle('formats', <?=($NewRequest ? 1 : 0)?>);"<?=(!empty($FormatArray) && (count($FormatArray) == count($Formats)) ? ' checked="checked"' : '')?> /><label for="toggle_formats"> All</label>
|
||||
<span style="float: right;"><strong>NB: You cannot require a log or cue unless FLAC is an allowed format</strong></span>
|
||||
<? foreach ($Formats as $Key => $Val) {
|
||||
if($Key % 8 == 0) echo "<br />";?>
|
||||
if ($Key % 8 == 0) {
|
||||
echo '<br />';
|
||||
} ?>
|
||||
<input type="checkbox" name="formats[]" value="<?=$Key?>" onchange="ToggleLogCue(); if (!this.checked) { $('#toggle_formats').raw().checked = false; }" id="format_<?=$Key?>"
|
||||
<?=(!empty($FormatArray) && in_array($Key, $FormatArray) ? ' checked="checked"' : '')?> /><label for="format_<?=$Key?>"> <?=$Val?></label>
|
||||
<? } ?>
|
||||
@ -290,7 +291,9 @@
|
||||
<td>
|
||||
<input type="checkbox" name="all_bitrates" id="toggle_bitrates" onchange="Toggle('bitrates', <?=($NewRequest ? 1 : 0)?>);"<?=(!empty($BitrateArray) && (count($BitrateArray) == count($Bitrates)) ? ' checked="checked"' : '')?> /><label for="toggle_bitrates"> All</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?>"
|
||||
<?=(!empty($BitrateArray) && in_array($Key, $BitrateArray) ? ' checked="checked" ' : '')?>
|
||||
onchange="if (!this.checked) { $('#toggle_bitrates').raw().checked = false; }" /><label for="bitrate_<?=$Key?>"> <?=$Val?></label>
|
||||
@ -302,7 +305,9 @@
|
||||
<td>
|
||||
<input type="checkbox" name="all_media" id="toggle_media" onchange="Toggle('media', <?=($NewRequest ? 1 : 0)?>);"<?=(!empty($MediaArray) && (count($MediaArray) == count($Media)) ? ' checked="checked"' : '')?> /><label for="toggle_media"> All</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?>"
|
||||
<?=(!empty($MediaArray) && in_array($Key, $MediaArray) ? ' checked="checked" ' : '')?>
|
||||
onchange="if (!this.checked) { $('#toggle_media').raw().checked = false; }" /><label for="media_<?=$Key?>"> <?=$Val?></label>
|
||||
@ -330,7 +335,7 @@
|
||||
<tr>
|
||||
<td class="label">Torrent group</td>
|
||||
<td>
|
||||
https://what.cd/torrents.php?id=<input type="text" name="groupid" value="<?=$GroupID?>" size="15" /><br />
|
||||
https://<?=SSL_SITE_URL?>/torrents.php?id=<input type="text" name="groupid" value="<?=$GroupID?>" size="15" /><br />
|
||||
If this request matches a torrent group <span style="font-weight: bold;">already existing</span> on the site, please indicate that here.
|
||||
</td>
|
||||
</tr>
|
||||
@ -339,7 +344,7 @@
|
||||
<tr>
|
||||
<td class="label">Torrent group</td>
|
||||
<td>
|
||||
<a href="torrents.php?id=<?=$GroupID?>">https://what.cd/torrents.php?id=<?=$GroupID?></a><br />
|
||||
<a href="torrents.php?id=<?=$GroupID?>">https://<?=SSL_SITE_URL?>/torrents.php?id=<?=$GroupID?></a><br />
|
||||
This request <?=($NewRequest?'will be':'is')?> associated with the above torrent group.
|
||||
<? if (!$NewRequest) { ?>
|
||||
If this is incorrect, please <a href="reports.php?action=report&type=request&id=<?=$RequestID?>">report this request</a> so that staff can fix it.
|
||||
|
@ -5,11 +5,11 @@
|
||||
authorize();
|
||||
|
||||
|
||||
if($_POST['action'] != "takenew" && $_POST['action'] != "takeedit") {
|
||||
if ($_POST['action'] != 'takenew' && $_POST['action'] != 'takeedit') {
|
||||
error(0);
|
||||
}
|
||||
|
||||
$NewRequest = ($_POST['action'] == "takenew");
|
||||
$NewRequest = ($_POST['action'] == 'takenew');
|
||||
|
||||
if (!$NewRequest) {
|
||||
$ReturnEdit = true;
|
||||
@ -40,7 +40,7 @@
|
||||
|
||||
$CategoryName = $Categories[$CategoryID - 1];
|
||||
|
||||
$ProjectCanEdit = (check_perms('project_team') && !$IsFilled && (($CategoryID == 0) || ($CategoryName == "Music" && $Year == 0)));
|
||||
$ProjectCanEdit = (check_perms('project_team') && !$IsFilled && (($CategoryID == 0) || ($CategoryName == 'Music' && $Year == 0)));
|
||||
$CanEdit = ((!$IsFilled && $LoggedUser['ID'] == $RequestorID && $VoteCount < 2) || $ProjectCanEdit || check_perms('site_moderate_requests'));
|
||||
|
||||
if (!$CanEdit) {
|
||||
@ -61,58 +61,58 @@
|
||||
}
|
||||
|
||||
if (empty($_POST['title'])) {
|
||||
$Err = "You forgot to enter the title!";
|
||||
$Err = 'You forgot to enter the title!';
|
||||
} else {
|
||||
$Title = trim($_POST['title']);
|
||||
}
|
||||
|
||||
if (empty($_POST['tags'])) {
|
||||
$Err = "You forgot to enter any tags!";
|
||||
$Err = 'You forgot to enter any tags!';
|
||||
} else {
|
||||
$Tags = trim($_POST['tags']);
|
||||
}
|
||||
|
||||
if ($NewRequest) {
|
||||
if (empty($_POST['amount'])) {
|
||||
$Err = "You forgot to enter any bounty!";
|
||||
$Err = 'You forgot to enter any bounty!';
|
||||
} else {
|
||||
$Bounty = trim($_POST['amount']);
|
||||
if (!is_number($Bounty)) {
|
||||
$Err = "Your entered bounty is not a number";
|
||||
$Err = 'Your entered bounty is not a number';
|
||||
} elseif ($Bounty < 100 * 1024 * 1024) {
|
||||
$Err = "Minumum bounty is 100MB";
|
||||
$Err = 'Minumum bounty is 100 MB.';
|
||||
}
|
||||
$Bytes = $Bounty; //From MB to B
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($_POST['image'])) {
|
||||
$Image = "";
|
||||
$Image = '';
|
||||
} else {
|
||||
ImageTools::blacklisted($_POST['image']);
|
||||
if(preg_match("/".IMAGE_REGEX."/", trim($_POST['image'])) > 0) {
|
||||
if (preg_match('/'.IMAGE_REGEX.'/', trim($_POST['image'])) > 0) {
|
||||
$Image = trim($_POST['image']);
|
||||
} else {
|
||||
$Err = display_str($_POST['image'])." does not appear to be a valid link to an image.";
|
||||
$Err = display_str($_POST['image']).' does not appear to be a valid link to an image.';
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($_POST['description'])) {
|
||||
$Err = "You forgot to enter any description!";
|
||||
$Err = 'You forgot to enter a description.';
|
||||
} else {
|
||||
$Description = trim($_POST['description']);
|
||||
}
|
||||
|
||||
if ($CategoryName == "Music") {
|
||||
if (empty($_POST['artists'])) {
|
||||
$Err = "You didn't enter any artists";
|
||||
$Err = 'You did not enter any artists.';
|
||||
} else {
|
||||
$Artists = $_POST['artists'];
|
||||
$Importance = $_POST['importance'];
|
||||
}
|
||||
|
||||
if (!is_number($_POST['releasetype']) || !array_key_exists($_POST['releasetype'], $ReleaseTypes)) {
|
||||
$Err = "Please pick a release type";
|
||||
$Err = 'Please pick a release type';
|
||||
}
|
||||
|
||||
$ReleaseType = $_POST['releasetype'];
|
||||
@ -120,7 +120,7 @@
|
||||
if (empty($_POST['all_formats']) && count($_POST['formats']) != count($Formats)) {
|
||||
$FormatArray = $_POST['formats'];
|
||||
if (count($FormatArray) < 1) {
|
||||
$Err = "You must require at least one format";
|
||||
$Err = 'You must require at least one format';
|
||||
}
|
||||
} else {
|
||||
$AllFormats = true;
|
||||
@ -129,7 +129,7 @@
|
||||
if (empty($_POST['all_bitrates']) && count($_POST['bitrates']) != count($Bitrates)) {
|
||||
$BitrateArray = $_POST['bitrates'];
|
||||
if (count($BitrateArray) < 1) {
|
||||
$Err = "You must require at least one bitrate";
|
||||
$Err = 'You must require at least one bitrate';
|
||||
}
|
||||
} else {
|
||||
$AllBitrates = true;
|
||||
@ -138,7 +138,7 @@
|
||||
if (empty($_POST['all_media']) && count($_POST['media']) != count($Media)) {
|
||||
$MediaArray = $_POST['media'];
|
||||
if (count($MediaArray) < 1) {
|
||||
$Err = "You must require at least one type of media";
|
||||
$Err = 'You must require at least one medium.';
|
||||
}
|
||||
} else {
|
||||
$AllMedia = true;
|
||||
@ -154,18 +154,18 @@
|
||||
$MinLogScore = 0;
|
||||
}
|
||||
if (!is_number($MinLogScore)) {
|
||||
$Err = "You've entered a minimum log score that isn't a number";
|
||||
$Err = 'You have entered a minimum log score that is not a number.';
|
||||
}
|
||||
}
|
||||
$NeedCue = empty($_POST['needcue']) ? false : true;
|
||||
//FLAC was picked, require either Lossless or 24 bit Lossless
|
||||
if (!$AllBitrates && !in_array(8, $BitrateArray) && !in_array(9, $BitrateArray)) {
|
||||
$Err = "You selected FLAC as a format but no possible bitrate to fill it (Lossless or 24 bit Lossless)";
|
||||
$Err = 'You selected FLAC as a format but no possible bitrate to fill it (Lossless or 24bit Lossless)';
|
||||
}
|
||||
|
||||
if (($NeedCue || $NeedLog)) {
|
||||
if (!(empty($_POST['all_media']) && $MediaArray[0] == 0)) {
|
||||
$Err = "Only CD is allowed as media for FLAC Log/Cue Requests.";
|
||||
$Err = 'Only CD is allowed as media for FLAC + log/cue requests.';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -177,17 +177,17 @@
|
||||
// GroupID
|
||||
if (!empty($_POST['groupid'])) {
|
||||
$GroupID = trim($_POST['groupid']);
|
||||
$URLRegex = '/^https?:\/\/(www\.|ssl\.)?'.NONSSL_SITE_URL.'\/torrents\.php\?(page=[0-9]+&)?id=([0-9]+)/i';
|
||||
$URLRegex = '/^https?:\/\/(www\.|ssl\.)?'.SSL_SITE_URL.'\/torrents\.php\?(page=[0-9]+&)?id=([0-9]+)/i';
|
||||
if (preg_match($URLRegex, $GroupID, $Matches)) {
|
||||
$GroupID = $Matches[3];
|
||||
}
|
||||
if (is_number($GroupID)) {
|
||||
$DB->query("SELECT 1 FROM torrents_group WHERE ID = '$GroupID' AND CategoryID = 1");
|
||||
if ($DB->record_count() == 0) {
|
||||
$Err = "Torrent Group, if entered, must correspond to a music group on the site.";
|
||||
$Err = 'The torrent group, if entered, must correspond to a music torrent group on the site.';
|
||||
}
|
||||
} else {
|
||||
$Err = "Torrent Group, if entered, must correspond to a music group on the site.";
|
||||
$Err = 'The torrent group, if entered, must correspond to a music torrent group on the site.';
|
||||
}
|
||||
} elseif ($_POST['groupid'] == '0') {
|
||||
$GroupID = 0;
|
||||
@ -197,27 +197,27 @@
|
||||
if (!empty($_POST['editioninfo'])) {
|
||||
$EditionInfo = trim($_POST['editioninfo']);
|
||||
} else {
|
||||
$EditionInfo = "";
|
||||
$EditionInfo = '';
|
||||
}
|
||||
if (!empty($_POST['cataloguenumber'])) {
|
||||
$CatalogueNumber = trim($_POST['cataloguenumber']);
|
||||
} else {
|
||||
$CatalogueNumber = "";
|
||||
$CatalogueNumber = '';
|
||||
}
|
||||
if (!empty($_POST['recordlabel'])) {
|
||||
$RecordLabel = trim($_POST['recordlabel']);
|
||||
} else {
|
||||
$RecordLabel = "";
|
||||
$RecordLabel = '';
|
||||
}
|
||||
}
|
||||
|
||||
if($CategoryName == "Music" || $CategoryName == "Audiobooks" || $CategoryName == "Comedy") {
|
||||
if ($CategoryName == 'Music' || $CategoryName == 'Audiobooks' || $CategoryName == 'Comedy') {
|
||||
if (empty($_POST['year'])) {
|
||||
$Err = "You forgot to enter the year!";
|
||||
$Err = 'You forgot to enter the year!';
|
||||
} else {
|
||||
$Year = trim($_POST['year']);
|
||||
if (!is_number($Year)) {
|
||||
$Err = "Your entered year is not a number";
|
||||
$Err = 'Your entered year is not a number.';
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -226,12 +226,12 @@
|
||||
if (!empty($_POST['oclc'])) {
|
||||
$OCLC = trim($_POST['oclc']);
|
||||
} else {
|
||||
$OCLC = "";
|
||||
$OCLC = '';
|
||||
}
|
||||
|
||||
|
||||
//For refilling on error
|
||||
if($CategoryName == "Music") {
|
||||
if ($CategoryName == 'Music') {
|
||||
$MainArtistCount = 0;
|
||||
$ArtistNames = array();
|
||||
$ArtistForm = array(
|
||||
@ -240,7 +240,7 @@
|
||||
3 => array()
|
||||
);
|
||||
for ($i = 0, $il = count($Artists); $i < $il; $i++) {
|
||||
if(trim($Artists[$i]) != "") {
|
||||
if (trim($Artists[$i]) != '') {
|
||||
if (!in_array($Artists[$i], $ArtistNames)) {
|
||||
$ArtistForm[$Importance[$i]][] = array('name' => trim($Artists[$i]));
|
||||
if (in_array($Importance[$i], array(1,4,5,6))) {
|
||||
@ -251,7 +251,7 @@
|
||||
}
|
||||
}
|
||||
if ($MainArtistCount < 1) {
|
||||
$Err = "Please enter at least one main artist, conductor, composer, or DJ";
|
||||
$Err = 'Please enter at least one main artist, conductor, composer, or DJ.';
|
||||
}
|
||||
if (!isset($ArtistNames[0])) {
|
||||
unset($ArtistForm);
|
||||
@ -267,7 +267,7 @@
|
||||
}
|
||||
|
||||
//Databasify the input
|
||||
if($CategoryName == "Music") {
|
||||
if ($CategoryName == 'Music') {
|
||||
if (empty($AllBitrates)) {
|
||||
foreach ($BitrateArray as $Index => $MasterIndex) {
|
||||
if (array_key_exists($Index, $Bitrates)) {
|
||||
@ -277,9 +277,9 @@
|
||||
error(0);
|
||||
}
|
||||
}
|
||||
$BitrateList = implode("|", $BitrateArray);
|
||||
$BitrateList = implode('|', $BitrateArray);
|
||||
} else {
|
||||
$BitrateList = "Any";
|
||||
$BitrateList = 'Any';
|
||||
}
|
||||
|
||||
if (empty($AllFormats)) {
|
||||
@ -291,9 +291,9 @@
|
||||
error(0);
|
||||
}
|
||||
}
|
||||
$FormatList = implode("|", $FormatArray);
|
||||
$FormatList = implode('|', $FormatArray);
|
||||
} else {
|
||||
$FormatList = "Any";
|
||||
$FormatList = 'Any';
|
||||
}
|
||||
|
||||
if (empty($AllMedia)) {
|
||||
@ -305,39 +305,39 @@
|
||||
error(0);
|
||||
}
|
||||
}
|
||||
$MediaList = implode("|", $MediaArray);
|
||||
$MediaList = implode('|', $MediaArray);
|
||||
} else {
|
||||
$MediaList = "Any";
|
||||
$MediaList = 'Any';
|
||||
}
|
||||
|
||||
$LogCue = "";
|
||||
$LogCue = '';
|
||||
if ($NeedLog) {
|
||||
$LogCue .= "Log";
|
||||
$LogCue .= 'Log';
|
||||
if ($MinLogScore > 0) {
|
||||
if ($MinLogScore >= 100) {
|
||||
$LogCue .= " (100%)";
|
||||
$LogCue .= ' (100%)';
|
||||
} else {
|
||||
$LogCue .= " (>= ".$MinLogScore."%)";
|
||||
$LogCue .= ' (>= '.$MinLogScore.'%)';
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($NeedCue) {
|
||||
if($LogCue != "") {
|
||||
$LogCue .= " + Cue";
|
||||
if ($LogCue != '') {
|
||||
$LogCue .= ' + Cue';
|
||||
} else {
|
||||
$LogCue = "Cue";
|
||||
$LogCue = 'Cue';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Query time!
|
||||
if($CategoryName == "Music") {
|
||||
if ($CategoryName == 'Music') {
|
||||
if ($NewRequest) {
|
||||
$DB->query("INSERT INTO requests (
|
||||
$DB->query('INSERT INTO requests (
|
||||
UserID, TimeAdded, LastVote, CategoryID, Title, Year, Image, Description, RecordLabel,
|
||||
CatalogueNumber, ReleaseType, BitrateList, FormatList, MediaList, LogCue, Visible, GroupID, OCLC)
|
||||
VALUES
|
||||
(".$LoggedUser['ID'].", '".sqltime()."', '".sqltime()."', ".$CategoryID.", '".db_string($Title)."', ".$Year.", '".db_string($Image)."', '".db_string($Description)."','".db_string($RecordLabel)."',
|
||||
('.$LoggedUser['ID'].", '".sqltime()."', '".sqltime()."', ".$CategoryID.", '".db_string($Title)."', ".$Year.", '".db_string($Image)."', '".db_string($Description)."','".db_string($RecordLabel)."',
|
||||
'".db_string($CatalogueNumber)."', ".$ReleaseType.", '".$BitrateList."','".$FormatList."', '".$MediaList."', '".$LogCue."', '1', '$GroupID', '".db_string($OCLC)."')");
|
||||
|
||||
$RequestID = $DB->inserted_id();
|
||||
@ -462,7 +462,7 @@
|
||||
$DB->query("DELETE FROM requests_artists WHERE RequestID = ".$RequestID);
|
||||
}
|
||||
|
||||
if($CategoryName == "Audiobooks" || $CategoryName == "Comedy") {
|
||||
if ($CategoryName == 'Audiobooks' || $CategoryName == 'Comedy') {
|
||||
//These types require a year field.
|
||||
if ($NewRequest) {
|
||||
$DB->query("INSERT INTO requests (
|
||||
|
@ -618,7 +618,7 @@ function next_hour() {
|
||||
AND ul.UserID IS NULL
|
||||
GROUP BY um.ID");
|
||||
while (list($Username, $Email) = $DB->next_record()) {
|
||||
$Body = "Hi $Username, \n\nIt has been almost 4 months since you used your account at http://".NONSSL_SITE_URL.". This is an automated email to inform you that your account will be disabled in 10 days if you do not sign in. ";
|
||||
$Body = "Hi $Username, \n\nIt has been almost 4 months since you used your account at https://".SSL_SITE_URL.". This is an automated email to inform you that your account will be disabled in 10 days if you do not sign in. ";
|
||||
Misc::send_email($Email, 'Your '.SITE_NAME.' account is about to be disabled', $Body);
|
||||
}
|
||||
$DB->query("SELECT um.ID
|
||||
|
@ -10,8 +10,8 @@
|
||||
*****************************************************************/
|
||||
|
||||
if (isset($argv[1])) {
|
||||
if ($argv[1] == "cli_sandbox") {
|
||||
include("misc/cli_sandbox.php");
|
||||
if ($argv[1] == 'cli_sandbox') {
|
||||
include('misc/cli_sandbox.php');
|
||||
die();
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
View::show_header('Tag Aliases');
|
||||
|
||||
$orderby = ($_GET['order']) == "badtags" ? "BadTag" : "AliasTag";
|
||||
$orderby = ($_GET['order']) == 'badtags' ? 'BadTag' : 'AliasTag';
|
||||
|
||||
if (check_perms('users_mod')) {
|
||||
if (isset($_POST['newalias'])) {
|
||||
@ -56,7 +56,7 @@
|
||||
</td>
|
||||
<? if (check_perms('users_mod')) { ?>
|
||||
<td>
|
||||
<input type="submit" value="Add Alias" />
|
||||
<input type="submit" value="Add alias" />
|
||||
</td>
|
||||
<? } ?>
|
||||
</form>
|
||||
|
265
sections/tools/misc/tags.php
Normal file
265
sections/tools/misc/tags.php
Normal file
@ -0,0 +1,265 @@
|
||||
<?
|
||||
View::show_header('Batch Tag Editor','validate');
|
||||
if (!check_perms('users_mod')) {
|
||||
error(403);
|
||||
}
|
||||
|
||||
// validation functions
|
||||
$Val->SetFields('tag',true,'string','Enter a single tag to search for.',array('maxlength'=>'200','minlength'=>'2'));
|
||||
$Val->SetFields('replace',true,'string','Enter a single replacement tag.',array('maxlength'=>'200','minlength'=>'2'));
|
||||
|
||||
echo $Val->GenerateJS('tagform');
|
||||
|
||||
// some constants to make programmers' lives easier
|
||||
define('MODE_RENAME',0);
|
||||
define('MODE_MERGE',1);
|
||||
|
||||
?>
|
||||
<div class="thin">
|
||||
<h3>Merge/Rename Tags</h3>
|
||||
<form action="tools.php" method="get" name="tagform" id="tagform" onsubmit="return formVal();">
|
||||
<input type="hidden" name="action" value="edit_tags" />
|
||||
<table>
|
||||
<tr>
|
||||
<td class="label">
|
||||
Tag:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="tag" id="tag" />
|
||||
</td>
|
||||
<td class="label">
|
||||
Rename to/merge with tag:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="replace" id="replace" />
|
||||
</td>
|
||||
<td class="label">
|
||||
<input type="checkbox" name="list" id="list" checked="checked" /> <label for="list">List affected rows</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="center" colspan="5">
|
||||
<input type="submit" value="Rename/Merge Tags" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<br />
|
||||
<?
|
||||
if (isset($_GET['tag']) || isset($_GET['replace'])) {
|
||||
|
||||
// validate input
|
||||
$Err = $Val->ValidateForm($_GET);
|
||||
if ($Err) {
|
||||
echo ' <div class="box pad center">
|
||||
<strong>Error:</strong> '.$Err.'
|
||||
</div>';
|
||||
} else {
|
||||
$Tag = Misc::sanitize_tag($_GET['tag']);
|
||||
$Replacement = Misc::sanitize_tag($_GET['replace']);
|
||||
|
||||
// trying to merge tag with itself would create big problems
|
||||
if ($Tag == $Replacement) {
|
||||
echo " <div class=\"box pad center\">
|
||||
<strong>Error:</strong> Cannot merge tag $Tag with itself (doh).
|
||||
</div>
|
||||
</div>";
|
||||
View::show_footer();
|
||||
exit;
|
||||
}
|
||||
|
||||
// 1) make sure tag exists
|
||||
$DB->query("SELECT ID
|
||||
FROM tags
|
||||
WHERE Name = '".$Tag."'
|
||||
LIMIT 1;");
|
||||
if ($DB->record_count() == 0) {
|
||||
echo " <div class=\"box pad center\">
|
||||
<strong>Error:</strong> No such tag found: $Tag
|
||||
</div>
|
||||
</div>";
|
||||
View::show_footer();
|
||||
exit;
|
||||
}
|
||||
list($TagID) = $DB->next_record();
|
||||
|
||||
// 2) check if replacement exists
|
||||
$DB->query("SELECT ID
|
||||
FROM tags
|
||||
WHERE Name = '".$Replacement."'
|
||||
LIMIT 1;");
|
||||
if ($DB->record_count() == 0 ) {
|
||||
$Mode = MODE_RENAME;
|
||||
} else {
|
||||
$Mode = MODE_MERGE;
|
||||
}
|
||||
list($ReplacementID) = $DB->next_record();
|
||||
|
||||
if ($_GET['list']) {
|
||||
$AffectedTorrents = array();
|
||||
// 3) get a list of affected torrents
|
||||
$DB->query("SELECT
|
||||
tg.ID,
|
||||
ag.ArtistID,
|
||||
ag.Name,
|
||||
tg.Name
|
||||
FROM torrents_group AS tg
|
||||
LEFT JOIN artists_group AS ag ON ag.ArtistID=tg.ArtistID
|
||||
JOIN torrents_tags AS t ON t.GroupID=tg.ID
|
||||
WHERE t.TagID=$TagID;");
|
||||
while (list($TorrentID,$ArtistID,$ArtistName,$TorrentName) = $DB->next_record()) {
|
||||
$Row = ($ArtistName ? "<a href=\"artist.php?id=$ArtistID\">$ArtistName</a> - " : '');
|
||||
$Row.= "<a href='torrents.php?id=$TorrentID'>".display_str($TorrentName)."</a>";
|
||||
$AffectedTorrents[] = $Row;
|
||||
}
|
||||
|
||||
// 4) get a list of affected requests
|
||||
$DB->query("SELECT
|
||||
ra.RequestID,
|
||||
ag.ArtistID,
|
||||
ag.Name,
|
||||
r.Title
|
||||
FROM requests AS r
|
||||
LEFT JOIN requests_artists AS ra ON r.ID=ra.RequestID
|
||||
LEFT JOIN artists_group AS ag ON ag.ArtistID=ra.ArtistID
|
||||
JOIN requests_tags AS t ON t.RequestID=r.ID
|
||||
WHERE t.TagID=$TagID;");
|
||||
while (list($RequestID,$ArtistID,$ArtistName,$RequestName) = $DB->next_record()) {
|
||||
$Row = ($ArtistName ? "<a href=\"artist.php?id=$ArtistID\">$ArtistName</a> - " : '');
|
||||
$Row.= "<a href='requests.php?action=viewrequest&id=$RequestID'>".display_str($RequestName)."</a>";
|
||||
$AffectedRequests[] = $Row;
|
||||
}
|
||||
}
|
||||
|
||||
$TotalAffected = 0;
|
||||
if ($Mode == MODE_RENAME) {
|
||||
// EASY! just rename the tag
|
||||
// 5) rename the tag
|
||||
$DB->query("UPDATE tags
|
||||
SET Name = '".$Replacement."'
|
||||
WHERE ID = $TagID
|
||||
LIMIT 1;");
|
||||
$TotalAffected = $DB->affected_rows();
|
||||
} else {
|
||||
// HARD! merge two tags together and update usage
|
||||
// 5) remove dupe tags from torrents
|
||||
// (torrents that have both "old tag" and "replacement tag" set)
|
||||
$DB->query("SELECT GroupID FROM torrents_tags WHERE TagID=$ReplacementID;");
|
||||
if ($DB->record_count() > 0 ) {
|
||||
$Query = "DELETE
|
||||
FROM torrents_tags
|
||||
WHERE TagID=$TagID
|
||||
AND GroupID IN (";
|
||||
while (list($GroupID) = $DB->next_record()) {
|
||||
$Query.= $GroupID.',';
|
||||
}
|
||||
$Query = substr($Query,0,-1).");";
|
||||
$DB->query($Query);
|
||||
$TotalAffected = $DB->affected_rows();
|
||||
}
|
||||
|
||||
// 6) replace old tag in torrents
|
||||
$DB->query("UPDATE torrents_tags
|
||||
SET TagID=$ReplacementID
|
||||
WHERE TagID=$TagID;");
|
||||
$UsageChange = $DB->affected_rows();
|
||||
|
||||
// 7) remove dupe tags from artists
|
||||
$DB->query("SELECT ArtistID FROM artists_tags WHERE TagID=$ReplacementID;");
|
||||
if ($DB->record_count() > 0 ) {
|
||||
$Query = "DELETE
|
||||
FROM artists_tags
|
||||
WHERE TagID=$TagID
|
||||
AND ArtistID IN (";
|
||||
while (list($ArtistID) = $DB->next_record()) {
|
||||
$Query.= $ArtistID.',';
|
||||
}
|
||||
$Query = substr($Query,0,-1).");";
|
||||
$DB->query($Query);
|
||||
$TotalAffected += $DB->affected_rows();
|
||||
}
|
||||
|
||||
// 8) replace old tag in artists
|
||||
$DB->query("UPDATE artists_tags
|
||||
SET TagID=$ReplacementID
|
||||
WHERE TagID=$TagID;");
|
||||
$UsageChange += $DB->affected_rows();
|
||||
|
||||
// 9) remove dupe tags from requests
|
||||
$DB->query("SELECT RequestID FROM requests_tags WHERE TagID=$ReplacementID;");
|
||||
if ($DB->record_count() > 0) {
|
||||
$Query = "DELETE
|
||||
FROM requests_tags
|
||||
WHERE TagID=$TagID
|
||||
AND RequestID IN (";
|
||||
while (list($RequestID) = $DB->next_record()) {
|
||||
$Query.= $RequestID.',';
|
||||
}
|
||||
$Query = substr($Query,0,-1).");";
|
||||
$DB->query($Query);
|
||||
$TotalAffected += $DB->affected_rows();
|
||||
}
|
||||
|
||||
// 10) replace old tag in requests
|
||||
$DB->query("UPDATE requests_tags
|
||||
SET TagID=$ReplacementID
|
||||
WHERE TagID=$TagID;");
|
||||
$UsageChange += $DB->affected_rows();
|
||||
$TotalAffected += $UsageChange;
|
||||
|
||||
// 11) finally, remove old tag completely
|
||||
$DB->query("DELETE
|
||||
FROM tags
|
||||
WHERE ID=$TagID
|
||||
LIMIT 1");
|
||||
|
||||
// 12) update usage count for replacement tag
|
||||
$DB->query("UPDATE tags
|
||||
SET Uses=Uses+$UsageChange
|
||||
WHERE ID=$ReplacementID
|
||||
LIMIT 1");
|
||||
|
||||
} // if ($Mode == MODE_MERGE)
|
||||
|
||||
echo '<div class="box pad center"><strong>Success!</strong> Affected entries: '.number_format($TotalAffected).'</div>';
|
||||
|
||||
if ($_GET['list']) {
|
||||
?>
|
||||
<br>
|
||||
<table>
|
||||
<tr class="colhead">
|
||||
<td>
|
||||
Affected torrent groups
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
if (count($AffectedTorrents)) {
|
||||
foreach ($AffectedTorrents as $Row) {
|
||||
echo "<tr><td>$Row</td></tr>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr class="colhead">
|
||||
<td>
|
||||
Affected requests
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
if (count($AffectedRequests)) {
|
||||
foreach ($AffectedRequests as $Row) {
|
||||
echo "<tr><td>$Row</td></tr>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
|
||||
} // if (!$Err)
|
||||
|
||||
} // if ( isset($_GET['tag']) || isset($_GET['replace']) )
|
||||
|
||||
echo '</div>';
|
||||
|
||||
View::show_footer();
|
||||
?>
|
@ -69,8 +69,10 @@
|
||||
<div class="permission_container">
|
||||
<table class="layout">
|
||||
<tr class="colhead"><td>Misc</td></tr>
|
||||
|
||||
<? if (check_perms('users_mod')) { ?>
|
||||
<tr><td><a href="tools.php?action=edit_tags">Batch tag editor</a></td></tr>
|
||||
<? }
|
||||
if (check_perms('users_mod')) { ?>
|
||||
<tr><td><a href="tools.php?action=manipulate_tree">Manipulate tree</a></td></tr>
|
||||
<? }
|
||||
if (check_perms('admin_update_geoip')) { ?>
|
||||
|
@ -447,16 +447,44 @@ function generate_torrent_table($Caption, $Tag, $Details, $Limit) {
|
||||
// append extra info to torrent title
|
||||
$ExtraInfo = '';
|
||||
$AddExtra = '';
|
||||
if ($Format) { $ExtraInfo.=$Format; $AddExtra=' / '; }
|
||||
if ($Encoding) { $ExtraInfo.=$AddExtra.$Encoding; $AddExtra=' / '; }
|
||||
if ($Format) {
|
||||
$ExtraInfo.=$Format;
|
||||
$AddExtra=' / ';
|
||||
}
|
||||
if ($Encoding) {
|
||||
$ExtraInfo.=$AddExtra.$Encoding;
|
||||
$AddExtra=' / ';
|
||||
}
|
||||
// "FLAC / Lossless / Log (100%) / Cue / CD";
|
||||
if ($HasLog) { $ExtraInfo.=$AddExtra."Log (".$LogScore."%)"; $AddExtra=' / '; }
|
||||
if ($HasCue) { $ExtraInfo.=$AddExtra."Cue"; $AddExtra=' / '; }
|
||||
if ($Media) { $ExtraInfo.=$AddExtra.$Media; $AddExtra=' / '; }
|
||||
if ($Scene) { $ExtraInfo.=$AddExtra.'Scene'; $AddExtra=' / '; }
|
||||
if ($Year>0) { $ExtraInfo.=$AddExtra.$Year; $AddExtra=' '; }
|
||||
if ($RemasterTitle) { $ExtraInfo.=$AddExtra.$RemasterTitle; }
|
||||
if ($IsSnatched) { if ($GroupCategoryID == 1) { $ExtraInfo .= ' / '; } $ExtraInfo.= Format::torrent_label('Snatched!'); }
|
||||
if ($HasLog) {
|
||||
$ExtraInfo.=$AddExtra.'Log ('.$LogScore.'%)';
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if ($HasCue) {
|
||||
$ExtraInfo.=$AddExtra.'Cue';
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if ($Media) {
|
||||
$ExtraInfo.=$AddExtra.$Media;
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if ($Scene) {
|
||||
$ExtraInfo.=$AddExtra.'Scene';
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if ($Year > 0) {
|
||||
$ExtraInfo.=$AddExtra.$Year;
|
||||
$AddExtra = ' ';
|
||||
}
|
||||
if ($RemasterTitle) {
|
||||
$ExtraInfo.=$AddExtra.$RemasterTitle;
|
||||
}
|
||||
if ($IsSnatched) {
|
||||
if ($GroupCategoryID == 1) {
|
||||
$ExtraInfo .= ' / ';
|
||||
}
|
||||
$ExtraInfo.= Format::torrent_label('Snatched!');
|
||||
}
|
||||
if ($ExtraInfo != '') {
|
||||
$ExtraInfo = "- [$ExtraInfo]";
|
||||
}
|
||||
@ -496,7 +524,6 @@ function generate_torrent_table($Caption, $Tag, $Details, $Limit) {
|
||||
<? } ?>
|
||||
</span>
|
||||
<div class="tags"><?=$TorrentTags->format()?></div>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td style="text-align: right;" class="nobr"><?=Format::get_size($Size)?></td>
|
||||
|
@ -186,7 +186,7 @@
|
||||
$DisplayName = $DisplayName. " [$GroupYear]";
|
||||
}
|
||||
if ($GroupVanityHouse) {
|
||||
$DisplayName .= ' [<abbr title="This is a vanity house release">VH</abbr>]';
|
||||
$DisplayName .= ' [<abbr title="This is a Vanity House release">VH</abbr>]';
|
||||
}
|
||||
// Start an output buffer, so we can store this output in $TorrentTable
|
||||
ob_start();
|
||||
|
@ -305,7 +305,48 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
|
||||
// Tag list
|
||||
if (!empty($SearchWords['taglist'])) {
|
||||
global $Cache, $DB;
|
||||
//Get tag aliases.
|
||||
$TagAliases = $Cache->get_value('tag_aliases_search');
|
||||
if (!$TagAliases) {
|
||||
$DB->query("SELECT ID,BadTag,AliasTag FROM tag_aliases ORDER BY BadTag");
|
||||
$TagAliases = $DB->to_array();
|
||||
//Unify tag aliases to be in_this_format as tags not in.this.format
|
||||
array_walk_recursive($TagAliases, create_function('&$val', '$val = preg_replace("/\./","_", $val);'));
|
||||
//Clean up the array for smaller cache size
|
||||
foreach ($TagAliases as &$TagAlias) {
|
||||
foreach (array_keys($TagAlias) as $Key) {
|
||||
if (is_numeric($Key)) {
|
||||
unset($TagAlias[$Key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
$Cache->cache_value('tag_aliases_search', $TagAliases, 3600 * 24 * 7); // cache for 7 days
|
||||
}
|
||||
//Get tags
|
||||
$Tags = $SearchWords['taglist'];
|
||||
//Replace bad tags with tag aliases
|
||||
//In other news oh God I'm going to hell for all this preg_replace, but they're kept in two separate formats
|
||||
for ($i = 0; $i < sizeof($Tags['include']) ; $i++) {
|
||||
foreach ($TagAliases as $TagAlias) {
|
||||
if ($Tags['include'][$i] === $TagAlias['BadTag']) {
|
||||
$Tags['include'][$i] = $TagAlias['AliasTag'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
for ($i = 0; $i < sizeof($Tags['exclude']) ; $i++) {
|
||||
foreach ($TagAliases as $TagAlias) {
|
||||
if (preg_replace('/^!/', '', $Tags['exclude'][$i]) === $TagAlias['BadTag']) {
|
||||
$Tags['exclude'][$i] = '!'.$TagAlias['AliasTag'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//Only keep unique entries after unifying tag standard
|
||||
$Tags['include'] = array_unique($Tags['include']);
|
||||
$Tags['exclude'] = array_unique($Tags['exclude']);
|
||||
$TagListString = implode(", ", array_merge($Tags['include'], $Tags['exclude']));
|
||||
if (!$EnableNegation && !empty($Tags['exclude'])) {
|
||||
$Tags['include'] = array_merge($Tags['include'], $Tags['exclude']);
|
||||
unset($Tags['exclude']);
|
||||
@ -712,7 +753,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
<tr id="tagfilter">
|
||||
<td class="label">Tags (comma-separated):</td>
|
||||
<td colspan="3" class="ft_taglist">
|
||||
<input type="text" size="40" id="tags" name="taglist" class="inputtext smaller" title="Use !tag to exclude tag" value="<?=str_replace('_','.',Format::form('taglist', true))?>" />
|
||||
<input type="text" size="40" id="tags" name="taglist" class="inputtext smaller" title="Use !tag to exclude tag" value="<?=str_replace('_','.',display_str($TagListString)) /* Use aliased tags, not actual query string. */ ?>" />
|
||||
<input type="radio" name="tags_type" id="tags_type0" value="0"<?Format::selected('tags_type',0,'checked')?> /><label for="tags_type0"> Any</label>
|
||||
<input type="radio" name="tags_type" id="tags_type1" value="1"<?Format::selected('tags_type',1,'checked')?> /><label for="tags_type1"> All</label>
|
||||
</td>
|
||||
@ -940,7 +981,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
$DisplayName .= " [$GroupYear]";
|
||||
}
|
||||
if ($GroupVanityHouse) {
|
||||
$DisplayName .= ' [<abbr title="This is a vanity house release">VH</abbr>]';
|
||||
$DisplayName .= ' [<abbr title="This is a Vanity House release">VH</abbr>]';
|
||||
}
|
||||
$DisplayName .= ' ['.$ReleaseTypes[$ReleaseType].']';
|
||||
?>
|
||||
|
@ -201,7 +201,7 @@ function get_reports($TorrentID){
|
||||
function build_torrents_table($Cache, $DB, $LoggedUser, $GroupID, $GroupName, $GroupCategoryID, $ReleaseType, $TorrentList, $Types, $Text, $Username, $ReportedTimes) {
|
||||
|
||||
function filelist($Str) {
|
||||
return "</td><td>" . Format::get_size($Str[1]) . "</td></tr>";
|
||||
return '</td><td>' . Format::get_size($Str[1]) . '</td></tr>';
|
||||
}
|
||||
|
||||
$LastRemasterYear = '-';
|
||||
@ -265,10 +265,10 @@ function filelist($Str) {
|
||||
//There was a type but it wasn't an option!
|
||||
$ReportType = $Types['master']['other'];
|
||||
}
|
||||
$ReportInfo .= "<tr><td>" . (check_perms('admin_reports') ? "<a href='user.php?id=$ReporterID'>$ReporterName</a> <a href='reportsv2.php?view=report&id=$ReportID'>reported it</a> " : "Someone reported it ") . time_diff($ReportedTime, 2, true, true) . " for the reason '" . $ReportType['title'] . "':";
|
||||
$ReportInfo .= "<blockquote>" . $Text->full_format($ReportReason) . "</blockquote></td></tr>";
|
||||
$ReportInfo .= '<tr><td>' . (check_perms('admin_reports') ? "<a href=\"user.php?id=$ReporterID\">$ReporterName</a> <a href=\"reportsv2.php?view=report&id=$ReportID\">reported it</a> " : 'Someone reported it ') . time_diff($ReportedTime, 2, true, true) . ' for the reason "' . $ReportType['title'] . '":';
|
||||
$ReportInfo .= '<blockquote>' . $Text->full_format($ReportReason) . '</blockquote></td></tr>';
|
||||
}
|
||||
$ReportInfo .= "</table>";
|
||||
$ReportInfo .= '</table>';
|
||||
}
|
||||
|
||||
$CanEdit = (check_perms('torrents_edit') || (($UserID == $LoggedUser['ID'] && !$LoggedUser['DisableWiki']) && !($Remastered && !$RemasterYear)));
|
||||
@ -276,12 +276,15 @@ function filelist($Str) {
|
||||
$RegenLink = check_perms('users_mod') ? ' <a href="torrents.php?action=regen_filelist&torrentid=' . $TorrentID . '" class="brackets">Regenerate</a>' : '';
|
||||
$FileTable = '
|
||||
<table class="filelist_table">
|
||||
<tr class="colhead_dark"><td>
|
||||
<div class="filelist_title" style="float: left;">File Name' . $RegenLink . '</div>
|
||||
<tr class="colhead_dark">
|
||||
<td>
|
||||
<div class="filelist_title" style="float: left;">File name' . $RegenLink . '</div>
|
||||
<div class="filelist_path" style="float: right;">' . ($FilePath ? "/$FilePath/" : '') . '</div>
|
||||
</td><td>
|
||||
</td>
|
||||
<td>
|
||||
<strong>Size</strong>
|
||||
</td></tr>';
|
||||
</td>
|
||||
</tr>';
|
||||
if (substr($FileList, -3) == '}}}') { // Old style
|
||||
$FileListSplit = explode('|||', $FileList);
|
||||
foreach ($FileListSplit as $File) {
|
||||
@ -401,7 +404,6 @@ function filelist($Str) {
|
||||
$LastRemasterCatalogueNumber = $RemasterCatalogueNumber;
|
||||
$LastMedia = $Media;
|
||||
?>
|
||||
|
||||
<tr class="torrent_row releases_<?= $ReleaseType ?> groupid_<?= $GroupID ?> edition_<?= $EditionID ?> group_torrent<?= $IsSnatched ? ' snatched_torrent' : '' ?>" style="font-weight: normal;" id="torrent<?= $TorrentID ?>">
|
||||
<td>
|
||||
<span>[ <a href="torrents.php?action=download&id=<?= $TorrentID ?>&authkey=<?= $LoggedUser['AuthKey'] ?>&torrent_pass=<?= $LoggedUser['torrent_pass'] ?>" title="Download"><?= $HasFile ? 'DL' : 'Missing' ?></a>
|
||||
@ -411,11 +413,10 @@ function filelist($Str) {
|
||||
| <a href="reportsv2.php?action=report&id=<?= $TorrentID ?>" title="Report">RP</a>
|
||||
<? if ($CanEdit) { ?>
|
||||
| <a href="torrents.php?action=edit&id=<?= $TorrentID ?>" title="Edit">ED</a>
|
||||
<? } ?>
|
||||
<? if (check_perms('torrents_delete') || $UserID == $LoggedUser['ID']) { ?>
|
||||
<? }
|
||||
if (check_perms('torrents_delete') || $UserID == $LoggedUser['ID']) { ?>
|
||||
| <a href="torrents.php?action=delete&torrentid=<?= $TorrentID ?>" title="Remove">RM</a>
|
||||
<? } ?>
|
||||
|
||||
| <a href="torrents.php?torrentid=<?= $TorrentID ?>" title="Permalink">PL</a>
|
||||
]</span>
|
||||
» <a href="#" onclick="$('#torrent_<?= $TorrentID ?>').toggle(); return false;"><?= $ExtraInfo; ?></a>
|
||||
@ -429,18 +430,16 @@ function filelist($Str) {
|
||||
<td colspan="5">
|
||||
<blockquote>
|
||||
Uploaded by <?= Users::format_username($UserID, false, false, false) ?> <?= time_diff($TorrentTime); ?>
|
||||
<? if ($Seeders == 0) { ?>
|
||||
<? if ($LastActive != '0000-00-00 00:00:00' && time() - strtotime($LastActive) >= 1209600) { ?>
|
||||
<? if ($Seeders == 0) {
|
||||
if ($LastActive != '0000-00-00 00:00:00' && time() - strtotime($LastActive) >= 1209600) { ?>
|
||||
<br /><strong>Last active: <?= time_diff($LastActive); ?></strong>
|
||||
<? } else { ?>
|
||||
<br />Last active: <?= time_diff($LastActive); ?>
|
||||
<? } ?>
|
||||
<? if ($LastActive != '0000-00-00 00:00:00' && time() - strtotime($LastActive) >= 345678 && time() - strtotime($LastReseedRequest) >= 864000) { ?>
|
||||
<? }
|
||||
if ($LastActive != '0000-00-00 00:00:00' && time() - strtotime($LastActive) >= 345678 && time() - strtotime($LastReseedRequest) >= 864000) { ?>
|
||||
<br /><a href="torrents.php?action=reseed&torrentid=<?= $TorrentID ?>&groupid=<?= $GroupID ?>" class="brackets">Request re-seed</a>
|
||||
<? } ?>
|
||||
|
||||
<? } ?>
|
||||
|
||||
<? }
|
||||
} ?>
|
||||
</blockquote>
|
||||
<? if (check_perms('site_moderate_requests')) { ?>
|
||||
<div class="linkbox">
|
||||
@ -464,8 +463,7 @@ function filelist($Str) {
|
||||
<div id="files_<?= $TorrentID ?>" class="hidden"><?= $FileTable ?></div>
|
||||
<? if ($Reported) { ?>
|
||||
<div id="reported_<?= $TorrentID ?>" class="hidden"><?= $ReportInfo ?></div>
|
||||
<? } ?>
|
||||
<?
|
||||
<? }
|
||||
if (!empty($Description)) {
|
||||
echo '<blockquote>' . $Text->full_format($Description) . '</blockquote>';
|
||||
}
|
||||
|
@ -2,13 +2,19 @@
|
||||
$GroupID = $_GET['groupid'];
|
||||
$TorrentID = $_GET['torrentid'];
|
||||
|
||||
if(!is_number($GroupID) || !is_number($TorrentID)) { error(0); }
|
||||
if (!is_number($GroupID) || !is_number($TorrentID)) {
|
||||
error(0);
|
||||
}
|
||||
|
||||
$DB->query("SELECT last_action, LastReseedRequest, UserID, Time FROM torrents WHERE ID='$TorrentID'");
|
||||
list($LastActive, $LastReseedRequest, $UploaderID, $UploadedTime) = $DB->next_record();
|
||||
|
||||
if(time()-strtotime($LastReseedRequest)<864000) { error("There was already a re-seed request for this torrent within the past 10 days."); }
|
||||
if ($LastActive == '0000-00-00 00:00:00' || time() - strtotime($LastActive) < 345678) { error(403); }
|
||||
if (time() - strtotime($LastReseedRequest) < 864000) {
|
||||
error('There was already a re-seed request for this torrent within the past 10 days.');
|
||||
}
|
||||
if ($LastActive == '0000-00-00 00:00:00' || time() - strtotime($LastActive) < 345678) {
|
||||
error(403);
|
||||
}
|
||||
|
||||
$DB->query("UPDATE torrents SET LastReseedRequest=NOW() WHERE ID='$TorrentID'");
|
||||
|
||||
@ -27,14 +33,16 @@
|
||||
$UserID = $User['uid'];
|
||||
|
||||
$DB->query("SELECT UserID FROM top_snatchers WHERE UserID='$UserID'");
|
||||
if($DB->record_count()>0) { continue; }
|
||||
if ($DB->record_count() > 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$UserInfo = Users::user_info($UserID);
|
||||
$Username = $UserInfo['Username'];
|
||||
$TimeStamp = $User['tstamp'];
|
||||
$Request = "Hi $Username,
|
||||
|
||||
The user [url=http://".SITE_URL."/user.php?id=$LoggedUser[ID]]$LoggedUser[Username][/url] has requested a re-seed for the torrent [url=http://".SITE_URL."/torrents.php?id=$GroupID&torrentid=$TorrentID]".$Name."[/url], which you snatched on ".date('M d Y', $TimeStamp).". The torrent is now un-seeded, and we need your help to resurrect it!
|
||||
The user [url=https://".SSL_SITE_URL."/user.php?id=$LoggedUser[ID]]$LoggedUser[Username][/url] has requested a re-seed for the torrent [url=https://".SSL_SITE_URL."/torrents.php?id=$GroupID&torrentid=$TorrentID]".$Name."[/url], which you snatched on ".date('M d Y', $TimeStamp).". The torrent is now un-seeded, and we need your help to resurrect it!
|
||||
|
||||
The exact process for re-seeding a torrent is slightly different for each client, but the concept is the same. The idea is to download the .torrent file and open it in your client, and point your client to the location where the data files are, then initiate a hash check.
|
||||
|
||||
@ -49,7 +57,7 @@
|
||||
|
||||
$Request = "Hi $Username,
|
||||
|
||||
The user [url=http://".SITE_URL."/user.php?id=$LoggedUser[ID]]$LoggedUser[Username][/url] has requested a re-seed for the torrent [url=http://".SITE_URL."/torrents.php?id=$GroupID&torrentid=$TorrentID]".$Name."[/url], which you uploaded on ".date('M d Y', strtotime($UploadedTime)).". The torrent is now un-seeded, and we need your help to resurrect it!
|
||||
The user [url=https://".SSL_SITE_URL."/user.php?id=$LoggedUser[ID]]$LoggedUser[Username][/url] has requested a re-seed for the torrent [url=https://".SSL_SITE_URL."/torrents.php?id=$GroupID&torrentid=$TorrentID]".$Name."[/url], which you uploaded on ".date('M d Y', strtotime($UploadedTime)).". The torrent is now un-seeded, and we need your help to resurrect it!
|
||||
|
||||
The exact process for re-seeding a torrent is slightly different for each client, but the concept is the same. The idea is to download the .torrent file and open it in your client, and point your client to the location where the data files are, then initiate a hash check.
|
||||
|
||||
|
@ -9,16 +9,22 @@
|
||||
function header_link($SortKey,$DefaultWay="DESC") {
|
||||
global $Order,$Way;
|
||||
if ($SortKey == $Order) {
|
||||
if($Way=="DESC") { $NewWay="ASC"; }
|
||||
else { $NewWay="DESC"; }
|
||||
} else { $NewWay=$DefaultWay; }
|
||||
if ($Way == 'DESC') {
|
||||
$NewWay = 'ASC';
|
||||
} else {
|
||||
$NewWay = 'DESC';
|
||||
}
|
||||
} else {
|
||||
$NewWay = $DefaultWay;
|
||||
}
|
||||
|
||||
return "torrents.php?way=".$NewWay."&order=".$SortKey."&".Format::get_url(array('way','order'));
|
||||
}
|
||||
|
||||
$UserID = $_GET['userid'];
|
||||
if(!is_number($UserID)) { error(0); }
|
||||
|
||||
if (!is_number($UserID)) {
|
||||
error(0);
|
||||
}
|
||||
|
||||
if (!empty($_GET['page']) && is_number($_GET['page']) && $_GET['page'] > 0) {
|
||||
$Page = $_GET['page'];
|
||||
@ -105,10 +111,14 @@ function header_link($SortKey,$DefaultWay="DESC") {
|
||||
$TagList = array();
|
||||
foreach ($Tags as $Tag) {
|
||||
$Tag = trim(str_replace('.','_',$Tag));
|
||||
if(empty($Tag)) { continue; }
|
||||
if (empty($Tag)) {
|
||||
continue;
|
||||
}
|
||||
if ($Tag[0] == '!') {
|
||||
$Tag = ltrim(substr($Tag,1));
|
||||
if(empty($Tag)) { continue; }
|
||||
if (empty($Tag)) {
|
||||
continue;
|
||||
}
|
||||
$TagList[]="CONCAT(' ',tg.TagList,' ') NOT LIKE '% ".db_string($Tag)." %'";
|
||||
} else {
|
||||
$TagList[]="CONCAT(' ',tg.TagList,' ') LIKE '% ".db_string($Tag)." %'";
|
||||
@ -136,14 +146,18 @@ function header_link($SortKey,$DefaultWay="DESC") {
|
||||
|
||||
switch ($_GET['type']) {
|
||||
case 'snatched':
|
||||
if(!check_paranoia('snatched', $User['Paranoia'], $UserClass, $UserID)) { error(403); }
|
||||
if (!check_paranoia('snatched', $User['Paranoia'], $UserClass, $UserID)) {
|
||||
error(403);
|
||||
}
|
||||
$Time = 'xs.tstamp';
|
||||
$UserField = 'xs.uid';
|
||||
$ExtraWhere = '';
|
||||
$From = "xbt_snatched AS xs JOIN torrents AS t ON t.ID=xs.fid";
|
||||
break;
|
||||
case 'seeding':
|
||||
if(!check_paranoia('seeding', $User['Paranoia'], $UserClass, $UserID)) { error(403); }
|
||||
if (!check_paranoia('seeding', $User['Paranoia'], $UserClass, $UserID)) {
|
||||
error(403);
|
||||
}
|
||||
$Time = '(xfu.mtime - xfu.timespent)';
|
||||
$UserField = 'xfu.uid';
|
||||
$ExtraWhere = 'AND xfu.active=1 AND xfu.Remaining=0';
|
||||
@ -156,21 +170,27 @@ function header_link($SortKey,$DefaultWay="DESC") {
|
||||
$From = "torrents AS t";
|
||||
break;
|
||||
case 'leeching':
|
||||
if(!check_paranoia('leeching', $User['Paranoia'], $UserClass, $UserID)) { error(403); }
|
||||
if (!check_paranoia('leeching', $User['Paranoia'], $UserClass, $UserID)) {
|
||||
error(403);
|
||||
}
|
||||
$Time = '(xfu.mtime - xfu.timespent)';
|
||||
$UserField = 'xfu.uid';
|
||||
$ExtraWhere = 'AND xfu.active=1 AND xfu.Remaining>0';
|
||||
$From = "xbt_files_users AS xfu JOIN torrents AS t ON t.ID=xfu.fid";
|
||||
break;
|
||||
case 'uploaded':
|
||||
if ((empty($_GET['filter']) || $_GET['filter'] != 'perfectflac') && !check_paranoia('uploads', $User['Paranoia'], $UserClass, $UserID)) { error(403); }
|
||||
if ((empty($_GET['filter']) || $_GET['filter'] != 'perfectflac') && !check_paranoia('uploads', $User['Paranoia'], $UserClass, $UserID)) {
|
||||
error(403);
|
||||
}
|
||||
$Time = 'unix_timestamp(t.Time)';
|
||||
$UserField = 't.UserID';
|
||||
$ExtraWhere = '';
|
||||
$From = "torrents AS t";
|
||||
break;
|
||||
case 'downloaded':
|
||||
if(!check_perms('site_view_torrent_snatchlist')) { error(403); }
|
||||
if (!check_perms('site_view_torrent_snatchlist')) {
|
||||
error(403);
|
||||
}
|
||||
$Time = 'unix_timestamp(ud.Time)';
|
||||
$UserField = 'ud.UserID';
|
||||
$ExtraWhere = '';
|
||||
@ -181,8 +201,10 @@ function header_link($SortKey,$DefaultWay="DESC") {
|
||||
}
|
||||
|
||||
if (!empty($_GET['filter'])) {
|
||||
if($_GET['filter'] == "perfectflac") {
|
||||
if (!check_paranoia('perfectflacs', $User['Paranoia'], $UserClass, $UserID)) { error(403); }
|
||||
if ($_GET['filter'] == 'perfectflac') {
|
||||
if (!check_paranoia('perfectflacs', $User['Paranoia'], $UserClass, $UserID)) {
|
||||
error(403);
|
||||
}
|
||||
$ExtraWhere .= " AND t.Format = 'FLAC'";
|
||||
if (empty($_GET['media'])) {
|
||||
$ExtraWhere .= " AND (
|
||||
@ -192,25 +214,33 @@ function header_link($SortKey,$DefaultWay="DESC") {
|
||||
} elseif (strtoupper($_GET['media']) == 'CD' && empty($_GET['log'])) {
|
||||
$ExtraWhere .= " AND t.LogScore = 100";
|
||||
}
|
||||
} elseif($_GET['filter'] == "uniquegroup") {
|
||||
if (!check_paranoia('uniquegroups', $User['Paranoia'], $UserClass, $UserID)) { error(403); }
|
||||
$GroupBy = "tg.ID";
|
||||
} elseif ($_GET['filter'] == 'uniquegroup') {
|
||||
if (!check_paranoia('uniquegroups', $User['Paranoia'], $UserClass, $UserID)) {
|
||||
error(403);
|
||||
}
|
||||
$GroupBy = 'tg.ID';
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($GroupBy)) {
|
||||
$GroupBy = "t.ID";
|
||||
$GroupBy = 't.ID';
|
||||
}
|
||||
|
||||
if ((empty($_GET['search']) || trim($_GET['search']) == '') && $Order!='Name') {
|
||||
$SQL = "SELECT SQL_CALC_FOUND_ROWS t.GroupID, t.ID AS TorrentID, $Time AS Time, tg.CategoryID
|
||||
$SQL = "
|
||||
SELECT
|
||||
SQL_CALC_FOUND_ROWS t.GroupID,
|
||||
t.ID AS TorrentID,
|
||||
$Time AS Time,
|
||||
tg.CategoryID
|
||||
FROM $From
|
||||
JOIN torrents_group AS tg ON tg.ID=t.GroupID
|
||||
WHERE $UserField='$UserID' $ExtraWhere $SearchWhere
|
||||
GROUP BY ".$GroupBy."
|
||||
ORDER BY $Order $Way LIMIT $Limit";
|
||||
} else {
|
||||
$DB->query("CREATE TEMPORARY TABLE temp_sections_torrents_user (
|
||||
$DB->query("
|
||||
CREATE TEMPORARY TABLE temp_sections_torrents_user (
|
||||
GroupID int(10) unsigned not null,
|
||||
TorrentID int(10) unsigned not null,
|
||||
Time int(12) unsigned not null,
|
||||
@ -221,7 +251,9 @@ function header_link($SortKey,$DefaultWay="DESC") {
|
||||
Name mediumtext,
|
||||
Size bigint(12) unsigned,
|
||||
PRIMARY KEY (TorrentID)) CHARSET=utf8");
|
||||
$DB->query("INSERT IGNORE INTO temp_sections_torrents_user SELECT
|
||||
$DB->query("
|
||||
INSERT IGNORE INTO temp_sections_torrents_user
|
||||
SELECT
|
||||
t.GroupID,
|
||||
t.ID AS TorrentID,
|
||||
$Time AS Time,
|
||||
@ -320,14 +352,14 @@ function header_link($SortKey,$DefaultWay="DESC") {
|
||||
<td class="label"><strong>Misc:</strong></td>
|
||||
<td class="nobr" colspan="3">
|
||||
<select name="log" class="ft_haslog">
|
||||
<option value="">Has Log</option>
|
||||
<option value="">Has log</option>
|
||||
<option value="1"<?Format::selected('log','1')?>>Yes</option>
|
||||
<option value="0"<?Format::selected('log','0')?>>No</option>
|
||||
<option value="100"<?Format::selected('log','100')?>>100% only</option>
|
||||
<option value="-1" <?Format::selected('log','-1')?>><100%/Unscored</option>
|
||||
<option value="-1"<?Format::selected('log','-1')?>><100%/unscored</option>
|
||||
</select>
|
||||
<select name="cue" class="ft_hascue">
|
||||
<option value="">Has Cue</option>
|
||||
<option value="">Has cue</option>
|
||||
<option value="1"<?Format::selected('cue',1)?>>Yes</option>
|
||||
<option value="0"<?Format::selected('cue',0)?>>No</option>
|
||||
</select>
|
||||
@ -441,8 +473,12 @@ function header_link($SortKey,$DefaultWay="DESC") {
|
||||
$DisplayName = '';
|
||||
}
|
||||
$DisplayName.='<a href="torrents.php?id='.$GroupID.'&torrentid='.$TorrentID.'" title="View Torrent" dir="ltr">'.$GroupName.'</a>';
|
||||
if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; }
|
||||
if($GroupVanityHouse) { $DisplayName .= ' [<abbr title="This is a vanity house release">VH</abbr>]'; }
|
||||
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) {
|
||||
|
@ -156,7 +156,7 @@ function checked($Checked) {
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><strong>Sort/Hide release types</strong></td>
|
||||
<td class="label"><strong>Sort/hide release types</strong></td>
|
||||
<td>
|
||||
<noscript>Please enable JavaScript to use these options.</noscript>
|
||||
<a href="#" id="toggle_sortable" class="brackets">Expand</a>
|
||||
|
@ -26,7 +26,7 @@
|
||||
$Email = $_POST['email'];
|
||||
$Username = $LoggedUser['Username'];
|
||||
$SiteName = SITE_NAME;
|
||||
$SiteURL = NONSSL_SITE_URL;
|
||||
$SiteURL = SSL_SITE_URL;
|
||||
$InviteExpires = time_plus(60*60*24*3); // 3 days
|
||||
|
||||
//MultiInvite
|
||||
@ -61,7 +61,7 @@
|
||||
|
||||
To confirm your invite, click on the following link:
|
||||
|
||||
http://$SiteURL/register.php?invite=$InviteKey
|
||||
https://$SiteURL/register.php?invite=$InviteKey
|
||||
|
||||
After you register, you will be able to use your account. Please take note that if you do not use this invite in the next 3 days, it will expire. We urge you to read the RULES and the wiki immediately after you join.
|
||||
|
||||
|
@ -12,7 +12,9 @@
|
||||
|
||||
|
||||
$UserID = $_GET['userid'];
|
||||
if (!is_number($UserID)) { error(404); }
|
||||
if (!is_number($UserID)) {
|
||||
error(404);
|
||||
}
|
||||
|
||||
$DB->query("SELECT ui.JoinDate, p.Level AS Class FROM users_main AS um JOIN users_info AS ui ON um.ID=ui.UserID JOIN permissions AS p ON p.ID=um.PermissionID WHERE um.ID = $UserID");
|
||||
list($Joined, $Class) = $DB->next_record();
|
||||
@ -104,7 +106,7 @@
|
||||
<td />
|
||||
<td><?=time_diff($Time)?></td>
|
||||
<td><?=display_str($IP)?></td>
|
||||
<? $UserURL = "http://".NONSSL_SITE_URL."/user.php?id=$UserID2";
|
||||
<? $UserURL = "https://".SSL_SITE_URL."/user.php?id=$UserID2";
|
||||
$DB->query("SELECT Enabled FROM users_main WHERE ID = ".$UserID2);
|
||||
list($Enabled)=$DB->next_record();
|
||||
$DB->set_query_id($ueQuery);
|
||||
|
@ -39,14 +39,12 @@ function loadArtists() {
|
||||
function addArtist(id, name, score) {
|
||||
var item = $('<li><a style="color:#007DC6;" data-weight="' + score + '">' + name + '</a></li>');
|
||||
|
||||
|
||||
$(item).click(function(e) {
|
||||
e.preventDefault();
|
||||
reinit(id, name);
|
||||
});
|
||||
|
||||
artistTags.append(item);
|
||||
|
||||
}
|
||||
|
||||
function addArtistMain(name) {
|
||||
@ -97,14 +95,10 @@ function createCloud() {
|
||||
shadowBlur: 3,
|
||||
weight : true,
|
||||
weightFrom: 'data-weight'
|
||||
|
||||
},'artistTags')) {
|
||||
// something went wrong, hide the canvas container
|
||||
$('#flip_view_2').hide();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
} ) ( jQuery );
|
||||
|
||||
|
@ -32,9 +32,7 @@ if(isMobile.Android()) {
|
||||
window.location = ANDROID_APP_URL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if(isMobile.NotAndroid()) {
|
||||
} else if (isMobile.NotAndroid()) {
|
||||
if (!hasCookie(OTHER_COOKIE_NAME)) {
|
||||
setCookie(OTHER_COOKIE_NAME, true, 365);
|
||||
var result = confirm("A mobile version of What.CD is available, would you like to use it?");
|
||||
@ -45,35 +43,28 @@ else if(isMobile.NotAndroid()) {
|
||||
}
|
||||
|
||||
|
||||
function setCookie(c_name,value,exdays)
|
||||
{
|
||||
function setCookie(c_name,value,exdays) {
|
||||
var exdate = new Date();
|
||||
exdate.setDate(exdate.getDate() + exdays);
|
||||
var c_value = escape(value) + ((exdays == null) ? "" : "; expires=" + exdate.toUTCString());
|
||||
document.cookie = c_name + "=" + c_value;
|
||||
}
|
||||
|
||||
function getCookie(c_name)
|
||||
{
|
||||
function getCookie(c_name) {
|
||||
var i,x,y,ARRcookies=document.cookie.split(";");
|
||||
for (i=0;i<ARRcookies.length;i++)
|
||||
{
|
||||
for (i = 0; i < ARRcookies.length; i++) {
|
||||
x = ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
|
||||
y = ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
|
||||
x = x.replace(/^\s+|\s+$/g,"");
|
||||
if (x==c_name)
|
||||
{
|
||||
if (x == c_name) {
|
||||
return unescape(y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function hasCookie(c_name)
|
||||
{
|
||||
function hasCookie(c_name) {
|
||||
var checked=getCookie(c_name);
|
||||
if (checked != null)
|
||||
{
|
||||
if (checked != null) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -1,5 +1,9 @@
|
||||
function toggleChecks(formElem,masterElem) {
|
||||
if (masterElem.checked) { checked=true; } else { checked=false; }
|
||||
if (masterElem.checked) {
|
||||
checked = true;
|
||||
} else {
|
||||
checked = false;
|
||||
}
|
||||
for (s = 0; s < $('#'+formElem).raw().elements.length; s++) {
|
||||
if ($('#'+formElem).raw().elements[s].type == "checkbox") {
|
||||
$('#'+formElem).raw().elements[s].checked=checked;
|
||||
@ -10,15 +14,15 @@ function toggleChecks(formElem,masterElem) {
|
||||
//Lightbox stuff
|
||||
|
||||
/*
|
||||
* If loading from a thumbnail the lightbox is shown first with a "loading" screen
|
||||
* while the full size image loads, then the html of the lightbox is replaced with the image.
|
||||
* If loading from a thumbnail, the lightbox is shown first with a "loading" screen
|
||||
* while the full size image loads, then the HTML of the lightbox is replaced with the image.
|
||||
*/
|
||||
|
||||
var lightbox = {
|
||||
init: function (image, size) {
|
||||
if (typeof(image) == 'string') {
|
||||
$('#lightbox').show().listen('click',lightbox.unbox).raw().innerHTML =
|
||||
'<p size="7" style="color:gray;font-size:50px">Loading...<p>';
|
||||
'<p size="7" style="color: gray; font-size: 50px;">Loading...<p>';
|
||||
$('#curtain').show().listen('click',lightbox.unbox);
|
||||
var src = image;
|
||||
image = new Image();
|
||||
|
Loading…
Reference in New Issue
Block a user