mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 02:46:30 +00:00
Empty commit
This commit is contained in:
parent
1b99f62706
commit
dba7352241
@ -1861,8 +1861,7 @@ function disable_users($UserIDs, $AdminComment, $BanReason = 1) {
|
||||
i.AdminComment = CONCAT('".sqltime()." - ".($AdminComment ? $AdminComment : 'Disabled by system')."\n\n', i.AdminComment),
|
||||
i.BanDate='".sqltime()."',
|
||||
i.BanReason='".$BanReason."',
|
||||
i.RatioWatchDownload='0',
|
||||
i.RatioWatchEnds='0000-00-00 00:00:00'
|
||||
i.RatioWatchDownload='0'
|
||||
WHERE m.ID IN(".implode(',',$UserIDs).") ");
|
||||
$Cache->decrement('stats_user_count',$DB->affected_rows());
|
||||
foreach($UserIDs as $UserID) {
|
||||
|
@ -82,13 +82,11 @@
|
||||
?>
|
||||
<li class="warning">Note: Because the user limit has been reached, you will be unable to use the invites recieved until a later date.</li>
|
||||
<? } ?>
|
||||
<li>Immunity to inactivity pruning.</li>
|
||||
<li>Access to an ever growing list of exclusive features, including the ability to submit requests and personal collages.</li>
|
||||
<li>A warm fuzzy feeling.</li>
|
||||
|
||||
<? } ?>
|
||||
</ul>
|
||||
<p>Please be aware that by making a donation you aren't purchasing donor status or invites. You are helping us pay the bills and cover the costs of running the site. We are doing our best to give the benefits to donors but sometimes it might take more than 48 hours. If it has been more than 48 hours and you were not credited, let us know by sending us a <a href="staffpm.php">Staff PM</a>. We will answer as quickly as possible.</p>
|
||||
<p>Please be aware that by making a donation you aren't purchasing donor status or invites. You are helping us pay the bills and cover the costs of running the site. We are doing our best to give our love back to donors but sometimes it might take more than 48 hours. Feel free to contact us by sending us a <a href="staffpm.php">Staff PM</a> regarding any matter. We will answer as quickly as possible.</p>
|
||||
</div>
|
||||
<h3>What you will <strong>not</strong> receive</h3>
|
||||
<div class="box pad" style="padding:10px 10px 10px 20px;">
|
||||
|
@ -14,6 +14,91 @@
|
||||
|
||||
$ID = $_GET['id'];
|
||||
|
||||
switch($Short) {
|
||||
case "user" :
|
||||
$DB->query("SELECT Username FROM users_main WHERE ID=".$ID);
|
||||
if($DB->record_count() < 1) {
|
||||
error(404);
|
||||
}
|
||||
list($Username) = $DB->next_record();
|
||||
break;
|
||||
|
||||
case "request_update" :
|
||||
$NoReason = true;
|
||||
$DB->query("SELECT Title, Description, TorrentID, CategoryID, Year FROM requests WHERE ID=".$ID);
|
||||
if($DB->record_count() < 1) {
|
||||
error(404);
|
||||
}
|
||||
list($Name, $Desc, $Filled, $CategoryID, $Year) = $DB->next_record();
|
||||
if($Filled || ($CategoryID != 0 && ($Categories[$CategoryID-1] != "Music" || $Year != 0))) {
|
||||
error(403);
|
||||
}
|
||||
break;
|
||||
|
||||
case "request" :
|
||||
$DB->query("SELECT Title, Description, TorrentID FROM requests WHERE ID=".$ID);
|
||||
if($DB->record_count() < 1) {
|
||||
error(404);
|
||||
}
|
||||
list($Name, $Desc, $Filled) = $DB->next_record();
|
||||
break;
|
||||
|
||||
case "collage" :
|
||||
$DB->query("SELECT Name, Description FROM collages WHERE ID=".$ID);
|
||||
if($DB->record_count() < 1) {
|
||||
error(404);
|
||||
}
|
||||
list($Name, $Desc) = $DB->next_record();
|
||||
break;
|
||||
|
||||
case "thread" :
|
||||
$DB->query("SELECT ft.Title, ft.ForumID, um.Username FROM forums_topics AS ft JOIN users_main AS um ON um.ID=ft.AuthorID WHERE ft.ID=".$ID);
|
||||
if($DB->record_count() < 1) {
|
||||
error(404);
|
||||
}
|
||||
list($Title, $ForumID, $Username) = $DB->next_record();
|
||||
$DB->query("SELECT MinClassRead FROM forums WHERE ID = ".$ForumID);
|
||||
list($MinClassRead) = $DB->next_record();
|
||||
if(!empty($LoggedUser['DisableForums']) ||
|
||||
($MinClassRead > $LoggedUser['Class'] && (!isset($LoggedUser['CustomForums'][$ForumID]) || $LoggedUser['CustomForums'][$ForumID] == 0)) ||
|
||||
(isset($LoggedUser['CustomForums'][$ForumID]) && $LoggedUser['CustomForums'][$ForumID] == 0)) {
|
||||
error(403);
|
||||
}
|
||||
break;
|
||||
|
||||
case "post" :
|
||||
$DB->query("SELECT fp.Body, fp.TopicID, um.Username FROM forums_posts AS fp JOIN users_main AS um ON um.ID=fp.AuthorID WHERE fp.ID=".$ID);
|
||||
if($DB->record_count() < 1) {
|
||||
error(404);
|
||||
}
|
||||
list($Body, $TopicID, $Username) = $DB->next_record();
|
||||
$DB->query("SELECT ForumID FROM forums_topics WHERE ID = ".$TopicID);
|
||||
list($ForumID) = $DB->next_record();
|
||||
$DB->query("SELECT MinClassRead FROM forums WHERE ID = ".$ForumID);
|
||||
list($MinClassRead) = $DB->next_record();
|
||||
if(!empty($LoggedUser['DisableForums']) ||
|
||||
($MinClassRead > $LoggedUser['Class'] && (!isset($LoggedUser['CustomForums'][$ForumID]) || $LoggedUser['CustomForums'][$ForumID] == 0)) ||
|
||||
(isset($LoggedUser['CustomForums'][$ForumID]) && $LoggedUser['CustomForums'][$ForumID] == 0)) {
|
||||
error(403);
|
||||
}
|
||||
break;
|
||||
|
||||
case "requests_comment" :
|
||||
case "torrents_comment" :
|
||||
case "collages_comment" :
|
||||
$Table = $Short.'s';
|
||||
if($Short == "collages_comment") {
|
||||
$Column = "UserID";
|
||||
} else {
|
||||
$Column = "AuthorID";
|
||||
}
|
||||
$DB->query("SELECT ".$Short.".Body, um.Username FROM ".$Table." AS ".$Short." JOIN users_main AS um ON um.ID=".$Short.".".$Column." WHERE ".$Short.".ID=".$ID);
|
||||
if($DB->record_count() < 1) {
|
||||
error(404);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
show_header('Report a '.$Type['title'],'bbcode');
|
||||
?>
|
||||
<div class="thin">
|
||||
@ -38,22 +123,11 @@
|
||||
|
||||
switch($Short) {
|
||||
case "user" :
|
||||
$DB->query("SELECT Username FROM users_main WHERE ID=".$ID);
|
||||
if($DB->record_count() < 1) {
|
||||
error(404);
|
||||
}
|
||||
list($Username) = $DB->next_record();
|
||||
?>
|
||||
<p>You are reporting the user <strong><?=display_str($Username)?></strong></p>
|
||||
<?
|
||||
break;
|
||||
case "request_update" :
|
||||
$NoReason = true;
|
||||
$DB->query("SELECT Title, Description, TorrentID FROM requests WHERE ID=".$ID);
|
||||
if($DB->record_count() < 1) {
|
||||
//error(404);
|
||||
}
|
||||
list($Name, $Desc, $Filled) = $DB->next_record();
|
||||
?>
|
||||
<p>You are reporting the request:</p>
|
||||
<table>
|
||||
@ -113,11 +187,6 @@
|
||||
<?
|
||||
break;
|
||||
case "request" :
|
||||
$DB->query("SELECT Title, Description, TorrentID FROM requests WHERE ID=".$ID);
|
||||
if($DB->record_count() < 1) {
|
||||
//error(404);
|
||||
}
|
||||
list($Name, $Desc, $Filled) = $DB->next_record();
|
||||
?>
|
||||
<p>You are reporting the request:</p>
|
||||
<table>
|
||||
@ -135,11 +204,6 @@
|
||||
<?
|
||||
break;
|
||||
case "collage" :
|
||||
$DB->query("SELECT Name, Description FROM collages WHERE ID=".$ID);
|
||||
if($DB->record_count() < 1) {
|
||||
error(404);
|
||||
}
|
||||
list($Name, $Desc) = $DB->next_record();
|
||||
?>
|
||||
<p>You are reporting the collage:</p>
|
||||
<table>
|
||||
@ -155,19 +219,6 @@
|
||||
<?
|
||||
break;
|
||||
case "thread" :
|
||||
$DB->query("SELECT ft.Title, ft.ForumID, um.Username FROM forums_topics AS ft JOIN users_main AS um ON um.ID=ft.AuthorID WHERE ft.ID=".$ID);
|
||||
if($DB->record_count() < 1) {
|
||||
error(404);
|
||||
}
|
||||
list($Title, $ForumID, $Username) = $DB->next_record();
|
||||
$DB->query("SELECT MinClassRead FROM forums WHERE ID = ".$ForumID);
|
||||
list($MinClassRead) = $DB->next_record();
|
||||
if ($MinClassRead > $LoggedUser['Class']) {
|
||||
?>
|
||||
<h1>Permission Denied!</h1>
|
||||
<?
|
||||
show_footer();
|
||||
die(); }
|
||||
?>
|
||||
<p>You are reporting the thread:</p>
|
||||
<table>
|
||||
@ -183,22 +234,6 @@
|
||||
<?
|
||||
break;
|
||||
case "post" :
|
||||
$DB->query("SELECT fp.Body, fp.TopicID, um.Username FROM forums_posts AS fp JOIN users_main AS um ON um.ID=fp.AuthorID WHERE fp.ID=".$ID);
|
||||
if($DB->record_count() < 1) {
|
||||
error(404);
|
||||
}
|
||||
list($Body, $TopicID, $Username) = $DB->next_record();
|
||||
$DB->query("SELECT ForumID FROM forums_topics WHERE ID = ".$TopicID);
|
||||
list($ForumID) = $DB->next_record();
|
||||
$DB->query("SELECT MinClassRead FROM forums WHERE ID = ".$ForumID);
|
||||
list($MinClassRead) = $DB->next_record();
|
||||
if ($MinClassRead > $LoggedUser['Class']) {
|
||||
?>
|
||||
<h1>Permission Denied!</h1>
|
||||
<?
|
||||
show_footer();
|
||||
die();
|
||||
}
|
||||
?>
|
||||
<p>You are reporting the post:</p>
|
||||
<table>
|
||||
@ -216,17 +251,6 @@
|
||||
case "requests_comment" :
|
||||
case "torrents_comment" :
|
||||
case "collages_comment" :
|
||||
$Table = $Short.'s';
|
||||
if($Short == "collages_comment") {
|
||||
$Column = "UserID";
|
||||
} else {
|
||||
$Column = "AuthorID";
|
||||
}
|
||||
$DB->query("SELECT ".$Short.".Body, um.Username FROM ".$Table." AS ".$Short." JOIN users_main AS um ON um.ID=".$Short.".".$Column." WHERE ".$Short.".ID=".$ID);
|
||||
if($DB->record_count() < 1) {
|
||||
error(404);
|
||||
}
|
||||
list($Body, $Username) = $DB->next_record();
|
||||
?>
|
||||
<p>You are reporting the <?=$Types[$Short]['title']?>:</p>
|
||||
<table>
|
||||
|
@ -108,7 +108,8 @@
|
||||
DisableUpload,
|
||||
DisableWiki,
|
||||
DisablePM,
|
||||
DisableIRC
|
||||
DisableIRC,
|
||||
m.RequiredRatio
|
||||
FROM users_main AS m
|
||||
JOIN users_info AS i ON i.UserID = m.ID
|
||||
LEFT JOIN permissions AS p ON p.ID=m.PermissionID
|
||||
@ -453,19 +454,24 @@
|
||||
|
||||
|
||||
if ($EnableUser!=$Cur['Enabled'] && check_perms('users_disable_users')) {
|
||||
$EditSummary[]='account '.translateUserStatus($Cur['Enabled']).'->'.translateUserStatus($EnableUser);
|
||||
$EnableStr = 'account '.translateUserStatus($Cur['Enabled']).'->'.translateUserStatus($EnableUser);
|
||||
if($EnableUser == '2') {
|
||||
disable_users($UserID, '', 1);
|
||||
} elseif($EnableUser == '1') {
|
||||
$Cache->increment('stats_user_count');
|
||||
$UpdateSet[]="i.RatioWatchDownload='0'";
|
||||
$UpdateSet[]="i.RatioWatchEnds='0000-00-00 00:00:00'";
|
||||
if ($Cur['Uploaded']/$Cur['Downloaded'] > $Cur['RequiredRatio']) {
|
||||
$UpdateSet[]="i.RatioWatchEnds='0000-00-00 00:00:00'";
|
||||
$CanLeech = 1;
|
||||
$UpdateSet[]="m.can_leech='1'";
|
||||
} else {
|
||||
$EnableStr .= ' (Ratio: '.number_format($Cur['Uploaded']/$Cur['Downloaded'],2).', RR: '.number_format($Cur['RequiredRatio'],2).')';
|
||||
}
|
||||
$UpdateSet[]="Enabled='1'";
|
||||
$CanLeech = 1;
|
||||
$UpdateSet[]="m.can_leech='1'";
|
||||
$LightUpdates['Enabled'] = 1;
|
||||
update_tracker('add_user', array('id' => $UserID, 'passkey' => $Cur['torrent_pass']));
|
||||
}
|
||||
$EditSummary[]=$EnableStr;
|
||||
$Cache->replace_value('enabled_'.$UserID, $EnableUser, 0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user