2011-03-28 14:21:28 +00:00
< ?
/********************************************************************************
************ Torrent form class * * * * * * * * * * * * * * * upload . php and torrents . php ****
********************************************************************************
** This class is used to create both the upload form , and the 'edit torrent' **
** form . It is broken down into several functions - head (), foot (), **
** music_form () [ music ], audiobook_form () [ Audiobooks and comedy ], and **
** simple_form () [ everything else ] . **
** **
** When it is called from the edit page , the forms are shortened quite a bit . **
** **
********************************************************************************/
2012-10-27 08:00:09 +00:00
2011-03-28 14:21:28 +00:00
class TORRENT_FORM {
var $Categories = array ();
var $Formats = array ();
var $Bitrates = array ();
var $Media = array ();
var $NewTorrent = false ;
var $Torrent = array ();
var $Error = false ;
var $TorrentID = false ;
var $Disabled = '' ;
2012-03-19 08:00:24 +00:00
var $DisabledFlag = false ;
2012-10-27 08:00:09 +00:00
2011-03-28 14:21:28 +00:00
function TORRENT_FORM ( $Torrent = false , $Error = false , $NewTorrent = true ) {
2012-10-27 08:00:09 +00:00
2011-03-28 14:21:28 +00:00
$this -> NewTorrent = $NewTorrent ;
$this -> Torrent = $Torrent ;
$this -> Error = $Error ;
2012-10-27 08:00:09 +00:00
2011-03-28 14:21:28 +00:00
global $Categories , $Formats , $Bitrates , $Media , $TorrentID ;
2012-10-27 08:00:09 +00:00
2011-03-28 14:21:28 +00:00
$this -> Categories = $Categories ;
$this -> Formats = $Formats ;
$this -> Bitrates = $Bitrates ;
$this -> Media = $Media ;
$this -> TorrentID = $TorrentID ;
2012-10-27 08:00:09 +00:00
2013-04-15 08:00:54 +00:00
if ( $this -> Torrent && $this -> Torrent [ 'GroupID' ]) {
2011-03-28 14:21:28 +00:00
$this -> Disabled = ' disabled="disabled"' ;
2012-03-19 08:00:24 +00:00
$this -> DisabledFlag = true ;
2011-03-28 14:21:28 +00:00
}
}
function head () {
global $LoggedUser ;
?>
2013-06-27 08:01:06 +00:00
2011-03-28 14:21:28 +00:00
< div class = " thin " >
2013-04-15 08:00:54 +00:00
< ? if ( $this -> NewTorrent ) { ?>
2011-03-28 14:21:28 +00:00
< p style = " text-align: center; " >
2013-02-23 08:00:22 +00:00
Your personal announce URL is :< br />
< input type = " text " value = " <?= ANNOUNCE_URL.'/'. $LoggedUser['torrent_pass'] .'/announce'?> " size = " 71 " onclick = " this.select() " readonly = " readonly " />
2011-03-28 14:21:28 +00:00
</ p >
< ? }
2013-04-15 08:00:54 +00:00
if ( $this -> Error ) {
2013-06-27 08:01:06 +00:00
echo " \t " . '<p style="color: red; text-align: center;">' . $this -> Error . " </p> \n " ;
2011-03-28 14:21:28 +00:00
}
?>
2012-09-15 08:00:25 +00:00
< form class = " create_form " name = " torrent " action = " " enctype = " multipart/form-data " method = " post " id = " upload_table " onsubmit = " $ ('#post').raw().disabled = 'disabled' " >
2011-03-28 14:21:28 +00:00
< div >
< input type = " hidden " name = " submit " value = " true " />
< input type = " hidden " name = " auth " value = " <?= $LoggedUser['AuthKey'] ?> " />
2013-04-15 08:00:54 +00:00
< ? if ( ! $this -> NewTorrent ) { ?>
2011-03-28 14:21:28 +00:00
< input type = " hidden " name = " action " value = " takeedit " />
< input type = " hidden " name = " torrentid " value = " <?=display_str( $this->TorrentID )?> " />
< input type = " hidden " name = " type " value = " <?=display_str( $this->Torrent ['CategoryID'])?> " />
2012-02-04 08:00:25 +00:00
< ? } else {
2013-04-15 08:00:54 +00:00
if ( $this -> Torrent && $this -> Torrent [ 'GroupID' ]) { ?>
2011-03-28 14:21:28 +00:00
< input type = " hidden " name = " groupid " value = " <?=display_str( $this->Torrent ['GroupID'])?> " />
< input type = " hidden " name = " type " value = " Music " />
2012-10-27 08:00:09 +00:00
< ? }
2013-04-15 08:00:54 +00:00
if ( $this -> Torrent && $this -> Torrent [ 'RequestID' ]) { ?>
2011-03-28 14:21:28 +00:00
< input type = " hidden " name = " requestid " value = " <?=display_str( $this->Torrent ['RequestID'])?> " />
2012-02-04 08:00:25 +00:00
< ? }
} ?>
2011-03-28 14:21:28 +00:00
</ div >
2013-04-15 08:00:54 +00:00
< ? if ( $this -> NewTorrent ) { ?>
2012-10-09 08:00:17 +00:00
< table cellpadding = " 3 " cellspacing = " 1 " border = " 0 " class = " layout border " width = " 100% " >
2011-03-28 14:21:28 +00:00
< tr >
2012-11-09 08:00:18 +00:00
< td class = " label " > Torrent file :</ td >
< td >< input id = " file " type = " file " name = " file_input " size = " 50 " /></ td >
2011-03-28 14:21:28 +00:00
</ tr >
< tr >
2012-11-09 08:00:18 +00:00
< td class = " label " > Type :</ td >
2011-03-28 14:21:28 +00:00
< td >
< select id = " categories " name = " type " onchange = " Categories() " < ? = $this -> Disabled ?> >
2013-04-15 08:00:54 +00:00
< ? foreach ( Misc :: display_array ( $this -> Categories ) as $Index => $Cat ) {
2013-06-02 08:01:02 +00:00
echo " \t \t \t \t \t <option value= \" $Index\ " " ;
if ( $Cat == $this -> Torrent [ 'CategoryName' ]) {
echo ' selected="selected"' ;
}
echo " > $Cat </option> \n " ;
2012-10-27 08:00:09 +00:00
}
2011-03-28 14:21:28 +00:00
?>
</ select >
</ td >
</ tr >
</ table >
< ? } //if ?>
< div id = " dynamic_form " >
< ? } // function head
2012-10-27 08:00:09 +00:00
2011-03-28 14:21:28 +00:00
function foot () {
$Torrent = $this -> Torrent ;
?>
</ div >
2012-09-01 08:00:24 +00:00
< table cellpadding = " 3 " cellspacing = " 1 " border = " 0 " class = " layout border slice " width = " 100% " >
2013-04-15 08:00:54 +00:00
< ? if ( ! $this -> NewTorrent ) {
if ( check_perms ( 'torrents_freeleech' )) {
2011-03-28 14:21:28 +00:00
?>
< tr id = " freetorrent " >
< td class = " label " > Freeleech </ td >
< td >
2011-04-13 15:36:33 +00:00
< select name = " freeleech " >
< ? $FL = array ( " Normal " , " Free " , " Neutral " );
2013-04-15 08:00:54 +00:00
foreach ( $FL as $Key => $Name ) { ?>
2013-02-23 08:00:22 +00:00
< option value = " <?= $Key ?> " < ? = ( $Key == $Torrent [ 'FreeTorrent' ] ? ' selected="selected"' : '' ) ?> ><?=$Name?></option>
2011-07-10 08:00:06 +00:00
< ? } ?>
</ select >
2012-10-27 08:00:09 +00:00
because
2011-07-10 08:00:06 +00:00
< select name = " freeleechtype " >
< ? $FL = array ( " N/A " , " Staff Pick " , " Perma-FL " , " Vanity House " );
2013-04-15 08:00:54 +00:00
foreach ( $FL as $Key => $Name ) { ?>
2013-02-23 08:00:22 +00:00
< option value = " <?= $Key ?> " < ? = ( $Key == $Torrent [ 'FreeLeechType' ] ? ' selected="selected"' : '' ) ?> ><?=$Name?></option>
2011-04-13 15:36:33 +00:00
< ? } ?>
</ select >
2011-03-28 14:21:28 +00:00
</ td >
</ tr >
< ?
}
}
?>
< tr >
< td colspan = " 2 " style = " text-align: center; " >
2012-11-09 08:00:18 +00:00
< p > Be sure that your torrent is approved by the < a href = " rules.php?p=upload " target = " _blank " > rules </ a >. Not doing this will result in a < strong class = " important_text " > warning </ strong > or < strong class = " important_text " > worse </ strong >.</ p >
2013-04-15 08:00:54 +00:00
< ? if ( $this -> NewTorrent ) { ?>
2013-02-16 08:00:57 +00:00
< p > After uploading the torrent , you will have a one hour grace period during which no one other than you can fill requests with this torrent . Make use of this time wisely , and < a href = " requests.php " > search the list of requests </ a >.</ p >
2011-03-28 14:21:28 +00:00
< ? } ?>
2013-04-15 08:00:54 +00:00
< input id = " post " type = " submit " < ? if ( $this -> NewTorrent ) { echo ' value="Upload torrent"' ; } else { echo ' value="Edit torrent"' ;} ?> />
2011-03-28 14:21:28 +00:00
</ td >
</ tr >
</ table >
</ form >
</ div >
< ? } //function foot
2012-10-27 08:00:09 +00:00
2011-03-28 14:21:28 +00:00
function music_form ( $GenreTags ) {
$Torrent = $this -> Torrent ;
$IsRemaster = ! empty ( $Torrent [ 'Remastered' ]);
$UnknownRelease = ! $this -> NewTorrent && $IsRemaster && ! $Torrent [ 'RemasterYear' ];
2012-10-27 08:00:09 +00:00
2013-04-15 08:00:54 +00:00
if ( $Torrent [ 'GroupID' ]) {
2011-03-28 14:21:28 +00:00
global $DB ;
2013-06-02 08:01:02 +00:00
$DB -> query ( '
SELECT
ID ,
RemasterYear ,
RemasterTitle ,
RemasterRecordLabel ,
RemasterCatalogueNumber
FROM torrents
WHERE GroupID = '.$Torrent[' GroupID ' ] . "
AND Remastered = '1'
AND RemasterYear != 0
ORDER BY RemasterYear DESC ,
RemasterTitle DESC ,
RemasterRecordLabel DESC ,
RemasterCatalogueNumber DESC " );
2012-10-27 08:00:09 +00:00
2013-07-10 00:08:53 +00:00
if ( $DB -> has_results ()) {
2011-03-28 14:21:28 +00:00
$GroupRemasters = $DB -> to_array ( false , MYSQLI_BOTH , false );
}
}
2012-10-27 08:00:09 +00:00
2012-03-08 08:00:24 +00:00
global $DB ;
2011-03-28 14:21:28 +00:00
$HasLog = $Torrent [ 'HasLog' ];
$HasCue = $Torrent [ 'HasCue' ];
$BadTags = $Torrent [ 'BadTags' ];
$BadFolders = $Torrent [ 'BadFolders' ];
$BadFiles = $Torrent [ 'BadFiles' ];
2011-08-09 21:03:28 +00:00
$CassetteApproved = $Torrent [ 'CassetteApproved' ];
$LossymasterApproved = $Torrent [ 'LossymasterApproved' ];
2012-05-31 08:00:14 +00:00
$LossywebApproved = $Torrent [ 'LossywebApproved' ];
2011-03-28 14:21:28 +00:00
global $ReleaseTypes ;
?>
2013-05-15 08:00:54 +00:00
< table cellpadding = " 3 " cellspacing = " 1 " border = " 0 " class = " layout border<? if ( $this->NewTorrent ) { echo ' slice'; } ?> " width = " 100% " >
2013-04-15 08:00:54 +00:00
< ? if ( $this -> NewTorrent ) { ?>
2011-03-28 14:21:28 +00:00
< tr id = " artist_tr " >
2013-01-15 08:00:37 +00:00
< td class = " label " > Artist ( s ) :</ td >
2011-03-28 14:21:28 +00:00
< td id = " artistfields " >
2013-02-23 08:00:22 +00:00
< p id = " vawarning " class = " hidden " > Please use the multiple artists feature rather than adding " Various Artists " as an artist ; read < a href = " wiki.php?action=article&id=369 " target = " _blank " > this </ a > for more information .</ p >
2013-04-15 08:00:54 +00:00
< ? if ( ! empty ( $Torrent [ 'Artists' ])) {
2012-02-13 08:00:23 +00:00
$FirstArtist = true ;
2013-04-15 08:00:54 +00:00
foreach ( $Torrent [ 'Artists' ] as $Importance => $Artists ) {
foreach ( $Artists as $Artist ) {
2011-03-28 14:21:28 +00:00
?>
2013-07-04 08:00:56 +00:00
< input type = " text " id = " artist " name = " artists[] " size = " 45 " value = " <?=display_str( $Artist['name'] ) ?> " onblur = " CheckVA(); " < ? Users :: has_autocomplete_enabled ( 'other' ); ?> <?=$this->Disabled?> />
2013-02-23 08:00:22 +00:00
< select id = " importance " name = " importance[] " < ? = $this -> Disabled ?> >
2011-11-20 08:00:18 +00:00
< option value = " 1 " < ? = ( $Importance == '1' ? ' selected="selected"' : '' ) ?> >Main</option>
< option value = " 2 " < ? = ( $Importance == '2' ? ' selected="selected"' : '' ) ?> >Guest</option>
< option value = " 4 " < ? = ( $Importance == '4' ? ' selected="selected"' : '' ) ?> >Composer</option>
< option value = " 5 " < ? = ( $Importance == '5' ? ' selected="selected"' : '' ) ?> >Conductor</option>
< option value = " 6 " < ? = ( $Importance == '6' ? ' selected="selected"' : '' ) ?> >DJ / Compiler</option>
< option value = " 3 " < ? = ( $Importance == '3' ? ' selected="selected"' : '' ) ?> >Remixer</option>
2013-03-02 08:00:34 +00:00
< option value = " 7 " < ? = ( $Importance == '7' ? ' selected="selected"' : '' ) ?> >Producer</option>
2011-03-28 14:21:28 +00:00
</ select >
2012-10-27 08:00:09 +00:00
< ? if ( $FirstArtist ) {
2012-03-19 08:00:24 +00:00
if ( ! $this -> DisabledFlag ) { ?>
2013-02-18 08:00:22 +00:00
< a href = " javascript:AddArtistField() " class = " brackets " >+</ a > < a href = " javascript:RemoveArtistField() " class = " brackets " >& minus ; </ a >
2012-03-19 08:00:24 +00:00
< ? }
$FirstArtist = false ;
2012-02-13 08:00:23 +00:00
} ?>
2011-03-28 14:21:28 +00:00
< br />
< ? }
}
} else {
?>
2013-07-04 08:00:56 +00:00
< input type = " text " id = " artist " name = " artists[] " size = " 45 " onblur = " CheckVA(); " < ? Users :: has_autocomplete_enabled ( 'other' ); ?> <?=$this->Disabled?> />
2013-02-23 08:00:22 +00:00
< select id = " importance " name = " importance[] " < ? = $this -> Disabled ?> >
2011-11-20 08:00:18 +00:00
< option value = " 1 " > Main </ option >
< option value = " 2 " > Guest </ option >
< option value = " 4 " > Composer </ option >
< option value = " 5 " > Conductor </ option >
< option value = " 6 " > DJ / Compiler </ option >
< option value = " 3 " > Remixer </ option >
2012-02-19 08:00:19 +00:00
< option value = " 7 " > Producer </ option >
2011-03-28 14:21:28 +00:00
</ select >
2013-02-18 08:00:22 +00:00
< a href = " # " onclick = " AddArtistField();return false; " class = " brackets " >+</ a > < a href = " # " onclick = " RemoveArtistField();return false; " class = " brackets " >& minus ; </ a >
2012-03-19 08:00:24 +00:00
< ?
2011-03-28 14:21:28 +00:00
}
2012-10-27 08:00:09 +00:00
?>
2011-03-28 14:21:28 +00:00
</ td >
</ tr >
< tr id = " title_tr " >
< td class = " label " > Album title :</ td >
< td >
2013-06-02 08:01:02 +00:00
< input type = " text " id = " title " name = " title " size = " 60 " value = " <?=display_str( $Torrent['Title'] )?> " < ? = $this -> Disabled ?> />
2013-02-23 08:00:22 +00:00
< p class = " min_padding " > Do not include the words remaster , re - issue , MFSL Gold , limited edition , bonus tracks , bonus disc or country - specific information in this field . That belongs in the edition information fields below ; see < a href = " wiki.php?action=article&id=159 " target = " _blank " > this </ a > for further information . Also remember to use the correct capitalization for your upload . See the < a href = " wiki.php?action=article&id=317 " target = " _blank " > Capitalization Guidelines </ a > for more information .</ p >
2011-03-28 14:21:28 +00:00
</ td >
</ tr >
2012-11-09 08:00:18 +00:00
< tr id = " musicbrainz_tr " >
2012-12-21 08:00:21 +00:00
< td class = " label " title = " Click the "Find Info" button to automatically fill out parts of the upload form by selecting an entry in MusicBrainz " > MusicBrainz :</ td >
2012-11-09 08:00:18 +00:00
< td >< input type = " button " value = " Find Info " id = " musicbrainz_button " /></ td >
</ tr >
< div id = " musicbrainz_popup " >
2012-12-21 08:00:21 +00:00
< a href = " #null " id = " popup_close " > x </ a >
< h1 id = " popup_title " ></ h1 >
< h2 id = " popup_back " ></ h2 >
< div id = " results1 " ></ div >
< div id = " results2 " ></ div >
2012-11-09 08:00:18 +00:00
</ div >
< div id = " popup_background " ></ div >
2012-04-08 08:00:25 +00:00
2012-12-21 08:00:21 +00:00
< script type = " text/javascript " >
//<![CDATA[
2012-04-08 08:00:25 +00:00
hide ();
2013-04-20 08:01:01 +00:00
if ( document . getElementById ( " categories " ) . disabled == false ) {
2013-04-15 08:00:54 +00:00
if ( navigator . appName == 'Opera' ) {
2012-04-08 08:00:25 +00:00
var useragent = navigator . userAgent ;
var match = useragent . split ( 'Version/' );
var version = parseFloat ( match [ 1 ]);
2013-04-15 08:00:54 +00:00
if ( version >= 12.00 ) {
2012-12-21 08:00:21 +00:00
show ();
2012-04-08 08:00:25 +00:00
}
2012-12-21 08:00:21 +00:00
}
2012-04-08 08:00:25 +00:00
else if ( navigator . appName != 'Microsoft Internet Explorer' ) {
2012-12-21 08:00:21 +00:00
show ();
2012-04-08 08:00:25 +00:00
}
}
function hide () {
2012-12-21 08:00:21 +00:00
document . getElementById ( " musicbrainz_tr " ) . style . display = " none " ;
document . getElementById ( " musicbrainz_popup " ) . style . display = " none " ;
document . getElementById ( " popup_background " ) . style . display = " none " ;
}
2012-04-08 08:00:25 +00:00
2012-12-21 08:00:21 +00:00
function show () {
document . getElementById ( " musicbrainz_tr " ) . style . display = " " ;
document . getElementById ( " musicbrainz_popup " ) . style . display = " " ;
document . getElementById ( " popup_background " ) . style . display = " " ;
}
//]]>
2012-04-08 08:00:25 +00:00
</ script >
2011-03-28 14:21:28 +00:00
< tr id = " year_tr " >
< td class = " label " >
2013-04-15 08:00:54 +00:00
< span id = " year_label_not_remaster " < ? if ( $IsRemaster ) { echo ' class="hidden"' ;} ?> >Year:</span>
2013-06-23 08:00:54 +00:00
< span id = " year_label_remaster " < ? if ( ! $IsRemaster ) { echo ' class="hidden"' ;} ?> >Year of original release:</span>
2011-03-28 14:21:28 +00:00
</ td >
< td >
2013-06-23 08:00:54 +00:00
< p id = " yearwarning " class = " hidden " > You have entered a year for a release which predates the medium ' s availability . You will need to change the year and enter additional edition information . If this information cannot be provided , check the & quot ; Unknown Release & quot ; check box below .</ p >
2011-03-28 14:21:28 +00:00
< input type = " text " id = " year " name = " year " size = " 5 " value = " <?=display_str( $Torrent['Year'] ) ?> " < ? = $this -> Disabled ?> onblur="CheckYear();" /> This is the year of the original release.
</ td >
</ tr >
< tr id = " label_tr " >
2013-01-15 08:00:37 +00:00
< td class = " label " > Record label ( optional ) :</ td >
2012-11-09 08:00:18 +00:00
< td >< input type = " text " id = " record_label " name = " record_label " size = " 40 " value = " <?=display_str( $Torrent['RecordLabel'] ) ?> " < ? = $this -> Disabled ?> /></td>
2011-03-28 14:21:28 +00:00
</ tr >
< tr id = " catalogue_tr " >
2013-01-15 08:00:37 +00:00
< td class = " label " > Catalogue number ( optional ) :</ td >
2011-03-28 14:21:28 +00:00
< td >
< input type = " text " id = " catalogue_number " name = " catalogue_number " size = " 40 " value = " <?=display_str( $Torrent['CatalogueNumber'] ) ?> " < ? = $this -> Disabled ?> />
2013-06-23 08:00:54 +00:00
< br />
Please double - check the record label and catalogue number when using MusicBrainz . See < a href = " wiki.php?action=article&id=688 " target = " _blank " > this guide </ a > for more details .
2011-03-28 14:21:28 +00:00
</ td >
</ tr >
< tr id = " releasetype_tr " >
< td class = " label " >
2013-01-15 08:00:37 +00:00
< span id = " releasetype_label " > Release type :</ span >
2011-03-28 14:21:28 +00:00
</ td >
< td >
< select id = " releasetype " name = " releasetype " < ? = $this -> Disabled ?> >
< option >---</ option >
< ?
foreach ( $ReleaseTypes as $Key => $Val ) {
2013-06-02 08:01:02 +00:00
echo " \t \t \t \t \t \t <option value= \" $Key\ " " ;
if ( $Key == $Torrent [ 'ReleaseType' ]) {
echo ' selected="selected"' ;
}
echo " > $Val </option> \n " ;
2011-03-28 14:21:28 +00:00
}
?>
2013-06-23 08:00:54 +00:00
</ select > Please take the time to fill this out properly . Need help ? Try reading < a href = " wiki.php?action=article&id=202 " target = " _blank " > this wiki article </ a > or searching < a href = " https://musicbrainz.org/search " target = " _blank " > MusicBrainz </ a >.
2011-03-28 14:21:28 +00:00
</ td >
</ tr >
< ? } ?>
< tr >
2013-01-15 08:00:37 +00:00
< td class = " label " > Edition information :</ td >
2011-03-28 14:21:28 +00:00
< td >
2013-04-15 08:00:54 +00:00
< input type = " checkbox " id = " remaster " name = " remaster " < ? if ( $IsRemaster ) { echo ' checked="checked"' ;} ?> onclick="Remaster();<? if ($this->NewTorrent) { ?> CheckYear();<? } ?>" />
2013-02-23 08:00:22 +00:00
< label for = " remaster " > Check this box if this torrent is a different release to the original , for example a limited or country specific edition or a release that includes additional bonus tracks or is a bonus disc .</ label >
2013-04-15 08:00:54 +00:00
< div id = " remaster_true " < ? if ( ! $IsRemaster ) { echo ' class="hidden"' ;} ?> >
< ? if ( check_perms ( 'edit_unknowns' ) || $LoggedUser [ 'ID' ] == $Torrent [ 'UserID' ]) { ?>
2011-03-28 14:21:28 +00:00
< br />
2013-04-15 08:00:54 +00:00
< input type = " checkbox " id = " unknown " name = " unknown " < ? if ( $UnknownRelease ) { echo ' checked="checked"' ;} ?> onclick="<? if ($this->NewTorrent) { ?> CheckYear();<? } ?>ToggleUnknown();" /> <label for="unknown">Unknown Release</label>
< ? } ?>
2011-03-28 14:21:28 +00:00
< br />< br />
2013-04-15 08:00:54 +00:00
< ? if ( ! empty ( $GroupRemasters )) { ?>
2011-03-28 14:21:28 +00:00
< input type = " hidden " id = " json_remasters " value = " <?=display_str(json_encode( $GroupRemasters ))?> " />
2013-04-15 08:00:54 +00:00
< select id = " groupremasters " name = " groupremasters " onchange = " GroupRemaster() " < ? if ( $UnknownRelease ) { echo ' disabled="disabled"' ;} ?> >
2011-03-28 14:21:28 +00:00
< option value = " " >-------</ option >
< ?
2013-04-15 08:00:54 +00:00
$LastLine = '' ;
2012-10-27 08:00:09 +00:00
2013-04-15 08:00:54 +00:00
foreach ( $GroupRemasters as $Index => $Remaster ) {
2013-04-24 08:00:23 +00:00
$Line = $Remaster [ 'RemasterYear' ] . ' / ' . $Remaster [ 'RemasterTitle' ] . ' / ' . $Remaster [ 'RemasterRecordLabel' ] . ' / ' . $Remaster [ 'RemasterCatalogueNumber' ];
2013-04-15 08:00:54 +00:00
if ( $Line != $LastLine ) {
2011-03-28 14:21:28 +00:00
$LastLine = $Line ;
2012-10-27 08:00:09 +00:00
2011-03-28 14:21:28 +00:00
?>
2013-06-02 08:01:02 +00:00
< option value = " <?= $Index ?> " < ? = (( $Remaster [ 'ID' ] == $this -> TorrentID ) ? ' selected="selected"' : '' ) ?> ><?=$Line?></option>
2011-03-28 14:21:28 +00:00
< ?
}
}
?>
</ select >
< br />
< ? } ?>
2012-11-09 08:00:18 +00:00
< table id = " edition_information " class = " layout border " border = " 0 " width = " 100% " >
< tbody >
< tr id = " edition_year " >
2013-01-15 08:00:37 +00:00
< td class = " label " > Year ( required ) :</ td >
2012-11-09 08:00:18 +00:00
< td >
2013-04-15 08:00:54 +00:00
< input type = " text " id = " remaster_year " name = " remaster_year " size = " 5 " value = " <? if ( $Torrent['RemasterYear'] ) { echo display_str( $Torrent['RemasterYear'] ); } ?> " < ? if ( $UnknownRelease ) { echo ' disabled="disabled"' ;} ?> />
2012-11-09 08:00:18 +00:00
</ td >
</ tr >
< tr id = " edition_title " >
< td class = " label " > Title :</ td >
< td >
2013-04-15 08:00:54 +00:00
< input type = " text " id = " remaster_title " name = " remaster_title " size = " 50 " value = " <?=display_str( $Torrent['RemasterTitle'] ) ?> " < ? if ( $UnknownRelease ) { echo ' disabled="disabled"' ;} ?> />
2013-06-02 08:01:02 +00:00
< p class = " min_padding " > Title of the release ( e . g . < span style = " font-style: italic; " > " Deluxe Edition " or " Remastered " </ span > ) .</ p >
2012-11-09 08:00:18 +00:00
</ td >
2013-02-23 08:00:22 +00:00
</ tr >
2012-11-09 08:00:18 +00:00
< tr id = " edition_record_label " >
2013-01-15 08:00:37 +00:00
< td class = " label " > Record label :</ td >
2012-11-09 08:00:18 +00:00
< td >
2013-04-15 08:00:54 +00:00
< input type = " text " id = " remaster_record_label " name = " remaster_record_label " size = " 50 " value = " <?=display_str( $Torrent['RemasterRecordLabel'] ) ?> " < ? if ( $UnknownRelease ) { echo ' disabled="disabled"' ;} ?> />
2013-05-16 08:00:10 +00:00
< p class = " min_padding " > This is for the record label of the < strong > release </ strong >. It may differ from the original .</ p >
2012-11-09 08:00:18 +00:00
</ td >
</ tr >
< tr id = " edition_catalogue_number " >
2013-01-15 08:00:37 +00:00
< td class = " label " > Catalogue number :</ td >
2013-05-15 08:00:54 +00:00
< td >< input type = " text " id = " remaster_catalogue_number " name = " remaster_catalogue_number " size = " 50 " value = " <?=display_str( $Torrent['RemasterCatalogueNumber'] ) ?> " < ? if ( $UnknownRelease ) { echo ' disabled="disabled"' ;} ?> />
2012-11-09 08:00:18 +00:00
< p class = " min_padding " > This is for the catalogue number of the < strong > release </ strong >.</ p >
</ td >
</ tr >
</ tbody >
</ table >
2011-03-28 14:21:28 +00:00
</ div >
</ td >
2012-10-27 08:00:09 +00:00
</ tr >
2011-03-28 14:21:28 +00:00
< tr >
2012-11-09 08:00:18 +00:00
< td class = " label " > Scene :</ td >
2011-03-28 14:21:28 +00:00
< td >
2013-05-15 08:00:54 +00:00
< input type = " checkbox " id = " scene " name = " scene " < ? if ( $Torrent [ 'Scene' ]) { echo 'checked="checked" ' ;} ?> />
2013-06-25 08:00:52 +00:00
< label for = " scene " > Select this only if this is a " scene release " .< br /> If you ripped it yourself , it is < strong > not </ strong > a scene release . If you are not sure , < strong class = " important_text " > do not </ strong > select it ; you will be penalized . For information on the scene , visit < a href = " https://en.wikipedia.org/wiki/Warez_scene " target = " _blank " > Wikipedia </ a >.</ label >
2011-03-28 14:21:28 +00:00
</ td >
</ tr >
< tr >
2012-11-09 08:00:18 +00:00
< td class = " label " > Format :</ td >
2011-03-28 14:21:28 +00:00
< td >
< select id = " format " name = " format " onchange = " Format() " >
< option >---</ option >
2013-04-15 08:00:54 +00:00
< ? foreach ( Misc :: display_array ( $this -> Formats ) as $Format ) {
2013-06-02 08:01:02 +00:00
echo " \t \t \t \t \t \t <option value= \" $Format\ " " ;
if ( $Format == $Torrent [ 'Format' ]) {
echo ' selected="selected"' ;
}
echo " > $Format </option> \n " ;
2013-02-23 08:00:22 +00:00
// <option value="$Format" selected="selected">$Format</option>
2012-10-27 08:00:09 +00:00
}
2011-03-28 14:21:28 +00:00
?>
</ select >
2012-09-23 08:00:25 +00:00
< span id = " format_warning " class = " important_text " ></ span >
2011-03-28 14:21:28 +00:00
</ td >
</ tr >
2012-11-14 08:00:19 +00:00
< tr id = " bitrate_row " >
2013-01-15 08:00:37 +00:00
< td class = " label " > Bitrate :</ td >
2011-03-28 14:21:28 +00:00
< td >
< select id = " bitrate " name = " bitrate " onchange = " Bitrate() " >
< option value = " " >---</ option >
2013-04-24 08:00:23 +00:00
< ?
if ( $Torrent [ 'Bitrate' ] && ! in_array ( $Torrent [ 'Bitrate' ], $this -> Bitrates )) {
2011-03-28 14:21:28 +00:00
$OtherBitrate = true ;
2013-04-24 08:00:23 +00:00
if ( substr ( $Torrent [ 'Bitrate' ], strlen ( $Torrent [ 'Bitrate' ]) - strlen ( ' (VBR)' )) == ' (VBR)' ) {
$Torrent [ 'Bitrate' ] = substr ( $Torrent [ 'Bitrate' ], 0 , strlen ( $Torrent [ 'Bitrate' ]) - 6 );
2011-03-28 14:21:28 +00:00
$VBR = true ;
}
} else {
$OtherBitrate = false ;
}
2012-10-27 08:00:09 +00:00
2011-03-28 14:21:28 +00:00
// See if they're the same bitrate
2012-10-27 08:00:09 +00:00
// We have to do this screwery because '(' is a regex character.
2011-03-28 14:21:28 +00:00
$SimpleBitrate = explode ( ' ' , $Torrent [ 'Bitrate' ]);
$SimpleBitrate = $SimpleBitrate [ 0 ];
2012-10-27 08:00:09 +00:00
2013-04-15 08:00:54 +00:00
foreach ( Misc :: display_array ( $this -> Bitrates ) as $Bitrate ) {
2013-06-02 08:01:02 +00:00
echo " \t \t \t \t \t \t <option value= \" $Bitrate\ " " ;
2013-04-24 08:00:23 +00:00
if (( $SimpleBitrate && preg_match ( '/^' . $SimpleBitrate . '.*/' , $Bitrate )) || ( $OtherBitrate && $Bitrate == 'Other' )) {
2011-03-28 14:21:28 +00:00
echo ' selected="selected"' ;
}
2013-06-02 08:01:02 +00:00
echo " > $Bitrate </option> \n " ;
2011-03-28 14:21:28 +00:00
} ?>
</ select >
2013-04-15 08:00:54 +00:00
< span id = " other_bitrate_span " < ? if ( ! $OtherBitrate ) { echo ' class="hidden"' ; } ?> >
< input type = " text " name = " other_bitrate " size = " 5 " id = " other_bitrate " < ? if ( $OtherBitrate ) { echo ' value="' . display_str ( $Torrent [ 'Bitrate' ]) . '"' ;} ?> onchange="AltBitrate()" />
< input type = " checkbox " id = " vbr " name = " vbr " < ? if ( isset ( $VBR )) { echo ' checked="checked"' ; } ?> /><label for="vbr"> (VBR)</label>
2011-03-28 14:21:28 +00:00
</ span >
</ td >
</ tr >
2013-04-24 08:00:23 +00:00
< ?
2013-04-15 08:00:54 +00:00
if ( $this -> NewTorrent ) { ?>
2012-11-14 08:00:19 +00:00
< tr id = " upload_logs " class = " hidden " >
< td class = " label " >
2013-01-15 08:00:37 +00:00
Log files :
2012-11-14 08:00:19 +00:00
</ td >
< td id = " logfields " >
2013-02-18 08:00:22 +00:00
Check your log files before uploading < a href = " logchecker.php " target = " _blank " > here </ a >. For multi - disc releases , click the " <span class= " brackets " >+</span> " button to add multiple log files .< br />
< input id = " file " type = " file " multiple = " multiple " name = " logfiles[] " size = " 50 " /> < a href = " javascript:; " onclick = " AddLogField(); " class = " brackets " >+</ a > < a href = " javascript:; " onclick = " RemoveLogField(); " class = " brackets " >& minus ; </ a >
2012-11-14 08:00:19 +00:00
</ td >
</ tr >
< ?
} ?>
2013-04-15 08:00:54 +00:00
< ? if ( $this -> NewTorrent ) { ?>
2012-11-14 08:00:19 +00:00
< tr >
2013-06-13 08:01:05 +00:00
< td class = " label " > Multi - format uploader :</ td >
< td >< input type = " button " value = " + " id = " add_format " />< input type = " button " style = " display: none; " value = " - " id = " remove_format " /></ td >
2012-11-14 08:00:19 +00:00
</ tr >
< tr id = " placeholder_row_top " ></ tr >
< tr id = " placeholder_row_bottom " ></ tr >
2012-11-15 08:00:19 +00:00
< ? } if ( check_perms ( 'torrents_edit_vanityhouse' ) && $this -> NewTorrent ) { ?>
2011-08-09 21:03:28 +00:00
< tr >
2012-11-09 08:00:18 +00:00
< td class = " label " > Vanity House :</ td >
2011-08-09 21:03:28 +00:00
< td >
2013-04-20 08:01:01 +00:00
< label >< input type = " checkbox " id = " vanity_house " name = " vanity_house " < ? if ( $Torrent [ 'GroupID' ]) { echo ' disabled="disabled"' ; } ?> <? if ($Torrent['VanityHouse']) { echo ' checked="checked"';} ?> />
2013-06-13 08:01:05 +00:00
Check this only if you are submitting your own work or submitting on behalf of the artist , and this is intended to be a Vanity House release . Checking this will also automatically add the group as a recommendation .
2012-12-21 08:00:21 +00:00
</ label >
2011-08-09 21:03:28 +00:00
</ td >
</ tr >
2012-02-22 08:00:31 +00:00
< ? } ?>
2011-03-28 14:21:28 +00:00
< tr >
2012-11-09 08:00:18 +00:00
< td class = " label " > Media :</ td >
2011-03-28 14:21:28 +00:00
< td >
2013-03-30 08:00:31 +00:00
< select name = " media " onchange = " CheckYear(); " id = " media " >
2011-03-28 14:21:28 +00:00
< option >---</ option >
2013-04-15 08:00:54 +00:00
< ? foreach ( $this -> Media as $Media ) {
2013-06-02 08:01:02 +00:00
echo " \t \t \t \t \t \t <option value= \" $Media\ " " ;
if ( isset ( $Torrent [ 'Media' ]) && $Media == $Torrent [ 'Media' ]) {
echo ' selected="selected"' ;
}
echo " > $Media </option> \n " ;
2012-10-27 08:00:09 +00:00
}
2011-03-28 14:21:28 +00:00
?>
</ select >
</ td >
</ tr >
2013-04-15 08:00:54 +00:00
< ? if ( ! $this -> NewTorrent && check_perms ( 'users_mod' )) { ?>
2011-03-28 14:21:28 +00:00
< tr >
2013-05-21 08:01:09 +00:00
< td class = " label " > Log / cue :</ td >
2011-03-28 14:21:28 +00:00
< td >
2013-04-15 08:00:54 +00:00
< input type = " checkbox " id = " flac_log " name = " flac_log " < ? if ( $HasLog ) { echo ' checked="checked"' ;} ?> /> <label for="flac_log">Check this box if the torrent has, or should have, a log file.</label><br />
< input type = " checkbox " id = " flac_cue " name = " flac_cue " < ? if ( $HasCue ) { echo ' checked="checked"' ;} ?> /> <label for="flac_cue">Check this box if the torrent has, or should have, a cue file.</label><br />
2013-06-02 08:01:02 +00:00
< ? }
2011-03-28 14:21:28 +00:00
global $LoggedUser ;
if (( check_perms ( 'users_mod' ) || $LoggedUser [ 'ID' ] == $Torrent [ 'UserID' ]) && ( $Torrent [ 'LogScore' ] == 100 || $Torrent [ 'LogScore' ] == 99 )) {
2013-06-02 08:01:02 +00:00
$DB -> query ( '
SELECT LogID
FROM torrents_logs_new
WHERE TorrentID = ' . $this -> TorrentID . "
AND Log LIKE 'EAC extraction logfile%'
AND ( Adjusted = '0' OR Adjusted = '' ) " );
2011-03-28 14:21:28 +00:00
list ( $LogID ) = $DB -> next_record ();
if ( $LogID ) {
2013-06-02 08:01:02 +00:00
if ( ! check_perms ( 'users_mod' )) { ?>
< tr >
< td class = " label " > Trumpable :</ td >
< td >
< ? } ?>
< input type = " checkbox " id = " make_trumpable " name = " make_trumpable " < ? if ( $Torrent [ 'LogScore' ] == 99 ) { echo ' checked="checked"' ;} ?> /> <label for="make_trumpable">Check this box if you want this torrent to be trumpable (subtracts 1 point).</label>
< ? if ( ! check_perms ( 'users_mod' )) { ?>
</ td >
</ tr >
2011-03-28 14:21:28 +00:00
< ?
}
}
2012-10-27 08:00:09 +00:00
}
2013-04-15 08:00:54 +00:00
if ( ! $this -> NewTorrent && check_perms ( 'users_mod' )) { ?>
2011-03-28 14:21:28 +00:00
</ td >
</ tr >
2013-04-15 08:00:54 +00:00
< ? /* if ( $HasLog ) { ?>
2011-03-28 14:21:28 +00:00
< tr >
2013-02-23 08:00:22 +00:00
< td class = " label " > Log score </ td >
2012-11-09 08:00:18 +00:00
< td >< input type = " text " name = " log_score " size = " 5 " id = " log_score " value = " <?=display_str( $Torrent['LogScore'] ) ?> " /></ td >
2011-03-28 14:21:28 +00:00
</ tr >
< tr >
2013-02-23 08:00:22 +00:00
< td class = " label " > Log adjustment reason </ td >
2011-03-28 14:21:28 +00:00
< td >
< textarea name = " adjustment_reason " id = " adjustment_reason " cols = " 60 " rows = " 8 " >< ? = display_str ( $Torrent [ 'AdjustmentReason' ]); ?> </textarea>
2013-02-23 08:00:22 +00:00
< p class = " min_padding " > Contains reason for adjusting a score . < strong > This field is displayed on the torrent page .</ strong ></ p >
2011-03-28 14:21:28 +00:00
</ td >
</ tr >
< ? } */ ?>
< tr >
2013-02-23 08:00:22 +00:00
< td class = " label " > Bad tags :</ td >
2013-04-15 08:00:54 +00:00
< td >< input type = " checkbox " id = " bad_tags " name = " bad_tags " < ? if ( $BadTags ) { echo ' checked="checked"' ;} ?> /> <label for="bad_tags">Check this box if the torrent has bad tags.</label></td>
2011-03-28 14:21:28 +00:00
</ tr >
< tr >
2013-02-23 08:00:22 +00:00
< td class = " label " > Bad folder names :</ td >
2013-04-15 08:00:54 +00:00
< td >< input type = " checkbox " id = " bad_folders " name = " bad_folders " < ? if ( $BadFolders ) { echo ' checked="checked"' ;} ?> /> <label for="bad_folders">Check this box if the torrent has bad folder names.</label></td>
2011-03-28 14:21:28 +00:00
</ tr >
< tr >
2013-02-23 08:00:22 +00:00
< td class = " label " > Bad file names :</ td >
2013-04-15 08:00:54 +00:00
< td >< input type = " checkbox " id = " bad_files " name = " bad_files " < ? if ( $BadFiles ) { echo ' checked="checked"' ;} ?> /> <label for="bad_files">Check this box if the torrent has bad file names.</label></td>
2011-03-28 14:21:28 +00:00
</ tr >
2011-08-09 21:03:28 +00:00
< tr >
2013-02-23 08:00:22 +00:00
< td class = " label " > Cassette approved :</ td >
2013-04-15 08:00:54 +00:00
< td >< input type = " checkbox " id = " cassette_approved " name = " cassette_approved " < ? if ( $CassetteApproved ) { echo ' checked="checked"' ;} ?> /> <label for="cassette_approved">Check this box if the torrent is an approved cassette rip.</label></td>
2011-08-09 21:03:28 +00:00
</ tr >
< tr >
2013-02-23 08:00:22 +00:00
< td class = " label " > Lossy master approved :</ td >
2013-04-15 08:00:54 +00:00
< td >< input type = " checkbox " id = " lossymaster_approved " name = " lossymaster_approved " < ? if ( $LossymasterApproved ) { echo ' checked="checked"' ;} ?> /> <label for="lossymaster_approved">Check this box if the torrent is an approved lossy master.</label></td>
2011-08-09 21:03:28 +00:00
</ tr >
2012-05-31 08:00:14 +00:00
< tr >
2013-02-23 08:00:22 +00:00
< td class = " label " > Lossy web approved :</ td >
2013-04-15 08:00:54 +00:00
< td >< input type = " checkbox " id = " lossyweb_approved " name = " lossyweb_approved " < ? if ( $LossywebApproved ) { echo ' checked="checked"' ;} ?> /> <label for="lossyweb_approved">Check this box if the torrent is an approved lossy WEB release.</label></td>
2012-05-31 08:00:14 +00:00
</ tr >
2013-05-26 08:00:59 +00:00
< ? }
if ( $this -> NewTorrent ) { ?>
2011-03-28 14:21:28 +00:00
< tr >
2012-11-09 08:00:18 +00:00
< td class = " label " > Tags :</ td >
2011-03-28 14:21:28 +00:00
< td >
2013-04-15 08:00:54 +00:00
< ? if ( $GenreTags ) { ?>
2013-02-23 08:00:22 +00:00
< select id = " genre_tags " name = " genre_tags " onchange = " add_tag();return false; " < ? = $this -> Disabled ?> >
2011-03-28 14:21:28 +00:00
< option >---</ option >
2013-04-15 08:00:54 +00:00
< ? foreach ( Misc :: display_array ( $GenreTags ) as $Genre ) { ?>
2013-06-02 08:01:02 +00:00
< option value = " <?= $Genre ?> " >< ? = $Genre ?> </option>
2011-03-28 14:21:28 +00:00
< ? } ?>
</ select >
2012-10-27 08:00:09 +00:00
< ? } ?>
2013-07-04 08:00:56 +00:00
< input type = " text " id = " tags " name = " tags " size = " 40 " value = " <?=display_str( $Torrent['TagList'] ) ?> " < ? Users :: has_autocomplete_enabled ( 'other' ); ?> <?=$this->Disabled?> />
2011-03-28 14:21:28 +00:00
< br />
2013-07-04 08:00:56 +00:00
< ? Rules :: display_site_tag_rules ( true ); ?>
2011-03-28 14:21:28 +00:00
</ td >
</ tr >
< tr >
2012-11-09 08:00:18 +00:00
< td class = " label " > Image ( optional ) :</ td >
2013-02-23 08:00:22 +00:00
< td >< input type = " text " id = " image " name = " image " size = " 60 " value = " <?=display_str( $Torrent['Image'] ) ?> " < ? = $this -> Disabled ?> /></td>
2011-03-28 14:21:28 +00:00
</ tr >
< tr >
2013-01-15 08:00:37 +00:00
< td class = " label " > Album description :</ td >
2011-03-28 14:21:28 +00:00
< td >
2013-01-23 08:00:38 +00:00
< ? php new TEXTAREA_PREVIEW ( 'album_desc' , 'album_desc' , display_str ( $Torrent [ 'GroupDescription' ]), 60 , 8 , true , true , false , array ( $this -> Disabled )); ?>
2012-10-27 08:00:09 +00:00
< p class = " min_padding " > Contains background information such as album history and maybe a review .</ p >
2011-03-28 14:21:28 +00:00
</ td >
</ tr >
2012-10-27 08:00:09 +00:00
< ? } // if new torrent ?>
2011-03-28 14:21:28 +00:00
< tr >
2013-01-15 08:00:37 +00:00
< td class = " label " > Release description ( optional ) :</ td >
2011-03-28 14:21:28 +00:00
< td >
2012-10-27 08:00:09 +00:00
< ? php new TEXTAREA_PREVIEW ( 'release_desc' , 'release_desc' , display_str ( $Torrent [ 'TorrentDescription' ]), 60 , 8 ); ?>
2012-11-09 08:00:18 +00:00
< p class = " min_padding " > Contains information like encoder settings or details of the ripping process . < strong class = " important_text " > Do not paste the ripping log here .</ strong ></ p >
2011-03-28 14:21:28 +00:00
</ td >
</ tr >
</ table >
< ?
2013-01-15 08:00:37 +00:00
// For AJAX requests (e.g. when changing the type from Music to Applications),
2012-10-27 08:00:09 +00:00
// we don't need to include all scripts, but we do need to include the code
// that generates previews. It will have to be eval'd after an AJAX request.
if ( $_SERVER [ 'SCRIPT_NAME' ] === '/ajax.php' )
TEXTAREA_PREVIEW :: JavaScript ( false );
} //function music_form
2011-03-28 14:21:28 +00:00
2012-10-27 08:00:09 +00:00
function audiobook_form () {
2011-03-28 14:21:28 +00:00
$Torrent = $this -> Torrent ;
?>
2012-09-01 08:00:24 +00:00
< table cellpadding = " 3 " cellspacing = " 1 " border = " 0 " class = " layout border slice " width = " 100% " >
2013-04-20 08:01:01 +00:00
< ? if ( $this -> NewTorrent ) { ?>
2011-03-28 14:21:28 +00:00
< tr id = " title_tr " >
2012-11-09 08:00:18 +00:00
< td class = " label " > Author - Title :</ td >
2011-03-28 14:21:28 +00:00
< td >
< input type = " text " id = " title " name = " title " size = " 60 " value = " <?=display_str( $Torrent['Title'] ) ?> " />
2012-11-09 08:00:18 +00:00
< p class = " min_padding " > Should only include the author if applicable .</ p >
2011-03-28 14:21:28 +00:00
</ td >
</ tr >
< ? } ?>
< tr id = " year_tr " >
2012-11-09 08:00:18 +00:00
< td class = " label " > Year :</ td >
< td >< input type = " text " id = " year " name = " year " size = " 5 " value = " <?=display_str( $Torrent['Year'] ) ?> " /></ td >
2011-03-28 14:21:28 +00:00
</ tr >
< tr >
2012-11-09 08:00:18 +00:00
< td class = " label " > Format :</ td >
2011-03-28 14:21:28 +00:00
< td >
< select name = " format " onchange = " Format() " >
< option value = " " >---</ option >
< ?
2013-04-15 08:00:54 +00:00
foreach ( Misc :: display_array ( $this -> Formats ) as $Format ) {
2013-06-02 08:01:02 +00:00
echo " \t \t \t \t \t \t <option value= \" $Format\ " " ;
2013-04-20 08:01:01 +00:00
if ( $Format == $Torrent [ 'Format' ]) {
echo ' selected="selected"' ;
}
2013-02-23 08:00:22 +00:00
echo '>' ;
2011-03-28 14:21:28 +00:00
echo $Format ;
echo " </option> \n " ;
2012-09-23 08:00:25 +00:00
}
2011-03-28 14:21:28 +00:00
?>
</ select >
</ td >
</ tr >
< tr >
2012-11-09 08:00:18 +00:00
< td class = " label " > Bitrate :</ td >
2011-03-28 14:21:28 +00:00
< td >
< select id = " bitrate " name = " bitrate " onchange = " Bitrate() " >
< option value = " " >---</ option >
2011-04-17 11:05:01 +00:00
< ?
2013-04-15 08:00:54 +00:00
if ( ! $Torrent [ 'Bitrate' ] || ( $Torrent [ 'Bitrate' ] && ! in_array ( $Torrent [ 'Bitrate' ], $this -> Bitrates ))) {
2011-03-28 14:21:28 +00:00
$OtherBitrate = true ;
2013-04-20 08:01:01 +00:00
if ( substr ( $Torrent [ 'Bitrate' ], strlen ( $Torrent [ 'Bitrate' ]) - strlen ( ' (VBR)' )) == ' (VBR)' ) {
$Torrent [ 'Bitrate' ] = substr ( $Torrent [ 'Bitrate' ], 0 , strlen ( $Torrent [ 'Bitrate' ]) - 6 );
2011-04-17 11:05:01 +00:00
$VBR = true ;
}
2011-03-28 14:21:28 +00:00
} else {
$OtherBitrate = false ;
}
2013-04-15 08:00:54 +00:00
foreach ( Misc :: display_array ( $this -> Bitrates ) as $Bitrate ) {
2013-06-02 08:01:02 +00:00
echo " \t \t \t \t \t \t <option value= \" $Bitrate\ " " ;
2013-04-20 08:01:01 +00:00
if ( $Bitrate == $Torrent [ 'Bitrate' ] || ( $OtherBitrate && $Bitrate == 'Other' )) {
2013-02-23 08:00:22 +00:00
echo ' selected="selected"' ;
2011-03-28 14:21:28 +00:00
}
2013-02-23 08:00:22 +00:00
echo '>' ;
2011-03-28 14:21:28 +00:00
echo $Bitrate ;
echo " </option> \n " ;
}
2012-10-27 08:00:09 +00:00
?>
2011-03-28 14:21:28 +00:00
</ select >
2013-04-15 08:00:54 +00:00
< span id = " other_bitrate_span " < ? if ( ! $OtherBitrate ) { echo ' class="hidden"' ; } ?> >
< input type = " text " name = " other_bitrate " size = " 5 " id = " other_bitrate " < ? if ( $OtherBitrate ) { echo ' value="' . display_str ( $Torrent [ 'Bitrate' ]) . '"' ;} ?> onchange="AltBitrate()" />
< input type = " checkbox " id = " vbr " name = " vbr " < ? if ( isset ( $VBR )) { echo ' checked="checked"' ; } ?> /><label for="vbr"> (VBR)</label>
2011-03-28 14:21:28 +00:00
</ span >
</ td >
</ tr >
2013-04-15 08:00:54 +00:00
< ? if ( $this -> NewTorrent ) { ?>
2011-03-28 14:21:28 +00:00
< tr >
2012-11-09 08:00:18 +00:00
< td class = " label " > Tags :</ td >
2011-03-28 14:21:28 +00:00
< td >
2013-07-04 08:00:56 +00:00
< input type = " text " id = " tags " name = " tags " size = " 60 " value = " <?=display_str( $Torrent['TagList'] ) ?> " < ? Users :: has_autocomplete_enabled ( 'other' ); ?> />
2011-03-28 14:21:28 +00:00
</ td >
</ tr >
2012-02-17 08:00:18 +00:00
< tr >
2012-11-09 08:00:18 +00:00
< td class = " label " > Image ( optional ) :</ td >
2013-02-23 08:00:22 +00:00
< td >< input type = " text " id = " image " name = " image " size = " 60 " value = " <?=display_str( $Torrent['Image'] ) ?> " < ? = $this -> Disabled ?> /></td>
2012-02-17 08:00:18 +00:00
</ tr >
2011-03-28 14:21:28 +00:00
< tr >
2012-11-09 08:00:18 +00:00
< td class = " label " > Description :</ td >
2011-03-28 14:21:28 +00:00
< td >
2012-10-27 08:00:09 +00:00
< ? php new TEXTAREA_PREVIEW ( 'album_desc' , 'album_desc' , display_str ( $Torrent [ 'GroupDescription' ]), 60 , 8 ); ?>
2012-09-23 08:00:25 +00:00
< p class = " min_padding " > Contains information like the track listing , a review , a link to Discogs or MusicBrainz , etc .</ p >
2011-03-28 14:21:28 +00:00
</ td >
</ tr >
2013-05-15 08:00:54 +00:00
< ? } ?>
2011-03-28 14:21:28 +00:00
< tr >
2013-01-15 08:00:37 +00:00
< td class = " label " > Release description ( optional ) :</ td >
2011-03-28 14:21:28 +00:00
< td >
2012-10-27 08:00:09 +00:00
< ? php new TEXTAREA_PREVIEW ( 'release_desc' , 'release_desc' , display_str ( $Torrent [ 'TorrentDescription' ]), 60 , 8 ); ?>
2012-09-23 08:00:25 +00:00
< p class = " min_padding " > Contains information like encoder settings . For analog rips , this frequently contains lineage information .</ p >
2011-03-28 14:21:28 +00:00
</ td >
</ tr >
</ table >
< ?
2012-10-27 08:00:09 +00:00
TEXTAREA_PREVIEW :: JavaScript ( false );
2011-03-28 14:21:28 +00:00
} //function audiobook_form
function simple_form ( $CategoryID ) {
2012-10-27 08:00:09 +00:00
$Torrent = $this -> Torrent ;
2012-09-01 08:00:24 +00:00
?> <table cellpadding="3" cellspacing="1" border="0" class="layout border slice" width="100%">
2011-03-28 14:21:28 +00:00
< tr id = " name " >
2012-10-27 08:00:09 +00:00
< ? if ( $this -> NewTorrent ) {
2012-02-17 08:00:18 +00:00
if ( $this -> Categories [ $CategoryID ] == 'E-Books' ) { ?>
2012-11-09 08:00:18 +00:00
< td class = " label " > Author - Title :</ td >
2012-02-17 08:00:18 +00:00
< ? } else { ?>
2012-11-09 08:00:18 +00:00
< td class = " label " > Title :</ td >
2012-02-17 08:00:18 +00:00
< ? } ?>
2012-11-09 08:00:18 +00:00
< td >< input type = " text " id = " title " name = " title " size = " 60 " value = " <?=display_str( $Torrent['Title'] ) ?> " /></ td >
2012-02-17 08:00:18 +00:00
</ tr >
< tr >
2012-11-09 08:00:18 +00:00
< td class = " label " > Tags :</ td >
2013-07-04 08:00:56 +00:00
< td >< input type = " text " id = " tags " name = " tags " size = " 60 " value = " <?=display_str( $Torrent['TagList'] ) ?> " < ? Users :: has_autocomplete_enabled ( 'other' ); ?> /></td>
2012-02-17 08:00:18 +00:00
</ tr >
< tr >
2012-11-09 08:00:18 +00:00
< td class = " label " > Image ( optional ) :</ td >
2013-02-23 08:00:22 +00:00
< td >< input type = " text " id = " image " name = " image " size = " 60 " value = " <?=display_str( $Torrent['Image'] ) ?> " < ? = $this -> Disabled ?> /></td>
2012-02-17 08:00:18 +00:00
</ tr >
< tr >
2012-11-09 08:00:18 +00:00
< td class = " label " > Description :</ td >
2012-02-17 08:00:18 +00:00
< td >
2012-10-27 08:00:09 +00:00
< ? php
new TEXTAREA_PREVIEW ( 'desc' , 'desc' , display_str ( $Torrent [ 'GroupDescription' ]), 60 , 8 );
TEXTAREA_PREVIEW :: JavaScript ( false );
?>
2012-02-17 08:00:18 +00:00
</ td >
</ tr >
< ? } ?>
2011-03-28 14:21:28 +00:00
</ table >
< ? } //function simple_form
} //class
?>