Empty commit

This commit is contained in:
Git 2013-02-18 08:00:22 +00:00
parent 9291b1fd8c
commit dde2653aa2
23 changed files with 287 additions and 254 deletions

View File

@ -28,7 +28,13 @@
error('Memcache Extension not loaded.');
}
class CACHE extends Memcache {
class CACHE extends Memcache
{
/**
* Torrent Group cache version
*/
const GROUP_VERSION = 4;
public $CacheHits = array();
public $MemcacheDBArray = array();
public $MemcacheDBKey = '';

View File

@ -109,7 +109,9 @@ function decode($Type, $Key){
$this->Val[$Key] = new BENCODE_DICT(substr($this->Str, $this->Pos));
$this->Pos += $this->Val[$Key]->Pos;
// Sort by key to respect spec
if (!empty($this->Val[$Key]->Val)) {
ksort($this->Val[$Key]->Val);
}
} else {
die('Invalid torrent file');
@ -131,7 +133,7 @@ function encode($Val){
class BENCODE_LIST extends BENCODE {
function enc(){
if(empty($this->Val)) {
if (empty($this->Val)) {
return 'le';
}
$Str = 'l';
@ -160,7 +162,7 @@ function dec(){
// Decode the bencoded element.
// This function changes $this->Pos and $this->Val, so you don't have to.
$this->decode($Type, $Key);
++ $Key;
++$Key;
}
return true;
}
@ -168,6 +170,9 @@ function dec(){
class BENCODE_DICT extends BENCODE {
function enc(){
if (empty($this->Val)) {
return 'de';
}
$Str = 'd';
reset($this->Val);
foreach ($this->Val as $Key => $Value) {

View File

@ -209,7 +209,7 @@ function music_form($GenreTags) {
</select>
<? if ($FirstArtist) {
if (!$this->DisabledFlag) { ?>
[<a href="javascript:AddArtistField()">+</a>] [<a href="javascript:RemoveArtistField()">-</a>]
<a href="javascript:AddArtistField()" class="brackets">+</a> <a href="javascript:RemoveArtistField()" class="brackets">&minus;</a>
<? }
$FirstArtist = false;
} ?>
@ -228,7 +228,7 @@ function music_form($GenreTags) {
<option value="3">Remixer</option>
<option value="7">Producer</option>
</select>
[<a href="#" onclick="AddArtistField();return false;">+</a>] [<a href="#" onclick="RemoveArtistField();return false;">-</a>]
<a href="#" onclick="AddArtistField();return false;" class="brackets">+</a> <a href="#" onclick="RemoveArtistField();return false;" class="brackets">&minus;</a>
<?
}
?>
@ -462,8 +462,8 @@ function show() {
Log files:
</td>
<td id="logfields">
Check your log files before uploading <a href="logchecker.php" target="_blank">here</a>. For multi-disc releases, click the [+] button to add multiple log files.<br />
<input id="file" type="file" multiple="multiple" name="logfiles[]" size="50" /> [<a href="javascript:;" onclick="AddLogField();">+</a>] [<a href="javascript:;" onclick="RemoveLogField();">-</a>]
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>
</td>
</tr>
<?

View File

@ -57,7 +57,7 @@ public static function get_groups($GroupIDs, $Return = true, $GetArtists = true,
foreach ($GroupIDs as $GroupID) {
$Data = $Cache->get_value($Key.$GroupID, true);
if (!empty($Data) && (@$Data['ver'] >= 4)) {
if (!empty($Data) && (@$Data['ver'] == CACHE::GROUP_VERSION)) {
unset($NotFound[$GroupID]);
$Found[$GroupID] = $Data['d'];
}

View File

@ -492,9 +492,9 @@ CREATE TABLE `permissions` (
CREATE TABLE `pm_conversations` (
`ID` int(12) NOT NULL AUTO_INCREMENT,
`Subject` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`Subject` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci;
CREATE TABLE `pm_conversations_users` (
`UserID` int(10) NOT NULL DEFAULT '0',

View File

@ -705,7 +705,7 @@ function compare($X, $Y){
<li>
<span title="<?=$Score?>"><a href="artist.php?id=<?=$Artist2ID?>" style="float:left; display:block;"><?=$Artist2Name?></a></span>
<div style="float:right; display:block; letter-spacing: -1px;">
<a href="artist.php?action=vote_similar&amp;artistid=<?=$ArtistID?>&amp;similarid=<?=$SimilarID?>&amp;way=down" style="font-family: monospace;" title="Vote down this similar artist. Use this when you feel that the two artists are not all that similar." class="brackets">-</a>
<a href="artist.php?action=vote_similar&amp;artistid=<?=$ArtistID?>&amp;similarid=<?=$SimilarID?>&amp;way=down" style="font-family: monospace;" title="Vote down this similar artist. Use this when you feel that the two artists are not all that similar." class="brackets">&minus;</a>
<a href="artist.php?action=vote_similar&amp;artistid=<?=$ArtistID?>&amp;similarid=<?=$SimilarID?>&amp;way=up" style="font-family: monospace;" title="Vote up this similar artist. Use this when you feel that the two artists are quite similar." class="brackets">+</a>
<? if(check_perms('site_delete_tag')) { ?>
<span class="remove remove_artist"><a href="artist.php?action=delete_similar&amp;similarid=<?=$SimilarID?>&amp;auth=<?=$LoggedUser['AuthKey']?>" title="Remove this similar artist" class="brackets">X</a></span>

View File

@ -22,9 +22,11 @@
$DB->query("SELECT t.GroupID, x.fid
FROM ".($SeedingOnly ? 'xbt_files_users' : 'xbt_snatched')." AS x
JOIN torrents AS t ON t.ID=x.fid
JOIN torrents_group AS tg ON tg.ID = t.GroupID
WHERE t.Format='FLAC'
AND ((t.LogScore = '100' AND t.Media = 'CD')
OR t.Media != 'CD')
AND tg.CategoryID = 1
AND x.uid='$UserID'");
$SnatchedTorrentIDs = array_fill_keys($DB->collect('fid'), true);
@ -45,7 +47,7 @@
CRC32(CONCAT_WS(' ', Media, Remasteryear, Remastertitle,
Remasterrecordlabel, Remastercataloguenumber)) AS RemIdent
FROM torrents AS t
WHERE t.GroupID IN(".implode(',',$SnatchedGroupIDs).")
WHERE t.GroupID IN(".implode(',',$SnatchedGroupIDs).") AND t.Format IN ('FLAC', 'MP3')
GROUP BY t.GroupID, RemIdent");
//$DB->query('SELECT * FROM t');
@ -97,19 +99,20 @@
'RemasterCatalogueNumber' => $Torrent['RemasterCatalogueNumber']
);
}
if (isset($EncodingKeys[$Torrent['Encoding']])) {
if ($Torrent['Format'] == 'MP3' && isset($EncodingKeys[$Torrent['Encoding']])) {
$TorrentGroups[$Group['ID']][$TorRemIdent]['Formats'][$Torrent['Encoding']] = true;
} elseif (isset($SnatchedTorrentIDs[$Torrent['ID']])) {
$TorrentGroups[$Group['ID']][$TorRemIdent]['FlacID'] = $Torrent['ID'];
}
}
}
// count how many FLAC torrents we have in this list totally (key 'total')
// how many transcodes there are missing totally (key 'miss_total')
// and for each format (keys , 'miss_V0 (VBR)', 'miss_V2 (VBR)', 'miss_320')
// the latter happens by counting the number of existing transcodes and then subtracting because that's easier
$Counter = array();
$Counter['total'] = 0;
$Counter = array(
'total' => 0, //how many FLAC torrents can be transcoded?
'miss_total' => 0, //how many transcodes are missing?
'miss_V0 (VBR)' => 0, //how many V0 transcodes are missing?
'miss_V2 (VBR)' => 0, //how many V2 transcodes are missing?
'miss_320' => 0, //how many 320 transcodes are missing?
);
foreach($TorrentGroups as $Editions) {
foreach($Editions as $Edition) {
if($Edition['FlacID'] == 0) { continue; } // no FLAC in this edition

View File

@ -72,7 +72,7 @@
'IsSnatched' => false
);
}
if (isset($EncodingKeys[$Torrent['Encoding']])) {
if ($Torrent['Format'] == 'MP3' && isset($EncodingKeys[$Torrent['Encoding']])) {
$TorrentGroups[$Group['ID']][$TorRemIdent]['Formats'][$Torrent['Encoding']] = true;
} elseif ($TorrentGroups[$Group['ID']][$TorRemIdent]['FlacID'] == 0 && $Torrent['Format'] == 'FLAC' && ($Torrent['LogScore'] == 100 || $Torrent['Media'] != 'CD')) {
$TorrentGroups[$Group['ID']][$TorRemIdent]['FlacID'] = $Torrent['ID'];
@ -133,9 +133,11 @@
}
$TorrentTags = implode(', ', $TorrentTags);
foreach ($Editions as $RemIdent => $Edition) {
if (!$Edition['FlacID']
|| !empty($Edition['Formats']) && $_GET['type'] == 3
|| $Edition['Formats'][$Encodings[$_GET['type']]] == true) {
if (!$Edition['FlacID'] //no FLAC in this group
|| !empty($Edition['Formats']) && $_GET['type'] == 3 //at least one transcode present when we only wanted groups containing no transcodes at all (type 3)
|| $Edition['Formats'][$Encodings[$_GET['type']]] == true //the transcode we asked for is already there
|| count($Edition['Formats']) == 3) //all 3 transcodes are there already (this can happen due to the caching of Sphinx's better_transcode table)
{
$Debug->log_var($Edition, 'Skipping '.$RemIdent);
continue;
}

View File

@ -15,10 +15,12 @@
// Get list of FLAC uploads
$DB->query("SELECT t.GroupID, t.ID
FROM torrents AS t
JOIN torrents_group AS tg ON tg.ID = t.GroupID
WHERE
t.Format='FLAC'
AND ((t.LogScore = '100' AND t.Media = 'CD')
OR t.Media != 'CD')
AND tg.CategoryID = 1
AND t.UserID='$UserID'");
$UploadedTorrentIDs = array_fill_keys($DB->collect('ID'), true);
@ -35,7 +37,7 @@
CRC32(CONCAT_WS(' ', Media, Remasteryear, Remastertitle,
Remasterrecordlabel, Remastercataloguenumber)) AS RemIdent
FROM torrents AS t
WHERE t.GroupID IN(".implode(',',$UploadedGroupIDs).")
WHERE t.GroupID IN(".implode(',',$UploadedGroupIDs).") AND t.Format IN ('FLAC', 'MP3')
GROUP BY t.GroupID, RemIdent");
$DB->query("SELECT GroupID FROM temp_sections_better_upload
@ -85,7 +87,7 @@
'RemasterCatalogueNumber' => $Torrent['RemasterCatalogueNumber']
);
}
if (isset($EncodingKeys[$Torrent['Encoding']])) {
if ($Torrent['Format'] == 'MP3' && isset($EncodingKeys[$Torrent['Encoding']])) {
$TorrentGroups[$Group['ID']][$TorRemIdent]['Formats'][$Torrent['Encoding']] = true;
$Counter['existing'][$Torrent['Encoding']] += 1;
} elseif (isset($UploadedTorrentIDs[$Torrent['ID']])) {
@ -93,12 +95,13 @@
}
}
}
// count how many FLAC torrents we have in this list totally (key 'total')
// how many transcodes there are missing totally (key 'miss_total')
// and for each format (keys , 'miss_V0 (VBR)', 'miss_V2 (VBR)', 'miss_320')
// the latter happens by counting the number of existing transcodes and then subtracting because that's easier
$Counter = array();
$Counter['total'] = 0;
$Counter = array(
'total' => 0, //how many FLAC torrents can be transcoded?
'miss_total' => 0, //how many transcodes are missing?
'miss_V0 (VBR)' => 0, //how many V0 transcodes are missing?
'miss_V2 (VBR)' => 0, //how many V2 transcodes are missing?
'miss_320' => 0, //how many 320 transcodes are missing?
);
foreach($TorrentGroups as $Editions) {
foreach($Editions as $Edition) {
if($Edition['FlacID'] == 0) { continue; } // no FLAC in this edition
@ -117,6 +120,7 @@
View::show_header('Transcode Uploads');
?>
<div class="thin">
<h2>Transcode uploaded torrents</h2>
<h3>Stats</h3>
<div class="box pad">
<p>

View File

@ -50,7 +50,7 @@
continue;
}
?>
<option value="<?=$CatID?>" <?=$CatID == $CategoryID ? ' selected="selected"' : ''?>><?=$CatName?></option>
<option value="<?=$CatID?>"<?=$CatID == $CategoryID ? ' selected="selected"' : ''?>><?=$CatName?></option>
<? } ?>
</select>
</td>
@ -66,10 +66,10 @@
<td class="label">Tags</td>
<td><input type="text" name="tags" size="60" value="<?=$TagList?>" /></td>
</tr>
<? if ($CategoryID == 0) { // CategoryID==0 is "Personal" collages ?>
<? if ($CategoryID == 0) { // CategoryID==0 is for "personal" collages ?>
<tr>
<td class="label"><span title="A &quot;featured&quot; personal collage will be listed first on your profile.">Featured</span></td>
<td><input type="checkbox" name="featured" <?=($Featured?'checked':'')?> /></td>
<td class="label"><span title="A &quot;featured&quot; personal collage will be listed first on your profile, along with a preview of the included torrents.">Featured</span></td>
<td><input type="checkbox" name="featured"<?=($Featured ? ' checked="checked"' : '')?> /></td>
</tr>
<? }
if(check_perms('site_collages_delete')) { ?>

View File

@ -60,7 +60,7 @@
<tr class="colhead">
<td style="width:2%;"></td>
<td style="width:25%;">Forum</td>
<td>Last Post</td>
<td>Last post</td>
<td style="width:7%;">Topics</td>
<td style="width:7%;">Posts</td>
</tr>
@ -108,6 +108,6 @@
<? } ?>
</table>
</div>
<div class="linkbox"><a href="forums.php?action=catchup&amp;forumid=all&amp;auth=<?=$LoggedUser['AuthKey']?>">Catch up</a></div>
<div class="linkbox"><a href="forums.php?action=catchup&amp;forumid=all&amp;auth=<?=$LoggedUser['AuthKey']?>" class="brackets">Catch up</a></div>
</div>
<? View::show_footer();

View File

@ -141,7 +141,7 @@ function RemoveAnswerField() {
<td id="answer_block">
<input type="text" name="answers[]" style="width: 90%;" />
<a href="#" onclick="AddAnswerField();return false;" class="brackets">+</a>
<a href="#" onclick="RemoveAnswerField();return false;" class="brackets">-</a>
<a href="#" onclick="RemoveAnswerField();return false;" class="brackets">&minus;</a>
</td>
</tr>
<? } ?>

View File

@ -32,9 +32,14 @@
// Searching for posts by a specific user
if(!empty($_GET['user'])) {
$User = $_GET['user'];
$User = trim($_GET['user']);
$DB->query("SELECT ID FROM users_main WHERE Username='".db_string($User)."'");
list($AuthorID) = $DB->next_record();
if($AuthorID === null) {
$AuthorID = 0;
//this will cause the search to return 0 results.
//workaround in line 276 to display that the username was wrong.
}
} else {
$User = '';
}
@ -273,7 +278,7 @@
<td>Time</td>
</tr>
<? if($DB->record_count() == 0) { ?>
<tr><td colspan="3">Nothing found!</td></tr>
<tr><td colspan="3">Nothing found<?=(isset($AuthorID) && $AuthorID == 0) ? ' (unknown username)' : ''?>!</td></tr>
<? }
$Row = 'a'; // For the pretty colours

View File

@ -71,6 +71,7 @@
$DB->query('SELECT FOUND_ROWS()');
list($NumResults) = $DB->next_record();
$DB->set_query_id($Results);
$Count = $DB->record_count();
$CurURL = Format::get_url(array('sort'));
if(empty($CurURL)) {
@ -85,15 +86,15 @@
</div>
<div class="box pad">
<? if($DB->record_count()==0) { ?>
<? if($Count == 0 && empty($_GET['search'])) { ?>
<h2>Your <?= ($Section == 'sentbox') ? 'sentbox' : 'inbox' ?> is currently empty</h2>
<? } else { ?>
<form class="search_form" name="<?= ($Section == 'sentbox')?'sentbox':'inbox'?>" action="inbox.php" method="get" id="searchbox">
<div>
<input type="hidden" name="action" value="<?=$Section?>" />
<input type="radio" name="searchtype" value="user" checked="checked" /> User
<input type="radio" name="searchtype" value="subject" /> Subject
<input type="radio" name="searchtype" value="message" /> Message
<input type="radio" name="searchtype" value="user"<?=(empty($_GET['searchtype']) || $_GET['searchtype'] == 'user' ? ' checked="checked"' : '')?> /> User
<input type="radio" name="searchtype" value="subject"<?=(!empty($_GET['searchtype']) && $_GET['searchtype'] == 'subject' ? ' checked="checked"' : '')?> /> Subject
<input type="radio" name="searchtype" value="message"<?=(!empty($_GET['searchtype']) && $_GET['searchtype'] == 'message' ? ' checked="checked"' : '')?> /> Message
<span style="float: right;">
<? if(empty($_GET['sort']) || $_GET['sort'] != "unread") { ?>
<a href="<?=$CurURL?>sort=unread" class="brackets">List unread first</a>
@ -102,7 +103,7 @@
<? } ?>
</span>
<br />
<input type="text" name="search" value="Search <?= ($Section == 'sentbox') ? 'Sentbox' : 'Inbox' ?>" style="width: 98%;"
<input type="text" name="search" value="<?=(!empty($_GET['search']) ? display_str($_GET['search']) : 'Search '.($Section == 'sentbox' ? 'Sentbox' : 'Inbox'))?>" style="width: 98%;"
onfocus="if (this.value == 'Search <?= ($Section == 'sentbox') ? 'Sentbox' : 'Inbox' ?>') this.value='';"
onblur="if (this.value == '') this.value='Search <?= ($Section == 'sentbox') ? 'Sentbox' : 'Inbox' ?>';"
/>
@ -126,6 +127,11 @@
<? } ?>
</tr>
<?
if($Count == 0) {?>
<tr class="a">
<td colspan="5">No results.</td>
</tr>
<? } else {
$Row = 'a';
while(list($ConvID, $Subject, $Unread, $Sticky, $ForwardedID, $SenderID, $Date) = $DB->next_record()) {
if($Unread === '1') {
@ -138,8 +144,8 @@
<tr class="<?=$RowClass?>">
<td class="center"><input type="checkbox" name="messages[]=" value="<?=$ConvID?>" /></td>
<td>
<? if($Unread) { echo '<strong>'; } ?>
<? if($Sticky) { echo 'Sticky: '; }
<? if($Unread) { echo '<strong>'; }
if($Sticky) { echo 'Sticky: '; }
?>
<a href="inbox.php?action=viewconv&amp;id=<?=$ConvID?>"><?=$Subject?></a>
<?
@ -151,7 +157,8 @@
<td><?=($ForwardedID && $ForwardedID != $LoggedUser['ID'] ? Users::format_username($ForwardedID, false, false, false):'')?></td>
<? } ?>
</tr>
<? } ?>
<? }
}?>
</table>
<input type="submit" name="read" value="Mark as read" />&nbsp;
<input type="submit" name="unread" value="Mark as unread" />&nbsp;

View File

@ -11,7 +11,7 @@
<div class="box">
<div class="head colhead_dark"><strong>Featured Album</strong></div>
<div class="center pad"><?=Artists::display_artists($Artists, true, true)?><a href="torrents.php?id=<?=$FeaturedAlbum['GroupID']?>"><?=$FeaturedAlbum['Name']?></a></div>
<div class="center"><a href="torrents.php?id=<?=$FeaturedAlbum['GroupID']?>" title="<?=Artists::display_artists($Artists, false, false)?> - <?=$FeaturedAlbum['Name']?>"><img src="<?=to_thumbnail($FeaturedAlbum['WikiImage'])?>" alt="<?=Artists::display_artists($Artists, false, false)?> - <?=$FeaturedAlbum['Name']?>" width="100%" /></a></div>
<div class="center"><a href="torrents.php?id=<?=$FeaturedAlbum['GroupID']?>" title="<?=Artists::display_artists($Artists, false, false)?> - <?=$FeaturedAlbum['Name']?>"><img src="<?=$FeaturedAlbum['WikiImage']?>" alt="<?=Artists::display_artists($Artists, false, false)?> - <?=$FeaturedAlbum['Name']?>" width="100%" /></a></div>
<div class="center pad"><a href="forums.php?action=viewthread&amp;threadid=<?=$FeaturedAlbum['ThreadID']?>"><em>Read the interview with the artist, discuss here</em></a></div>
</div>
<?

View File

@ -37,7 +37,7 @@
if($LastGroupID != $GroupID) {
$CachedData = $Cache->get_value('torrent_group_'.$GroupID);
if($CachedData !== false) {
if(isset($CachedData['ver']) && $CachedData['ver'] >= 4) {
if(isset($CachedData['ver']) && $CachedData['ver'] == CACHE::GROUP_VERSION) {
$CachedStats = &$CachedData['d']['Torrents'];
}
} else {

View File

@ -147,7 +147,7 @@
<td>
<select id="categories" name="type" onchange="Categories()">
<? foreach(Misc::display_array($Categories) as $Cat){ ?>
<option value='<?=$Cat?>' <?=(!empty($CategoryName) && ($CategoryName == $Cat) ? 'selected="selected"' : '')?>><?=$Cat?></option>
<option value="<?=$Cat?>"<?=(!empty($CategoryName) && ($CategoryName == $Cat) ? ' selected="selected"' : '')?>><?=$Cat?></option>
<? } ?>
</select>
</td>
@ -173,7 +173,7 @@
<option value="3"<?=($Importance == '3' ? ' selected="selected"' : '')?>>Remixer</option>
<option value="3"<?=($Importance == '7' ? ' selected="selected"' : '')?>>Producer</option>
</select>
<?if($First) { ?><a href="#" onclick="AddArtistField();return false;" class="brackets">+</a> <a href="#" onclick="RemoveArtistField();return false;" class="brackets">-</a> <? } $First = false;?>
<?if($First) { ?><a href="#" onclick="AddArtistField();return false;" class="brackets">+</a> <a href="#" onclick="RemoveArtistField();return false;" class="brackets">&minus;</a> <? } $First = false;?>
<br />
<? }
}
@ -187,7 +187,7 @@
<option value="6">DJ / Compiler</option>
<option value="3">Remixer</option>
</select>
<a href="#" onclick="AddArtistField();return false;" class="brackets">+</a> <a href="#" onclick="RemoveArtistField();return false;" class="brackets">-</a>
<a href="#" onclick="AddArtistField();return false;" class="brackets">+</a> <a href="#" onclick="RemoveArtistField();return false;" class="brackets">&minus;</a>
<?
}
?>
@ -201,13 +201,13 @@
</td>
</tr>
<tr id="cataloguenumber_tr">
<td class="label">Record Label</td>
<td class="label">Record label</td>
<td>
<input type="text" name="recordlabel" size="45" value="<?=(!empty($RecordLabel) ? display_str($RecordLabel) : '')?>" />
</td>
</tr>
<tr id="cataloguenumber_tr">
<td class="label">Catalogue Number</td>
<td class="label">Catalogue number</td>
<td>
<input type="text" name="cataloguenumber" size="15" value="<?=(!empty($CatalogueNumber) ? display_str($CatalogueNumber) : '')?>" />
</td>
@ -252,21 +252,21 @@
</select>
<input type="text" id="tags" name="tags" size="45" value="<?=(!empty($Tags) ? display_str($Tags) : '')?>" />
<br />
Tags should be comma separated, and you should use a period ('.') to separate words inside a tag - eg. '<strong style="color:green;">hip.hop</strong>'.
Tags should be comma-separated, and you should use a period (".") to separate words inside a tag &mdash; e.g. "<strong class="important_text_alt">hip.hop</strong>".
<br /><br />
There is a list of official tags to the left of the text box. Please use these tags instead of 'unofficial' tags (eg. use the official '<strong style="color:green;">drum.and.bass</strong>' tag, instead of an unofficial '<strong style="color:red;">dnb</strong>' tag.)
There is a list of official tags to the left of the text box. Please use these tags instead of "unofficial" tags (e.g. use the official "<strong class="important_text_alt">drum.and.bass</strong>" tag, instead of an unofficial "<strong class="important_text">dnb</strong>" tag.).
</td>
</tr>
<? if($NewRequest || $CanEdit) { ?>
<tr id="releasetypes_tr">
<td class="label">Release Type</td>
<td class="label">Release type</td>
<td>
<select id="releasetype" name="releasetype">
<option value='0'>---</option>
<?
foreach ($ReleaseTypes as $Key => $Val) {
//echo '<h1>'.$ReleaseType.'</h1>'; die();
?> <option value='<?=$Key?>' <?=(!empty($ReleaseType) ? ($Key == $ReleaseType ?" selected='selected'" : "") : '') ?>><?=$Val?></option>
?> <option value="<?=$Key?>"<?=(!empty($ReleaseType) ? ($Key == $ReleaseType ? ' selected="selected"' : '') : '') ?>><?=$Val?></option>
<?
}
?>
@ -274,7 +274,7 @@
</td>
</tr>
<tr id="formats_tr">
<td class="label">Allowed Formats</td>
<td class="label">Allowed formats</td>
<td>
<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>
@ -286,7 +286,7 @@
</td>
</tr>
<tr id="bitrates_tr">
<td class="label">Allowed Bitrates</td>
<td class="label">Allowed bitrates</td>
<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) {
@ -298,7 +298,7 @@
</td>
</tr>
<tr id="media_tr">
<td class="label">Allowed Media</td>
<td class="label">Allowed media</td>
<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) {
@ -312,10 +312,10 @@
<tr id="logcue_tr" class="hidden">
<td class="label">Log / Cue (CD FLAC only)</td>
<td>
<input type="checkbox" id="needlog" name="needlog" onchange="ToggleLogScore()" <?=(!empty($NeedLog) ? 'checked="checked" ' : '')?>/><label for="needlog"> Require Log</label>
<span id="minlogscore_span" class="hidden">&nbsp;<input type="text" name="minlogscore" id="minlogscore" size="4" value="<?=(!empty($MinLogScore) ? $MinLogScore : '')?>" /> Minimum Log Score</span>
<input type="checkbox" id="needlog" name="needlog" onchange="ToggleLogScore()" <?=(!empty($NeedLog) ? 'checked="checked" ' : '')?>/><label for="needlog"> Require log</label>
<span id="minlogscore_span" class="hidden">&nbsp;<input type="text" name="minlogscore" id="minlogscore" size="4" value="<?=(!empty($MinLogScore) ? $MinLogScore : '')?>" /> Minimum log score</span>
<br />
<input type="checkbox" id="needcue" name="needcue" <?=(!empty($NeedCue) ? 'checked="checked" ' : '')?>/><label for="needcue"> Require Cue</label>
<input type="checkbox" id="needcue" name="needcue" <?=(!empty($NeedCue) ? 'checked="checked" ' : '')?>/><label for="needcue"> Require cue</label>
<br />
</td>
</tr>
@ -328,7 +328,7 @@
</tr>
<? if(check_perms('site_moderate_requests')) { ?>
<tr>
<td class="label">Torrent Group</td>
<td class="label">Torrent group</td>
<td>
https://what.cd/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.
@ -337,7 +337,7 @@
<? } elseif ($GroupID && ($CategoryID == 1)) {
?>
<tr>
<td class="label">Torrent Group</td>
<td class="label">Torrent group</td>
<td>
<a href="torrents.php?id=<?=$GroupID?>">https://what.cd/torrents.php?id=<?=$GroupID?></a><br />
This request <?=($NewRequest?'will be':'is')?> associated with the above torrent group.
@ -354,8 +354,8 @@
<td>
<input type="text" id="amount_box" size="8" value="<?=(!empty($Bounty) ? $Bounty : '100')?>" onchange="Calculate();" />
<select id="unit" name="unit" onchange="Calculate();">
<option value='mb'<?=(!empty($_POST['unit']) && $_POST['unit'] == 'mb' ? ' selected="selected"' : '') ?>>MB</option>
<option value='gb'<?=(!empty($_POST['unit']) && $_POST['unit'] == 'gb' ? ' selected="selected"' : '') ?>>GB</option>
<option value="mb"<?=(!empty($_POST['unit']) && $_POST['unit'] == 'mb' ? ' selected="selected"' : '') ?>>MB</option>
<option value="gb"<?=(!empty($_POST['unit']) && $_POST['unit'] == 'gb' ? ' selected="selected"' : '') ?>>GB</option>
</select>
<input type="button" value="Preview" onclick="Calculate();" />
<strong><?=($RequestTax * 100)?>% of this is deducted as tax by the system.</strong>
@ -386,7 +386,7 @@
<? } ?>
</table>
</form>
<script type="text/javascript" >ToggleLogCue(); <?=$NewRequest ? "Calculate();" : '' ?></script>
<script type="text/javascript">ToggleLogCue(); <?=$NewRequest ? "Calculate();" : '' ?></script>
<script type="text/javascript">Categories();</script>
</div>
</div>

View File

@ -207,6 +207,7 @@
$GroupSnatched = true;
}
}
unset($Torrent);
$SnatchedGroupClass = $GroupSnatched ? ' snatched_group' : '';
?>
<tr class="group discog<?=$SnatchedGroupClass?>" id="group_<?=$GroupID?>">

View File

@ -322,7 +322,7 @@ function compare($X, $Y){
<li>
<a href="torrents.php?taglist=<?=$Tag['name']?>" style="float:left; display:block;"><?=display_str($Tag['name'])?></a>
<div style="float:right; display:block; letter-spacing: -1px;" class="edit_tags_votes">
<a href="torrents.php?action=vote_tag&amp;way=down&amp;groupid=<?=$GroupID?>&amp;tagid=<?=$Tag['id']?>&amp;auth=<?=$LoggedUser['AuthKey']?>" style="font-family: monospace;" title="Vote this tag down" class="brackets vote_tag_down">-</a>
<a href="torrents.php?action=vote_tag&amp;way=down&amp;groupid=<?=$GroupID?>&amp;tagid=<?=$Tag['id']?>&amp;auth=<?=$LoggedUser['AuthKey']?>" style="font-family: monospace;" title="Vote this tag down" class="brackets vote_tag_down">&minus;</a>
<?=$Tag['score']?>
<a href="torrents.php?action=vote_tag&amp;way=up&amp;groupid=<?=$GroupID?>&amp;tagid=<?=$Tag['id']?>&amp;auth=<?=$LoggedUser['AuthKey']?>" style="font-family: monospace;" title="Vote this tag up" class="brackets vote_tag_up">+</a>
<? if(check_perms('users_warn')){ ?>
@ -666,7 +666,7 @@ function filelist($Str) {
<span id="vote_count_<?=$Request['ID']?>"><?=count($RequestVotes['Voters'])?></span>
<input type="hidden" id="requestid_<?=$Request['ID']?>" name="requestid" value="<?=$Request['ID']?>" />
<input type="hidden" id="auth" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
&nbsp;&nbsp; <a href="javascript:Vote(0, <?=$Request['ID']?>)"><strong>(+)</strong></a>
&nbsp;&nbsp; <a href="javascript:Vote(0, <?=$Request['ID']?>)" class="brackets">+</a>
</form>
</td>
<td><?=Format::get_size($RequestVotes['TotalBounty'])?></td>

View File

@ -152,7 +152,7 @@ function checked($Checked) {
<noscript>Please enable JavaScript to use these options.</noscript>
<a href="#" id="toggle_sortable">Expand</a>
<div id="sortable_container" style="display: none;">
<a href="#" id="reset_sortable">Reset to Default</a>
<a href="#" id="reset_sortable">Reset to default</a>
<ul class="sortable_list" id="sortable">
<?Users::release_order()?>
</ul>
@ -198,28 +198,28 @@ function checked($Checked) {
<tr>
<td class="label"><strong>Subscription</strong></td>
<td>
<input type="checkbox" name="autosubscribe" id="autosubscribe" <? if (!empty($SiteOptions['AutoSubscribe'])) { ?>checked="checked"<? } ?> />
<input type="checkbox" name="autosubscribe" id="autosubscribe"<? if (!empty($SiteOptions['AutoSubscribe'])) { ?> checked="checked"<? } ?> />
<label for="autosubscribe">Subscribe to topics when posting</label>
</td>
</tr>
<tr>
<td class="label"><strong>Quote notifications</strong></td>
<td>
<input type="checkbox" name="notifyquotes" id="notifyquotes" <? if (!empty($SiteOptions['NotifyOnQuote'])) { ?>checked="checked"<? } ?> />
<input type="checkbox" name="notifyquotes" id="notifyquotes"<? if (!empty($SiteOptions['NotifyOnQuote'])) { ?> checked="checked"<? } ?> />
<label for="notifyquotes">Notifications when someone quotes you in the forum</label>
</td>
</tr>
<tr>
<td class="label"><strong>Smileys</strong></td>
<td>
<input type="checkbox" name="disablesmileys" id="disablesmileys" <? if (!empty($SiteOptions['DisableSmileys'])) { ?>checked="checked"<? } ?> />
<input type="checkbox" name="disablesmileys" id="disablesmileys"<? if (!empty($SiteOptions['DisableSmileys'])) { ?> checked="checked"<? } ?> />
<label for="disablesmileys">Disable smileys</label>
</td>
</tr>
<tr>
<td class="label"><strong>Mature content</strong></td>
<td>
<input type="checkbox" name="enablematurecontent" id="enablematurecontent" <? if (!empty($SiteOptions['EnableMatureContent'])) { ?>checked="checked"<? } ?> />
<input type="checkbox" name="enablematurecontent" id="enablematurecontent"<? if (!empty($SiteOptions['EnableMatureContent'])) { ?> checked="checked"<? } ?> />
<label for="enablematurecontent">Show mature content</label>
</td>
</tr>
@ -274,7 +274,7 @@ function checked($Checked) {
</tr>
<tr class="colhead_dark">
<td colspan="2">
<strong>User info</strong>
<strong>User information</strong>
</td>
</tr>
<tr>

View File

@ -167,7 +167,7 @@ function user_dupes_table($UserID) {
<input type="hidden" id="auth" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
<input type="hidden" id="form_comment_hash" name="form_comment_hash" value="<?=$CommentHash?>" />
<div class="box">
<div class="head"><?=max($DupeCount - 1, 0)?> Linked Account<?=(($DupeCount == 2)?'':'s')?> <a href="#" onclick="$('.linkedaccounts').toggle(); return false;">(View)</a></div>
<div class="head"><?=max($DupeCount - 1, 0)?> linked account<?=(($DupeCount == 2)?'':'s')?> <a href="#" onclick="$('.linkedaccounts').toggle(); return false;">(View)</a></div>
<table width="100%" class="layout hidden linkedaccounts">
<?=$DupeCount?'<tr>':''?>
<?

View File

@ -158,21 +158,21 @@ function check_paranoia_here($Setting) {
<h2><?=$Username?></h2>
<div class="linkbox">
<? if (!$OwnProfile) { ?>
<a href="inbox.php?action=compose&amp;to=<?=$UserID?>" class="brackets">Send Message</a>
<a href="inbox.php?action=compose&amp;to=<?=$UserID?>" class="brackets">Send message</a>
<? if(check_perms("users_mod")) {
$DB->query("SELECT PushService FROM users_push_notifications WHERE UserID = '$UserID'");
if($DB->record_count() > 0) { ?>
<a
href="user.php?action=take_push&amp;push=1&amp;userid=<?=$UserID?>&amp;auth=<?=$LoggedUser['AuthKey']?>" class="brackets"
>Push User</a>
>Push user</a>
<? }
}
$DB->query("SELECT FriendID FROM friends WHERE UserID='$LoggedUser[ID]' AND FriendID='$UserID'");
if($DB->record_count() == 0) { ?>
<a href="friends.php?action=add&amp;friendid=<?=$UserID?>&amp;auth=<?=$LoggedUser['AuthKey']?>" class="brackets">Add to friends</a>
<? }?>
<a href="reports.php?action=report&amp;type=user&amp;id=<?=$UserID?>" class="brackets">Report User</a>
<a href="reports.php?action=report&amp;type=user&amp;id=<?=$UserID?>" class="brackets">Report user</a>
<?
}
@ -224,25 +224,25 @@ function check_paranoia_here($Setting) {
<ul class="stats nobullet">
<li>Joined: <?=$JoinedDate?></li>
<? if (($Override = check_paranoia_here('lastseen'))) { ?>
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?>>Last seen: <?=$LastAccess?></li>
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?>>Last seen: <?=$LastAccess?></li>
<? } ?>
<? if (($Override=check_paranoia_here('uploaded'))) { ?>
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?> title="<?=Format::get_size($Uploaded, 5)?>">Uploaded: <?=Format::get_size($Uploaded)?></li>
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?> title="<?=Format::get_size($Uploaded, 5)?>">Uploaded: <?=Format::get_size($Uploaded)?></li>
<? } ?>
<? if (($Override=check_paranoia_here('downloaded'))) { ?>
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?> title="<?=Format::get_size($Downloaded, 5)?>">Downloaded: <?=Format::get_size($Downloaded)?></li>
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?> title="<?=Format::get_size($Downloaded, 5)?>">Downloaded: <?=Format::get_size($Downloaded)?></li>
<? } ?>
<? if (($Override=check_paranoia_here('ratio'))) { ?>
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?>>Ratio: <?=Format::get_ratio_html($Uploaded, $Downloaded)?></li>
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?>>Ratio: <?=Format::get_ratio_html($Uploaded, $Downloaded)?></li>
<? } ?>
<? if (($Override=check_paranoia_here('requiredratio')) && isset($RequiredRatio)) { ?>
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?>>Required ratio: <?=number_format((double)$RequiredRatio, 2)?></li>
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?>>Required ratio: <?=number_format((double)$RequiredRatio, 2)?></li>
<? } ?>
<? if ($OwnProfile || ($Override=check_paranoia_here(false)) || check_perms('users_mod')) { ?>
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?>><a href="userhistory.php?action=token_history&amp;userid=<?=$UserID?>">Tokens</a>: <?=number_format($FLTokens)?></li>
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?>><a href="userhistory.php?action=token_history&amp;userid=<?=$UserID?>">Tokens</a>: <?=number_format($FLTokens)?></li>
<? }
if (($OwnProfile || check_perms('users_mod')) && $Warned!='0000-00-00 00:00:00') { ?>
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?>>Warning expires: <?= date('Y-m-d h:i', strtotime($Warned)) ?></li>
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?>>Warning expires: <?= date('Y-m-d h:i', strtotime($Warned)) ?></li>
<? } ?>
</ul>
</div>
@ -302,26 +302,26 @@ function check_paranoia_here($Setting) {
?>
<div class="box box_info box_userinfo_percentile">
<div class="head colhead_dark">Percentile Rankings (Hover for values)</div>
<div class="head colhead_dark">Percentile rankings (hover for values)</div>
<ul class="stats nobullet">
<? if (($Override=check_paranoia_here('uploaded'))) { ?>
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?> title="<?=Format::get_size($Uploaded)?>">Data uploaded: <?=$UploadedRank === false ? 'Server busy' : number_format($UploadedRank)?></li>
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?> title="<?=Format::get_size($Uploaded)?>">Data uploaded: <?=$UploadedRank === false ? 'Server busy' : number_format($UploadedRank)?></li>
<? } ?>
<? if (($Override=check_paranoia_here('downloaded'))) { ?>
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?> title="<?=Format::get_size($Downloaded)?>">Data downloaded: <?=$DownloadedRank === false ? 'Server busy' : number_format($DownloadedRank)?></li>
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?> title="<?=Format::get_size($Downloaded)?>">Data downloaded: <?=$DownloadedRank === false ? 'Server busy' : number_format($DownloadedRank)?></li>
<? } ?>
<? if (($Override=check_paranoia_here('uploads+'))) { ?>
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?> title="<?=number_format($Uploads)?>">Torrents uploaded: <?=$UploadsRank === false ? 'Server busy' : number_format($UploadsRank)?></li>
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?> title="<?=number_format($Uploads)?>">Torrents uploaded: <?=$UploadsRank === false ? 'Server busy' : number_format($UploadsRank)?></li>
<? } ?>
<? if (($Override=check_paranoia_here('requestsfilled_count'))) { ?>
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?> title="<?=number_format($RequestsFilled)?>">Requests filled: <?=$RequestRank === false ? 'Server busy' : number_format($RequestRank)?></li>
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?> title="<?=number_format($RequestsFilled)?>">Requests filled: <?=$RequestRank === false ? 'Server busy' : number_format($RequestRank)?></li>
<? } ?>
<? if (($Override=check_paranoia_here('requestsvoted_bounty'))) { ?>
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?> title="<?=Format::get_size($TotalSpent)?>">Bounty spent: <?=$BountyRank === false ? 'Server busy' : number_format($BountyRank)?></li>
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?> title="<?=Format::get_size($TotalSpent)?>">Bounty spent: <?=$BountyRank === false ? 'Server busy' : number_format($BountyRank)?></li>
<? } ?>
<li title="<?=number_format($ForumPosts)?>">Posts made: <?=$PostRank === false ? 'Server busy' : number_format($PostRank)?></li>
<? if (($Override=check_paranoia_here('artistsadded'))) { ?>
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?> title="<?=number_format($ArtistsAdded)?>">Artists added: <?=$ArtistsRank === false ? 'Server busy' : number_format($ArtistsRank)?></li>
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?> title="<?=number_format($ArtistsAdded)?>">Artists added: <?=$ArtistsRank === false ? 'Server busy' : number_format($ArtistsRank)?></li>
<? } ?>
<? if (check_paranoia_here(array('uploaded', 'downloaded', 'uploads+', 'requestsfilled_count', 'requestsvoted_bounty', 'artistsadded'))) { ?>
<li><strong>Overall rank: <?=$OverallRank === false ? 'Server busy' : number_format($OverallRank)?></strong></li>
@ -356,7 +356,7 @@ function check_paranoia_here($Setting) {
}
if (check_perms('users_view_ips',$Class)) {
?>
<li>IPs: <?=number_format($IPChanges)?> <a href="userhistory.php?action=ips&amp;userid=<?=$UserID?>" class="brackets">View</a>&nbsp;<a href="userhistory.php?action=ips&amp;userid=<?=$UserID?>&amp;usersonly=1" class="brackets">View Users</a></li>
<li>IPs: <?=number_format($IPChanges)?> <a href="userhistory.php?action=ips&amp;userid=<?=$UserID?>" class="brackets">View</a>&nbsp;<a href="userhistory.php?action=ips&amp;userid=<?=$UserID?>&amp;usersonly=1" class="brackets">View users</a></li>
<? if (check_perms('users_view_ips',$Class) && check_perms('users_mod',$Class)) { ?>
<li>Tracker IPs: <?=number_format($TrackerIPs)?> <a href="userhistory.php?action=tracker_ips&amp;userid=<?=$UserID?>" class="brackets">View</a></li>
<? } ?>
@ -528,7 +528,7 @@ function check_paranoia_here($Setting) {
?>
<table class="layout recent" id="recent_snatches" cellpadding="0" cellspacing="0" border="0">
<tr class="colhead">
<td colspan="5">Recent Snatches</td>
<td colspan="5">Recent snatches</td>
</tr>
<tr>
<?
@ -568,7 +568,7 @@ function check_paranoia_here($Setting) {
?>
<table class="layout recent" id="recent_uploads" cellpadding="0" cellspacing="0" border="0">
<tr class="colhead">
<td colspan="5">Recent Uploads</td>
<td colspan="5">Recent uploads</td>
</tr>
<tr>
<? foreach($RecentUploads as $RU) { ?>
@ -640,7 +640,7 @@ function check_paranoia_here($Setting) {
$Tree = new INVITE_TREE($UserID, array('visible'=>false));
?>
<div class="box">
<div class="head">Invite Tree <a href="#" onclick="$('#invitetree').toggle();return false;">(View)</a></div>
<div class="head">Invite tree <a href="#" onclick="$('#invitetree').toggle();return false;">(View)</a></div>
<div id="invitetree" class="hidden">
<? $Tree->make_tree(); ?>
</div>
@ -733,7 +733,7 @@ function check_paranoia_here($Setting) {
<span id="vote_count_<?=$RequestID?>"><?=$Votes?></span>
<? if(check_perms('site_vote')){ ?>
<input type="hidden" id="auth" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
&nbsp;&nbsp; <a href="javascript:Vote(0, <?=$RequestID?>)"><strong>(+)</strong></a>
&nbsp;&nbsp; <a href="javascript:Vote(0, <?=$RequestID?>)" class="brackets">+</a>
<? } ?>
</td>
<td>
@ -821,7 +821,7 @@ function check_paranoia_here($Setting) {
if($DB->record_count() > 0) {
?>
<div class="box">
<div class="head">Forum Warnings</div>
<div class="head">Forum warnings</div>
<div class="pad">
<div id="forumwarningslinks" class="AdminComment box" style="width:98%;"><?=$Text->full_format($ForumWarnings)?></div>
</div>
@ -837,7 +837,7 @@ function check_paranoia_here($Setting) {
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
<div class="box">
<div class="head">Staff Notes
<div class="head">Staff notes
<a href="#" name="admincommentbutton" onclick="ChangeTo('text'); return false;">(Edit)</a>
<a href="#" onclick="$('#staffnotes').toggle(); return false;">(Toggle)</a>
</div>
@ -845,7 +845,7 @@ function check_paranoia_here($Setting) {
<input type="hidden" name="comment_hash" value="<?=$CommentHash?>" />
<div id="admincommentlinks" class="AdminComment box" style="width:98%;"><?=$Text->full_format($AdminComment)?></div>
<textarea id="admincomment" onkeyup="resize('admincomment');" class="AdminComment hidden" name="AdminComment" cols="65" rows="26" style="width:98%;"><?=display_str($AdminComment)?></textarea>
<a href="#" name="admincommentbutton" onclick="ChangeTo('text'); return false;">Toggle Edit</a>
<a href="#" name="admincommentbutton" onclick="ChangeTo('text'); return false;" class="brackets">Toggle edit</a>
<script type="text/javascript">
resize('admincomment');
</script>
@ -854,7 +854,7 @@ function check_paranoia_here($Setting) {
<table class="layout">
<tr class="colhead">
<td colspan="2">User Info</td>
<td colspan="2">User information</td>
</tr>
<? if (check_perms('users_edit_usernames', $Class)) { ?>
<tr>
@ -866,7 +866,7 @@ function check_paranoia_here($Setting) {
if (check_perms('users_edit_titles')) {
?>
<tr>
<td class="label">Custom Title:</td>
<td class="label">Custom title:</td>
<td><input type="text" size="50" name="Title" value="<?=display_str($CustomTitle)?>" /></td>
</tr>
<?
@ -875,7 +875,7 @@ function check_paranoia_here($Setting) {
if (check_perms('users_promote_below', $Class) || check_perms('users_promote_to', $Class-1)) {
?>
<tr>
<td class="label">Primary Class:</td>
<td class="label">Primary class:</td>
<td>
<select name="Class">
<?
@ -883,9 +883,9 @@ function check_paranoia_here($Setting) {
if (check_perms('users_promote_below', $Class) && $CurClass['ID']>=$LoggedUser['EffectiveClass']) { break; }
if ($CurClass['ID']>$LoggedUser['EffectiveClass']) { break; }
if ($CurClass['Secondary']) { continue; }
if ($Class===$CurClass['Level']) { $Selected='selected="selected"'; } else { $Selected=""; }
if ($Class===$CurClass['Level']) { $Selected=' selected="selected"'; } else { $Selected=""; }
?>
<option value="<?=$CurClass['ID']?>" <?=$Selected?>><?=$CurClass['Name'].' ('.$CurClass['Level'].')'?></option>
<option value="<?=$CurClass['ID']?>"<?=$Selected?>><?=$CurClass['Name'].' ('.$CurClass['Level'].')'?></option>
<? } ?>
</select>
</td>
@ -897,13 +897,13 @@ function check_paranoia_here($Setting) {
?>
<tr>
<td class="label">Donor:</td>
<td><input type="checkbox" name="Donor" <? if ($Donor == 1) { ?>checked="checked" <? } ?> /></td>
<td><input type="checkbox" name="Donor"<? if ($Donor == 1) { ?> checked="checked"<? } ?> /></td>
</tr>
<?
}
if (check_perms('users_promote_below') || check_perms('users_promote_to')) { ?>
<tr>
<td class="label">Secondary Classes:</td>
<td class="label">Secondary classes:</td>
<td>
<?
$DB->query("SELECT p.ID, p.Name, l.UserID
@ -915,7 +915,7 @@ function check_paranoia_here($Setting) {
while (list($PermID, $PermName, $IsSet) = $DB->next_record()) {
$i++;
?>
<input type="checkbox" id="perm_<?=$PermID?>" name="secondary_classes[]" value="<?=$PermID?>" <? if ($IsSet) { ?>checked="checked" <? } ?> />&nbsp;<label for="perm_<?=$PermID?>" style="margin-right: 10px;"><?=$PermName?></label>
<input type="checkbox" id="perm_<?=$PermID?>" name="secondary_classes[]" value="<?=$PermID?>"<? if ($IsSet) { ?> checked="checked"<? } ?> />&nbsp;<label for="perm_<?=$PermID?>" style="margin-right: 10px;"><?=$PermName?></label>
<? if ($i % 5 == 0) { echo '<br />'; }
} ?>
</td>
@ -924,8 +924,8 @@ function check_paranoia_here($Setting) {
if (check_perms('users_make_invisible')) {
?>
<tr>
<td class="label">Visible in Peer Lists:</td>
<td><input type="checkbox" name="Visible" <? if ($Visible == 1) { ?>checked="checked" <? } ?> /></td>
<td class="label">Visible in peer lists:</td>
<td><input type="checkbox" name="Visible"<? if ($Visible == 1) { ?> checked="checked"<? } ?> /></td>
</tr>
<?
}
@ -947,13 +947,13 @@ function check_paranoia_here($Setting) {
</td>
</tr>
<tr>
<td class="label">Merge Stats <strong>From:</strong></td>
<td class="label">Merge stats <strong>from:</strong></td>
<td>
<input type="text" size="40" name="MergeStatsFrom" />
</td>
</tr>
<tr>
<td class="label">Freeleech Tokens:</td>
<td class="label">Freeleech tokens:</td>
<td>
<input type="text" size="5" name="FLTokens" value="<?=$FLTokens?>" />
</td>
@ -964,7 +964,7 @@ function check_paranoia_here($Setting) {
if (check_perms('users_edit_invites')) {
?>
<tr>
<td class="label"><span title="Number of Invites">Invites:</span></td>
<td class="label"><span title="Number of invites">Invites:</span></td>
<td><input type="text" size="5" name="Invites" value="<?=$Invites?>" /></td>
</tr>
<?
@ -973,7 +973,7 @@ function check_paranoia_here($Setting) {
if (check_perms('admin_manage_fls') || (check_perms('users_mod') && $OwnProfile)) {
?>
<tr>
<td class="label"><span title="This is the message shown in the right-hand column on /staff.php">FLS/Staff Remark:</span></td>
<td class="label"><span title="This is the message shown in the right-hand column on /staff.php">FLS/Staff remark:</span></td>
<td><input type="text" size="50" name="SupportFor" value="<?=display_str($SupportFor)?>" /></td>
</tr>
<?
@ -984,14 +984,14 @@ function check_paranoia_here($Setting) {
<tr>
<td class="label">Reset:</td>
<td>
<input type="checkbox" name="ResetRatioWatch" id="ResetRatioWatch" /> <label for="ResetRatioWatch">Ratio Watch</label> |
<input type="checkbox" name="ResetRatioWatch" id="ResetRatioWatch" /> <label for="ResetRatioWatch">Ratio watch</label> |
<input type="checkbox" name="ResetPasskey" id="ResetPasskey" /> <label for="ResetPasskey">Passkey</label> |
<input type="checkbox" name="ResetAuthkey" id="ResetAuthkey" /> <label for="ResetAuthkey">Authkey</label> |
<input type="checkbox" name="ResetIPHistory" id="ResetIPHistory" /> <label for="ResetIPHistory">IP History</label> |
<input type="checkbox" name="ResetEmailHistory" id="ResetEmailHistory" /> <label for="ResetEmailHistory">Email History</label>
<input type="checkbox" name="ResetIPHistory" id="ResetIPHistory" /> <label for="ResetIPHistory">IP history</label> |
<input type="checkbox" name="ResetEmailHistory" id="ResetEmailHistory" /> <label for="ResetEmailHistory">Email history</label>
<br />
<input type="checkbox" name="ResetSnatchList" id="ResetSnatchList" /> <label for="ResetSnatchList">Snatch List</label> |
<input type="checkbox" name="ResetDownloadList" id="ResetDownloadList" /> <label for="ResetDownloadList">Download List</label>
<input type="checkbox" name="ResetSnatchList" id="ResetSnatchList" /> <label for="ResetSnatchList">Snatch list</label> |
<input type="checkbox" name="ResetDownloadList" id="ResetDownloadList" /> <label for="ResetDownloadList">Download list</label>
</td>
</tr>
<?
@ -1000,7 +1000,7 @@ function check_paranoia_here($Setting) {
if (check_perms('users_mod')) {
?>
<tr>
<td class="label">Reset all EAC v0.95 Logs To:</td>
<td class="label">Reset all EAC v0.95 logs to:</td>
<td>
<select name="095logs">
<option value=""></option>
@ -1014,7 +1014,7 @@ function check_paranoia_here($Setting) {
if (check_perms('users_edit_password')) {
?>
<tr>
<td class="label">New Password:</td>
<td class="label">New password:</td>
<td>
<input type="text" size="30" id="change_password" name="ChangePassword" />
</td>
@ -1025,12 +1025,12 @@ function check_paranoia_here($Setting) {
<? if (check_perms('users_warn')) { ?>
<table class="layout">
<tr class="colhead">
<td colspan="2">Warn User</td>
<td colspan="2">Warn user</td>
</tr>
<tr>
<td class="label">Warned:</td>
<td>
<input type="checkbox" name="Warned" <? if ($Warned != '0000-00-00 00:00:00') { ?>checked="checked"<? } ?> />
<input type="checkbox" name="Warned"<? if ($Warned != '0000-00-00 00:00:00') { ?> checked="checked"<? } ?> />
</td>
</tr>
<? if ($Warned=='0000-00-00 00:00:00') { // user is not warned ?>
@ -1073,7 +1073,7 @@ function check_paranoia_here($Setting) {
</tr>
<? } ?>
<tr>
<td class="label"><span title="This message *will* be sent to the user in the warning PM!">Warning Reason:</span></td>
<td class="label"><span title="This message *will* be sent to the user in the warning PM!">Warning reason:</span></td>
<td>
<input type="text" size="60" name="WarnReason" />
</td>
@ -1081,7 +1081,7 @@ function check_paranoia_here($Setting) {
<? } ?>
</table><br />
<table class="layout">
<tr class="colhead"><td colspan="2">User Privileges</td></tr>
<tr class="colhead"><td colspan="2">User privileges</td></tr>
<? if (check_perms('users_disable_posts') || check_perms('users_disable_any')) {
$DB->query("SELECT DISTINCT Email, IP FROM users_history_emails WHERE UserID = ".$UserID." ORDER BY Time ASC");
$Emails = $DB->to_array();
@ -1129,30 +1129,30 @@ function check_paranoia_here($Setting) {
<td class="label">Account:</td>
<td>
<select name="UserStatus">
<option value="0" <? if ($Enabled=='0') { ?>selected="selected"<? } ?>>Unconfirmed</option>
<option value="1" <? if ($Enabled=='1') { ?>selected="selected"<? } ?>>Enabled</option>
<option value="2" <? if ($Enabled=='2') { ?>selected="selected"<? } ?>>Disabled</option>
<option value="0"<? if ($Enabled=='0') { ?> selected="selected"<? } ?>>Unconfirmed</option>
<option value="1"<? if ($Enabled=='1') { ?> selected="selected"<? } ?>>Enabled</option>
<option value="2"<? if ($Enabled=='2') { ?> selected="selected"<? } ?>>Disabled</option>
<? if (check_perms('users_delete_users')) { ?>
<optgroup label="-- WARNING --"></optgroup>
<option value="delete">Delete Account</option>
<option value="delete">Delete account</option>
<? } ?>
</select>
</td>
</tr>
<tr>
<td class="label">User Reason:</td>
<td class="label">User reason:</td>
<td>
<input type="text" size="60" name="UserReason" />
</td>
</tr>
<tr>
<td class="label"><span title="Enter a comma-delimited list of forum IDs">Restricted Forums:</span></td>
<td class="label"><span title="Enter a comma-delimited list of forum IDs">Restricted forums:</span></td>
<td>
<input type="text" size="60" name="RestrictedForums" value="<?=display_str($RestrictedForums)?>" />
</td>
</tr>
<tr>
<td class="label"><span title="Enter a comma-delimited list of forum IDs">Extra Forums:</span></td>
<td class="label"><span title="Enter a comma-delimited list of forum IDs">Extra forums:</span></td>
<td>
<input type="text" size="60" name="PermittedForums" value="<?=display_str($PermittedForums)?>" />
</td>
@ -1185,7 +1185,7 @@ function check_paranoia_here($Setting) {
<tr>
<td align="right" colspan="2">
<input type="submit" value="Save Changes" />
<input type="submit" value="Save changes" />
</td>
</tr>
</table>