Empty commit

This commit is contained in:
Git 2012-07-11 08:00:16 +00:00
parent b606162ef6
commit e825c7af3c
33 changed files with 484 additions and 170 deletions

View File

@ -4,6 +4,23 @@
*
**/
$blacklist = array("tinypic", "dsimg");
/**
* Checks if image host is good, otherwise displays an error.
*/
function check_imagehost($url) {
global $blacklist;
foreach ($blacklist as &$value) {
if(contains(strtolower($url), $value)) {
$parsed_url = parse_url($url);
error($parsed_url['host'] . " is not an allowed imagehost. Please use a different imagehost.");
break;
}
}
}
/**
* The main function, called to get the thumbnail url.
*/

View File

@ -3,6 +3,7 @@
The page that handles the backend of the 'edit artist' function.
\*********************************************************************/
include(SERVER_ROOT.'/classes/class_image_tools.php');
authorize();
if(!$_REQUEST['artistid'] || !is_number($_REQUEST['artistid'])) {
@ -27,6 +28,7 @@
$Body = db_string($_POST['body']);
$Summary = db_string($_POST['summary']);
$Image = db_string($_POST['image']);
check_imagehost($Image);
// Trickery
if(!preg_match("/^".IMAGE_REGEX."$/i", $Image)) {
$Image = '';
@ -55,4 +57,4 @@
// There we go, all done!
$Cache->delete_value('artist_'.$ArtistID); // Delete artist cache
header('Location: artist.php?id='.$ArtistID);
?>
?>

View File

@ -1,4 +1,5 @@
<?
authorize();
include(SERVER_ROOT.'/classes/class_validate.php');
@ -110,6 +111,4 @@ function AddTorrent($CollageID, $GroupID) {
}
}
header('Location: collages.php?id='.$CollageID);
?>
header('Location: collages.php?id='.$CollageID);

View File

@ -1,88 +1,132 @@
<?
$CollageID = $_GET['collageid'];
if(!is_number($CollageID)) { error(0); }
<?php
$DB->query("SELECT Name, UserID, CategoryID FROM collages WHERE ID='$CollageID'");
list($Name, $UserID, $CategoryID) = $DB->next_record();
if($CategoryID == 0 && $UserID!=$LoggedUser['ID'] && !check_perms('site_collages_delete')) { error(403); }
$CollageID = $_GET['collageid'];
if(!is_number($CollageID)) { error(0); }
$DB->query("SELECT ct.GroupID,
ct.UserID,
ct.Sort
FROM collages_torrents AS ct
JOIN torrents_group AS tg ON tg.ID=ct.GroupID
WHERE ct.CollageID='$CollageID'
ORDER BY ct.Sort");
$DB->query("SELECT Name, UserID, CategoryID FROM collages WHERE ID='$CollageID'");
list($Name, $UserID, $CategoryID) = $DB->next_record();
if($CategoryID == 0 && $UserID!=$LoggedUser['ID'] && !check_perms('site_collages_delete')) { error(403); }
$GroupIDs = $DB->collect('GroupID');
$DB->query("SELECT ct.GroupID,
um.ID,
um.Username,
ct.Sort
FROM collages_torrents AS ct
JOIN torrents_group AS tg ON tg.ID=ct.GroupID
LEFT JOIN users_main AS um ON um.ID=ct.UserID
WHERE ct.CollageID='$CollageID'
ORDER BY ct.Sort");
$CollageDataList=$DB->to_array('GroupID', MYSQLI_ASSOC);
if(count($GroupIDs)>0) {
$TorrentList = get_groups($GroupIDs);
$TorrentList = $TorrentList['matches'];
} else {
$TorrentList = array();
}
$GroupIDs = $DB->collect('GroupID');
$CollageDataList=$DB->to_array('GroupID', MYSQLI_ASSOC);
if(count($GroupIDs)>0) {
$TorrentList = get_groups($GroupIDs);
$TorrentList = $TorrentList['matches'];
} else {
$TorrentList = array();
}
show_header('Manage collage '.$Name);
show_header('Manage collage '.$Name);
?>
<script src="static/functions/jquery.js" type="text/javascript"></script>
<script type="text/javascript">$.noConflict();</script>
<script src="static/functions/jquery-ui.js" type="text/javascript"></script>
<script src="static/functions/jquery.tablesorter.min.js" type="text/javascript"></script>
<script src="static/functions/sort.js" type="text/javascript"></script>
<div class="thin">
<h2>Manage collage <a href="collages.php?id=<?=$CollageID?>"><?=$Name?></a></h2>
<table>
<tr class="colhead">
<td>Sort</td>
<td>Torrent</td>
<td>User</td>
<td>Submit</td>
<table width="100%">
<tr class="colhead"><td>Sorting</td></tr>
<tr>
<td id="drag_drop_textnote">
<ul>
<li>Click on the headings to organize columns automatically.</li>
<li>Sort multiple columns simultaneously by holding down the shift key and clicking other column headers.</li>
<li>Click and drag any row to change its order.</li>
<li>Press <em>Save All Changes</em> when you are finished sorting.</li>
<li>Press <em>Edit</em> or <em>Remove</em> to simply modify one entry.</li>
</ul>
<noscript><ul><li><strong class="important_text">Note: You cannot drag and drop while JavaScript is disabled.</strong></li></ul></noscript>
</td>
</tr>
<?
</table>
<div class="drag_drop_save hidden">
<input type="button" name="submit" value="Save All Changes" title="Save your changes." class="save_sortable_collage" />
</div>
<table id="manage_collage_table">
<thead>
<tr class="colhead">
<th style="width:7%">Order</th>
<th style="width:1%"><span><abbr title="Changes">&Delta;</abbr></span></th>
<th style="width:1%"><span>Year</span></th>
<th style="width:15%"><span>Artist</span></th>
<th><span>Torrent</span></th>
<th style="width:1%"><span>User</span></th>
<th style="width:1%; text-align: right" class="nobr"><abbr title="Modify an individual row.">Tweak</abbr></th>
</tr>
</thead>
<tbody>
<?php
$Number = 0;
foreach ($TorrentList as $GroupID=>$Group) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $GroupArtists, $ExtendedArtists) = array_values($Group);
list($GroupID2, $UserID, $Sort) = array_values($CollageDataList[$GroupID]);
$Number++;
$Number = 0;
foreach ($TorrentList as $GroupID=>$Group) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $GroupArtists, $ExtendedArtists) = array_values($Group);
list($GroupID2, $UserID, $Username, $Sort) = array_values($CollageDataList[$GroupID]);
$DisplayName = $Number.' - ';
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5])|| !empty($ExtendedArtists[6])) {
$Number++;
$DisplayName = '';
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) {
unset($ExtendedArtists[2]);
unset($ExtendedArtists[3]);
$DisplayName .= display_artists($ExtendedArtists);
} elseif(count($GroupArtists)>0) {
$DisplayName .= display_artists(array('1'=>$GroupArtists));
}
$DisplayName .= '<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
if($GroupYear>0) { $DisplayName = $DisplayName. ' ['. $GroupYear .']';}
if($GroupVanityHouse) { $DisplayName .= ' [<abbr title="This is a vanity house release">VH</abbr>]'; }
?>
<tr>
<form action="collages.php" method="post">
<input type="hidden" name="action" value="manage_handle" />
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
<input type="hidden" name="collageid" value="<?=$CollageID?>" />
<input type="hidden" name="groupid" value="<?=$GroupID?>" />
<td>
<input type="text" name="sort" value="<?=$Sort?>" size="4" title="The collage is sorted order of this number" />
</td>
<td>
<?=$DisplayName?>
</td>
<td>
<?=format_username($UserID, false, false, false)?>
</td>
<td>
<input type="submit" name="submit" value="Edit" />
<input type="submit" name="submit" value="Remove" />
</td>
</form>
</tr>
<?
}
$DisplayName .= display_artists($ExtendedArtists, true, false);
} elseif(count($GroupArtists)>0) {
$DisplayName .= display_artists(array('1'=>$GroupArtists), true, false);
}
$TorrentLink = '<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
$GroupYear = $GroupYear > 0 ? $GroupYear : '';
if($GroupVanityHouse) { $DisplayName .= ' [<abbr title="This is a vanity house release">VH</abbr>]'; }
$AltCSS = $Number % 2 === 0 ? 'rowa' : 'rowb';
?>
<tr class="drag <?=$AltCSS?>" id="li_<?=$GroupID?>">
<form action="collages.php" method="post">
<td>
<input class="sort_numbers" type="text" name="sort" value="<?=$Sort?>" id="sort_<?=$GroupID?>" size="4" />
</td>
<td><?=$Number?></td>
<td><?=$GroupYear?></td>
<td><?=$DisplayName?> </td>
<td><?=$TorrentLink?></td>
<td class="nobr"><?=format_username($UserID, $Username)?></td>
<td class="nobr">
<input type="hidden" name="action" value="manage_handle" />
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
<input type="hidden" name="collageid" value="<?=$CollageID?>" />
<input type="hidden" name="groupid" value="<?=$GroupID?>" />
<input type="submit" name="submit" value="Edit" />
<input type="submit" name="submit" value="Remove" />
</td>
</form>
</tr>
<?php } ?>
</tbody>
</table>
<div class="drag_drop_save hidden">
<input type="button" name="submit" value="Save All Changes" title="Save your changes." class="save_sortable_collage" />
</div>
<form action="collages.php" method="post" id="drag_drop_collage_form" class="hidden">
<div>
<input type="hidden" name="action" value="manage_handle" />
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
<input type="hidden" name="collageid" value="<?=$CollageID?>" />
<input type="hidden" name="groupid" value="1" />
<input type="hidden" name="drag_drop_collage_sort_order" id="drag_drop_collage_sort_order" readonly="readonly" value="" />
</div>
</form>
</div>
<? show_footer() ?>
<?php show_footer(); ?>

