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
ksort($this->Val[$Key]->Val);
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

@ -9,7 +9,7 @@ function compare($X, $Y){
include(SERVER_ROOT.'/sections/bookmarks/functions.php'); // has_bookmarked()
include(SERVER_ROOT.'/classes/class_text.php'); // Text formatting class
include(SERVER_ROOT.'/classes/class_image_tools.php');
include(SERVER_ROOT.'/classes/class_image_tools.php');
$Text = new TEXT;
@ -103,20 +103,20 @@ function compare($X, $Y){
foreach ($TorrentList as $GroupID=>$Group) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $GroupArtists, $ExtendedArtists, $GroupFlags) = array_values($Group);
list($GroupID2, $Image, $GroupCategoryID, $UserID, $Username) = array_values($CollageDataList[$GroupID]);
// Handle stats and stuff
$Number++;
$NumGroups++;
if($UserID == $LoggedUser['ID']) {
$NumGroupsByUser++;
}
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) {
$CountArtists = array_merge((array)$ExtendedArtists[1], (array)$ExtendedArtists[4], (array)$ExtendedArtists[5], (array)$ExtendedArtists[6]);
} else{
$CountArtists = $GroupArtists;
}
if($CountArtists) {
foreach($CountArtists as $Artist) {
if(!isset($Artists[$Artist['id']])) {
@ -126,7 +126,7 @@ function compare($X, $Y){
}
}
}
if($Username) {
if(!isset($Users[$UserID])) {
$Users[$UserID] = array('name'=>$Username, 'count'=>1);
@ -134,7 +134,7 @@ function compare($X, $Y){
$Users[$UserID]['count']++;
}
}
$TagList = explode(' ',str_replace('_','.',$TagList));
$TorrentTags = array();
@ -151,7 +151,7 @@ function compare($X, $Y){
$TorrentTags='<br /><div class="tags">'.$TorrentTags.'</div>';
$DisplayName = $Number.' - ';
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5])|| !empty($ExtendedArtists[6])) {
unset($ExtendedArtists[2]);
unset($ExtendedArtists[3]);
@ -159,7 +159,7 @@ function compare($X, $Y){
} elseif(count($GroupArtists)>0) {
$DisplayName .= Artists::display_artists(array('1'=>$GroupArtists));
}
$DisplayName .= '<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
if($GroupYear>0) { $DisplayName = $DisplayName. ' ['. $GroupYear .']';}
if($GroupVanityHouse) { $DisplayName .= ' [<abbr title="This is a vanity house release">VH</abbr>]'; }
@ -191,17 +191,17 @@ function compare($X, $Y){
$LastRemasterRecordLabel = '';
$LastRemasterCatalogueNumber = '';
$LastMedia = '';
$EditionID = 0;
unset($FirstUnknown);
foreach ($Torrents as $TorrentID => $Torrent) {
if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) {
$FirstUnknown = !isset($FirstUnknown);
}
$SnatchedTorrentClass = $Torrent['IsSnatched'] ? ' snatched_torrent' : '';
if($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear ||
$Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber || $FirstUnknown || $Torrent['Media'] != $LastMedia) {
$EditionID++;
@ -212,7 +212,7 @@ function compare($X, $Y){
if($Torrent['RemasterCatalogueNumber']) { $RemasterName .= $AddExtra.display_str($Torrent['RemasterCatalogueNumber']); $AddExtra=' / '; }
if($Torrent['RemasterTitle']) { $RemasterName .= $AddExtra.display_str($Torrent['RemasterTitle']); $AddExtra=' / '; }
$RemasterName .= $AddExtra.display_str($Torrent['Media']);
?>
<tr class="group_torrent groupid_<?=$GroupID?> edition<?=$SnatchedGroupClass . (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1 ? ' hidden' : '')?>">
<td colspan="7" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event)" title="Collapse this edition. Hold &quot;Ctrl&quot; while clicking to collapse all editions in this torrent group.">&minus;</a> <?=$RemasterName?></strong></td>
@ -261,9 +261,9 @@ function compare($X, $Y){
}
} else {
// Viewing a type that does not require grouping
list($TorrentID, $Torrent) = each($Torrents);
$DisplayName = '<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
if ($Torrent['IsSnatched']) {
@ -289,7 +289,7 @@ function compare($X, $Y){
[ <a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download">DL</a>
<? if (Torrents::can_use_token($Torrent)) { ?>
| <a href="torrents.php?action=download&amp;id=<?=$TorrentID ?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>&amp;usetoken=1" title="Use a FL Token" onclick="return confirm('Are you sure you want to use a freeleech token here?');">FL</a>
<? } ?>
<? } ?>
| <a href="reportsv2.php?action=report&amp;id=<?=$TorrentID?>" title="Report">RP</a> ]
</span>
<strong><?=$DisplayName?></strong> <?Votes::vote_link($GroupID,$UserVotes[$GroupID]['Type']);?>
@ -303,11 +303,11 @@ function compare($X, $Y){
<?
}
$TorrentTable.=ob_get_clean();
// Album art
ob_start();
$DisplayName = '';
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5])|| !empty($ExtendedArtists[6])) {
unset($ExtendedArtists[2]);
@ -321,7 +321,7 @@ function compare($X, $Y){
?>
<li class="image_group_<?=$GroupID?>">
<a href="torrents.php?id=<?=$GroupID?>">
<? if($Image) {
<? if($Image) {
if(check_perms('site_proxy_images')) {
$Image = 'http'.($SSL?'s':'').'://'.SITE_URL.'/image.php?i='.urlencode($Image);
}
@ -421,11 +421,11 @@ function compare($X, $Y){
<form class="download_form" name="zip" action="collages.php" method="post">
<input type="hidden" name="action" value="download" />
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
<input type="hidden" name="collageid" value="<?=$CollageID?>" />
<input type="hidden" name="collageid" value="<?=$CollageID?>" />
<ul id="list" class="nobullet">
<? foreach ($ZIPList as $ListItem) { ?>
<li id="list<?=$ListItem?>">
<input type="hidden" name="list[]" value="<?=$ListItem?>" />
<input type="hidden" name="list[]" value="<?=$ListItem?>" />
<span style="float:left;"><?=$ZIPOptions[$ListItem]['2']?></span>
<span class="remove remove_collector"><a href="#" onclick="remove_selection('<?=$ListItem?>');return false;" style="float:right;" class="brackets">X</a></span>
<br style="clear:all;" />
@ -461,7 +461,7 @@ function compare($X, $Y){
<option value="1"<? if($ZIPPrefs==1){ echo ' selected="selected"'; } ?>>Prefer Best Seeded</option>
<option value="2"<? if($ZIPPrefs==2){ echo ' selected="selected"'; } ?>>Prefer Bonus Tracks</option>
</select>
<input type="submit" style="width:210px" value="Download" />
<input type="submit" style="width:210px" value="Download" />
</form>
</div>
</div>
@ -530,7 +530,7 @@ function compare($X, $Y){
}
?>
</ol>
</div>
</div>
<? if(check_perms('site_collages_manage') && !$PreventAdditions) { ?>
@ -563,15 +563,15 @@ function compare($X, $Y){
<h3>Comments</h3>
<?
if(empty($CommentList)) {
$DB->query("SELECT
cc.ID,
cc.Body,
cc.UserID,
$DB->query("SELECT
cc.ID,
cc.Body,
cc.UserID,
um.Username,
cc.Time
cc.Time
FROM collages_comments AS cc
LEFT JOIN users_main AS um ON um.ID=cc.UserID
WHERE CollageID='$CollageID'
WHERE CollageID='$CollageID'
ORDER BY ID DESC LIMIT 15");
$CommentList = $DB->to_array(false, MYSQLI_NUM);
}
@ -608,8 +608,8 @@ function compare($X, $Y){
}
?>
</div>
<div class="main_column">
<?
<div class="main_column">
<?
if($CollageCovers != 0) { ?>
<div id="coverart" class="box">
<div class="head" id="coverhead"><strong>Cover Art</strong></div>
@ -635,7 +635,7 @@ function compare($X, $Y){
<script type="text/javascript">//<![CDATA[
collageShow.init(<?=json_encode($CollagePages)?>);
//]]></script>
<? }
<? }
} ?>
<table class="torrent_table grouping cats" id="discog_table">
<tr class="colhead_dark">

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')) { ?>
@ -85,7 +85,7 @@
<td class="label">Max groups per user</td>
<td><input type="text" name="maxgroupsperuser" size="5" value="<?=$MaxGroupsPerUser?>" /></td>
</tr>
<? } ?>
<tr>
<td colspan="2" class="center"><input type="submit" value="Edit collage" /></td>

View File

@ -31,7 +31,7 @@
?>
<div class="thin">
<h2>Forums</h2>
<div class="forum_list">
<div class="forum_list">
<?
$Row = 'a';
@ -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>
@ -107,7 +107,7 @@
</tr>
<? } ?>
</table>
</div>
<div class="linkbox"><a href="forums.php?action=catchup&amp;forumid=all&amp;auth=<?=$LoggedUser['AuthKey']?>">Catch up</a></div>
</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

@ -83,7 +83,7 @@
<input type="hidden" name="forum" value="<?=$ForumID?>" />
<table id="newthreadtext" class="layout">
<tr>
<td class="label">Title:</td>
<td class="label">Title:</td>
<td><input id="title" type="text" name="title" style="width: 98%;" /></td>
</tr>
<tr>
@ -111,7 +111,7 @@ function AddAnswerField() {
AnswerField.id = "answer_"+AnswerCount;
AnswerField.name = "answers[]";
AnswerField.style.width = "90%";
var x = $('#answer_block').raw();
x.appendChild(document.createElement("br"));
x.appendChild(AnswerField);
@ -128,8 +128,8 @@ function RemoveAnswerField() {
</script>
<tr>
<td colspan="2" class="center">
<strong>Poll Settings</strong>
<a href="#" onclick="$('#poll_question, #poll_answers').toggle();return false;">(View)</a>
<strong>Poll Settings</strong>
<a href="#" onclick="$('#poll_question, #poll_answers').toggle();return false;">(View)</a>
</td>
</tr>
<tr id="poll_question" class="hidden">
@ -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

@ -51,16 +51,16 @@
}
$sql .= " WHERE ";
if(!empty($_GET['search'])) {
$Search = db_string($_GET['search']);
if($_GET['searchtype'] == "user") {
$sql .= "um.Username LIKE '".$Search."' AND ";
} elseif($_GET['searchtype'] == "subject") {
$Words = explode(' ', $Search);
$sql .= "c.Subject LIKE '%".implode("%' AND c.Subject LIKE '%", $Words)."%' AND ";
} elseif($_GET['searchtype'] == "message") {
$Words = explode(' ', $Search);
$sql .= "m.Body LIKE '%".implode("%' AND m.Body LIKE '%", $Words)."%' AND ";
}
$Search = db_string($_GET['search']);
if($_GET['searchtype'] == "user") {
$sql .= "um.Username LIKE '".$Search."' AND ";
} elseif($_GET['searchtype'] == "subject") {
$Words = explode(' ', $Search);
$sql .= "c.Subject LIKE '%".implode("%' AND c.Subject LIKE '%", $Words)."%' AND ";
} elseif($_GET['searchtype'] == "message") {
$Words = explode(' ', $Search);
$sql .= "m.Body LIKE '%".implode("%' AND m.Body LIKE '%", $Words)."%' AND ";
}
}
$sql .= ($Section == 'sentbox')? ' cu.InSentbox' : ' cu.InInbox';
$sql .="='1'";
@ -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' ?>';"
/>
@ -111,9 +112,9 @@
<form class="manage_form" name="messages" action="inbox.php" method="post" id="messageform">
<input type="hidden" name="action" value="masschange" />
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
<input type="submit" name="read" value="Mark as read" />&nbsp;
<input type="submit" name="unread" value="Mark as unread" />&nbsp;
<input type="submit" name="delete" value="Delete message(s)" />
<input type="submit" name="read" value="Mark as read" />&nbsp;
<input type="submit" name="unread" value="Mark as unread" />&nbsp;
<input type="submit" name="delete" value="Delete message(s)" />
<table class="message_table checkboxes">
<tr class="colhead">
@ -126,32 +127,38 @@
<? } ?>
</tr>
<?
$Row = 'a';
while(list($ConvID, $Subject, $Unread, $Sticky, $ForwardedID, $SenderID, $Date) = $DB->next_record()) {
if($Unread === '1') {
$RowClass = 'unreadpm';
} else {
$Row = ($Row === 'a') ? 'b' : 'a';
$RowClass = 'row'.$Row;
}
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') {
$RowClass = 'unreadpm';
} else {
$Row = ($Row === 'a') ? 'b' : 'a';
$RowClass = 'row'.$Row;
}
?>
<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>
<?
if($Unread) { echo '</strong>';} ?>
if($Unread) { echo '</strong>';} ?>
</td>
<td><?=Users::format_username($SenderID, true, true, true, true)?></td>
<td><?=time_diff($Date)?></td>
<? if(check_perms('users_mod')) { ?>
<? if(check_perms('users_mod')) { ?>
<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

@ -3,7 +3,7 @@
/*
* Yeah, that's right, edit and new are the same place again.
* It makes the page uglier to read but ultimately better as the alternative means
* maintaining 2 copies of almost identical files.
* maintaining 2 copies of almost identical files.
*/
@ -23,18 +23,18 @@
if(!$NewRequest) {
if(empty($ReturnEdit)) {
$Request = Requests::get_requests(array($RequestID));
$Request = $Request['matches'][$RequestID];
if(empty($Request)) {
error(404);
}
list($RequestID, $RequestorID, $RequestorName, $TimeAdded, $LastVote, $CategoryID, $Title, $Year, $Image, $Description, $CatalogueNumber, $RecordLabel,
list($RequestID, $RequestorID, $RequestorName, $TimeAdded, $LastVote, $CategoryID, $Title, $Year, $Image, $Description, $CatalogueNumber, $RecordLabel,
$ReleaseType, $BitrateList, $FormatList, $MediaList, $LogCue, $FillerID, $FillerName, $TorrentID, $TimeFilled, $GroupID, $OCLC) = $Request;
$VoteArray = get_votes_array($RequestID);
$VoteCount = count($VoteArray['Voters']);
$NeedCue = (strpos($LogCue, "Cue") !== false);
$NeedLog = (strpos($LogCue, "Log") !== false);
if($NeedLog) {
@ -43,27 +43,27 @@
$MinLogScore = (int) $Matches[0];
}
}
$IsFilled = !empty($TorrentID);
$CategoryName = $Categories[$CategoryID - 1];
$ProjectCanEdit = (check_perms('project_team') && !$IsFilled && (($CategoryID == 0) || ($CategoryName == "Music" && $Year == 0)));
$CanEdit = ((!$IsFilled && $LoggedUser['ID'] == $RequestorID && $VoteCount < 2) || $ProjectCanEdit || check_perms('site_moderate_requests'));
if(!$CanEdit) {
error(403);
}
if($CategoryName == "Music") {
$ArtistForm = get_request_artists($RequestID);
$BitrateArray = array();
if($BitrateList == "Any") {
$BitrateArray = array_keys($Bitrates);
} else {
$BitrateArray = array_keys(array_intersect($Bitrates,explode('|', $BitrateList)));
}
$FormatArray = array();
if($FormatList == "Any") {
$FormatArray = array_keys($Formats);
@ -74,8 +74,8 @@
}
}
}
$MediaArray = array();
if($MediaList == "Any") {
$MediaArray = array_keys($Media);
@ -88,7 +88,7 @@
}
}
}
$Tags = implode(", ", $Request['Tags']);
}
}
@ -103,13 +103,13 @@
);
} elseif($NewRequest && !empty($_GET['groupid']) && is_number($_GET['groupid'])) {
$ArtistForm = Artists::get_artist($_GET['groupid']);
$DB->query("SELECT tg.Name,
tg.Year,
tg.ReleaseType,
$DB->query("SELECT tg.Name,
tg.Year,
tg.ReleaseType,
tg.WikiImage,
GROUP_CONCAT(t.Name SEPARATOR ', '),
tg.CategoryID
FROM torrents_group AS tg
FROM torrents_group AS tg
JOIN torrents_tags AS tt ON tt.GroupID=tg.ID
JOIN tags AS t ON t.ID=tt.TagID
WHERE tg.ID = ".$_GET['groupid']);
@ -124,17 +124,17 @@
<div class="header">
<h2><?=($NewRequest ? "Create a request" : "Edit a request")?></h2>
</div>
<div class="box pad">
<form action="" method="post" id="request_form" onsubmit="Calculate();">
<div>
<? if(!$NewRequest) { ?>
<input type="hidden" name="requestid" value="<?=$RequestID?>" />
<input type="hidden" name="requestid" value="<?=$RequestID?>" />
<? } ?>
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
<input type="hidden" name="action" value="<?=$NewRequest ? 'takenew' : 'takeedit'?>" />
</div>
<table class="layout">
<tr>
<td colspan="2" class="center">Please make sure your request follows <a href="rules.php?p=requests">the request rules!</a></td>
@ -147,13 +147,13 @@
<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>
</tr>
<tr id="artist_tr">
<td class="label">Artist(s)</td>
<td class="label">Artist(s)</td>
<td id="artistfields">
<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&amp;id=369">this</a> for more information.</p>
<?
@ -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,10 +187,10 @@
<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>
<?
}
?>
?>
</td>
</tr>
@ -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,29 +252,29 @@
</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>
<?
}
?>
</select>
</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,24 +286,24 @@
</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) {
if($Key % 8 == 0) echo "<br />";?>
<input type="checkbox" name="bitrates[]" value="<?=$Key?>" id="bitrate_<?=$Key?>"
<input type="checkbox" name="bitrates[]" value="<?=$Key?>" id="bitrate_<?=$Key?>"
<?=(!empty($BitrateArray) && in_array($Key, $BitrateArray) ? ' checked="checked" ' : '')?>
onchange="if(!this.checked) { $('#toggle_bitrates').raw().checked = false; }" /><label for="bitrate_<?=$Key?>"> <?=$Val?></label>
<? }?>
</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) {
if($Key % 8 == 0) echo "<br />";?>
<input type="checkbox" name="media[]" value="<?=$Key?>" id="media_<?=$Key?>"
<? foreach ($Media as $Key => $Val) {
if($Key % 8 == 0) echo "<br />";?>
<input type="checkbox" name="media[]" value="<?=$Key?>" id="media_<?=$Key?>"
<?=(!empty($MediaArray) && in_array($Key, $MediaArray) ? ' checked="checked" ' : '')?>
onchange="if(!this.checked) { $('#toggle_media').raw().checked = false; }" /><label for="media_<?=$Key?>"> <?=$Val?></label>
<? }?>
@ -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>
@ -326,9 +326,9 @@
<textarea name="description" cols="70" rows="7"><?=(!empty($Description) ? $Description : '')?></textarea> <br />
</td>
</tr>
<? if(check_perms('site_moderate_requests')) { ?>
<? 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>
@ -377,7 +377,7 @@
<input type="submit" id="button" value="Create request" disabled="disabled" />
</td>
</tr>
<? } else { ?>
<? } else { ?>
<tr>
<td colspan="2" class="center">
<input type="submit" id="button" value="Edit request" />
@ -386,10 +386,10 @@
<? } ?>
</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::show_footer();
View::show_footer();
?>

View File

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

View File

@ -63,7 +63,7 @@ function compare($X, $Y){
$TorrentTagUserIDs=explode('|',$TorrentTagUserIDs);
$TagPositiveVotes=explode('|',$TagPositiveVotes);
$TagNegativeVotes=explode('|',$TagNegativeVotes);
foreach ($TorrentTags as $TagKey => $TagName) {
$Tags[$TagKey]['name'] = $TagName;
$Tags[$TagKey]['score'] = ($TagPositiveVotes[$TagKey] - $TagNegativeVotes[$TagKey]);
@ -102,7 +102,7 @@ function compare($X, $Y){
<? }
if($Categories[$GroupCategoryID-1] == 'Music') { ?>
<a href="upload.php?groupid=<?=$GroupID?>" class="brackets">Add format</a>
<? }
<? }
if(check_perms('site_submit_requests')) { ?>
<a href="requests.php?action=new&amp;groupid=<?=$GroupID?>" class="brackets">Request format</a>
<? }?>
@ -279,7 +279,7 @@ function compare($X, $Y){
?>
</ul>
</div>
<?
<?
if(check_perms('torrents_add_artist')) { ?>
<div class="box box_addartists">
<div class="head"><strong>Add artist</strong><span style="float:right;" class="additional_add_artist"><a onclick="AddArtistField(); return false;" href="#" class="brackets">+</a></span></div>
@ -317,12 +317,12 @@ function compare($X, $Y){
<ul class="stats nobullet">
<?
foreach($Tags as $TagKey=>$Tag) {
?>
<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')){ ?>
@ -449,7 +449,7 @@ function filelist($Str) {
}
$ReportInfo .= "</table>";
}
$CanEdit = (check_perms('torrents_edit') || (($UserID == $LoggedUser['ID'] && !$LoggedUser['DisableWiki']) && !($Remastered && !$RemasterYear)));
$RegenLink = check_perms('users_mod') ? ' <a href="torrents.php?action=regen_filelist&amp;torrentid='.$TorrentID.'" class="brackets">Regenerate</a>' : '';
@ -510,24 +510,24 @@ function filelist($Str) {
if(!empty($LossymasterApproved)) { $ExtraInfo.=$AddExtra. Format::torrent_label('Lossy Master Approved'); $AddExtra=' / '; }
if(!empty($LossywebApproved)) { $ExtraInfo.=$AddExtra. Format::torrent_label('Lossy WEB Approved'); $AddExtra = ' / '; }
if(!empty($BadFiles)) { $ExtraInfo.=$AddExtra. Format::torrent_label('Bad File Names'); $AddExtra=' / '; }
if($GroupCategoryID == 1
if($GroupCategoryID == 1
&& ($RemasterTitle != $LastRemasterTitle
|| $RemasterYear != $LastRemasterYear
|| $RemasterRecordLabel != $LastRemasterRecordLabel
|| $RemasterRecordLabel != $LastRemasterRecordLabel
|| $RemasterCatalogueNumber != $LastRemasterCatalogueNumber
|| $FirstUnknown
|| $Media != $LastMedia)) {
$EditionID++;
if($Remastered && $RemasterYear != 0){
$RemasterName = $RemasterYear;
$AddExtra = " - ";
if($RemasterRecordLabel) { $RemasterName .= $AddExtra.display_str($RemasterRecordLabel); $AddExtra=' / '; }
if($RemasterCatalogueNumber) { $RemasterName .= $AddExtra.display_str($RemasterCatalogueNumber); $AddExtra=' / '; }
if($RemasterTitle) { $RemasterName .= $AddExtra.display_str($RemasterTitle); $AddExtra=' / '; }
if($RemasterTitle) { $RemasterName .= $AddExtra.display_str($RemasterTitle); $AddExtra=' / '; }
$RemasterName .= $AddExtra.display_str($Media);
?>
<tr class="releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition group_torrent">
@ -563,7 +563,7 @@ function filelist($Str) {
<span>[ <a href="torrents.php?action=download&amp;id=<?=$TorrentID ?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download"><?=$HasFile ? 'DL' : 'Missing'?></a>
<? if (Torrents::can_use_token($Torrent)) { ?>
| <a href="torrents.php?action=download&amp;id=<?=$TorrentID ?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>&amp;usetoken=1" title="Use a FL Token" onclick="return confirm('Are you sure you want to use a freeleech token here?');">FL</a>
<? } ?>
<? } ?>
| <a href="reportsv2.php?action=report&amp;id=<?=$TorrentID?>" title="Report">RP</a>
<? if($CanEdit) { ?>
| <a href="torrents.php?action=edit&amp;id=<?=$TorrentID ?>" title="Edit">ED</a>
@ -596,7 +596,7 @@ function filelist($Str) {
if ($LastActive != '0000-00-00 00:00:00' && time() - strtotime($LastActive) >= 345678 && time()-strtotime($LastReseedRequest)>=864000) { ?>
<br /><a href="torrents.php?action=reseed&amp;torrentid=<?=$TorrentID?>&amp;groupid=<?=$GroupID?>" class="brackets">Request re-seed</a>
<?} ?>
<? } ?>
</blockquote>
@ -607,7 +607,7 @@ function filelist($Str) {
<? } ?>
<div class="linkbox">
<a href="#" class="brackets" onclick="show_peers('<?=$TorrentID?>', 0);return false;">View peer list</a>
<? if(check_perms('site_view_torrent_snatchlist')) { ?>
<? if(check_perms('site_view_torrent_snatchlist')) { ?>
<a href="#" class="brackets" onclick="show_downloads('<?=$TorrentID?>', 0);return false;" title="View the list of users that have clicked the &quot;DL&quot; button.">View download list</a>
<a href="#" class="brackets" onclick="show_snatches('<?=$TorrentID?>', 0);return false;" title="View the list of users that have reported a snatch to the tracker.">View snatch list</a>
<? } ?>
@ -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>
@ -699,7 +699,7 @@ function filelist($Str) {
<td width="85%"><a href="#">&uarr;</a>&nbsp;This album is in <?=count($Collages)?> collage<?=((count($Collages)>1)?'s':'')?><?=$SeeAll?></td>
<td># torrents</td>
</tr>
<? foreach ($Indices as $i) {
<? foreach ($Indices as $i) {
list($CollageName, $CollageTorrents, $CollageID) = $Collages[$i];
unset($Collages[$i]);
?>
@ -708,7 +708,7 @@ function filelist($Str) {
<td><?=$CollageTorrents?></td>
</tr>
<? }
foreach ($Collages as $Collage) {
foreach ($Collages as $Collage) {
list($CollageName, $CollageTorrents, $CollageID) = $Collage;
?>
<tr class="collage_rows hidden">
@ -727,7 +727,7 @@ function filelist($Str) {
$Cache->cache_value('torrent_collages_personal_'.$GroupID, $PersonalCollages, 3600*6);
}
if(count($PersonalCollages)>0) {
if(count($PersonalCollages)>0) {
if (count($PersonalCollages) > MAX_PERS_COLLAGES) {
// Pick some at random
$Range = range(0,count($PersonalCollages) - 1);
@ -744,7 +744,7 @@ function filelist($Str) {
<td width="85%"><a href="#">&uarr;</a>&nbsp;This album is in <?=count($PersonalCollages)?> personal collage<?=((count($PersonalCollages)>1)?'s':'')?><?=$SeeAll?></td>
<td># torrents</td>
</tr>
<? foreach ($Indices as $i) {
<? foreach ($Indices as $i) {
list($CollageName, $CollageTorrents, $CollageID) = $PersonalCollages[$i];
unset($PersonalCollages[$i]);
?>
@ -753,7 +753,7 @@ function filelist($Str) {
<td><?=$CollageTorrents?></td>
</tr>
<? }
foreach ($PersonalCollages as $Collage) {
foreach ($PersonalCollages as $Collage) {
list($CollageName, $CollageTorrents, $CollageID) = $Collage;
?>
<tr class="personal_rows hidden">
@ -889,7 +889,7 @@ function filelist($Str) {
<br />
<br />
<? if (check_perms('site_admin_forums')) { ?>
<a href="#content<?=$PostID?>" onclick="LoadEdit('torrents', <?=$PostID?>, 1); return false;">&laquo;</a>
<a href="#content<?=$PostID?>" onclick="LoadEdit('torrents', <?=$PostID?>, 1); return false;">&laquo;</a>
<? } ?>
Last edited by
<?=Users::format_username($EditedUserID, false, false, false) ?> <?=time_diff($EditedTime,2,true,true)?>

View File

@ -7,7 +7,7 @@
$DB->query("SELECT
$DB->query("SELECT
m.Username,
m.Email,
m.IRCKey,
@ -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>