Empty commit

This commit is contained in:
Git 2013-08-22 08:00:54 +00:00
parent 814e3b91c4
commit 21963fb898
10 changed files with 92 additions and 65 deletions

View File

@ -380,7 +380,7 @@ function authorize($Ajax = false) {
Old versions of Internet Explorer choke when downloading binary files over HTTPS with disabled cache. Old versions of Internet Explorer choke when downloading binary files over HTTPS with disabled cache.
Define the following constant in files that handle file downloads */ Define the following constant in files that handle file downloads */
if (!defined('IE_WORKAROUND_NO_CACHE_HEADERS')) { if (!defined('SKIP_NO_CACHE_HEADERS')) {
header('Cache-Control: no-cache, must-revalidate, post-check=0, pre-check=0'); header('Cache-Control: no-cache, must-revalidate, post-check=0, pre-check=0');
header('Pragma: no-cache'); header('Pragma: no-cache');
} }

View File

@ -2,8 +2,8 @@
// Functions and headers needed by the image proxy // Functions and headers needed by the image proxy
error_reporting(E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR); error_reporting(E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR);
if (isset($_SERVER['http_if_modified_since'])) { if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) {
header("Status: 304 Not Modified"); header("HTTP/1.1 304 Not Modified");
die(); die();
} }
@ -97,5 +97,6 @@ function image_height($Type, $Data) {
} }
} }
define('SKIP_NO_CACHE_HEADERS', 1);
require('classes/script_start.php'); // script_start contains all we need and includes sections/image/index.php require('classes/script_start.php'); // script_start contains all we need and includes sections/image/index.php
?> ?>

View File

@ -180,5 +180,5 @@
Users::update_site_options($LoggedUser['ID'], array('Collector' => $Settings)); Users::update_site_options($LoggedUser['ID'], array('Collector' => $Settings));
} }
define('IE_WORKAROUND_NO_CACHE_HEADERS', 1); define('SKIP_NO_CACHE_HEADERS', 1);
?> ?>

View File

@ -164,5 +164,5 @@
Users::update_site_options($LoggedUser['ID'], array('Collector' => $Settings)); Users::update_site_options($LoggedUser['ID'], array('Collector' => $Settings));
} }
define('IE_WORKAROUND_NO_CACHE_HEADERS', 1); define('SKIP_NO_CACHE_HEADERS', 1);
?> ?>

View File

@ -183,4 +183,4 @@
echo TorrentsDL::get_file($Contents, ANNOUNCE_URL."/$TorrentPass/announce"); echo TorrentsDL::get_file($Contents, ANNOUNCE_URL."/$TorrentPass/announce");
define('IE_WORKAROUND_NO_CACHE_HEADERS', 1); define('SKIP_NO_CACHE_HEADERS', 1);

View File

@ -88,4 +88,4 @@
} }
$Collector->finalize(false); $Collector->finalize(false);
define('IE_WORKAROUND_NO_CACHE_HEADERS', 1); define('SKIP_NO_CACHE_HEADERS', 1);

View File