View File

@ -1,29 +1,49 @@
<?
authorize();
<?php
$CollageID = $_POST['collageid'];
if(!is_number($CollageID)) { error(404); }
authorize();
$DB->query("SELECT UserID, CategoryID FROM collages WHERE ID='$CollageID'");
list($UserID, $CategoryID) = $DB->next_record();
if($CategoryID == 0 && $UserID!=$LoggedUser['ID'] && !check_perms('site_collages_delete')) { error(403); }
$CollageID = $_POST['collageid'];
if(!is_number($CollageID)) { error(404); }
$GroupID = $_POST['groupid'];
if(!is_number($GroupID)) { error(404); }
$DB->query("SELECT UserID, CategoryID FROM collages WHERE ID='$CollageID'");
list($UserID, $CategoryID) = $DB->next_record();
if($CategoryID == 0 && $UserID!=$LoggedUser['ID'] && !check_perms('site_collages_delete')) { error(403); }
$GroupID = $_POST['groupid'];
if(!is_number($GroupID)) { error(404); }
if($_POST['submit'] == 'Remove') {
$DB->query("DELETE FROM collages_torrents WHERE CollageID='$CollageID' AND GroupID='$GroupID'");
$Rows = $DB->affected_rows();
$DB->query("UPDATE collages SET NumTorrents=NumTorrents-$Rows WHERE ID='$CollageID'");
$Cache->delete_value('torrents_details_'.$GroupID);
$Cache->delete_value('torrent_collages_'.$GroupID);
$Cache->delete_value('torrent_collages_personal_'.$GroupID);
} else {
$Sort = $_POST['sort'];
if(!is_number($Sort)) { error(404); }
$DB->query("UPDATE collages_torrents SET Sort='$Sort' WHERE CollageID='$CollageID' AND GroupID='$GroupID'");
}
$Cache->delete_value('collage_'.$CollageID);
header('Location: collages.php?action=manage&collageid='.$CollageID);
?>
if($_POST['submit'] == 'Remove') {
$DB->query("DELETE FROM collages_torrents WHERE CollageID='$CollageID' AND GroupID='$GroupID'");
$Rows = $DB->affected_rows();
$DB->query("UPDATE collages SET NumTorrents=NumTorrents-$Rows WHERE ID='$CollageID'");
$Cache->delete_value('torrents_details_'.$GroupID);
$Cache->delete_value('torrent_collages_'.$GroupID);
$Cache->delete_value('torrent_collages_personal_'.$GroupID);
} elseif(isset($_POST['drag_drop_collage_sort_order'])) {
@parse_str($_POST['drag_drop_collage_sort_order'], $Series);
$Series = @array_shift($Series);
if(is_array($Series)){
$SQL = array();
foreach($Series as $Sort => $GroupID){
if(is_number($Sort) && is_number($GroupID)){
$Sort = ($Sort+1) * 10;
$SQL[] = sprintf('(%d, %d, %d)', $GroupID, $Sort, $CollageID);
}
}
$SQL = 'INSERT INTO collages_torrents (GroupID, Sort, CollageID) VALUES '
. implode(', ', $SQL)
. ' ON DUPLICATE KEY UPDATE Sort = VALUES (Sort)';
$DB->query($SQL);
}
} else {
$Sort = $_POST['sort'];
if(!is_number($Sort)) { error(404); }
$DB->query("UPDATE collages_torrents SET Sort='$Sort' WHERE CollageID='$CollageID' AND GroupID='$GroupID'");
}
$Cache->delete_value('collage_'.$CollageID);
header('Location: collages.php?action=manage&collageid='.$CollageID);

