mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 12:11:36 +00:00
Empty commit
This commit is contained in:
parent
4429a12057
commit
f6b5d6a71e
@ -1,5 +1,5 @@
|
||||
<?
|
||||
function compare($X, $Y){
|
||||
function compare($X, $Y) {
|
||||
return($Y['score'] - $X['score']);
|
||||
}
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
@ -13,9 +13,11 @@ function compare($X, $Y){
|
||||
$Text = NEW TEXT;
|
||||
|
||||
$GroupID=ceil($_GET['id']);
|
||||
if(!empty($_GET['revisionid']) && is_number($_GET['revisionid'])) {
|
||||
if (!empty($_GET['revisionid']) && is_number($_GET['revisionid'])) {
|
||||
$RevisionID = $_GET['revisionid'];
|
||||
} else { $RevisionID = 0; }
|
||||
} else {
|
||||
$RevisionID = 0;
|
||||
}
|
||||
|
||||
include(SERVER_ROOT.'/sections/torrents/functions.php');
|
||||
$TorrentCache = get_group_info($GroupID, true, $RevisionID);
|
||||
@ -35,22 +37,22 @@ function compare($X, $Y){
|
||||
|
||||
$Artists = Artists::get_artist($GroupID);
|
||||
|
||||
if($Artists) {
|
||||
if ($Artists) {
|
||||
$DisplayName = '<span dir="ltr">'.Artists::display_artists($Artists, true).$DisplayName.'</span>';
|
||||
$AltName = display_str(Artists::display_artists($Artists, false)).$AltName;
|
||||
$Title = $AltName;
|
||||
}
|
||||
|
||||
if($GroupYear>0) {
|
||||
if ($GroupYear > 0) {
|
||||
$DisplayName.=' ['.$GroupYear.']';
|
||||
$AltName.=' ['.$GroupYear.']';
|
||||
$Title.= ' ['.$GroupYear.']';
|
||||
}
|
||||
if($GroupVanityHouse){
|
||||
if ($GroupVanityHouse){
|
||||
$DisplayName.=' [Vanity House]';
|
||||
$AltName.=' [Vanity House]';
|
||||
}
|
||||
if($GroupCategoryID == 1) {
|
||||
if ($GroupCategoryID == 1) {
|
||||
$DisplayName.=' ['.$ReleaseTypes[$ReleaseType].']';
|
||||
$AltName.=' ['.$ReleaseTypes[$ReleaseType].']';
|
||||
}
|
||||
@ -86,28 +88,28 @@ function compare($X, $Y){
|
||||
<div class="header">
|
||||
<h2><?=$DisplayName?></h2>
|
||||
<div class="linkbox">
|
||||
<? if(check_perms('site_edit_wiki')) { ?>
|
||||
<? if (check_perms('site_edit_wiki')) { ?>
|
||||
<a href="torrents.php?action=editgroup&groupid=<?=$GroupID?>" class="brackets">Edit description</a>
|
||||
<? } ?>
|
||||
<a href="torrents.php?action=history&groupid=<?=$GroupID?>" class="brackets">View history</a>
|
||||
<? if($RevisionID && check_perms('site_edit_wiki')) { ?>
|
||||
<? if ($RevisionID && check_perms('site_edit_wiki')) { ?>
|
||||
<a href="/torrents.php?action=revert&groupid=<?=$GroupID ?>&revisionid=<?=$RevisionID ?>&auth=<?=$LoggedUser['AuthKey']?>" class="brackets">Revert to this revision</a>
|
||||
<? }
|
||||
if(Bookmarks::has_bookmarked('torrent', $GroupID)) {
|
||||
if (Bookmarks::has_bookmarked('torrent', $GroupID)) {
|
||||
?>
|
||||
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="remove_bookmark brackets" title="Remove bookmark" onclick="Unbookmark('torrent',<?=$GroupID?>,'Bookmark');return false;">Unbookmark</a>
|
||||
<? } else { ?>
|
||||
<? } else { ?>
|
||||
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="add_bookmark brackets" title="Add bookmark" onclick="Bookmark('torrent',<?=$GroupID?>,'Unbookmark');return false;">Bookmark</a>
|
||||
<? }
|
||||
?>
|
||||
<!-- <a href="#" id="recommend" class="brackets">Recommend</a> -->
|
||||
<?
|
||||
if($Categories[$GroupCategoryID-1] == 'Music') { ?>
|
||||
if ($Categories[$GroupCategoryID-1] == 'Music') { ?>
|
||||
<a href="upload.php?groupid=<?=$GroupID?>" class="brackets">Add format</a>
|
||||
<? }
|
||||
if(check_perms('site_submit_requests')) { ?>
|
||||
if (check_perms('site_submit_requests')) { ?>
|
||||
<a href="requests.php?action=new&groupid=<?=$GroupID?>" class="brackets">Request format</a>
|
||||
<? }?>
|
||||
<? } ?>
|
||||
<a href="torrents.php?action=grouplog&groupid=<?=$GroupID?>" class="brackets">View log</a>
|
||||
</div>
|
||||
</div>
|
||||
@ -116,9 +118,9 @@ function compare($X, $Y){
|
||||
<div class="box box_image box_image_albumart box_albumart"><!-- .box_albumart deprecated -->
|
||||
<div class="head"><strong>Cover</strong></div>
|
||||
<?
|
||||
if ($WikiImage!="") {
|
||||
if ($WikiImage != "") {
|
||||
$WikiImageThumb = ImageTools::wiki_image($WikiImage);
|
||||
if(check_perms('site_proxy_images')) {
|
||||
if (check_perms('site_proxy_images')) {
|
||||
$WikiImage = ImageTools::proxy_url($WikiImage);
|
||||
}
|
||||
?>
|
||||
@ -132,7 +134,7 @@ function compare($X, $Y){
|
||||
?>
|
||||
</div>
|
||||
<?
|
||||
if($Categories[$GroupCategoryID-1] == 'Music') {
|
||||
if ($Categories[$GroupCategoryID-1] == 'Music') {
|
||||
$ShownWith = false;
|
||||
?>
|
||||
<div class="box box_artists">
|
||||
@ -140,13 +142,13 @@ function compare($X, $Y){
|
||||
<?=(check_perms('torrents_edit')) ? '<span style="float:right;" class="edit_artists"><a onclick="ArtistManager(); return false;" href="#" class="brackets">Edit</a></span>' : ''?>
|
||||
</div>
|
||||
<ul class="stats nobullet" id="artist_list">
|
||||
<? if(!empty($Artists[4]) && count($Artists[4]) > 0) {
|
||||
<? if (!empty($Artists[4]) && count($Artists[4]) > 0) {
|
||||
print ' <li class="artists_composers"><strong class="artists_label">Composers:</strong></li>';
|
||||
foreach($Artists[4] as $Artist) {
|
||||
foreach ($Artists[4] as $Artist) {
|
||||
?>
|
||||
<li class="artists_composers">
|
||||
<?=Artists::display_artist($Artist).' ‎'?>
|
||||
<? if(check_perms('torrents_edit')){
|
||||
<? if (check_perms('torrents_edit')){
|
||||
$DB->query("SELECT AliasID FROM artists_alias WHERE ArtistID = ".$Artist['id']." AND ArtistID != AliasID AND Name = '".db_string($Artist['name'])."'");
|
||||
list($AliasID) = $DB->next_record();
|
||||
if (empty($AliasID)) {
|
||||
@ -161,11 +163,11 @@ function compare($X, $Y){
|
||||
}
|
||||
if (!empty($Artists[6]) && count($Artists[6]) > 0) {
|
||||
print ' <li class="artists_dj"><strong class="artists_label">DJ / Compiler:</strong></li>';
|
||||
foreach($Artists[6] as $Artist) {
|
||||
foreach ($Artists[6] as $Artist) {
|
||||
?>
|
||||
<li class="artists_dj">
|
||||
<?=Artists::display_artist($Artist).' ‎'?>
|
||||
<? if(check_perms('torrents_edit')){
|
||||
<? if (check_perms('torrents_edit')){
|
||||
$DB->query("SELECT AliasID FROM artists_alias WHERE ArtistID = ".$Artist['id']." AND ArtistID != AliasID AND Name = '".db_string($Artist['name'])."'");
|
||||
list($AliasID) = $DB->next_record();
|
||||
if (empty($AliasID)) {
|
||||
@ -184,11 +186,11 @@ function compare($X, $Y){
|
||||
} elseif ((count($Artists[4]) > 0) && (count($Artists[1]) > 0)) {
|
||||
print ' <li class="artists_main"><strong class="artists_label">Performers:</strong></li>';
|
||||
}
|
||||
foreach($Artists[1] as $Artist) {
|
||||
foreach ($Artists[1] as $Artist) {
|
||||
?>
|
||||
<li class="artist_main">
|
||||
<?=Artists::display_artist($Artist).' ‎'?>
|
||||
<? if(check_perms('torrents_edit')){
|
||||
<? if (check_perms('torrents_edit')){
|
||||
$AliasID = $Artist['aliasid'];
|
||||
if (empty($AliasID)) {
|
||||
$AliasID = $Artist['id'];
|
||||
@ -200,13 +202,13 @@ function compare($X, $Y){
|
||||
</li>
|
||||
<?
|
||||
}
|
||||
if(!empty($Artists[2]) && count($Artists[2]) > 0) {
|
||||
if (!empty($Artists[2]) && count($Artists[2]) > 0) {
|
||||
print ' <li class="artists_with"><strong class="artists_label">With:</strong></li>';
|
||||
foreach($Artists[2] as $Artist) {
|
||||
foreach ($Artists[2] as $Artist) {
|
||||
?>
|
||||
<li class="artist_guest">
|
||||
<?=Artists::display_artist($Artist).' ‎'?>
|
||||
<? if(check_perms('torrents_edit')){
|
||||
<? if (check_perms('torrents_edit')){
|
||||
$DB->query("SELECT AliasID FROM artists_alias WHERE ArtistID = ".$Artist['id']." AND ArtistID != AliasID AND Name = '".db_string($Artist['name'])."'");
|
||||
list($AliasID) = $DB->next_record();
|
||||
if (empty($AliasID)) {
|
||||
@ -220,13 +222,13 @@ function compare($X, $Y){
|
||||
<?
|
||||
}
|
||||
}
|
||||
if(!empty($Artists[5]) && count($Artists[5]) > 0) {
|
||||
if (!empty($Artists[5]) && count($Artists[5]) > 0) {
|
||||
print ' <li class="artists_conductors"><strong class="artists_label">Conducted by:</strong></li>';
|
||||
foreach($Artists[5] as $Artist) {
|
||||
foreach ($Artists[5] as $Artist) {
|
||||
?>
|
||||
<li class="artists_conductors">
|
||||
<?=Artists::display_artist($Artist).' ‎'?>
|
||||
<? if(check_perms('torrents_edit')){
|
||||
<? if (check_perms('torrents_edit')){
|
||||
$DB->query("SELECT AliasID FROM artists_alias WHERE ArtistID = ".$Artist['id']." AND ArtistID != AliasID AND Name = '".db_string($Artist['name'])."'");
|
||||
list($AliasID) = $DB->next_record();
|
||||
if (empty($AliasID)) {
|
||||
@ -242,40 +244,40 @@ function compare($X, $Y){
|
||||
}
|
||||
if (!empty($Artists[3]) && count($Artists[3]) > 0) {
|
||||
print ' <li class="artists_remix"><strong class="artists_label">Remixed by:</strong></li>';
|
||||
foreach($Artists[3] as $Artist) {
|
||||
foreach ($Artists[3] as $Artist) {
|
||||
?>
|
||||
<li class="artists_remix">
|
||||
<?=Artists::display_artist($Artist).' ‎'?>
|
||||
<? if(check_perms('torrents_edit')){
|
||||
$DB->query("SELECT AliasID FROM artists_alias WHERE ArtistID = ".$Artist['id']." AND ArtistID != AliasID AND Name = '".db_string($Artist['name'])."'");
|
||||
list($AliasID) = $DB->next_record();
|
||||
if (empty($AliasID)) {
|
||||
$AliasID = $Artist['id'];
|
||||
}
|
||||
<? if (check_perms('torrents_edit')){
|
||||
$DB->query("SELECT AliasID FROM artists_alias WHERE ArtistID = ".$Artist['id']." AND ArtistID != AliasID AND Name = '".db_string($Artist['name'])."'");
|
||||
list($AliasID) = $DB->next_record();
|
||||
if (empty($AliasID)) {
|
||||
$AliasID = $Artist['id'];
|
||||
}
|
||||
?>
|
||||
(<?=$AliasID?>)
|
||||
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&auth=' + authkey + '&groupid=<?=$GroupID?>&artistid=<?=$Artist['id']?>&importance=3');this.parentNode.parentNode.style.display = 'none';" class="brackets" title="Remove artist">X</a></span>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
</li>
|
||||
<?
|
||||
}
|
||||
}
|
||||
if (!empty($Artists[7]) && count($Artists[7]) > 0) {
|
||||
print ' <li class="artists_producer"><strong class="artists_label">Produced by:</strong></li>';
|
||||
foreach($Artists[7] as $Artist) {
|
||||
foreach ($Artists[7] as $Artist) {
|
||||
?>
|
||||
<li class="artists_producer">
|
||||
<?=Artists::display_artist($Artist).' ‎'?>
|
||||
<? if(check_perms('torrents_edit')){
|
||||
$DB->query("SELECT AliasID FROM artists_alias WHERE ArtistID = ".$Artist['id']." AND ArtistID != AliasID AND Name = '".db_string($Artist['name'])."'");
|
||||
list($AliasID) = $DB->next_record();
|
||||
if (empty($AliasID)) {
|
||||
$AliasID = $Artist['id'];
|
||||
}
|
||||
<? if (check_perms('torrents_edit')) {
|
||||
$DB->query("SELECT AliasID FROM artists_alias WHERE ArtistID = ".$Artist['id']." AND ArtistID != AliasID AND Name = '".db_string($Artist['name'])."'");
|
||||
list($AliasID) = $DB->next_record();
|
||||
if (empty($AliasID)) {
|
||||
$AliasID = $Artist['id'];
|
||||
}
|
||||
?>
|
||||
(<?=$AliasID?>)
|
||||
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&auth=' + authkey + '&groupid=<?=$GroupID?>&artistid=<?=$Artist['id']?>&importance=7');this.parentNode.parentNode.style.display = 'none';" class="brackets" title="Remove producer">X</a></span>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
</li>
|
||||
<?
|
||||
}
|
||||
@ -284,7 +286,7 @@ function compare($X, $Y){
|
||||
</ul>
|
||||
</div>
|
||||
<?
|
||||
if(check_perms('torrents_add_artist')) { ?>
|
||||
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>
|
||||
<div class="body">
|
||||
@ -316,12 +318,11 @@ function compare($X, $Y){
|
||||
<div class="box box_tags">
|
||||
<div class="head"><strong>Tags</strong></div>
|
||||
<?
|
||||
if(count($Tags) > 0) {
|
||||
if (count($Tags) > 0) {
|
||||
?>
|
||||
<ul class="stats nobullet">
|
||||
<?
|
||||
foreach($Tags as $TagKey=>$Tag) {
|
||||
|
||||
foreach ($Tags as $TagKey=>$Tag) {
|
||||
?>
|
||||
<li>
|
||||
<a href="torrents.php?taglist=<?=$Tag['name']?>" style="float:left; display:block;"><?=display_str($Tag['name'])?></a>
|
||||
@ -329,10 +330,10 @@ function compare($X, $Y){
|
||||
<a href="torrents.php?action=vote_tag&way=down&groupid=<?=$GroupID?>&tagid=<?=$Tag['id']?>&auth=<?=$LoggedUser['AuthKey']?>" style="font-family: monospace;" title="Vote this tag down" class="brackets vote_tag_down">−</a>
|
||||
<?=$Tag['score']?>
|
||||
<a href="torrents.php?action=vote_tag&way=up&groupid=<?=$GroupID?>&tagid=<?=$Tag['id']?>&auth=<?=$LoggedUser['AuthKey']?>" style="font-family: monospace;" title="Vote this tag up" class="brackets vote_tag_up">+</a>
|
||||
<? if(check_perms('users_warn')){ ?>
|
||||
<? if (check_perms('users_warn')) { ?>
|
||||
<a href="user.php?id=<?=$Tag['userid']?>" title="View the profile of the user that added this tag" class="brackets view_tag_user">U</a>
|
||||
<? } ?>
|
||||
<? if(empty($LoggedUser['DisableTagging']) && check_perms('site_delete_tag')){ ?>
|
||||
<? if (empty($LoggedUser['DisableTagging']) && check_perms('site_delete_tag')) { ?>
|
||||
<span class="remove remove_tag"><a href="torrents.php?action=delete_tag&groupid=<?=$GroupID?>&tagid=<?=$Tag['id']?>&auth=<?=$LoggedUser['AuthKey']?>" class="brackets" title="Remove tag">X</a></span>
|
||||
<? } ?>
|
||||
</div>
|
||||
@ -381,7 +382,6 @@ function compare($X, $Y){
|
||||
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/leechers.png" alt="Leechers" title="Leechers" /></td>
|
||||
</tr>
|
||||
<?
|
||||
|
||||
function filelist($Str) {
|
||||
return "</td><td>".Format::get_size($Str[1])."</td></tr>";
|
||||
}
|
||||
@ -409,14 +409,14 @@ function filelist($Str) {
|
||||
$CassetteApproved, $LossymasterApproved, $LossywebApproved, $LastReseedRequest,
|
||||
$LogInDB, $HasFile, $PersonalFL, $IsSnatched) = array_values($Torrent);
|
||||
|
||||
if($Remastered && !$RemasterYear) {
|
||||
if ($Remastered && !$RemasterYear) {
|
||||
$FirstUnknown = !isset($FirstUnknown);
|
||||
}
|
||||
|
||||
$Reported = false;
|
||||
unset($ReportedTimes);
|
||||
$Reports = $Cache->get_value('reports_torrent_'.$TorrentID);
|
||||
if($Reports === false) {
|
||||
if ($Reports === false) {
|
||||
$DB->query("SELECT r.ID,
|
||||
r.ReporterID,
|
||||
r.Type,
|
||||
@ -429,12 +429,12 @@ function filelist($Str) {
|
||||
$Reports = $DB->to_array();
|
||||
$Cache->cache_value('reports_torrent_'.$TorrentID, $Reports, 0);
|
||||
}
|
||||
if(count($Reports) > 0) {
|
||||
if (count($Reports) > 0) {
|
||||
$Reported = true;
|
||||
include(SERVER_ROOT.'/sections/reportsv2/array.php');
|
||||
$ReportInfo = '<table class="reportinfo_table"><tr class="colhead_dark" style="font-weight: bold;"><td>This torrent has '.count($Reports).' active '.(count($Reports) > 1 ? "reports" : "report").':</td></tr>';
|
||||
|
||||
foreach($Reports as $Report) {
|
||||
foreach ($Reports as $Report) {
|
||||
list($ReportID, $ReporterID, $ReportType, $ReportReason, $ReportedTime) = $Report;
|
||||
|
||||
$Reporter = Users::user_info($ReporterID);
|
||||
@ -442,7 +442,7 @@ function filelist($Str) {
|
||||
|
||||
if (array_key_exists($ReportType, $Types[$GroupCategoryID])) {
|
||||
$ReportType = $Types[$GroupCategoryID][$ReportType];
|
||||
} else if(array_key_exists($ReportType,$Types['master'])) {
|
||||
} elseif (array_key_exists($ReportType,$Types['master'])) {
|
||||
$ReportType = $Types['master'][$ReportType];
|
||||
} else {
|
||||
//There was a type but it wasn't an option!
|
||||
@ -494,28 +494,28 @@ function filelist($Str) {
|
||||
$TorrentUploader = $Username; // Save this for "Uploaded by:" below
|
||||
|
||||
// similar to Torrents::torrent_info()
|
||||
if($Format) { $ExtraInfo.=display_str($Format); $AddExtra=' / '; }
|
||||
if($Encoding) { $ExtraInfo.=$AddExtra.display_str($Encoding); $AddExtra=' / '; }
|
||||
if($HasLog) { $ExtraInfo.=$AddExtra.'Log'; $AddExtra=' / '; }
|
||||
if($HasLog && $LogInDB) { $ExtraInfo.=' ('.(int) $LogScore.'%)'; }
|
||||
if($HasCue) { $ExtraInfo.=$AddExtra.'Cue'; $AddExtra=' / '; }
|
||||
if($Scene) { $ExtraInfo.=$AddExtra.'Scene'; $AddExtra=' / '; }
|
||||
if(!$ExtraInfo) {
|
||||
if ($Format) { $ExtraInfo.=display_str($Format); $AddExtra=' / '; }
|
||||
if ($Encoding) { $ExtraInfo.=$AddExtra.display_str($Encoding); $AddExtra=' / '; }
|
||||
if ($HasLog) { $ExtraInfo.=$AddExtra.'Log'; $AddExtra=' / '; }
|
||||
if ($HasLog && $LogInDB) { $ExtraInfo.=' ('.(int) $LogScore.'%)'; }
|
||||
if ($HasCue) { $ExtraInfo.=$AddExtra.'Cue'; $AddExtra=' / '; }
|
||||
if ($Scene) { $ExtraInfo.=$AddExtra.'Scene'; $AddExtra=' / '; }
|
||||
if (!$ExtraInfo) {
|
||||
$ExtraInfo = $GroupName ; $AddExtra=' / ';
|
||||
}
|
||||
if($IsSnatched) { $ExtraInfo.=$AddExtra. Format::torrent_label('Snatched!'); $AddExtra=' / '; }
|
||||
if($FreeTorrent == '1') { $ExtraInfo.=$AddExtra. Format::torrent_label('Freeleech!'); $AddExtra=' / '; }
|
||||
if($FreeTorrent == '2') { $ExtraInfo.=$AddExtra. Format::torrent_label('Neutral Leech!'); $AddExtra=' / '; }
|
||||
if($PersonalFL) { $ExtraInfo.=$AddExtra. Format::torrent_label('Personal Freeleech!'); $AddExtra=' / '; }
|
||||
if($Reported) { $ExtraInfo.=$AddExtra. Format::torrent_label('Reported'); $AddExtra=' / '; }
|
||||
if(!empty($BadTags)) { $ExtraInfo.=$AddExtra. Format::torrent_label('Bad Tags'); $AddExtra=' / '; }
|
||||
if(!empty($BadFolders)) { $ExtraInfo.=$AddExtra. Format::torrent_label('Bad Folders'); $AddExtra=' / '; }
|
||||
if(!empty($CassetteApproved)) { $ExtraInfo.=$AddExtra. Format::torrent_label('Cassette Approved'); $AddExtra=' / '; }
|
||||
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 ($IsSnatched) { $ExtraInfo.=$AddExtra. Format::torrent_label('Snatched!'); $AddExtra=' / '; }
|
||||
if ($FreeTorrent == '1') { $ExtraInfo.=$AddExtra. Format::torrent_label('Freeleech!'); $AddExtra=' / '; }
|
||||
if ($FreeTorrent == '2') { $ExtraInfo.=$AddExtra. Format::torrent_label('Neutral Leech!'); $AddExtra=' / '; }
|
||||
if ($PersonalFL) { $ExtraInfo.=$AddExtra. Format::torrent_label('Personal Freeleech!'); $AddExtra=' / '; }
|
||||
if ($Reported) { $ExtraInfo.=$AddExtra. Format::torrent_label('Reported'); $AddExtra=' / '; }
|
||||
if (!empty($BadTags)) { $ExtraInfo.=$AddExtra. Format::torrent_label('Bad Tags'); $AddExtra=' / '; }
|
||||
if (!empty($BadFolders)) { $ExtraInfo.=$AddExtra. Format::torrent_label('Bad Folders'); $AddExtra=' / '; }
|
||||
if (!empty($CassetteApproved)) { $ExtraInfo.=$AddExtra. Format::torrent_label('Cassette Approved'); $AddExtra=' / '; }
|
||||
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
|
||||
@ -545,10 +545,10 @@ function filelist($Str) {
|
||||
| <a href="torrents.php?action=download&id=<?=$TorrentID ?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>&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&id=<?=$TorrentID?>" title="Report">RP</a>
|
||||
<? if($CanEdit) { ?>
|
||||
<? if ($CanEdit) { ?>
|
||||
| <a href="torrents.php?action=edit&id=<?=$TorrentID ?>" title="Edit">ED</a>
|
||||
<? } ?>
|
||||
<? if(check_perms('torrents_delete') || $UserID == $LoggedUser['ID']) { ?>
|
||||
<? if (check_perms('torrents_delete') || $UserID == $LoggedUser['ID']) { ?>
|
||||
| <a href="torrents.php?action=delete&torrentid=<?=$TorrentID ?>" title="Remove">RM</a>
|
||||
<? } ?>
|
||||
|
||||
@ -561,56 +561,54 @@ function filelist($Str) {
|
||||
<td><?=number_format($Seeders)?></td>
|
||||
<td><?=number_format($Leechers)?></td>
|
||||
</tr>
|
||||
<tr class="releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition_<?=$EditionID?> torrentdetails pad <? if(!isset($_GET['torrentid']) || $_GET['torrentid']!=$TorrentID) { ?>hidden<? } ?>" id="torrent_<?=$TorrentID; ?>">
|
||||
<tr class="releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition_<?=$EditionID?> torrentdetails pad <? if (!isset($_GET['torrentid']) || $_GET['torrentid']!=$TorrentID) { ?>hidden<? } ?>" id="torrent_<?=$TorrentID; ?>">
|
||||
<td colspan="5">
|
||||
<div id="release_<?=$TorrentID?>" class="no_overflow">
|
||||
<blockquote>
|
||||
Uploaded by <?=Users::format_username($UserID, false, false, false)?> <?=time_diff($TorrentTime);?>
|
||||
<? if($Seeders == 0){ ?>
|
||||
<?
|
||||
if ($LastActive != '0000-00-00 00:00:00' && time() - strtotime($LastActive) >= 1209600) { ?>
|
||||
<br /><strong>Last active: <?=time_diff($LastActive);?></strong>
|
||||
<?} else { ?>
|
||||
<br />Last active: <?=time_diff($LastActive);?>
|
||||
<?} ?>
|
||||
<?
|
||||
if ($LastActive != '0000-00-00 00:00:00' && time() - strtotime($LastActive) >= 345678 && time()-strtotime($LastReseedRequest)>=864000) { ?>
|
||||
<br /><a href="torrents.php?action=reseed&torrentid=<?=$TorrentID?>&groupid=<?=$GroupID?>" class="brackets">Request re-seed</a>
|
||||
<?} ?>
|
||||
<div id="release_<?=$TorrentID?>" class="no_overflow">
|
||||
<blockquote>
|
||||
Uploaded by <?=Users::format_username($UserID, false, false, false)?> <?=time_diff($TorrentTime);?>
|
||||
<? if ($Seeders == 0) { ?>
|
||||
<?
|
||||
if ($LastActive != '0000-00-00 00:00:00' && time() - strtotime($LastActive) >= 1209600) { ?>
|
||||
<br /><strong>Last active: <?=time_diff($LastActive); ?></strong>
|
||||
<? } else { ?>
|
||||
<br />Last active: <?=time_diff($LastActive); ?>
|
||||
<? }
|
||||
if ($LastActive != '0000-00-00 00:00:00' && time() - strtotime($LastActive) >= 345678 && time() - strtotime($LastReseedRequest) >= 864000) { ?>
|
||||
<br /><a href="torrents.php?action=reseed&torrentid=<?=$TorrentID?>&groupid=<?=$GroupID?>" class="brackets">Request re-seed</a>
|
||||
<? } ?>
|
||||
|
||||
<? } ?>
|
||||
|
||||
</blockquote>
|
||||
</div>
|
||||
<? if(check_perms('site_moderate_requests')) { ?>
|
||||
<? } ?>
|
||||
</blockquote>
|
||||
</div>
|
||||
<? if (check_perms('site_moderate_requests')) { ?>
|
||||
<div class="linkbox">
|
||||
<a href="torrents.php?action=masspm&id=<?=$GroupID?>&torrentid=<?=$TorrentID?>" class="brackets">Mass PM snatchers</a>
|
||||
</div>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
<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 "DL" 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>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
<a href="#" class="brackets" onclick="show_files('<?=$TorrentID?>');return false;">View file list</a>
|
||||
<? if($Reported) { ?>
|
||||
<? if ($Reported) { ?>
|
||||
<a href="#" class="brackets" onclick="show_reported('<?=$TorrentID?>');return false;">View report information</a>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
</div>
|
||||
<div id="peers_<?=$TorrentID?>" class="hidden"></div>
|
||||
<div id="downloads_<?=$TorrentID?>" class="hidden"></div>
|
||||
<div id="snatches_<?=$TorrentID?>" class="hidden"></div>
|
||||
<div id="files_<?=$TorrentID?>" class="hidden"><?=$FileTable?></div>
|
||||
<? if($Reported) { ?>
|
||||
<? if ($Reported) { ?>
|
||||
<div id="reported_<?=$TorrentID?>" class="hidden"><?=$ReportInfo?></div>
|
||||
<? } ?>
|
||||
<? if(!empty($Description)) {
|
||||
echo '<blockquote>'.$Text->full_format($Description).'</blockquote>';}
|
||||
?>
|
||||
<? }
|
||||
if (!empty($Description)) {
|
||||
echo '<blockquote>'.$Text->full_format($Description).'</blockquote>';}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
</table>
|
||||
<?
|
||||
$Requests = get_group_requests($GroupID);
|
||||
@ -625,10 +623,10 @@ function filelist($Str) {
|
||||
<td>Votes</td>
|
||||
<td>Bounty</td>
|
||||
</tr>
|
||||
<? foreach($Requests as $Request) {
|
||||
<? foreach ($Requests as $Request) {
|
||||
$RequestVotes = get_votes_array($Request['ID']);
|
||||
|
||||
if($Request['BitrateList'] != "") {
|
||||
if ($Request['BitrateList'] != "") {
|
||||
$BitrateString = implode(", ", explode("|", $Request['BitrateList']));
|
||||
$FormatString = implode(", ", explode("|", $Request['FormatList']));
|
||||
$MediaString = implode(", ", explode("|", $Request['MediaList']));
|
||||
@ -645,7 +643,7 @@ function filelist($Str) {
|
||||
<td><a href="requests.php?action=view&id=<?=$Request['ID']?>"><?=$FormatString?> / <?=$BitrateString?> / <?=$MediaString?></a></td>
|
||||
<td>
|
||||
<span id="vote_count_<?=$Request['ID']?>"><?=count($RequestVotes['Voters'])?></span>
|
||||
<? if(check_perms('site_vote')){ ?>
|
||||
<? if (check_perms('site_vote')) { ?>
|
||||
<a href="javascript:Vote(0, <?=$Request['ID']?>)" class="brackets">+</a>
|
||||
<? } ?>
|
||||
</td>
|
||||
@ -657,12 +655,12 @@ function filelist($Str) {
|
||||
<?
|
||||
}
|
||||
$Collages = $Cache->get_value('torrent_collages_'.$GroupID);
|
||||
if(!is_array($Collages)) {
|
||||
if (!is_array($Collages)) {
|
||||
$DB->query("SELECT c.Name, c.NumTorrents, c.ID FROM collages AS c JOIN collages_torrents AS ct ON ct.CollageID=c.ID WHERE ct.GroupID='$GroupID' AND Deleted='0' AND CategoryID!='0'");
|
||||
$Collages = $DB->to_array();
|
||||
$Cache->cache_value('torrent_collages_'.$GroupID, $Collages, 3600*6);
|
||||
}
|
||||
if(count($Collages)>0) {
|
||||
if (count($Collages) > 0) {
|
||||
if (count($Collages) > MAX_COLLAGES) {
|
||||
// Pick some at random
|
||||
$Range = range(0,count($Collages) - 1);
|
||||
@ -701,13 +699,13 @@ function filelist($Str) {
|
||||
}
|
||||
|
||||
$PersonalCollages = $Cache->get_value('torrent_collages_personal_'.$GroupID);
|
||||
if(!is_array($PersonalCollages)) {
|
||||
if (!is_array($PersonalCollages)) {
|
||||
$DB->query("SELECT c.Name, c.NumTorrents, c.ID FROM collages AS c JOIN collages_torrents AS ct ON ct.CollageID=c.ID WHERE ct.GroupID='$GroupID' AND Deleted='0' AND CategoryID='0'");
|
||||
$PersonalCollages = $DB->to_array(false, MYSQLI_NUM);
|
||||
$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);
|
||||
@ -756,7 +754,7 @@ function filelist($Str) {
|
||||
|
||||
// gets the amount of comments for this group
|
||||
$Results = $Cache->get_value('torrent_comments_'.$GroupID);
|
||||
if($Results === false) {
|
||||
if ($Results === false) {
|
||||
$DB->query("SELECT
|
||||
COUNT(c.ID)
|
||||
FROM torrents_comments as c
|
||||
@ -765,7 +763,7 @@ function filelist($Str) {
|
||||
$Cache->cache_value('torrent_comments_'.$GroupID, $Results, 0);
|
||||
}
|
||||
|
||||
if(isset($_GET['postid']) && is_number($_GET['postid']) && $Results > TORRENT_COMMENTS_PER_PAGE) {
|
||||
if (isset($_GET['postid']) && is_number($_GET['postid']) && $Results > TORRENT_COMMENTS_PER_PAGE) {
|
||||
$DB->query("SELECT COUNT(ID) FROM torrents_comments WHERE GroupID = $GroupID AND ID <= $_GET[postid]");
|
||||
list($PostNum) = $DB->next_record();
|
||||
list($Page,$Limit) = Format::page_limit(TORRENT_COMMENTS_PER_PAGE,$PostNum);
|
||||
@ -781,7 +779,7 @@ function filelist($Str) {
|
||||
|
||||
// Cache catalogue from which the page is selected, allows block caches and future ability to specify posts per page
|
||||
$Catalogue = $Cache->get_value('torrent_comments_'.$GroupID.'_catalogue_'.$CatalogueID);
|
||||
if($Catalogue === false) {
|
||||
if ($Catalogue === false) {
|
||||
$DB->query("SELECT
|
||||
c.ID,
|
||||
c.AuthorID,
|
||||
@ -809,9 +807,8 @@ function filelist($Str) {
|
||||
?>
|
||||
</div>
|
||||
<?
|
||||
|
||||
//---------- Begin printing
|
||||
foreach($Thread as $Key => $Post) {
|
||||
foreach ($Thread as $Key => $Post) {
|
||||
list($PostID, $AuthorID, $AddedTime, $Body, $EditedUserID, $EditedTime, $EditedUsername) = array_values($Post);
|
||||
list($AuthorID, $Username, $PermissionID, $Paranoia, $Artist, $Donor, $Warned, $Avatar, $Enabled, $UserTitle) = array_values(Users::user_info($AuthorID));
|
||||
?>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?
|
||||
/**********************************************************************
|
||||
*>>>>>>>>>>>>>>>>>>>>>>>>>>> User search <<<<<<<<<<<<<<<<<<<<<<<<<<<<*
|
||||
* Best viewed with a wide screen monitor *
|
||||
* Best viewed with a wide screen monitor *
|
||||
**********************************************************************/
|
||||
if (!empty($_GET['search'])) {
|
||||
if (preg_match("/^".IP_REGEX."$/", $_GET['search'])) {
|
||||
@ -22,20 +22,20 @@
|
||||
|
||||
define('USERS_PER_PAGE', 30);
|
||||
|
||||
function wrap($String, $ForceMatch = '', $IPSearch = false){
|
||||
if(!$ForceMatch){
|
||||
function wrap($String, $ForceMatch = '', $IPSearch = false) {
|
||||
if (!$ForceMatch) {
|
||||
global $Match;
|
||||
} else {
|
||||
$Match = $ForceMatch;
|
||||
}
|
||||
if($Match == ' REGEXP '){
|
||||
if(strpos($String, '\'') !== false || preg_match('/^.*\\\\$/i', $String)){
|
||||
if ($Match == ' REGEXP ') {
|
||||
if (strpos($String, '\'') !== false || preg_match('/^.*\\\\$/i', $String)) {
|
||||
error('Regex contains illegal characters.');
|
||||
}
|
||||
} else {
|
||||
$String = db_string($String);
|
||||
}
|
||||
if($Match == ' LIKE '){
|
||||
if ($Match == ' LIKE ') {
|
||||
// Fuzzy search
|
||||
// Stick in wildcards at beginning and end of string unless string starts or ends with |
|
||||
if (($String[0] != '|') && !$IPSearch) {
|
||||
@ -44,23 +44,22 @@ function wrap($String, $ForceMatch = '', $IPSearch = false){
|
||||
$String = substr($String, 1, strlen($String));
|
||||
}
|
||||
|
||||
if(substr($String, -1, 1) != '|'){
|
||||
if (substr($String, -1, 1) != '|') {
|
||||
$String = $String.'%';
|
||||
} else {
|
||||
$String = substr($String, 0, -1);
|
||||
}
|
||||
|
||||
}
|
||||
$String="'$String'";
|
||||
return $String;
|
||||
}
|
||||
|
||||
function date_compare($Field, $Operand, $Date1, $Date2 = ''){
|
||||
function date_compare($Field, $Operand, $Date1, $Date2 = '') {
|
||||
$Date1 = db_string($Date1);
|
||||
$Date2 = db_string($Date2);
|
||||
$Return = array();
|
||||
|
||||
switch($Operand){
|
||||
switch($Operand) {
|
||||
case 'on':
|
||||
$Return []= " $Field>='$Date1 00:00:00' ";
|
||||
$Return []= " $Field<='$Date1 23:59:59' ";
|
||||
@ -81,18 +80,18 @@ function date_compare($Field, $Operand, $Date1, $Date2 = ''){
|
||||
}
|
||||
|
||||
|
||||
function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
||||
function num_compare($Field, $Operand, $Num1, $Num2 = '') {
|
||||
|
||||
if($Num1!=0){
|
||||
if ($Num1 != 0) {
|
||||
$Num1 = db_string($Num1);
|
||||
}
|
||||
if($Num2!=0){
|
||||
if ($Num2 != 0) {
|
||||
$Num2 = db_string($Num2);
|
||||
}
|
||||
|
||||
$Return = array();
|
||||
|
||||
switch($Operand){
|
||||
switch($Operand) {
|
||||
case 'equal':
|
||||
$Return []= " $Field='$Num1' ";
|
||||
break;
|
||||
@ -122,7 +121,7 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
||||
$OrderVals = array('inarray'=>array('Username', 'Ratio', 'IP', 'Email', 'Joined', 'Last Seen', 'Uploaded', 'Downloaded', 'Invites', 'Snatches'));
|
||||
$WayVals = array('inarray'=>array('Ascending', 'Descending'));
|
||||
|
||||
if(count($_GET)){
|
||||
if (count($_GET)) {
|
||||
$DateRegex = array('regex'=>'/\d{4}-\d{2}-\d{2}/');
|
||||
|
||||
$ClassIDs = array();
|
||||
@ -172,13 +171,13 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
||||
|
||||
$Err = $Val->ValidateForm($_GET);
|
||||
|
||||
if(!$Err){
|
||||
if (!$Err) {
|
||||
// Passed validation. Let's rock.
|
||||
$RunQuery = false; // if we should run the search
|
||||
|
||||
if(isset($_GET['matchtype']) && $_GET['matchtype'] == 'strict'){
|
||||
if (isset($_GET['matchtype']) && $_GET['matchtype'] == 'strict') {
|
||||
$Match = ' = ';
|
||||
} elseif(isset($_GET['matchtype']) && $_GET['matchtype'] == 'regex') {
|
||||
} elseif (isset($_GET['matchtype']) && $_GET['matchtype'] == 'regex') {
|
||||
$Match = ' REGEXP ';
|
||||
} else {
|
||||
$Match = ' LIKE ';
|
||||
@ -219,12 +218,12 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
||||
FROM users_main AS um1 JOIN users_info AS ui1 ON ui1.UserID=um1.ID ';
|
||||
|
||||
|
||||
if(!empty($_GET['username'])){
|
||||
if (!empty($_GET['username'])) {
|
||||
$Where[]='um1.Username'.$Match.wrap($_GET['username']);
|
||||
}
|
||||
|
||||
if(!empty($_GET['email'])){
|
||||
if(isset($_GET['email_history'])){
|
||||
if (!empty($_GET['email'])) {
|
||||
if (isset($_GET['email_history'])) {
|
||||
$Distinct = 'DISTINCT ';
|
||||
$Join['he']=' JOIN users_history_emails AS he ON he.UserID=um1.ID ';
|
||||
$Where[]= ' he.Email '.$Match.wrap($_GET['email']);
|
||||
@ -255,8 +254,8 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
||||
}
|
||||
|
||||
|
||||
if(!empty($_GET['ip'])){
|
||||
if(isset($_GET['ip_history'])){
|
||||
if (!empty($_GET['ip'])) {
|
||||
if (isset($_GET['ip_history'])) {
|
||||
$Distinct = 'DISTINCT ';
|
||||
$Join['hi']=' JOIN users_history_ips AS hi ON hi.UserID=um1.ID ';
|
||||
$Where[]= ' hi.IP '.$Match.wrap($_GET['ip'], '', true);
|
||||
@ -275,22 +274,22 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_GET['tracker_ip'])){
|
||||
if (!empty($_GET['tracker_ip'])) {
|
||||
$Distinct = 'DISTINCT ';
|
||||
$Join['xfu']=' JOIN xbt_files_users AS xfu ON um1.ID=xfu.uid ';
|
||||
$Where[]= ' xfu.ip '.$Match.wrap($_GET['tracker_ip'], '', true);
|
||||
}
|
||||
|
||||
// if(!empty($_GET['tracker_ip'])){
|
||||
// if (!empty($_GET['tracker_ip'])) {
|
||||
// $Distinct = 'DISTINCT ';
|
||||
// $Join['xs']=' JOIN xbt_snatched AS xs ON um1.ID=xs.uid ';
|
||||
// $Where[]= ' xs.IP '.$Match.wrap($_GET['ip']);
|
||||
// }
|
||||
|
||||
if(!empty($_GET['comment'])){
|
||||
if (!empty($_GET['comment'])) {
|
||||
$Where[]='ui1.AdminComment'.$Match.wrap($_GET['comment']);
|
||||
}
|
||||
|
||||
|
||||
if (!empty($_GET['lastfm'])) {
|
||||
$Distinct = 'DISTINCT ';
|
||||
$Join['lastfm'] = ' JOIN lastfm_users AS lfm ON lfm.ID = um1.ID ';
|
||||
@ -298,91 +297,92 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
||||
}
|
||||
|
||||
|
||||
if(strlen($_GET['invites1'])){
|
||||
if (strlen($_GET['invites1'])) {
|
||||
$Invites1 = round($_GET['invites1']);
|
||||
$Invites2 = round($_GET['invites2']);
|
||||
$Where[]=implode(' AND ', num_compare('Invites', $_GET['invites'], $Invites1, $Invites2));
|
||||
}
|
||||
|
||||
if($_GET['disabled_invites'] == 'yes'){
|
||||
if ($_GET['disabled_invites'] == 'yes') {
|
||||
$Where[]='ui1.DisableInvites=\'1\'';
|
||||
} elseif($_GET['disabled_invites'] == 'no'){
|
||||
} elseif ($_GET['disabled_invites'] == 'no') {
|
||||
$Where[]='ui1.DisableInvites=\'0\'';
|
||||
}
|
||||
|
||||
if($_GET['disabled_uploads'] == 'yes'){
|
||||
if ($_GET['disabled_uploads'] == 'yes') {
|
||||
$Where[]='ui1.DisableUpload=\'1\'';
|
||||
} elseif($_GET['disabled_uploads'] == 'no'){
|
||||
} elseif ($_GET['disabled_uploads'] == 'no') {
|
||||
$Where[]='ui1.DisableUpload=\'0\'';
|
||||
}
|
||||
|
||||
if($_GET['join1']){
|
||||
if ($_GET['join1']) {
|
||||
$Where[]=implode(' AND ', date_compare('ui1.JoinDate', $_GET['joined'], $_GET['join1'], $_GET['join2']));
|
||||
}
|
||||
|
||||
if($_GET['lastactive1']){
|
||||
if ($_GET['lastactive1']) {
|
||||
$Where[]=implode(' AND ', date_compare('um1.LastAccess', $_GET['lastactive'], $_GET['lastactive1'], $_GET['lastactive2']));
|
||||
}
|
||||
|
||||
if($_GET['ratio1']){
|
||||
if ($_GET['ratio1']) {
|
||||
$Decimals = strlen(array_pop(explode('.', $_GET['ratio1'])));
|
||||
if(!$Decimals){ $Decimals = 0; }
|
||||
|
||||
if (!$Decimals) {
|
||||
$Decimals = 0;
|
||||
}
|
||||
$Where[]=implode(' AND ', num_compare("ROUND(Uploaded/Downloaded,$Decimals)", $_GET['ratio'], $_GET['ratio1'], $_GET['ratio2']));
|
||||
}
|
||||
|
||||
if(strlen($_GET['uploaded1'])){
|
||||
if (strlen($_GET['uploaded1'])) {
|
||||
$Upload1 = round($_GET['uploaded1']);
|
||||
$Upload2 = round($_GET['uploaded2']);
|
||||
if($_GET['uploaded']!='buffer'){
|
||||
if ($_GET['uploaded']!='buffer') {
|
||||
$Where[]=implode(' AND ', num_compare('ROUND(Uploaded/1024/1024/1024)', $_GET['uploaded'], $Upload1, $Upload2));
|
||||
} else {
|
||||
$Where[]=implode(' AND ', num_compare('ROUND((Uploaded/1024/1024/1024)-(Downloaded/1024/1024/1023))', 'between', $Upload1*0.9, $Upload1*1.1));
|
||||
}
|
||||
}
|
||||
|
||||
if(strlen($_GET['downloaded1'])){
|
||||
if (strlen($_GET['downloaded1'])) {
|
||||
$Download1 = round($_GET['downloaded1']);
|
||||
$Download2 = round($_GET['downloaded2']);
|
||||
$Where[]=implode(' AND ', num_compare('ROUND(Downloaded/1024/1024/1024)', $_GET['downloaded'], $Download1, $Download2));
|
||||
}
|
||||
|
||||
if(strlen($_GET['snatched1'])){
|
||||
if (strlen($_GET['snatched1'])) {
|
||||
$Snatched1 = round($_GET['snatched1']);
|
||||
$Snatched2 = round($_GET['snatched2']);
|
||||
$Having[]=implode(' AND ', num_compare('Snatches', $_GET['snatched'], $Snatched1, $Snatched2));
|
||||
}
|
||||
|
||||
if($_GET['enabled']!=''){
|
||||
if ($_GET['enabled'] != '') {
|
||||
$Where[]='um1.Enabled='.wrap($_GET['enabled'], '=');
|
||||
}
|
||||
|
||||
if($_GET['class']!=''){
|
||||
if ($_GET['class'] != '') {
|
||||
$Where[]='um1.PermissionID='.wrap($_GET['class'], '=');
|
||||
}
|
||||
|
||||
|
||||
if($_GET['secclass']!=''){
|
||||
if ($_GET['secclass'] != '') {
|
||||
$Join['ul']=' JOIN users_levels AS ul ON um1.ID=ul.UserID ';
|
||||
$Where[]='ul.PermissionID='.wrap($_GET['secclass'], '=');
|
||||
}
|
||||
|
||||
if($_GET['donor'] == 'yes'){
|
||||
if ($_GET['donor'] == 'yes') {
|
||||
$Where[]='ui1.Donor=\'1\'';
|
||||
} elseif($_GET['donor'] == 'no'){
|
||||
} elseif ($_GET['donor'] == 'no') {
|
||||
$Where[]='ui1.Donor=\'0\'';
|
||||
}
|
||||
|
||||
if($_GET['warned'] == 'yes'){
|
||||
if ($_GET['warned'] == 'yes') {
|
||||
$Where[]='ui1.Warned!=\'0000-00-00 00:00:00\'';
|
||||
} elseif($_GET['warned'] == 'no'){
|
||||
} elseif ($_GET['warned'] == 'no') {
|
||||
$Where[]='ui1.Warned=\'0000-00-00 00:00:00\'';
|
||||
}
|
||||
|
||||
if($_GET['disabled_ip']){
|
||||
if ($_GET['disabled_ip']) {
|
||||
$Distinct = 'DISTINCT ';
|
||||
if($_GET['ip_history']){
|
||||
if(!isset($Join['hi'])){
|
||||
if ($_GET['ip_history']) {
|
||||
if (!isset($Join['hi'])) {
|
||||
$Join['hi']=' JOIN users_history_ips AS hi ON hi.UserID=um1.ID ';
|
||||
}
|
||||
$Join['hi2']=' JOIN users_history_ips AS hi2 ON hi2.IP=hi.IP ';
|
||||
@ -392,19 +392,19 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_GET['passkey'])){
|
||||
if (!empty($_GET['passkey'])) {
|
||||
$Where[]='um1.torrent_pass'.$Match.wrap($_GET['passkey']);
|
||||
}
|
||||
|
||||
if(!empty($_GET['avatar'])){
|
||||
if (!empty($_GET['avatar'])) {
|
||||
$Where[]='ui1.Avatar'.$Match.wrap($_GET['avatar']);
|
||||
}
|
||||
|
||||
if($_GET['stylesheet']!=''){
|
||||
if ($_GET['stylesheet']!='') {
|
||||
$Where[]='ui1.StyleID='.wrap($_GET['stylesheet'], '=');
|
||||
}
|
||||
|
||||
if($OrderTable[$_GET['order']] && $WayTable[$_GET['way']]){
|
||||
if ($OrderTable[$_GET['order']] && $WayTable[$_GET['way']]) {
|
||||
$Order = ' ORDER BY '.$OrderTable[$_GET['order']].' '.$WayTable[$_GET['way']].' ';
|
||||
}
|
||||
|
||||
@ -413,16 +413,16 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
||||
$SQL = 'SELECT '.$Distinct.$SQL;
|
||||
$SQL .= implode(' ', $Join);
|
||||
|
||||
if(count($Where)){
|
||||
if (count($Where)) {
|
||||
$SQL .= ' WHERE '.implode(' AND ', $Where);
|
||||
}
|
||||
|
||||
if(count($Having)){
|
||||
if (count($Having)) {
|
||||
$SQL .= ' HAVING '.implode(' AND ', $Having);
|
||||
}
|
||||
$SQL .= $Order;
|
||||
|
||||
if(count($Where)>0 || count($Join)>0 || count($Having)>0){
|
||||
if (count($Where) > 0 || count($Join) > 0 || count($Having) > 0) {
|
||||
$RunQuery = true;
|
||||
}
|
||||
|
||||
@ -445,10 +445,10 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
||||
<td class="label nobr"><span title="Date format is YYYY-MM-DD">Joined:</span></td>
|
||||
<td width="24%">
|
||||
<select name="joined">
|
||||
<option value="on"<? if($_GET['joined']==='on'){echo ' selected="selected"';}?>>On</option>
|
||||
<option value="before"<? if($_GET['joined']==='before'){echo ' selected="selected"';}?>>Before</option>
|
||||
<option value="after"<? if($_GET['joined']==='after'){echo ' selected="selected"';}?>>After</option>
|
||||
<option value="between"<? if($_GET['joined']==='between'){echo ' selected="selected"';}?>>Between</option>
|
||||
<option value="on"<? if ($_GET['joined']==='on') {echo ' selected="selected"';}?>>On</option>
|
||||
<option value="before"<? if ($_GET['joined']==='before') {echo ' selected="selected"';}?>>Before</option>
|
||||
<option value="after"<? if ($_GET['joined']==='after') {echo ' selected="selected"';}?>>After</option>
|
||||
<option value="between"<? if ($_GET['joined']==='between') {echo ' selected="selected"';}?>>Between</option>
|
||||
</select>
|
||||
<input type="text" name="join1" size="6" value="<?=display_str($_GET['join1'])?>" />
|
||||
<input type="text" name="join2" size="6" value="<?=display_str($_GET['join2'])?>" />
|
||||
@ -456,10 +456,10 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
||||
<td class="label nobr">Enabled:</td>
|
||||
<td>
|
||||
<select name="enabled">
|
||||
<option value="" <? if($_GET['enabled']==='') {echo ' selected="selected"';}?>>Any</option>
|
||||
<option value="0"<? if($_GET['enabled']==='0'){echo ' selected="selected"';}?>>Unconfirmed</option>
|
||||
<option value="1"<? if($_GET['enabled']==='1'){echo ' selected="selected"';}?>>Enabled</option>
|
||||
<option value="2"<? if($_GET['enabled']==='2'){echo ' selected="selected"';}?>>Disabled</option>
|
||||
<option value=""<? if ($_GET['enabled']==='') {echo ' selected="selected"';}?>>Any</option>
|
||||
<option value="0"<? if ($_GET['enabled']==='0') {echo ' selected="selected"';}?>>Unconfirmed</option>
|
||||
<option value="1"<? if ($_GET['enabled']==='1') {echo ' selected="selected"';}?>>Enabled</option>
|
||||
<option value="2"<? if ($_GET['enabled']==='2') {echo ' selected="selected"';}?>>Disabled</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@ -471,22 +471,24 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
||||
<td class="label nobr"><span title="Date format is YYYY-MM-DD">Last active:</span></td>
|
||||
<td width="30%">
|
||||
<select name="lastactive">
|
||||
<option value="on"<? if($_GET['lastactive']==='on'){echo ' selected="selected"';}?>>On</option>
|
||||
<option value="before"<? if($_GET['lastactive']==='before'){echo ' selected="selected"';}?>>Before</option>
|
||||
<option value="after"<? if($_GET['lastactive']==='after'){echo ' selected="selected"';}?>>After</option>
|
||||
<option value="between"<? if($_GET['lastactive']==='between'){echo ' selected="selected"';}?>>Between</option>
|
||||
<option value="on"<? if ($_GET['lastactive']==='on') {echo ' selected="selected"';}?>>On</option>
|
||||
<option value="before"<? if ($_GET['lastactive']==='before') {echo ' selected="selected"';}?>>Before</option>
|
||||
<option value="after"<? if ($_GET['lastactive']==='after') {echo ' selected="selected"';}?>>After</option>
|
||||
<option value="between"<? if ($_GET['lastactive']==='between') {echo ' selected="selected"';}?>>Between</option>
|
||||
</select>
|
||||
<input type="text" name="lastactive1" size="6" value="<?=display_str($_GET['lastactive1'])?>" />
|
||||
<input type="text" name="lastactive2" size="6" value="<?=display_str($_GET['lastactive2'])?>" />
|
||||
</td>
|
||||
<td class="label nobr">Primary Class:</td>
|
||||
<td class="label nobr">Primary class:</td>
|
||||
<td>
|
||||
<select name="class">
|
||||
<option value="" <? if($_GET['class']==='') {echo ' selected="selected"';}?>>Any</option>
|
||||
<? foreach($ClassLevels as $Class){
|
||||
if ($Class['Secondary']) { continue; }
|
||||
<option value=""<? if ($_GET['class']==='') {echo ' selected="selected"';}?>>Any</option>
|
||||
<? foreach ($ClassLevels as $Class) {
|
||||
if ($Class['Secondary']) {
|
||||
continue;
|
||||
}
|
||||
?>
|
||||
<option value="<?=$Class['ID'] ?>" <? if($_GET['class']===$Class['ID']) {echo ' selected="selected"';}?>><?=Format::cut_string($Class['Name'], 10, 1, 1).' ('.$Class['Level'].')'?></option>
|
||||
<option value="<?=$Class['ID'] ?>"<? if ($_GET['class']===$Class['ID']) {echo ' selected="selected"';}?>><?=Format::cut_string($Class['Name'], 10, 1, 1).' ('.$Class['Level'].')'?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</td>
|
||||
@ -498,22 +500,24 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
||||
</td>
|
||||
<td class="label nobr"></td>
|
||||
<td></td>
|
||||
<td class="label nobr">Secondary Class:</td>
|
||||
<td class="label nobr">Secondary class:</td>
|
||||
<td>
|
||||
<select name="secclass">
|
||||
<option value="" <? if($_GET['secclass']==='') {echo ' selected="selected"';}?>>Any</option>
|
||||
<option value=""<? if ($_GET['secclass']==='') {echo ' selected="selected"';}?>>Any</option>
|
||||
<? $Secondaries = array();
|
||||
// Neither level nor ID is particularly useful when searching secondary classes, so let's do some
|
||||
// kung-fu to sort them alphabetically.
|
||||
$fnc = function($Class1, $Class2) { return strcmp($Class1['Name'], $Class2['Name']);};
|
||||
foreach($ClassLevels as $Class) {
|
||||
if (!$Class['Secondary']) { continue; }
|
||||
foreach ($ClassLevels as $Class) {
|
||||
if (!$Class['Secondary']) {
|
||||
continue;
|
||||
}
|
||||
$Secondaries[] = $Class;
|
||||
}
|
||||
usort($Secondaries, $fnc);
|
||||
foreach($Secondaries as $Class) {
|
||||
foreach ($Secondaries as $Class) {
|
||||
?>
|
||||
<option value="<?=$Class['ID'] ?>" <? if($_GET['secclass']===$Class['ID']) {echo ' selected="selected"';}?>><?=Format::cut_string($Class['Name'], 20, 1, 1)?></option>
|
||||
<option value="<?=$Class['ID'] ?>"<? if ($_GET['secclass']===$Class['ID']) {echo ' selected="selected"';}?>><?=Format::cut_string($Class['Name'], 20, 1, 1)?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</td>
|
||||
@ -521,19 +525,19 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
||||
<tr>
|
||||
<td class="label nobr">Extra:</td>
|
||||
<td>
|
||||
<input type="checkbox" name="ip_history" id="ip_history"<? if($_GET['ip_history']){ echo ' checked="checked"'; }?> />
|
||||
<label for="ip_history">IP History</label>
|
||||
<input type="checkbox" name="ip_history" id="ip_history"<? if ($_GET['ip_history']) { echo ' checked="checked"'; }?> />
|
||||
<label for="ip_history">IP history</label>
|
||||
|
||||
<input type="checkbox" name="email_history" id="email_history"<? if($_GET['email_history']){ echo ' checked="checked"'; }?> />
|
||||
<label for="email_history">Email History</label>
|
||||
<input type="checkbox" name="email_history" id="email_history"<? if ($_GET['email_history']) { echo ' checked="checked"'; }?> />
|
||||
<label for="email_history">Email history</label>
|
||||
</td>
|
||||
<td class="label nobr">Ratio:</td>
|
||||
<td width="30%">
|
||||
<select name="ratio">
|
||||
<option value="equal"<? if($_GET['ratio']==='equal'){echo ' selected="selected"';}?>>Equal</option>
|
||||
<option value="above"<? if($_GET['ratio']==='above'){echo ' selected="selected"';}?>>Above</option>
|
||||
<option value="below"<? if($_GET['ratio']==='below'){echo ' selected="selected"';}?>>Below</option>
|
||||
<option value="between"<? if($_GET['ratio']==='between'){echo ' selected="selected"';}?>>Between</option>
|
||||
<option value="equal"<? if ($_GET['ratio']==='equal') {echo ' selected="selected"';}?>>Equal</option>
|
||||
<option value="above"<? if ($_GET['ratio']==='above') {echo ' selected="selected"';}?>>Above</option>
|
||||
<option value="below"<? if ($_GET['ratio']==='below') {echo ' selected="selected"';}?>>Below</option>
|
||||
<option value="between"<? if ($_GET['ratio']==='between') {echo ' selected="selected"';}?>>Between</option>
|
||||
</select>
|
||||
<input type="text" name="ratio1" size="6" value="<?=display_str($_GET['ratio1'])?>" />
|
||||
<input type="text" name="ratio2" size="6" value="<?=display_str($_GET['ratio2'])?>" />
|
||||
@ -541,25 +545,31 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
||||
<td class="label nobr">Donor:</td>
|
||||
<td>
|
||||
<select name="donor">
|
||||
<option value="" <? if($_GET['donor']==='') {echo ' selected="selected"';}?>>Any</option>
|
||||
<option value="yes" <? if($_GET['donor']==='yes') {echo ' selected="selected"';}?>>Yes</option>
|
||||
<option value="no" <? if($_GET['donor']==='no') {echo ' selected="selected"';}?>>No</option>
|
||||
<option value=""<? if ($_GET['donor']==='') {echo ' selected="selected"';}?>>Any</option>
|
||||
<option value="yes"<? if ($_GET['donor']==='yes') {echo ' selected="selected"';}?>>Yes</option>
|
||||
<option value="no"<? if ($_GET['donor']==='no') {echo ' selected="selected"';}?>>No</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label nobr">Comment:</td>
|
||||
<? if (check_perms('users_mod')) { ?>
|
||||
<td class="label nobr">Staff notes:</td>
|
||||
<td>
|
||||
<input type="text" name="comment" size="20" value="<?=display_str($_GET['comment'])?>" />
|
||||
</td>
|
||||
<? } else { ?>
|
||||
<td class="label nobr"></td>
|
||||
<td>
|
||||
</td>
|
||||
<? } ?>
|
||||
<td class="label nobr"><span title="Units are in bytes">Uploaded:</span></td>
|
||||
<td width="30%">
|
||||
<select name="uploaded">
|
||||
<option value="equal"<? if($_GET['uploaded']==='equal'){echo ' selected="selected"';}?>>Equal</option>
|
||||
<option value="above"<? if($_GET['uploaded']==='above'){echo ' selected="selected"';}?>>Above</option>
|
||||
<option value="below"<? if($_GET['uploaded']==='below'){echo ' selected="selected"';}?>>Below</option>
|
||||
<option value="between"<? if($_GET['uploaded']==='between'){echo ' selected="selected"';}?>>Between</option>
|
||||
<option value="buffer"<? if($_GET['uploaded']==='buffer'){echo ' selected="selected"';}?>>Buffer</option>
|
||||
<option value="equal"<? if ($_GET['uploaded']==='equal') {echo ' selected="selected"';}?>>Equal</option>
|
||||
<option value="above"<? if ($_GET['uploaded']==='above') {echo ' selected="selected"';}?>>Above</option>
|
||||
<option value="below"<? if ($_GET['uploaded']==='below') {echo ' selected="selected"';}?>>Below</option>
|
||||
<option value="between"<? if ($_GET['uploaded']==='between') {echo ' selected="selected"';}?>>Between</option>
|
||||
<option value="buffer"<? if ($_GET['uploaded']==='buffer') {echo ' selected="selected"';}?>>Buffer</option>
|
||||
</select>
|
||||
<input type="text" name="uploaded1" size="6" value="<?=display_str($_GET['uploaded1'])?>" />
|
||||
<input type="text" name="uploaded2" size="6" value="<?=display_str($_GET['uploaded2'])?>" />
|
||||
@ -567,21 +577,21 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
||||
<td class="label nobr">Warned:</td>
|
||||
<td>
|
||||
<select name="warned">
|
||||
<option value="" <? if($_GET['warned']==='') {echo ' selected="selected"';}?>>Any</option>
|
||||
<option value="yes" <? if($_GET['warned']==='yes') {echo ' selected="selected"';}?>>Yes</option>
|
||||
<option value="no" <? if($_GET['warned']==='no') {echo ' selected="selected"';}?>>No</option>
|
||||
<option value=""<? if ($_GET['warned']==='') {echo ' selected="selected"';}?>>Any</option>
|
||||
<option value="yes"<? if ($_GET['warned']==='yes') {echo ' selected="selected"';}?>>Yes</option>
|
||||
<option value="no"<? if ($_GET['warned']==='no') {echo ' selected="selected"';}?>>No</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="label nobr"># of Invites:</td>
|
||||
<td class="label nobr"># of invites:</td>
|
||||
<td>
|
||||
<select name="invites">
|
||||
<option value="equal"<? if($_GET['invites']==='equal'){echo ' selected="selected"';}?>>Equal</option>
|
||||
<option value="above"<? if($_GET['invites']==='above'){echo ' selected="selected"';}?>>Above</option>
|
||||
<option value="below"<? if($_GET['invites']==='below'){echo ' selected="selected"';}?>>Below</option>
|
||||
<option value="between"<? if($_GET['invites']==='between'){echo ' selected="selected"';}?>>Between</option>
|
||||
<option value="equal"<? if ($_GET['invites']==='equal') {echo ' selected="selected"';}?>>Equal</option>
|
||||
<option value="above"<? if ($_GET['invites']==='above') {echo ' selected="selected"';}?>>Above</option>
|
||||
<option value="below"<? if ($_GET['invites']==='below') {echo ' selected="selected"';}?>>Below</option>
|
||||
<option value="between"<? if ($_GET['invites']==='between') {echo ' selected="selected"';}?>>Between</option>
|
||||
</select>
|
||||
<input type="text" name="invites1" size="6" value="<?=display_str($_GET['invites1'])?>" />
|
||||
<input type="text" name="invites2" size="6" value="<?=display_str($_GET['invites2'])?>" />
|
||||
@ -589,47 +599,49 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
||||
<td class="label nobr"><span title="Units are in bytes">Downloaded:</span></td>
|
||||
<td width="30%">
|
||||
<select name="downloaded">
|
||||
<option value="equal"<? if($_GET['downloaded']==='equal'){echo ' selected="selected"';}?>>Equal</option>
|
||||
<option value="above"<? if($_GET['downloaded']==='above'){echo ' selected="selected"';}?>>Above</option>
|
||||
<option value="below"<? if($_GET['downloaded']==='below'){echo ' selected="selected"';}?>>Below</option>
|
||||
<option value="between"<? if($_GET['downloaded']==='between'){echo ' selected="selected"';}?>>Between</option>
|
||||
<option value="equal"<? if ($_GET['downloaded']==='equal') {echo ' selected="selected"';}?>>Equal</option>
|
||||
<option value="above"<? if ($_GET['downloaded']==='above') {echo ' selected="selected"';}?>>Above</option>
|
||||
<option value="below"<? if ($_GET['downloaded']==='below') {echo ' selected="selected"';}?>>Below</option>
|
||||
<option value="between"<? if ($_GET['downloaded']==='between') {echo ' selected="selected"';}?>>Between</option>
|
||||
</select>
|
||||
<input type="text" name="downloaded1" size="6" value="<?=display_str($_GET['downloaded1'])?>" />
|
||||
<input type="text" name="downloaded2" size="6" value="<?=display_str($_GET['downloaded2'])?>" />
|
||||
</td>
|
||||
<td class="label nobr">Disabled IP:</td>
|
||||
<td class="label nobr">
|
||||
<label for="disabled_ip" title="Only display users that have a disabled account linked by IP address">Disabled accounts<br />linked by IP:</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="disabled_ip" <? if($_GET['disabled_ip']){ echo ' checked="checked"'; }?> />
|
||||
<input type="checkbox" name="disabled_ip" id="disabled_ip"<? if ($_GET['disabled_ip']) { echo ' checked="checked"'; }?> />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="label nobr">Disabled invites</td>
|
||||
<td class="label nobr">Disabled invites:</td>
|
||||
<td>
|
||||
<select name="disabled_invites">
|
||||
<option value="" <? if($_GET['disabled_invites']==='') {echo ' selected="selected"';}?>>Any</option>
|
||||
<option value="yes" <? if($_GET['disabled_invites']==='yes') {echo ' selected="selected"';}?>>Yes</option>
|
||||
<option value="no" <? if($_GET['disabled_invites']==='no') {echo ' selected="selected"';}?>>No</option>
|
||||
<option value=""<? if ($_GET['disabled_invites']==='') {echo ' selected="selected"';}?>>Any</option>
|
||||
<option value="yes"<? if ($_GET['disabled_invites']==='yes') {echo ' selected="selected"';}?>>Yes</option>
|
||||
<option value="no"<? if ($_GET['disabled_invites']==='no') {echo ' selected="selected"';}?>>No</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="label nobr">Snatched:</td>
|
||||
<td width="30%">
|
||||
<select name="snatched">
|
||||
<option value="equal"<? if(isset($_GET['snatched']) && $_GET['snatched']==='equal'){echo ' selected="selected"';}?>>Equal</option>
|
||||
<option value="above"<? if(isset($_GET['snatched']) && $_GET['snatched']==='above'){echo ' selected="selected"';}?>>Above</option>
|
||||
<option value="below"<? if(isset($_GET['snatched']) && $_GET['snatched']==='below'){echo ' selected="selected"';}?>>Below</option>
|
||||
<option value="between"<? if(isset($_GET['snatched']) && $_GET['snatched']==='between'){echo ' selected="selected"';}?>>Between</option>
|
||||
<option value="off"<? if(isset($_GET['snatched']) && $_GET['snatched']==='off'){echo ' selected="selected"';}?>>Off</option>
|
||||
<option value="equal"<? if (isset($_GET['snatched']) && $_GET['snatched']==='equal') {echo ' selected="selected"';}?>>Equal</option>
|
||||
<option value="above"<? if (isset($_GET['snatched']) && $_GET['snatched']==='above') {echo ' selected="selected"';}?>>Above</option>
|
||||
<option value="below"<? if (isset($_GET['snatched']) && $_GET['snatched']==='below') {echo ' selected="selected"';}?>>Below</option>
|
||||
<option value="between"<? if (isset($_GET['snatched']) && $_GET['snatched']==='between') {echo ' selected="selected"';}?>>Between</option>
|
||||
<option value="off"<? if (isset($_GET['snatched']) && $_GET['snatched']==='off') {echo ' selected="selected"';}?>>Off</option>
|
||||
</select>
|
||||
<input type="text" name="snatched1" size="6" value="<?=display_str($_GET['snatched1'])?>" />
|
||||
<input type="text" name="snatched2" size="6" value="<?=display_str($_GET['snatched2'])?>" />
|
||||
</td>
|
||||
<td class="label nobr">Disabled uploads</td>
|
||||
<td class="label nobr">Disabled uploads:</td>
|
||||
<td>
|
||||
<select name="disabled_uploads">
|
||||
<option value="" <? if(isset($_GET['disabled_uploads']) && $_GET['disabled_uploads']==='') {echo ' selected="selected"';}?>>Any</option>
|
||||
<option value="yes" <? if(isset($_GET['disabled_uploads']) && $_GET['disabled_uploads']==='yes') {echo ' selected="selected"';}?>>Yes</option>
|
||||
<option value="no" <? if(isset($_GET['disabled_uploads']) && $_GET['disabled_uploads']==='no') {echo ' selected="selected"';}?>>No</option>
|
||||
<option value=""<? if (isset($_GET['disabled_uploads']) && $_GET['disabled_uploads']==='') {echo ' selected="selected"';}?>>Any</option>
|
||||
<option value="yes"<? if (isset($_GET['disabled_uploads']) && $_GET['disabled_uploads']==='yes') {echo ' selected="selected"';}?>>Yes</option>
|
||||
<option value="no"<? if (isset($_GET['disabled_uploads']) && $_GET['disabled_uploads']==='no') {echo ' selected="selected"';}?>>No</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@ -642,7 +654,7 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
||||
<td>
|
||||
<input type="text" name="tracker_ip" size="20" value="<?=display_str($_GET['tracker_ip'])?>" />
|
||||
</td>
|
||||
<td class="label nobr">Last.fm Username:</td>
|
||||
<td class="label nobr">Last.fm username:</td>
|
||||
<td>
|
||||
<input type="text" name="lastfm" size="20" value="<?=display_str($_GET['lastfm'])?>" />
|
||||
</td>
|
||||
@ -657,48 +669,48 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
||||
<td>
|
||||
<select name="stylesheet" id="stylesheet">
|
||||
<option value="">Any</option>
|
||||
<? foreach($Stylesheets as $Style) { ?>
|
||||
<? foreach ($Stylesheets as $Style) { ?>
|
||||
<option value="<?=$Style['ID']?>"<?Format::selected('stylesheet',$Style['ID'])?>><?=$Style['ProperName']?></option>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
</select>
|
||||
</td>
|
||||
<td class="label nobr"><span title="Two-letter codes as defined in ISO 3166-1 alpha-2">Country Code:</span></td>
|
||||
<td class="label nobr"><span title="Two-letter codes as defined in ISO 3166-1 alpha-2">Country code:</span></td>
|
||||
<td width="30%">
|
||||
<select name="cc_op">
|
||||
<option value="equal"<? if ($_GET['cc_op']==='equal'){ echo ' selected="selected"';}?>>Equals</option>
|
||||
<option value="not_equal"<? if ($_GET['cc_op']==='not_equal'){ echo ' selected="selected"';}?>>Not Equal</option>
|
||||
<option value="equal"<? if ($_GET['cc_op']==='equal') { echo ' selected="selected"';}?>>Equals</option>
|
||||
<option value="not_equal"<? if ($_GET['cc_op']==='not_equal') { echo ' selected="selected"';}?>>Not equal</option>
|
||||
</select>
|
||||
<input type="text" name="cc" size="2" value="<?=display_str($_GET['cc'])?>" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="label nobr">Type</td>
|
||||
<td class="label nobr">Search type:</td>
|
||||
<td>
|
||||
<label title="A "strict" search uses no wildcards in search fields, and it is analogous to `grep -E "ˆSEARCHTERM$"`">Strict <input type="radio" name="matchtype" value="strict"<? if($_GET['matchtype'] == 'strict' || !$_GET['matchtype']){ echo ' checked="checked"'; } ?> /></label> |
|
||||
<label title="A "fuzzy" search automatically prepends and appends wildcards to search strings, except for IP address searches, unless the search string begins or ends with a "|" (pipe). It is analogous to a vanilla grep search (except for the pipe stuff).">Fuzzy <input type="radio" name="matchtype" value="fuzzy"<? if($_GET['matchtype'] == 'fuzzy' || !$_GET['matchtype']){ echo ' checked="checked"'; } ?> /></label> |
|
||||
<label title="A "regex" search uses MySQL's regular expression syntax.">Regex <input type="radio" name="matchtype" value="regex"<? if($_GET['matchtype'] == 'regex'){ echo ' checked="checked"'; } ?> /></label>
|
||||
<label title="A "strict" search uses no wildcards in search fields, and it is analogous to `grep -E "ˆSEARCHTERM$"`">Strict <input type="radio" name="matchtype" value="strict"<? if ($_GET['matchtype'] == 'strict' || !$_GET['matchtype']) { echo ' checked="checked"'; } ?> /></label> |
|
||||
<label title="A "fuzzy" search automatically prepends and appends wildcards to search strings, except for IP address searches, unless the search string begins or ends with a "|" (pipe). It is analogous to a vanilla grep search (except for the pipe stuff).">Fuzzy <input type="radio" name="matchtype" value="fuzzy"<? if ($_GET['matchtype'] == 'fuzzy' || !$_GET['matchtype']) { echo ' checked="checked"'; } ?> /></label> |
|
||||
<label title="A "regex" search uses MySQL's regular expression syntax.">Regex <input type="radio" name="matchtype" value="regex"<? if ($_GET['matchtype'] == 'regex') { echo ' checked="checked"'; } ?> /></label>
|
||||
</td>
|
||||
<td class="label nobr">Order:</td>
|
||||
<td class="nobr">
|
||||
<select name="order">
|
||||
<?
|
||||
foreach(array_shift($OrderVals) as $Cur){ ?>
|
||||
<option value="<?=$Cur?>"<? if(isset($_GET['order']) && $_GET['order'] == $Cur || (!isset($_GET['order']) && $Cur == 'Joined')) { echo ' selected="selected"'; } ?>><?=$Cur?></option>
|
||||
<? }?>
|
||||
<?
|
||||
foreach (array_shift($OrderVals) as $Cur) { ?>
|
||||
<option value="<?=$Cur?>"<? if (isset($_GET['order']) && $_GET['order'] == $Cur || (!isset($_GET['order']) && $Cur == 'Joined')) { echo ' selected="selected"'; } ?>><?=$Cur?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
<select name="way">
|
||||
<? foreach(array_shift($WayVals) as $Cur){ ?>
|
||||
<option value="<?=$Cur?>"<? if(isset($_GET['way']) && $_GET['way'] == $Cur || (!isset($_GET['way']) && $Cur == 'Descending')) { echo ' selected="selected"'; } ?>><?=$Cur?></option>
|
||||
<? }?>
|
||||
<? foreach (array_shift($WayVals) as $Cur) { ?>
|
||||
<option value="<?=$Cur?>"<? if (isset($_GET['way']) && $_GET['way'] == $Cur || (!isset($_GET['way']) && $Cur == 'Descending')) { echo ' selected="selected"'; } ?>><?=$Cur?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</td>
|
||||
<td class="label nobr"># of Emails:</td>
|
||||
<td class="label nobr"># of emails:</td>
|
||||
<td>
|
||||
<select name="emails_opt">
|
||||
<option value="equal"<? if($_GET['emails_opt']==='equal'){echo ' selected="selected"';}?>>Equal</option>
|
||||
<option value="above"<? if($_GET['emails_opt']==='above'){echo ' selected="selected"';}?>>Above</option>
|
||||
<option value="below"<? if($_GET['emails_opt']==='below'){echo ' selected="selected"';}?>>Below</option>
|
||||
<option value="equal"<? if ($_GET['emails_opt']==='equal') {echo ' selected="selected"';}?>>Equal</option>
|
||||
<option value="above"<? if ($_GET['emails_opt']==='above') {echo ' selected="selected"';}?>>Above</option>
|
||||
<option value="below"<? if ($_GET['emails_opt']==='below') {echo ' selected="selected"';}?>>Below</option>
|
||||
</select>
|
||||
<input type="text" name="email_cnt" size="6" value="<?=display_str($_GET['email_cnt'])?>" />
|
||||
</td>
|
||||
@ -712,7 +724,7 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
||||
</form>
|
||||
</div>
|
||||
<?
|
||||
if($RunQuery){
|
||||
if ($RunQuery) {
|
||||
$Results = $DB->query($SQL);
|
||||
$DB->query('SELECT FOUND_ROWS()');
|
||||
list($NumResults) = $DB->next_record();
|
||||
@ -729,12 +741,12 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
||||
?>
|
||||
</div>
|
||||
<div class="box pad center">
|
||||
<h2><?=$NumResults?> results</h2>
|
||||
<h2><?=number_format($NumResults)?> results</h2>
|
||||
<table width="100%">
|
||||
<tr class="colhead">
|
||||
<td>Username</td>
|
||||
<td>Ratio</td>
|
||||
<td>IP</td>
|
||||
<td>IP address</td>
|
||||
<td>Email</td>
|
||||
<td>Joined</td>
|
||||
<td>Last seen</td>
|
||||
@ -745,7 +757,7 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
||||
<td>Invites</td>
|
||||
</tr>
|
||||
<?
|
||||
while(list($UserID, $Username, $Uploaded, $Downloaded, $Snatched, $Class, $Email, $Enabled, $IP, $Invites, $DisableInvites, $Warned, $Donor, $JoinDate, $LastAccess) = $DB->next_record()){ ?>
|
||||
while (list($UserID, $Username, $Uploaded, $Downloaded, $Snatched, $Class, $Email, $Enabled, $IP, $Invites, $DisableInvites, $Warned, $Donor, $JoinDate, $LastAccess) = $DB->next_record()) { ?>
|
||||
<tr>
|
||||
<td><?=Users::format_username($UserID, true, true, true, true)?></td>
|
||||
<td><?=Format::get_ratio_html($Uploaded, $Downloaded)?></td>
|
||||
@ -761,7 +773,7 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
||||
?>
|
||||
<td><?=number_format((int)$Downloads)?></td>
|
||||
<td><?=is_numeric($Snatched) ? number_format($Snatched) : display_str($Snatched)?></td>
|
||||
<td><? if($DisableInvites) { echo 'X'; } else { echo number_format($Invites); } ?></td>
|
||||
<td><? if ($DisableInvites) { echo 'X'; } else { echo number_format($Invites); } ?></td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
|
@ -20,10 +20,10 @@
|
||||
break;
|
||||
case 'notify_delete':
|
||||
authorize();
|
||||
if($_GET['id'] && is_number($_GET['id'])){
|
||||
if ($_GET['id'] && is_number($_GET['id'])) {
|
||||
$DB->query("DELETE FROM users_notify_filters WHERE ID='".db_string($_GET['id'])."' AND UserID='$LoggedUser[ID]'");
|
||||
$ArtistNotifications = $Cache->get_value('notify_artists_'.$LoggedUser['ID']);
|
||||
if(is_array($ArtistNotifications) && $ArtistNotifications['ID'] == $_GET['id']) {
|
||||
if (is_array($ArtistNotifications) && $ArtistNotifications['ID'] == $_GET['id']) {
|
||||
$Cache->delete_value('notify_artists_'.$LoggedUser['ID']);
|
||||
}
|
||||
}
|
||||
@ -42,7 +42,6 @@
|
||||
case 'edit':
|
||||
include('edit.php');
|
||||
break;
|
||||
|
||||
case 'takeedit':
|
||||
include('takeedit.php');
|
||||
break;
|
||||
@ -92,37 +91,37 @@
|
||||
include(SERVER_ROOT.'/sections/user/user.php');
|
||||
break;
|
||||
|
||||
//Provide public methods for Last.fm data gets.
|
||||
case 'lastfm_compare':
|
||||
if(isset($_GET['username'])) {
|
||||
echo LastFM::compare_user_with($_GET['username']);
|
||||
}
|
||||
break;
|
||||
case 'lastfm_last_played_track':
|
||||
if(isset($_GET['username'])) {
|
||||
echo LastFM::get_last_played_track($_GET['username']);
|
||||
}
|
||||
break;
|
||||
case 'lastfm_top_artists':
|
||||
if(isset($_GET['username'])) {
|
||||
echo LastFM::get_top_artists($_GET['username']);
|
||||
}
|
||||
break;
|
||||
case 'lastfm_top_albums':
|
||||
if(isset($_GET['username'])) {
|
||||
echo LastFM::get_top_albums($_GET['username']);
|
||||
}
|
||||
break;
|
||||
case 'lastfm_top_tracks':
|
||||
if(isset($_GET['username'])) {
|
||||
echo LastFM::get_top_tracks($_GET['username']);
|
||||
}
|
||||
break;
|
||||
case 'lastfm_clear_cache':
|
||||
if(isset($_GET['username']) && isset($_GET['uid'])) {
|
||||
echo LastFM::clear_cache($_GET['username'],$_GET['uid']);
|
||||
}
|
||||
break;
|
||||
//Provide public methods for Last.fm data gets.
|
||||
case 'lastfm_compare':
|
||||
if (isset($_GET['username'])) {
|
||||
echo LastFM::compare_user_with($_GET['username']);
|
||||
}
|
||||
break;
|
||||
case 'lastfm_last_played_track':
|
||||
if (isset($_GET['username'])) {
|
||||
echo LastFM::get_last_played_track($_GET['username']);
|
||||
}
|
||||
break;
|
||||
case 'lastfm_top_artists':
|
||||
if (isset($_GET['username'])) {
|
||||
echo LastFM::get_top_artists($_GET['username']);
|
||||
}
|
||||
break;
|
||||
case 'lastfm_top_albums':
|
||||
if (isset($_GET['username'])) {
|
||||
echo LastFM::get_top_albums($_GET['username']);
|
||||
}
|
||||
break;
|
||||
case 'lastfm_top_tracks':
|
||||
if (isset($_GET['username'])) {
|
||||
echo LastFM::get_top_tracks($_GET['username']);
|
||||
}
|
||||
break;
|
||||
case 'lastfm_clear_cache':
|
||||
if (isset($_GET['username']) && isset($_GET['uid'])) {
|
||||
echo LastFM::clear_cache($_GET['username'],$_GET['uid']);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (isset($_REQUEST['id'])) {
|
||||
include(SERVER_ROOT.'/sections/user/user.php');
|
||||
|
@ -1,7 +1,11 @@
|
||||
<?
|
||||
//TODO: Redo html
|
||||
if (!check_perms('admin_manage_permissions')) { error(403); }
|
||||
if(!isset($_REQUEST['userid']) || !is_number($_REQUEST['userid'])){ error(404); }
|
||||
if (!check_perms('admin_manage_permissions')) {
|
||||
error(403);
|
||||
}
|
||||
if (!isset($_REQUEST['userid']) || !is_number($_REQUEST['userid'])) {
|
||||
error(404);
|
||||
}
|
||||
|
||||
include(SERVER_ROOT."/classes/permissions_form.php");
|
||||
|
||||
@ -22,13 +26,15 @@
|
||||
authorize();
|
||||
|
||||
foreach ($PermissionsArray as $Perm => $Explaination) {
|
||||
$Setting = (isset($_POST['perm_'.$Perm]))?1:0;
|
||||
$Default = (isset($Defaults[$Perm]))?1:0;
|
||||
$Setting = (isset($_POST['perm_'.$Perm])) ? 1 : 0;
|
||||
$Default = (isset($Defaults[$Perm])) ? 1 : 0;
|
||||
if ($Setting != $Default) {
|
||||
$Delta[$Perm] = $Setting;
|
||||
}
|
||||
}
|
||||
if (!is_number($_POST['maxcollages']) && !empty($_POST['maxcollages'])) { error("Please enter a valid number of extra personal collages"); }
|
||||
if (!is_number($_POST['maxcollages']) && !empty($_POST['maxcollages'])) {
|
||||
error("Please enter a valid number of extra personal collages");
|
||||
}
|
||||
$Delta['MaxCollages'] = $_POST['maxcollages'];
|
||||
|
||||
$Cache->begin_transaction('user_info_heavy_'.$UserID);
|
||||
@ -44,10 +50,14 @@
|
||||
|
||||
function display_perm($Key,$Title) {
|
||||
global $Defaults, $Permissions;
|
||||
$Perm='<input id="default_'.$Key.'" type="checkbox" disabled';
|
||||
if (isset($Defaults[$Key]) && $Defaults[$Key]) { $Perm.=' checked'; }
|
||||
$Perm='<input id="default_'.$Key.'" type="checkbox" disabled="disabled"';
|
||||
if (isset($Defaults[$Key]) && $Defaults[$Key]) {
|
||||
$Perm.=' checked="checked"';
|
||||
}
|
||||
$Perm.=' /><input type="checkbox" name="perm_'.$Key.'" id="'.$Key.'" value="1"';
|
||||
if (isset($Permissions[$Key]) && $Permissions[$Key]) { $Perm.=' checked'; }
|
||||
if (isset($Permissions[$Key]) && $Permissions[$Key]) {
|
||||
$Perm.=' checked="checked"';
|
||||
}
|
||||
$Perm.=' /> <label for="'.$Key.'">'.$Title.'</label><br />';
|
||||
echo $Perm;
|
||||
}
|
||||
@ -66,7 +76,7 @@ function reset() {
|
||||
//]]>
|
||||
</script>
|
||||
<div class="header">
|
||||
<h2><?=Users::format_username($UserID, false, false, false)?> > Permissions</h2>
|
||||
<h2><?=Users::format_username($UserID, false, false, false)?> > Permissions</h2>
|
||||
<div class="linkbox">
|
||||
<a href="#" onclick="reset();return false;" class="brackets">Defaults</a>
|
||||
</div>
|
||||
@ -80,7 +90,7 @@ function reset() {
|
||||
<table class="layout permission_head">
|
||||
<tr>
|
||||
<td class="label">Extra personal collages</td>
|
||||
<td><input type="text" name="maxcollages" size="5" value="<?=($MaxCollages?$MaxCollages:'0')?>" /></td>
|
||||
<td><input type="text" name="maxcollages" size="5" value="<?=($MaxCollages ? $MaxCollages : '0') ?>" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="action" value="permissions" />
|
||||
|
@ -58,7 +58,7 @@
|
||||
?>
|
||||
</div>
|
||||
<form class="search_form" name="users" action="user.php" method="get">
|
||||
<input type="hidden" name="action" value="search" />
|
||||
<input type="hidden" name="action" value="search" />
|
||||
<table class="layout" width="100%">
|
||||
<tr>
|
||||
<td class="label nobr">Username:</td>
|
||||
@ -72,20 +72,20 @@
|
||||
</form>
|
||||
<br />
|
||||
<div class="box pad center">
|
||||
<table style="width:400px;margin:0px auto;">
|
||||
<table style="width: 400px; margin: 0px auto;">
|
||||
<tr class="colhead">
|
||||
<td width="50%">Username</td>
|
||||
<td>Class</td>
|
||||
<td>Primary class</td>
|
||||
</tr>
|
||||
<?
|
||||
foreach($Results as $Result) {
|
||||
list($UserID, $Username, $Enabled, $PermissionID, $Donor, $Warned) = $Result;
|
||||
foreach ($Results as $Result) {
|
||||
list($UserID, $Username, $Enabled, $PermissionID, $Donor, $Warned) = $Result;
|
||||
?>
|
||||
<tr>
|
||||
<td><?=Users::format_username($UserID, true, true, true, true);?></td>
|
||||
<td><?=Users::make_class_string($PermissionID);?></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
</table>
|
||||
</div>
|
||||
<div class="linkbox">
|
||||
|
@ -365,7 +365,7 @@
|
||||
}
|
||||
|
||||
if ($Warned == 1 && $Cur['Warned']=='0000-00-00 00:00:00' && check_perms('users_warn')) {
|
||||
Misc::send_pm($UserID, 0, 'You have received a warning', "You have been [url=https://".NONSSL_SITE_URL."/wiki.php?action=article&id=218]warned for $WarnLength week(s)[/url] by [user]".$LoggedUser['Username']."[/user]. The reason given was: $WarnReason");
|
||||
Misc::send_pm($UserID, 0, 'You have received a warning', "You have been [url=https://".SSL_SITE_URL."/wiki.php?action=article&id=218]warned for $WarnLength week(s)[/url] by [user]".$LoggedUser['Username']."[/user]. The reason given was: $WarnReason");
|
||||
$UpdateSet[]="Warned='".sqltime()."' + INTERVAL $WarnLength WEEK";
|
||||
$Msg = "warned for $WarnLength week(s)";
|
||||
if ($WarnReason) { $Msg.=" for $WarnReason"; }
|
||||
@ -431,7 +431,7 @@
|
||||
$EditSummary[]="avatar status changed";
|
||||
$HeavyUpdates['DisableAvatar']=$DisableAvatar;
|
||||
if (!empty($UserReason)) {
|
||||
Misc::send_pm($UserID, 0, 'Your avatar privileges have been disabled', "Your avatar privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url].");
|
||||
Misc::send_pm($UserID, 0, 'Your avatar privileges have been disabled', "Your avatar privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".SSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url].");
|
||||
}
|
||||
}
|
||||
|
||||
@ -441,7 +441,7 @@
|
||||
$HeavyUpdates['DisableLeech']=$DisableLeech;
|
||||
$HeavyUpdates['CanLeech']=$DisableLeech;
|
||||
if (!empty($UserReason)) {
|
||||
Misc::send_pm($UserID, 0, 'Your leeching privileges have been disabled', "Your leeching privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url].");
|
||||
Misc::send_pm($UserID, 0, 'Your leeching privileges have been disabled', "Your leeching privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".SSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url].");
|
||||
}
|
||||
Tracker::update_tracker('update_user', array('passkey' => $Cur['torrent_pass'], 'can_leech' => $DisableLeech));
|
||||
}
|
||||
@ -451,7 +451,7 @@
|
||||
if ($DisableInvites == 1) {
|
||||
//$UpdateSet[]="Invites='0'";
|
||||
if (!empty($UserReason)) {
|
||||
Misc::send_pm($UserID, 0, 'Your invite privileges have been disabled', "Your invite privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url].");
|
||||
Misc::send_pm($UserID, 0, 'Your invite privileges have been disabled', "Your invite privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".SSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url].");
|
||||
}
|
||||
}
|
||||
$EditSummary[]="invites status changed";
|
||||
@ -463,7 +463,7 @@
|
||||
$EditSummary[]="posting status changed";
|
||||
$HeavyUpdates['DisablePosting']=$DisablePosting;
|
||||
if (!empty($UserReason)) {
|
||||
Misc::send_pm($UserID, 0, 'Your forum posting privileges have been disabled', "Your forum posting privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url].");
|
||||
Misc::send_pm($UserID, 0, 'Your forum posting privileges have been disabled', "Your forum posting privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".SSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url].");
|
||||
}
|
||||
}
|
||||
|
||||
@ -472,7 +472,7 @@
|
||||
$EditSummary[]="forums status changed";
|
||||
$HeavyUpdates['DisableForums']=$DisableForums;
|
||||
if (!empty($UserReason)) {
|
||||
Misc::send_pm($UserID, 0, 'Your forum privileges have been disabled', "Your forum privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url].");
|
||||
Misc::send_pm($UserID, 0, 'Your forum privileges have been disabled', "Your forum privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".SSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url].");
|
||||
}
|
||||
}
|
||||
|
||||
@ -481,7 +481,7 @@
|
||||
$EditSummary[]="tagging status changed";
|
||||
$HeavyUpdates['DisableTagging']=$DisableTagging;
|
||||
if (!empty($UserReason)) {
|
||||
Misc::send_pm($UserID, 0, 'Your tagging privileges have been disabled', "Your tagging privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url].");
|
||||
Misc::send_pm($UserID, 0, 'Your tagging privileges have been disabled', "Your tagging privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".SSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url].");
|
||||
}
|
||||
}
|
||||
|
||||
@ -490,7 +490,7 @@
|
||||
$EditSummary[]="upload status changed";
|
||||
$HeavyUpdates['DisableUpload']=$DisableUpload;
|
||||
if ($DisableUpload == 1) {
|
||||
Misc::send_pm($UserID, 0, 'Your upload privileges have been disabled', "Your upload privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url].");
|
||||
Misc::send_pm($UserID, 0, 'Your upload privileges have been disabled', "Your upload privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".SSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url].");
|
||||
}
|
||||
}
|
||||
|
||||
@ -500,7 +500,7 @@
|
||||
$HeavyUpdates['DisableWiki']=$DisableWiki;
|
||||
$HeavyUpdates['site_edit_wiki']=0;
|
||||
if (!empty($UserReason)) {
|
||||
Misc::send_pm($UserID, 0, 'Your site editing privileges have been disabled', "Your site editing privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url].");
|
||||
Misc::send_pm($UserID, 0, 'Your site editing privileges have been disabled', "Your site editing privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".SSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url].");
|
||||
}
|
||||
|
||||
}
|
||||
@ -510,7 +510,7 @@
|
||||
$EditSummary[]="PM status changed";
|
||||
$HeavyUpdates['DisablePM']=$DisablePM;
|
||||
if (!empty($UserReason)) {
|
||||
Misc::send_pm($UserID, 0, 'Your PM privileges have been disabled', "Your PM privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url].");
|
||||
Misc::send_pm($UserID, 0, 'Your PM privileges have been disabled', "Your PM privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".SSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url].");
|
||||
}
|
||||
}
|
||||
|
||||
@ -519,7 +519,7 @@
|
||||
$EditSummary[]="IRC status changed";
|
||||
$HeavyUpdates['DisableIRC']=$DisableIRC;
|
||||
if (!empty($UserReason)) {
|
||||
Misc::send_pm($UserID, 0, 'Your IRC privileges have been disabled', "Your IRC privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]. This loss of privileges does not affect the ability to join and talk to staff in #what.cd-disabled.");
|
||||
Misc::send_pm($UserID, 0, 'Your IRC privileges have been disabled', "Your IRC privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".SSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]. This loss of privileges does not affect the ability to join and talk to staff in #what.cd-disabled.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -528,7 +528,7 @@
|
||||
$EditSummary[]="request status changed";
|
||||
$HeavyUpdates['DisableRequests']=$DisableRequests;
|
||||
if (!empty($UserReason)) {
|
||||
Misc::send_pm($UserID, 0, 'Your request privileges have been disabled', "Your request privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]. This loss of privileges does not affect the ability to join and talk to staff in #what.cd-disabled.");
|
||||
Misc::send_pm($UserID, 0, 'Your request privileges have been disabled', "Your request privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".SSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]. This loss of privileges does not affect the ability to join and talk to staff in #what.cd-disabled.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -599,12 +599,12 @@
|
||||
|
||||
if ($MergeStatsFrom && check_perms('users_edit_ratio')) {
|
||||
$DB->query("SELECT ID, Uploaded, Downloaded FROM users_main WHERE Username LIKE '".$MergeStatsFrom."'");
|
||||
if($DB->record_count() > 0) {
|
||||
if ($DB->record_count() > 0) {
|
||||
list($MergeID, $MergeUploaded, $MergeDownloaded) = $DB->next_record();
|
||||
$DB->query("UPDATE users_main AS um JOIN users_info AS ui ON um.ID=ui.UserID SET um.Uploaded = 0, um.Downloaded = 0, ui.AdminComment = CONCAT('".sqltime()." - Stats merged into https://".NONSSL_SITE_URL."/user.php?id=".$UserID." (".$Cur['Username'].") by ".$LoggedUser['Username']."\n\n', ui.AdminComment) WHERE ID = ".$MergeID);
|
||||
$DB->query("UPDATE users_main AS um JOIN users_info AS ui ON um.ID=ui.UserID SET um.Uploaded = 0, um.Downloaded = 0, ui.AdminComment = CONCAT('".sqltime()." - Stats merged into https://".SSL_SITE_URL."/user.php?id=".$UserID." (".$Cur['Username'].") by ".$LoggedUser['Username']."\n\n', ui.AdminComment) WHERE ID = ".$MergeID);
|
||||
$UpdateSet[]="Uploaded = Uploaded + '$MergeUploaded'";
|
||||
$UpdateSet[]="Downloaded = Downloaded + '$MergeDownloaded'";
|
||||
$EditSummary[]="stats merged from https://".NONSSL_SITE_URL."/user.php?id=".$MergeID." (".$MergeStatsFrom.")";
|
||||
$EditSummary[]="stats merged from https://".SSL_SITE_URL."/user.php?id=".$MergeID." (".$MergeStatsFrom.")";
|
||||
$Cache->delete_value('users_stats_'.$UserID);
|
||||
$Cache->delete_value('users_stats_'.$MergeID);
|
||||
}
|
||||
@ -620,7 +620,7 @@
|
||||
$Cache->delete_value('enabled_'.$UserID);
|
||||
|
||||
$DB->query("SELECT SessionID FROM users_sessions WHERE UserID='$UserID'");
|
||||
while(list($SessionID) = $DB->next_record()) {
|
||||
while (list($SessionID) = $DB->next_record()) {
|
||||
$Cache->delete_value('session_'.$UserID.'_'.$SessionID);
|
||||
}
|
||||
$Cache->delete_value('users_sessions_'.$UserID);
|
||||
|
@ -485,8 +485,8 @@ function check_paranoia_here($Setting) {
|
||||
<? } ?>
|
||||
<div class="box">
|
||||
<div class="head">
|
||||
<span style="float:left;">Profile - </span>
|
||||
<span class="user_title"><? if ($CustomTitle) { echo html_entity_decode($DisplayCustomTitle); } ?></span>
|
||||
<span style="float:left;">Profile<? if ($CustomTitle) {?> - </span>
|
||||
<span class="user_title"><? echo html_entity_decode($DisplayCustomTitle); } ?></span>
|
||||
<span style="float:right;"><?=!empty($Badges)?"$Badges ":''?><a href="#" onclick="$('#profilediv').toggle(); this.innerHTML=(this.innerHTML=='Hide'?'Show':'Hide'); return false;" class="brackets">Hide</a></span>
|
||||
</div>
|
||||
<div class="pad" id="profilediv">
|
||||
|
@ -470,3 +470,11 @@ tr.torrent .bookmark>a:after {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
-webkit-transform: rotate(0.15deg);
|
||||
-o-transform: rotate(0.15deg);
|
||||
transform: rotate(0.15deg);
|
||||
font-smooth: always;
|
||||
-webkit-font-smoothing: subpixel-antialiased;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user