@ -22,7 +22,7 @@
foreach ($ExtraFileList as $ExtraFile) { foreach ($ExtraFileList as $ExtraFile) {
list($ExtraSize, $ExtraName) = $ExtraFile; list($ExtraSize, $ExtraName) = $ExtraFile;
check_file($ExtraType, $ExtraName); check_file($Type, $ExtraName);
// Make sure the file name is not too long // Make sure the file name is not too long
if (mb_strlen($ExtraName, 'UTF-8') + mb_strlen($ExtraDirName, 'UTF-8') + 1 > MAX_FILENAME_LENGTH) { if (mb_strlen($ExtraName, 'UTF-8') + mb_strlen($ExtraDirName, 'UTF-8') + 1 > MAX_FILENAME_LENGTH) {

View File

@ -62,38 +62,40 @@
<div class="box box_info box_userinfo_community"> <div class="box box_info box_userinfo_community">
<div class="head colhead_dark">Community</div> <div class="head colhead_dark">Community</div>
<ul class="stats nobullet"> <ul class="stats nobullet">
<li>Forum posts: <?=number_format($ForumPosts)?> <a href="userhistory.php?action=posts&amp;userid=<?=$UserID?>" class="brackets" title="View">View</a></li> <li id="comm_posts">Forum posts: <?=number_format($ForumPosts)?> <a href="userhistory.php?action=posts&amp;userid=<?=$UserID?>" class="brackets" title="View">View</a></li>
<? if ($Override = check_paranoia_here('torrentcomments+')) { ?> <? if ($Override = check_paranoia_here('torrentcomments+')) { ?>
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Torrent comments: <?=number_format($NumComments)?> <li id="comm_torrcomm"<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Torrent comments: <?=number_format($NumComments)?>
<? if ($Override = check_paranoia_here('torrentcomments')) { ?> <? if ($Override = check_paranoia_here('torrentcomments')) { ?>
<a href="comments.php?id=<?=$UserID?>" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a> <a href="comments.php?id=<?=$UserID?>" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a>
<? } ?> <? } ?>
</li> </li>
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Artist comments: <?=number_format($NumArtistComments)?> <li id="comm_artcomm"<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Artist comments: <?=number_format($NumArtistComments)?>
<? if ($Override = check_paranoia_here('torrentcomments')) { ?> <? if ($Override = check_paranoia_here('torrentcomments')) { ?>
<a href="comments.php?id=<?=$UserID?>&amp;action=artists" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a> <a href="comments.php?id=<?=$UserID?>&amp;action=artists" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a>
<? } ?> <? } ?>
</li> </li>
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Collage comments: <?=number_format($NumCollageComments)?> <li id="comm_collcomm"<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Collage comments: <?=number_format($NumCollageComments)?>
<? if ($Override = check_paranoia_here('torrentcomments')) { ?> <? if ($Override = check_paranoia_here('torrentcomments')) { ?>
<a href="comments.php?id=<?=$UserID?>&amp;action=collages" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a> <a href="comments.php?id=<?=$UserID?>&amp;action=collages" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a>
<? } ?> <? } ?>
</li> </li>
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Request comments: <?=number_format($NumRequestComments)?> <li id="comm_reqcomm"<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Request comments: <?=number_format($NumRequestComments)?>
<? if ($Override = check_paranoia_here('torrentcomments')) { ?> <? if ($Override = check_paranoia_here('torrentcomments')) { ?>
<a href="comments.php?id=<?=$UserID?>&amp;action=requests" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a> <a href="comments.php?id=<?=$UserID?>&amp;action=requests" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a>
<? } ?> <? } ?>
</li> </li>
<? } <?
}
if (($Override = check_paranoia_here('collages+'))) { ?> if (($Override = check_paranoia_here('collages+'))) { ?>
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Collages started: <?=number_format($NumCollages)?> <li id="comm_collstart"<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Collages started: <?=number_format($NumCollages)?>
<? if ($Override = check_paranoia_here('collages')) { ?> <? if ($Override = check_paranoia_here('collages')) { ?>
<a href="collages.php?userid=<?=$UserID?>" class="brackets<?=(($Override === 2) ? ' paranoia_override' : '')?>" title="View">View</a> <a href="collages.php?userid=<?=$UserID?>" class="brackets<?=(($Override === 2) ? ' paranoia_override' : '')?>" title="View">View</a>
<? } ?> <? } ?>
</li> </li>
<? } <?
}
if (($Override = check_paranoia_here('collagecontribs+'))) { ?> if (($Override = check_paranoia_here('collagecontribs+'))) { ?>
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Collages contributed to: <? echo number_format($NumCollageContribs); ?> <li id="comm_collstart"<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Collages contributed to: <? echo number_format($NumCollageContribs); ?>
<? if ($Override = check_paranoia_here('collagecontribs')) { ?> <? if ($Override = check_paranoia_here('collagecontribs')) { ?>
<a href="collages.php?userid=<?=$UserID?>&amp;contrib=1" class="brackets<?=(($Override === 2) ? ' paranoia_override' : '')?>" title="View">View</a> <a href="collages.php?userid=<?=$UserID?>&amp;contrib=1" class="brackets<?=(($Override === 2) ? ' paranoia_override' : '')?>" title="View">View</a>
<? } ?> <? } ?>
@ -118,7 +120,8 @@
<span<?=($ViewBounty === 2 ? ' class="paranoia_override"' : '')?>> for <?=Format::get_size($TotalBounty) ?></span> <span<?=($ViewBounty === 2 ? ' class="paranoia_override"' : '')?>> for <?=Format::get_size($TotalBounty) ?></span>
<a href="requests.php?type=filled&amp;userid=<?=$UserID?>" class="brackets<?=(($ViewAll === 2) ? ' paranoia_override' : '')?>" title="View">View</a> <a href="requests.php?type=filled&amp;userid=<?=$UserID?>" class="brackets<?=(($ViewAll === 2) ? ' paranoia_override' : '')?>" title="View">View</a>
</li> </li>
<? } <?
}
//Let's see if we can view requests because of reasons //Let's see if we can view requests because of reasons
$ViewAll = check_paranoia_here('requestsvoted_list'); $ViewAll = check_paranoia_here('requestsvoted_list');
@ -145,27 +148,31 @@
<span<?=($ViewBounty === 2 ? ' class="paranoia_override"' : '')?>> for <?=Format::get_size($TotalSpent)?></span> <span<?=($ViewBounty === 2 ? ' class="paranoia_override"' : '')?>> for <?=Format::get_size($TotalSpent)?></span>
<a href="requests.php?type=voted&amp;userid=<?=$UserID?>" class="brackets<?=($ViewAll === 2 ? ' paranoia_override' : '')?>" title="View">View</a> <a href="requests.php?type=voted&amp;userid=<?=$UserID?>" class="brackets<?=($ViewAll === 2 ? ' paranoia_override' : '')?>" title="View">View</a>
</li> </li>
<? } <?
}
if ($Override = check_paranoia_here('uploads+')) { ?> if ($Override = check_paranoia_here('uploads+')) { ?>
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Uploaded: <?=number_format($Uploads)?> <li id="comm_upload"<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Uploaded: <?=number_format($Uploads)?>
<? if ($Override = check_paranoia_here('uploads')) { ?> <? if ($Override = check_paranoia_here('uploads')) { ?>
<a href="torrents.php?type=uploaded&amp;userid=<?=$UserID?>" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a> <a href="torrents.php?type=uploaded&amp;userid=<?=$UserID?>" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a>
<? if (check_perms('zip_downloader')) { ?> <? if (check_perms('zip_downloader')) { ?>
<a href="torrents.php?action=redownload&amp;type=uploads&amp;userid=<?=$UserID?>" onclick="return confirm('If you no longer have the content, your ratio WILL be affected; be sure to check the size of all torrents before redownloading.');" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="Download">Download</a> <a href="torrents.php?action=redownload&amp;type=uploads&amp;userid=<?=$UserID?>" onclick="return confirm('If you no longer have the content, your ratio WILL be affected; be sure to check the size of all torrents before redownloading.');" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="Download">Download</a>
<? } <?
}
} }
?> ?>
</li> </li>
<? } <?
}
if ($Override = check_paranoia_here('uniquegroups+')) { ?> if ($Override = check_paranoia_here('uniquegroups+')) { ?>
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Unique groups: <?=number_format($UniqueGroups)?> <li id="comm_uniquegroup"<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Unique groups: <?=number_format($UniqueGroups)?>
<? if ($Override = check_paranoia_here('uniquegroups')) { ?> <? if ($Override = check_paranoia_here('uniquegroups')) { ?>
<a href="torrents.php?type=uploaded&amp;userid=<?=$UserID?>&amp;filter=uniquegroup" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a> <a href="torrents.php?type=uploaded&amp;userid=<?=$UserID?>&amp;filter=uniquegroup" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a>
<? } ?> <? } ?>
</li> </li>
<? } <?
}
if ($Override = check_paranoia_here('perfectflacs+')) { ?> if ($Override = check_paranoia_here('perfectflacs+')) { ?>
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>"Perfect" FLACs: <?=number_format($PerfectFLACs)?> <li id="comm_perfectflac"<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>"Perfect" FLACs: <?=number_format($PerfectFLACs)?>
<? if ($Override = check_paranoia_here('perfectflacs')) { ?> <? if ($Override = check_paranoia_here('perfectflacs')) { ?>
<a href="torrents.php?type=uploaded&amp;userid=<?=$UserID?>&amp;filter=perfectflac" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a> <a href="torrents.php?type=uploaded&amp;userid=<?=$UserID?>&amp;filter=perfectflac" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a>
<? } ?> <? } ?>
@ -174,7 +181,7 @@
} }
if ($Override = check_paranoia_here('seeding+')) { if ($Override = check_paranoia_here('seeding+')) {
?> ?>
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Seeding: <li id="comm_seeding"<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Seeding:
<span class="user_commstats" id="user_commstats_seeding"><a href="#" class="brackets" onclick="commStats(<?=$UserID?>); return false;">Show stats</a></span> <span class="user_commstats" id="user_commstats_seeding"><a href="#" class="brackets" onclick="commStats(<?=$UserID?>); return false;">Show stats</a></span>
<? <?
if ($AOverride = check_paranoia_here('seeding')) { if ($AOverride = check_paranoia_here('seeding')) {
@ -194,7 +201,7 @@
} }
if ($Override = check_paranoia_here('leeching+')) { if ($Override = check_paranoia_here('leeching+')) {
?> ?>
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Leeching: <li id="comm_leeching"<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Leeching:
<span class="user_commstats" id="user_commstats_leeching"><a href="#" class="brackets" onclick="commStats(<?=$UserID?>); return false;">Show stats</a></span> <span class="user_commstats" id="user_commstats_leeching"><a href="#" class="brackets" onclick="commStats(<?=$UserID?>); return false;">Show stats</a></span>
<? if ($Override = check_paranoia_here('leeching')) { ?> <? if ($Override = check_paranoia_here('leeching')) { ?>
<a href="torrents.php?type=leeching&amp;userid=<?=$UserID?>" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a> <a href="torrents.php?type=leeching&amp;userid=<?=$UserID?>" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a>
@ -208,11 +215,12 @@
<? <?
} }
if ($Override = check_paranoia_here('snatched+')) { ?> if ($Override = check_paranoia_here('snatched+')) { ?>
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Snatched: <li id="comm_snatched"<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Snatched:
<span class="user_commstats" id="user_commstats_snatched"><a href="#" class="brackets" onclick="commStats(<?=$UserID?>); return false;">Show stats</a></span> <span class="user_commstats" id="user_commstats_snatched"><a href="#" class="brackets" onclick="commStats(<?=$UserID?>); return false;">Show stats</a></span>
<? if ($Override = check_perms('site_view_torrent_snatchlist', $Class)) { ?> <? if ($Override = check_perms('site_view_torrent_snatchlist', $Class)) { ?>
<span id="user_commstats_usnatched"<?=($Override === 2 ? ' class="paranoia_override"' : '')?>></span> <span id="user_commstats_usnatched"<?=($Override === 2 ? ' class="paranoia_override"' : '')?>></span>
<? } <?
}
} }
if ($Override = check_paranoia_here('snatched')) { ?> if ($Override = check_paranoia_here('snatched')) { ?>
<a href="torrents.php?type=snatched&amp;userid=<?=$UserID?>" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a> <a href="torrents.php?type=snatched&amp;userid=<?=$UserID?>" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a>
@ -220,15 +228,17 @@
<a href="torrents.php?action=redownload&amp;type=snatches&amp;userid=<?=$UserID?>" onclick="return confirm('If you no longer have the content, your ratio WILL be affected, be sure to check the size of all torrents before redownloading.');" class="brackets" title="Download">Download</a> <a href="torrents.php?action=redownload&amp;type=snatches&amp;userid=<?=$UserID?>" onclick="return confirm('If you no longer have the content, your ratio WILL be affected, be sure to check the size of all torrents before redownloading.');" class="brackets" title="Download">Download</a>
<? } ?> <? } ?>
</li> </li>
<? } <?
}
if (check_perms('site_view_torrent_snatchlist', $Class)) { if (check_perms('site_view_torrent_snatchlist', $Class)) {
?> ?>
<li>Downloaded: <li id="comm_downloaded">Downloaded:
<span class="user_commstats" id="user_commstats_downloaded"><a href="#" class="brackets" onclick="commStats(<?=$UserID?>); return false;">Show stats</a></span> <span class="user_commstats" id="user_commstats_downloaded"><a href="#" class="brackets" onclick="commStats(<?=$UserID?>); return false;">Show stats</a></span>
<span id="user_commstats_udownloaded"></span> <span id="user_commstats_udownloaded"></span>
<a href="torrents.php?type=downloaded&amp;userid=<?=$UserID?>" class="brackets" title="View">View</a> <a href="torrents.php?type=downloaded&amp;userid=<?=$UserID?>" class="brackets" title="View">View</a>
</li> </li>
<? } <?
}
if ($Override = check_paranoia_here('invitedcount')) { if ($Override = check_paranoia_here('invitedcount')) {
$DB->query(" $DB->query("
SELECT COUNT(UserID) SELECT COUNT(UserID)
@ -236,7 +246,7 @@
WHERE Inviter = '$UserID'"); WHERE Inviter = '$UserID'");
list($Invited) = $DB->next_record(); list($Invited) = $DB->next_record();
?> ?>
<li>Invited: <?=number_format($Invited)?></li> <li id="comm_invited">Invited: <?=number_format($Invited)?></li>
<? <?
} }
?> ?>

View File

@ -173,8 +173,9 @@ function check_paranoia_here($Setting) {
$Badges .= (($Warned != '0000-00-00 00:00:00') ? '<img src="'.STATIC_SERVER.'common/symbols/warned.png" alt="Warned" />' : ''); $Badges .= (($Warned != '0000-00-00 00:00:00') ? '<img src="'.STATIC_SERVER.'common/symbols/warned.png" alt="Warned" />' : '');
$Badges .= (($Enabled == '1' || $Enabled == '0' || !$Enabled) ? '' : '<img src="'.STATIC_SERVER.'common/symbols/disabled.png" alt="Banned" />'); $Badges .= (($Enabled == '1' || $Enabled == '0' || !$Enabled) ? '' : '<img src="'.STATIC_SERVER.'common/symbols/disabled.png" alt="Banned" />');
<<<<<<< HEAD
View::show_header($Username, 'user,bbcode,requests,lastfm'); View::show_header($Username, 'user,bbcode,requests,lastfm,info_paster');
?> ?>
<div class="thin"> <div class="thin">
@ -242,27 +243,27 @@ function check_paranoia_here($Setting) {
<div class="box box_info box_userinfo_stats"> <div class="box box_info box_userinfo_stats">
<div class="head colhead_dark">Stats</div> <div class="head colhead_dark">Stats</div>
<ul class="stats nobullet"> <ul class="stats nobullet">
<li>Joined: <?=$JoinedDate?></li> <li id="ustats_joined">Joined: <?=$JoinedDate?></li>
<? if (($Override = check_paranoia_here('lastseen'))) { ?> <? if (($Override = check_paranoia_here('lastseen'))) { ?>
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Last seen: <?=$LastAccess?></li> <li id="ustats_last"<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Last seen: <?=$LastAccess?></li>
<? } <? }
if (($Override = check_paranoia_here('uploaded'))) { ?> 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 id="ustats_upload"<?=($Override === 2 ? ' class="paranoia_override"' : '')?> title="<?=Format::get_size($Uploaded, 5)?>">Uploaded: <?=Format::get_size($Uploaded)?></li>
<? } <? }
if (($Override = check_paranoia_here('downloaded'))) { ?> 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 id="ustats_download"<?=($Override === 2 ? ' class="paranoia_override"' : '')?> title="<?=Format::get_size($Downloaded, 5)?>">Downloaded: <?=Format::get_size($Downloaded)?></li>
<? } <? }
if (($Override = check_paranoia_here('ratio'))) { ?> if (($Override = check_paranoia_here('ratio'))) { ?>
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Ratio: <?=Format::get_ratio_html($Uploaded, $Downloaded)?></li> <li id="ustats_ratio"<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Ratio: <?=Format::get_ratio_html($Uploaded, $Downloaded)?></li>
<? } <? }
if (($Override = check_paranoia_here('requiredratio')) && isset($RequiredRatio)) { ?> if (($Override = check_paranoia_here('requiredratio')) && isset($RequiredRatio)) { ?>
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Required ratio: <?=number_format((double)$RequiredRatio, 2)?></li> <li id="ustats_required" <?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Required ratio: <?=number_format((double)$RequiredRatio, 2)?></li>
<? } <? }
if ($OwnProfile || ($Override = check_paranoia_here(false)) || check_perms('users_mod')) { ?> 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 id="ustats_tokens"<?=($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') { ?> if (($OwnProfile || check_perms('users_mod')) && $Warned != '0000-00-00 00:00:00') { ?>
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Warning expires in: <?=time_diff((date('Y-m-d H:i', strtotime($Warned))))?></li> <li id="ustats_warning"<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Warning expires in: <?=time_diff((date('Y-m-d H:i', strtotime($Warned))))?></li>
<? } ?> <? } ?>
</ul> </ul>
</div> </div>
@ -344,26 +345,26 @@ function check_paranoia_here($Setting) {
<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"> <ul class="stats nobullet">
<? if (($Override = check_paranoia_here('uploaded'))) { ?> <? 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 id="percent_up"<?=($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'))) { ?> <? 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 id="percent_down"<?=($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+'))) { ?> <? 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 id="percent_torrup"<?=($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'))) { ?> <? 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 id="percent_fill"<?=($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'))) { ?> <? 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 id="percent_spent"<?=($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> <li id="percent_posts"title="<?=number_format($ForumPosts)?>">Posts made: <?=$PostRank === false ? 'Server busy' : number_format($PostRank)?></li>
<? if (($Override = check_paranoia_here('artistsadded'))) { ?> <? 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 id="percent_artists"<?=($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'))) { ?> <? 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> <li id="percent_overall"><strong>Overall rank: <?=$OverallRank === false ? 'Server busy' : number_format($OverallRank)?></strong></li>
<? } ?> <? } ?>
</ul> </ul>
</div> </div>
@ -406,26 +407,26 @@ function check_paranoia_here($Setting) {
<div class="head colhead_dark">History</div> <div class="head colhead_dark">History</div>
<ul class="stats nobullet"> <ul class="stats nobullet">
<? if (check_perms('users_view_email', $Class)) { ?> <? if (check_perms('users_view_email', $Class)) { ?>
<li>Emails: <?=number_format($EmailChanges)?> <a href="userhistory.php?action=email2&amp;userid=<?=$UserID?>" class="brackets">View</a>&nbsp;<a href="userhistory.php?action=email&amp;userid=<?=$UserID?>" class="brackets">Legacy view</a></li> <li id="hist_emails">Emails: <?=number_format($EmailChanges)?> <a href="userhistory.php?action=email2&amp;userid=<?=$UserID?>" class="brackets">View</a>&nbsp;<a href="userhistory.php?action=email&amp;userid=<?=$UserID?>" class="brackets">Legacy view</a></li>
<? <?
} }
if (check_perms('users_view_ips', $Class)) { 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 id="hist_ips">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)) { ?> <? 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> <li id="hist_trackips">Tracker IPs: <?=number_format($TrackerIPs)?> <a href="userhistory.php?action=tracker_ips&amp;userid=<?=$UserID?>" class="brackets">View</a></li>
<? } ?> <? } ?>
<? <?
} }
if (check_perms('users_view_keys', $Class)) { if (check_perms('users_view_keys', $Class)) {
?> ?>
<li>Passkeys: <?=number_format($PasskeyChanges)?> <a href="userhistory.php?action=passkeys&amp;userid=<?=$UserID?>" class="brackets">View</a></li> <li id="hist_passkey">Passkeys: <?=number_format($PasskeyChanges)?> <a href="userhistory.php?action=passkeys&amp;userid=<?=$UserID?>" class="brackets">View</a></li>
<? <?
} }
if (check_perms('users_mod', $Class)) { if (check_perms('users_mod', $Class)) {
?> ?>
<li>Passwords: <?=number_format($PasswordChanges)?> <a href="userhistory.php?action=passwords&amp;userid=<?=$UserID?>" class="brackets">View</a></li> <li id="hist_passwords">Passwords: <?=number_format($PasswordChanges)?> <a href="userhistory.php?action=passwords&amp;userid=<?=$UserID?>" class="brackets">View</a></li>
<li>Stats: N/A <a href="userhistory.php?action=stats&amp;userid=<?=$UserID?>" class="brackets">View</a></li> <li id="hist_stats">Stats: N/A <a href="userhistory.php?action=stats&amp;userid=<?=$UserID?>" class="brackets">View</a></li>
<? <?
} }
@ -436,7 +437,7 @@ function check_paranoia_here($Setting) {
<div class="box box_info box_userinfo_personal"> <div class="box box_info box_userinfo_personal">
<div class="head colhead_dark">Personal</div> <div class="head colhead_dark">Personal</div>
<ul class="stats nobullet"> <ul class="stats nobullet">
<li>Class: <?=$ClassLevels[$Class]['Name']?></li> <li id="personal_class">Class: <?=$ClassLevels[$Class]['Name']?></li>
<? <?
$UserInfo = Users::user_info($UserID); $UserInfo = Users::user_info($UserID);
if (!empty($UserInfo['ExtraClasses'])) { if (!empty($UserInfo['ExtraClasses'])) {
@ -464,9 +465,9 @@ function check_paranoia_here($Setting) {
$ParanoiaLevelText = 'Very high'; $ParanoiaLevelText = 'Very high';
} }
?> ?>
<li>Paranoia level: <span title="<?=$ParanoiaLevel?>"><?=$ParanoiaLevelText?></span></li> <li id="personal_paranoia">Paranoia level: <span title="<?=$ParanoiaLevel?>"><?=$ParanoiaLevelText?></span></li>
<? if (check_perms('users_view_email', $Class) || $OwnProfile) { ?> <? if (check_perms('users_view_email', $Class) || $OwnProfile) { ?>
<li>Email: <a href="mailto:<?=display_str($Email)?>"><?=display_str($Email)?></a> <li id="personal_email">Email: <a href="mailto:<?=display_str($Email)?>"><?=display_str($Email)?></a>
<? if (check_perms('users_view_email', $Class)) { ?> <? if (check_perms('users_view_email', $Class)) { ?>
<a href="user.php?action=search&amp;email_history=on&amp;email=<?=display_str($Email)?>" title="Search" class="brackets">S</a> <a href="user.php?action=search&amp;email_history=on&amp;email=<?=display_str($Email)?>" title="Search" class="brackets">S</a>
<? } ?> <? } ?>
@ -475,14 +476,14 @@ function check_paranoia_here($Setting) {
if (check_perms('users_view_ips', $Class)) { if (check_perms('users_view_ips', $Class)) {
?> ?>
<li>IP: <?=Tools::display_ip($IP)?></li> <li id="personal_ip">IP: <?=Tools::display_ip($IP)?></li>
<li>Host: <?=Tools::get_host_by_ajax($IP)?></li> <li id="personal_host">Host: <?=Tools::get_host_by_ajax($IP)?></li>
<? <?
} }
if (check_perms('users_view_keys', $Class) || $OwnProfile) { if (check_perms('users_view_keys', $Class) || $OwnProfile) {
?> ?>
<li>Passkey: <a href="#" id="passkey" onclick="togglePassKey('<?=display_str($torrent_pass)?>'); return false;" class="brackets">View</a></li> <li id="personal_passkey">Passkey: <a href="#" id="passkey" onclick="togglePassKey('<?=display_str($torrent_pass)?>'); return false;" class="brackets">View</a></li>
<? } <? }
if (check_perms('users_view_invites')) { if (check_perms('users_view_invites')) {
if (!$InviterID) { if (!$InviterID) {
@ -492,8 +493,8 @@ function check_paranoia_here($Setting) {
} }
?> ?>
<li>Invited by: <?=$Invited?></li> <li id="personal_inviter">Invited by: <?=$Invited?></li>
<li>Invites: <? <li id="personal_invites">Invites: <?
$DB->query(" $DB->query("
SELECT COUNT(InviterID) SELECT COUNT(InviterID)
FROM invites FROM invites
@ -518,7 +519,7 @@ function check_paranoia_here($Setting) {
} }
if ($Override = check_perms('users_mod') || $OwnProfile || !empty($SupportFor)) { if ($Override = check_perms('users_mod') || $OwnProfile || !empty($SupportFor)) {
?> ?>
<li<?=(($Override === 2 || $SupportFor) ? ' class="paranoia_override"' : '')?>>Clients: <? <li id="personal_clients"<?=(($Override === 2 || $SupportFor) ? ' class="paranoia_override"' : '')?>>Clients: <?
$DB->query(" $DB->query("
SELECT DISTINCT useragent SELECT DISTINCT useragent
FROM xbt_files_users FROM xbt_files_users
@ -1306,6 +1307,12 @@ function check_paranoia_here($Setting) {
</td> </td>
</tr> </tr>
<tr>
<td class="label">Broadcast to #fbi:</td>
<td>
<button type="button" id="paster">Paste info</button>
</td>
</tr>
<tr> <tr>
<td align="right" colspan="2"> <td align="right" colspan="2">
<input type="submit" value="Save changes" /> <input type="submit" value="Save changes" />

View File

@ -0,0 +1,9 @@
$(document).ready(function() {
$("#paster").click(function() {
var info = $('#ustats_joined').text() +'\n' + $('#ustats_last').text() + '\n' + $('#ustats_upload').text() + '\n' + $('#ustats_download').text() + '\n' + $('#ustats_ratio').text() + '\n' + $('#ustats_required').text() +'\n';
info += $('#personal_clients').text() + '\n' + $('#comm_upload').text().replace(/\s/g,"").slice(0.-12) + '\n' + $('#comm_perfectflac').text().replace(/\s/g,"").slice(0,-4) + '\n' + $('#comm_seeding').text().replace(/\s/g,"").slice(0,-12) + '\n';
info += $('#comm_leeching').text().replace(/\s/g,"").slice(0,-4) + '\n' + $('#comm_snatched').text().replace(/\s/g,"").slice(0,-12) + '\n' + $('#comm_downloaded').text().replace(/\s/g,"").slice(0,-4);
$('#Reason').val($('#Reason').val()+info);
$('#Reason').height($('#Reason')[0].scrollHeight);
});
});