View File

@ -111,6 +111,10 @@
<form action="inbox.php" method="post" id="messageform">
<input type="hidden" name="action" value="masschange" />
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
<input type="submit" name="read" value="Mark as read" />&nbsp;
<input type="submit" name="unread" value="Mark as unread" />&nbsp;
<input type="submit" name="delete" value="Delete message(s)" />
<table>
<tr class="colhead">
<td width="10"><input type="checkbox" onclick="toggleChecks('messageform',this)" /></td>

View File

@ -2,7 +2,7 @@
//******************************************************************************//
//----------------- Take request -----------------------------------------------//
include(SERVER_ROOT.'/classes/class_image_tools.php');
authorize();
@ -90,6 +90,7 @@
if(empty($_POST['image'])) {
$Image = "";
} else {
check_imagehost($Image);
if(preg_match("/".IMAGE_REGEX."/", trim($_POST['image'])) > 0) {
$Image = trim($_POST['image']);
} else {

View File

@ -199,7 +199,7 @@
<li id="r2.1.15"><a href="#h2.1"><strong>&uarr;_</strong></a> <a href="#r2.1.15">2.1.15.</a> <strong>WEB uploads must be uploaded at the bit depths and sampling rates they were sold at.</strong> WEB uploads of the same audio with different sampling rates or bit depths may coexist if that is how they are sold or distributed. This means that if, for example, an album is sold with a bit depth of 24 bits and a sampling rate of 88.2 kHz, it must be uploaded directly with no modifications to the audio stream. An existing WEB upload of the same material with a bit depth of 24 and a sampling rate of 96 kHz may coexist with the new 24/88.2 upload but does not trump it. See <a href="#r2.1.6.2">2.1.6.2</a> for more information.</li>
<li id="r2.1.16"><a href="#h2.1"><strong>&uarr;_</strong></a> <a href="#r2.1.16">2.1.16.</a> <strong>User-made compilations are not allowed.</strong>
<ul>
<li id="r2.1.16.1"><a href="#r2.1.16"><strong>&uarr;_</strong></a> <a href="#r2.1.16.1">2.1.16.1.</a> <strong>These are defined as compilations made by the uploader or anyone else who does not officially represent the artist or the label.</strong> Compilations must be reasonably official. For example, "34 of my favourite Grateful Dead songs" is not a reasonably official collection. Compiling a release from a list, such as a Top 100 Billboard Chart, is not allowed. User-made and unofficial multichannel mixes are also not allowed.</li>
<li id="r2.1.16.1"><a href="#r2.1.16"><strong>&uarr;_</strong></a> <a href="#r2.1.16.1">2.1.16.1.</a> <strong>These are defined as compilations made by the uploader or anyone else who does not officially represent the artist or the label. </strong> Compilations must be reasonably official. For example, "34 of my favourite Grateful Dead songs" is not a reasonably official collection. Compiling a release from a list, such as a Top 100 Billboard Chart, is not allowed. User-made and unofficial multichannel mixes are also not allowed. See <a href="wiki.php?action=article&id=973">this wiki</a> for more information.</li>
<li id="r2.1.16.2"><a href="#r2.1.16"><strong>&uarr;_</strong></a> <a href="#r2.1.16.2">2.1.16.2.</a> <strong>Exceptions: Bootlegs are allowed if they meet quality standards for music and are proven to be retail releases in either a digital or physical form.</strong> Bootlegs/mixtapes assembled and available from internet-only sources (e.g., music blogs, message boards, etc.) are not considered official enough for this site.</li>
</ul>
</li>
@ -215,9 +215,9 @@
<li id="r2.1.20"><a href="#h2.1"><strong>&uarr;_</strong></a> <a href="#r2.1.20">2.1.20.</a> <strong>User made discographies may not be uploaded.</strong> 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. Exceptions: Only official boxsets and official compilation collections can contain multiple albums.</li>
<li id="r2.1.21"><a href="#h2.1"><strong>&uarr;_</strong></a> <a href="#r2.1.21">2.1.21.</a> <strong><a href="wiki.php?action=article&id=386">Pre-emphasis</a> is allowed in lossless torrents only.</strong> Lossless FLAC torrents with pre-emphasis are allowed on the site. They are allowed to coexist with lossless de-emphasized torrents (both in their separate album edition groups). In contrast, lossy formats may not have pre-emphasis and will be deleted if uploaded.</li>
<li id="r2.1.22"><a href="#h2.1"><strong>&uarr;_</strong></a> <a href="#r2.1.22">2.1.22.</a> <strong>Edition Information must be provided for digitally-sourced torrents.</strong> Digitally-sourced (including CD-sourced) rips of albums that were first released before the availability of their source medium must have accurate edition information. For example, if a CD rip is of an album whose original release date was 1957, predating the creation and distribution of CDs, then the uploader must make note of the correct year in which the CD was pressed, and preferably note the catalog identification as well. Rips for which Edition Information cannot be provided must be marked as an "Unknown Release." Under no circumstances may you guess or feign knowledge of the Edition Information. See <a href="wiki.php?action=article&id=367">this wiki</a> for more information on album editions.</li>
<li id="r2.1.23"><a href="#h2.1"><strong>&uarr;_</strong></a> <a href="#r2.1.23">2.1.23.</a> <strong>The audio layer from game discs that are lossless or lossy mastered may be uploaded.</strong>
<li id="r2.1.23"><a href="#h2.1"><strong>&uarr;_</strong></a> <a href="#r2.1.23">2.1.23.</a> <strong>This audio layer must comply with the Redbook standard for audio data. If there is no Redbook audio on the game disc, you may not upload a rip of the disc. Be prepared to provide extensive information on any audio that is ripped from a gaming disc (see this wiki for information about providing proofs).</strong>
<ul>
<li id="r2.1.23.1"><a href="#r2.1.23"><strong>&uarr;_</strong></a> <a href="#r2.1.23.1">2.1.23.1.</a> <strong>This audio layer must comply with the Redbook standard for audio data.</strong> If there is no Redbook audio on the game disc, you may not upload a rip of the disc. Be prepared to provide extensive information on any audio that is ripped from a gaming disc (see <a href="wiki.php?action=article&id=953">this wiki</a> for information about providing proofs.</li>
<li id="r2.1.23.1"><a href="#r2.1.23"><strong>&uarr;_</strong></a> <a href="#r2.1.23.1">2.1.23.1.</a> <strong>This audio layer must comply with the Redbook standard for audio data. </strong>f there is no Redbook audio on the game disc, you may not upload a rip of the disc. Be prepared to provide extensive information on any audio that is ripped from a gaming disc (see <a href="wiki.php?action=article&id=953" wiki for information about providing proofs).</li>
<li id="r2.1.23.2"><a href="#r2.1.23"><strong>&uarr;_</strong></a> <a href="#r2.1.23.2">2.1.23.2.</a> <strong>The audio must meet the minimum requirements for music on the site (see <a href="#r2.1.3">2.1.3</a> and <a href="#r2.1.6">2.1.6</a>).</strong> </li>
<li id="r2.1.23.3"><a href="#r2.1.23"><strong>&uarr;_</strong></a> <a href="#r2.1.23.3">2.1.23.3.</a> <strong>Officially-released game soundtracks, which adhere to Redbook standards, are always allowed.</strong> </li>
</ul>
@ -333,15 +333,27 @@
<li id="r2.3.11"><a href="#h2.3"><strong>&uarr;_</strong></a> <a href="#r2.3.11">2.3.11.</a> <strong>File names must accurately reflect the song titles.</strong> 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.). Note that these must be substantial improvements such as the removal of garbage characters. Small changes such as diacritical marks are insufficient grounds for trumping. English translations of song titles in file names are encouraged, but not necessary for foreign language song titles. If all the letters in the track titles are capitalized, the torrent is trumpable. Exceptions: Rare albums featuring no track listing or untitled tracks may have file names like 01track.mp3, 02track.mp3, and so forth. Please note this tracklist in the Album description. If foreign language characters create playback problems for some systems and cannot be coherently translated, file names such as "01track" are acceptable for those few cases.</li>
<li id="r2.3.12"><a href="#h2.3"><strong>&uarr;_</strong></a> <a href="#r2.3.12">2.3.12.</a> <strong>The maximum character length for audio files is 180 characters.</strong> Path length values must not be so long that they cause incompatibility problems with operating systems and media players. For example, "My Artist Name - My Album Name (2012) - FLAC/01 - Long Track Name for the First Track.flac" is a typical torrent folder that contains the audio files. This path name consists of 91 characters. As of September 01, 2012, new torrents will be trumpable if their path lengths exceed 180 characters. This limit includes the number of characters in the main torrent folder (in this case, 46 characters) and any sub-folders and audio files within that torrent folder. For example, unnecessary nested folders will count towards this limit; and lengthy classical music file names will count towards this limit. Torrents that were uploaded prior to September 01, 2012 with character lengths that are longer than 180 characters may remain on the site. However, torrents with exceedingly long path lengths will only remain on the site at the discretion of staff.</li>
<li id="r2.3.13"><a href="#h2.3"><strong>&uarr;_</strong></a> <a href="#r2.3.13">2.3.13.</a> <strong>Track numbers are required in file names (e.g., "01 - TrackName.mp3").</strong> 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 <a href="#r2.3.14">2.3.14</a>. Exception: Track numbers are not required for single-track torrents.</li>
<li id="r2.3.14"><a href="#h2.3"><strong>&uarr;_</strong></a> <a href="#r2.3.14">2.3.14.</a> <strong>Compilation albums that feature multiple artists must have file names that consist of the track number, the track artist, and the track title in that specific order.</strong> For example, "01 U2 - Where the Streets Have No Name.flac" is a properly formatted file name. "U2 - 01 - Where the Streets Have No Name.mp3" is not correct in the context of a compilation album because the resultant filelist within the torrent description will display the tracks in alphabetical order with respect to the artist instead of in numerical order with respect to the track number. Torrents that have improperly-formatted or incomplete file names will be trumpable.</li>
<li id="r2.3.14"><a href="#h2.3"><strong>&uarr;_</strong></a> <a href="#r2.3.14">2.3.14.</a> <strong>When formatted properly, file names will alphabetically sort into the original playing order of the release.</strong>
<ul>
<li id="r2.3.14.1"><a href="#r2.3.14"><strong>&uarr;_</strong></a> <a href="#r2.3.14.1">2.3.14.1.</a><strong>For albums with more than one artist, if the name of the artist is in the filename, it must come after the track number in order for the tracks to sort into the correct order.</strong> For example, "01 U2 - Where the Streets Have No Name.flac" is a properly formatted file name for a multiple-artist album. "U2 - 01 - Where the Streets Have No Name.mp3" is not correct in the context of a compilation album because the resultant file list will sort in alphabetical order by artist rather than by numerical track number. <strong>Note:</strong> there is no requirement for artist names to be in the track filenames, other than <a href="#2.3.16.2">2.3.16.2.</a> Torrents that have improperly-formatted or incomplete file names will be trumpable.</li>
<li id="r2.3.14.2"><a href="#r2.3.14"><strong>&uarr;_</strong></a> <a href="#r2.3.14.2">2.3.14.2.</a><strong>If a torrent has subfolders for multiple discs of a release, these subfolders must sort by disc order.</strong> If each disc has a title (<a href="torrents.php?id=62329">torrents.php?id=62329</a>, for example) and the discs are not numbered, this rule does not apply, and each subdirectory should have the disc name included.</li>
</ul>
</li>
<li id="r2.3.15"><a href="#h2.3"><strong>&uarr;_</strong></a> <a href="#r2.3.15">2.3.15.</a> <strong>Multiple-disc torrents cannot have tracks with the same numbers in one directory.</strong> You may place all the tracks for Disc One in one directory and all the tracks for Disc Two in another directory. If you prefer to use one directory for all the audio files, you must use successive numbering. For example, Disc One has 15 tracks and Disc Two has 20. You may either number tracks in Disc One as #01-#15 and those of Disc Two as #16-#35 in the same directory, or you may add a Disc number before the track numbers such that the numbers are #1 06 for Disc One Track 06, and #2 03 for Disc 2 Track 03, and so forth.</li>
<li id="r2.3.16"><a href="#h2.3"><strong>&uarr;_</strong></a> <a href="#r2.3.16">2.3.16.</a> <strong>Properly tag your music files.</strong> Certain meta tags (e.g., ID3, Vorbis) are required on all music uploads. Make sure to use the proper format tags for your files (e.g., no ID3 tags for FLAC - see <a href="#r2.2.10.8">2.2.10.8</a>). 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). Because of this lack of support, the Album and Artist information must be included in the torrent folder for AC3 and DTS files. In addition, the Track Number and Track Title information must be included in the file names for AC3 and DTS files; for various artists compilations, the Track Artist must be included in the file names as well according to <a href="#r2.3.14">2.3.14</a>. 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). See <a href="wiki.php?action=article&id=170">this wiki</a> for more information on ID3 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. The required tags are:
<ul>
<li>Artist</li>
<li>Album</li>
<li>Title</li>
<li>Track Number</li>
</ul>
<li id="r2.3.16"><a href="#h2.3"><strong>&uarr;_</strong></a> <a href="#r2.3.16">2.3.16.</a> <strong>Properly tag your music files.</strong>
<ul>
<li id="r2.3.16.1"><a href="#r2.3.16"><strong>&uarr;_</strong></a> <a href="#r2.3.16.1">2.3.16.1.</a>Certain meta tags (e.g., ID3, Vorbis) are required on all music uploads. Make sure to use the proper format tags for your files (e.g., no ID3 tags for FLAC - see <a href="#2.2.10.8">2.2.10.8</a>. ID3v2 tags for files are highly recommended over ID3v1.</li>
<li id="r2.3.16.2"><a href="#r2.3.16"><strong>&uarr;_</strong></a> <a href="#r2.3.16.2">2.3.16.2.</a>ID3 tags 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). Because of this lack of support, the Album and Artist information must be included in the torrent folder for AC3 and DTS files. In addition, the Track Number and Track Title information must be included in the file names for AC3 and DTS files; for various artists compilations, the Track Artist must be included in the file names as well. ensuring that they also satisfy <a href="#2.3.14">2.3.14.</a></li>
<li id="r2.3.16.3"><a href="#r2.3.16"><strong>&uarr;_</strong></a> <a href="#r2.3.16.3">2.3.16.3.</a>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). See <a href="wiki.php?action=article&id=170">this wiki</a> for more information on ID3 tags.</li>
<li id="r2.3.16.4"><a href="#r2.3.16"><strong>&uarr;_</strong></a> <a href="#r2.3.16.4">2.3.16.4.</a>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. The required tags are:
<ul>
<li>Artist</li>
<li>Album</li>
<li>Title</li>
<li>Track Number</li>
</ul>
</li>
</ul>
<span style="font-style: italic;">Note: The "Year" tag is optional, but strongly encouraged. However, if missing or incorrect, this is not grounds for trumping a torrent.</span>
</li>
<li id="r2.3.17"><a href="#h2.3"><strong>&uarr;_</strong></a> <a href="#r2.3.17">2.3.17.</a> <strong>The torrent artist for classical works should use the full composer name.</strong> Before uploading see <a href="wiki.php?action=article&id=700">this wiki</a> for guidelines on uploading classical music torrents. Also, consult <a href="wiki.php?action=article&id=691">this wiki</a> for a full explanation of the classical music tagging system.</li>

View File

@ -914,7 +914,7 @@ function next_hour() {
$TorrentAlerts[$UserID]['Count']++;
}
foreach($TorrentAlerts as $UserID => $MessageInfo){
send_pm($UserID, 0, db_string('Unseeded torrent notification'), db_string($MessageInfo['Count']." of your upload".($MessageInfo['Count']>1?'s':'')." will be deleted for inactivity soon. Unseeded torrents are deleted after 4 weeks. If you still have the files, you can seed your uploads by ensuring the torrents are in your client and that they aren't stopped. You can view the time that a torrent has been unseeded by clicking on the torrent description line and looking for the \"Last active\" time. For more information, please go [url=http://what.cd/wiki.php?action=article&id=663]here[/url].\n\nThe following torrent".($MessageInfo['Count']>1?'s':'')." will be removed for inactivity:".$MessageInfo['Msg']."\n\nIf you no longer wish to receive these notifications, please disable them in your profile settings."));
send_pm($UserID, 0, db_string('Unseeded torrent notification'), db_string($MessageInfo['Count']." of your uploads will be deleted for inactivity soon. Unseeded torrents are deleted after 4 weeks. If you still have the files, you can seed your uploads by ensuring the torrents are in your client and that they aren't stopped. You can view the time that a torrent has been unseeded by clicking on the torrent description line and looking for the \"Last active\" time. For more information, please go [url=http://what.cd/wiki.php?action=article&id=663]here[/url].\n\nThe following torrent".($MessageInfo['Count']>1?'s':'')." will be removed for inactivity:".$MessageInfo['Msg']."\n\nIf you no longer wish to receive these notifications, please disable them in your profile settings."));
}
}
}

View File

@ -11,6 +11,8 @@
require(SERVER_ROOT.'/classes/class_validate.php');
include(SERVER_ROOT.'/classes/class_image_tools.php');
$Validate = new VALIDATE;
//******************************************************************************//
@ -225,6 +227,7 @@
if (preg_match($RegX, $Properties['Image'], $Matches)) {
$Properties['Image'] = $Matches[1].'.jpg';
}
check_imagehost($Properties['Image']);
if($Err){ // Show the upload form, with the data the user entered
if(check_perms('site_debug')) {

View File

@ -3,6 +3,7 @@
authorize();
include(SERVER_ROOT.'/classes/class_text.php');
include(SERVER_ROOT.'/classes/class_image_tools.php');
$Text = new TEXT;
// Quick SQL injection check
@ -50,9 +51,7 @@
if(!preg_match("/^".IMAGE_REGEX."$/i", $Image)) {
$Image = '';
}
if(strpos($Image, 'tinypic') || strpos($Image, 'dsimg')) {
error($Image . " This image host is not allowed");
}
check_imagehost($Image);
$Summary = db_string($_POST['summary']);
}

View File

@ -16,7 +16,7 @@
include(SERVER_ROOT.'/sections/torrents/functions.php');
include(SERVER_ROOT.'/classes/class_file_checker.php');
include(SERVER_ROOT.'/classes/class_image_tools.php');
enforce_login();
authorize();
@ -322,9 +322,7 @@
if (preg_match($RegX, $Properties['Image'], $Matches)) {
$Properties['Image'] = $Matches[1].'.jpg';
}
if(strpos($Properties['Image'], 'tinypic') || strpos($Properties['Image'], 'dsimg')) {
$Err = $Properties['Image'] . " This image host is not allowed";
}
check_imagehost($Properties['Image']);
//******************************************************************************//
//--------------- Make variables ready for database input ----------------------//

Binary file not shown.

After

Width:  |  Height:  |  Size: 1009 B

125
static/functions/jquery-ui.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,11 @@
"use strict";
/* Prototypes */
String.prototype.trim = function () {
return this.replace(/^\s+|\s+$/g, '');
};
if(!String.prototype.trim) {
String.prototype.trim = function () {
return this.replace(/^\s+|\s+$/g,'');
};
}
var listener = {
set: function (el,type,callback) {

82
static/functions/sort.js Normal file
View File

@ -0,0 +1,82 @@
var sortCollageTable;
jQuery(document).ready(function ($) {
sortCollageTable = {
counter: function () {
var x = 10;
$('.sort_numbers').each(function () {
this.value = x;
x += 10;
});
this.serializer();
},
color : function () {
var i = 0, css;
$('.drag').each(function () {
css = i % 2 === 0 ? ['rowa', 'rowb'] : ['rowb', 'rowa'];
$(this).removeClass(css[0]).addClass(css[1]);
i++;
});
},
serializer : function () {
var s = this.container.sortable('serialize');
this.serialInput.val(s);
},
save : function () {
this.form.submit();
},
widthFix : function(e, row) {
row.children('td').each(function () {
$(this).width($(this).width());
});
return row;
},
init : function () {
this.container = $('#manage_collage_table');
this.form = $('#drag_drop_collage_form');
this.serialInput = $('#drag_drop_collage_sort_order');
$('.drag_drop_save').toggleClass('hidden');
this.container.sortable({
items: '.drag',
axis: 'y',
containment: '.thin',
forcePlaceholderSize: true,
helper: sortCollageTable.widthFix,
stop: function () {
sortCollageTable.postSort();
}
});
$('.save_sortable_collage').click(function () {
sortCollageTable.save();
});
this.tableSorter();
},
tableSorter : function () {
this.container.tablesorter({
cssHeader : 'headerSort',
textExtraction: sortCollageTable.extractor,
headers : {
0: {
sorter : false
},
6: {
sorter : false
}
}
});
this.container.bind('sortEnd', function () {
sortCollageTable.postSort();
});
},
extractor : function (node) {
return node.textContent || node.innerText;
},
postSort : function () {
this.color();
this.counter();
}
};
sortCollageTable.init();
});

View File

@ -428,7 +428,7 @@ tr.rowa {
background-color: #CDA369;
}
td {
td, th {
border: 1px solid #65430F;
padding: 5px;
text-align: left;
@ -448,7 +448,7 @@ td {
color: #ECDABB;
}
td.colhead, .colhead td {
td.colhead, .colhead td, .colhead th {
padding-left: 10px;
padding-right: 10px;
}

View File

@ -608,7 +608,7 @@ tr.rowb {
background-color: #FFFFFF;
}
td {
td, th {
border: none;
padding: 5px;
text-align: left;
@ -629,7 +629,7 @@ td {
outline: 0;
}
td.colhead, .colhead td {
td.colhead, .colhead td, .colhead th {
padding-left: 10px;
padding-right: 10px;
}

View File

@ -528,7 +528,7 @@ margin-left:20px;
width: 100%;
}
#content table td {
#content table td, #content table th {
padding: 5px;
border-top: 1px solid #252525;
}
@ -884,7 +884,7 @@ td.body {width:100%;}
}
.colhead td, .colhead_dark td {
.colhead td, .colhead th, .colhead_dark td {
background: #212121 url('images/bar2.png') !important;
font-weight: bold;
border-top: 1px solid #1f1f1f !important;

View File

@ -178,6 +178,11 @@ span.secondary_class { font-size:85%; font-weight:bold; }
.paranoia_override {
font-style: italic;
}
#manage_collage_table.ui-sortable .drag {
cursor: n-resize;
}
#manage_collage_table.ui-sortable .ui-sortable-helper.drag {
cursor:grabbing;
cursor:-moz-grabbing;
@ -204,5 +209,4 @@ span.secondary_class { font-size:85%; font-weight:bold; }
.headerSortUp span {
background: url("../common/table-order.png") no-repeat scroll right -79px transparent;
}
padding: 6px 0
}

View File

@ -169,7 +169,7 @@ a img {
top: 1px;
}
table td {
table td, table th {
padding: 2px;
}
@ -289,7 +289,7 @@ table {
tr.colhead, tr.colhead_dark {
border: 1px solid #b93dd6;
}
tr.colhead td, tr.colhead_dark td {
tr.colhead td, tr.colhead th, tr.colhead_dark td {
background: #8E2FA4;
color: #FFF;
font-weight: bold;
@ -302,6 +302,10 @@ table tr.rowa td {
background-color: #1a1f25;
border-top: 1px solid #5F7187;
}
.nobr {
word-wrap: normal;
white-space: nowrap;
}
/* ************************************************************************** */
/* header */

View File

@ -418,7 +418,7 @@ tr.rowa {
background-color: #E1E9F2;
}
td {
td, th {
border: 1px solid #98AAB1;
padding: 5px;
text-align: left;
@ -430,7 +430,7 @@ td {
color: #516A88;
}
td.colhead, .colhead td {
td.colhead, .colhead td, .colhead th {
padding-left: 10px;
padding-right: 10px;
}

View File

@ -562,7 +562,7 @@ tr.rowa {
background-color: #222222;
}
td {
td, th {
border: 1px solid #303030;
padding: 5px;
text-align: left;
@ -574,7 +574,7 @@ td {
color: #ffffff;
}
td.colhead,.colhead td {
td.colhead,.colhead td, .colhead th {
padding-left: 10px;
padding-right: 10px;
}

View File

@ -458,7 +458,7 @@ tr.rowa {
background-color: #DDD;
}
td {
td, th {
border: 1px solid #666666;
padding: 5px;
text-align: left;
@ -470,7 +470,7 @@ td {
color: #ffffff;
}
td.colhead, .colhead td {
td.colhead, .colhead td, .colhead th {
padding-left: 10px;
padding-right: 10px;
}

View File

@ -168,7 +168,7 @@ table tr td{border:1px solid #757575}
#content h2:first-child{border-bottom:1px solid #ACBFA9;}
#content .box h2{background:none; margin:0; padding:0; position:static; border-bottom:0}
#content table{padding:0; border-collapse:collapse; width:100%}
#content table td{padding:5px}
#content table td, #content table th{padding:5px}
#content table td h4{margin:0}
#content table .colhead td{background-color:#454545; font-weight:bold}
#content table .colhead_dark td{background-color:#555}

View File

@ -505,7 +505,7 @@ table[width="100%"],.box,.torrent_table,#request_table,#collages,.forum_index,ta
-moz-box-shadow: none;
}
.head,.colhead td,.recent .colhead td,.colhead_dark td {
.head,.colhead td,.recent .colhead td,.colhead th,.colhead_dark td {
margin: -11px;
margin-bottom: 10px;
padding: 8px !important;
@ -1027,17 +1027,17 @@ h3#irc+div.box.pad,h3#general+div.box.pad {
-moz-border-radius: 5px;
}
h3#irc+div.box.pad ul,h3#general+div.box.pad ul {
h3#irc+div.box.pad ul,h3#general+div.box.pad ul,#drag_drop_textnote ul {
list-style: none;
}
h3#irc+div.box.pad ul li,h3#general+div.box.pad ul li {
h3#irc+div.box.pad ul li,h3#general+div.box.pad ul li,#drag_drop_textnote ul li {
margin-bottom: 8px;
padding-bottom: 8px;
border-bottom: 1px solid #ddd;
}
h3#irc+div.box.pad ul li:last-child,h3#general+div.box.pad ul li:last-child {
h3#irc+div.box.pad ul li:last-child,h3#general+div.box.pad ul li:last-child,#drag_drop_textnote ul li:last-child {
margin-bottom: 0;
padding-bottom: 0;
border-bottom: none;
@ -1117,6 +1117,10 @@ li.graph .center_poll {
margin-top: 10px;
}
#manage_collage_table input[type="text"] {
width: 40px;
}
td {
border: 1px solid #BBB;
padding: 5px;

View File

@ -608,7 +608,7 @@ tr.rowb {
background-color: #FFFFFF;
}
td {
td, th {
border: none;
padding: 5px;
text-align: left;
@ -629,7 +629,7 @@ td {
outline: 0;
}
td.colhead, .colhead td {
td.colhead, .colhead td, .colhead th {
padding-left: 10px;
padding-right: 10px;
}

View File

@ -526,7 +526,7 @@ ul#userinfo_username {
width: 100%;
}
#content table td {
#content table td, #content table th {
padding: 5px;
border-top: 1px solid #e6e6e6;
}
@ -944,7 +944,7 @@ ul#userinfo_username {
background-color: #f5f5f5 !important;
}
.colhead td, .colhead_dark td {
.colhead td, .colhead th, .colhead_dark td {
background-color: #E6E6E6 !important;
font-weight: bold;
border-top: 1px solid #cccccc !important;

View File

@ -531,7 +531,7 @@ tr.rowa {
background-color: #EEE;
}
td {
td, th {
border: 1px solid #BBB;
padding: 5px;
text-align: left;
@ -543,7 +543,7 @@ td {
color: #444;
}
td.colhead,.colhead td {
td.colhead,.colhead td, .colhead th {
padding-left: 10px;
padding-right: 10px;
}

View File

@ -566,7 +566,7 @@ tr.rowa {
background-color: #B8E8FB;
}
td {
td, th {
border: 1px solid #B8E8FB;
padding: 5px;
text-align: left;
@ -578,7 +578,7 @@ td {
color: #444;
}
td.colhead,.colhead td {
td.colhead,.colhead td,.colhead th {
padding-left: 10px;
padding-right: 10px;
}

File diff suppressed because one or more lines are too long