mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-31 10:31:37 +00:00
Empty commit
This commit is contained in:
parent
0c52e30873
commit
5f916db48e
@ -645,7 +645,7 @@ function authorize($Ajax = false) {
|
|||||||
// ex: 'somefile,somdire/somefile'
|
// ex: 'somefile,somdire/somefile'
|
||||||
|
|
||||||
function show_header($PageTitle='',$JSIncludes='') {
|
function show_header($PageTitle='',$JSIncludes='') {
|
||||||
global $Document, $Cache, $DB, $LoggedUser, $Mobile;
|
global $Document, $Cache, $DB, $LoggedUser, $Mobile, $Classes;
|
||||||
|
|
||||||
if($PageTitle!='') { $PageTitle.=' :: '; }
|
if($PageTitle!='') { $PageTitle.=' :: '; }
|
||||||
$PageTitle .= SITE_NAME;
|
$PageTitle .= SITE_NAME;
|
||||||
@ -2174,7 +2174,7 @@ function freeleech_torrents($TorrentIDs, $FreeNeutral = 1, $FreeLeechType = 0) {
|
|||||||
update_tracker('update_torrent', array('info_hash' => rawurlencode($InfoHash), 'freetorrent' => $FreeNeutral));
|
update_tracker('update_torrent', array('info_hash' => rawurlencode($InfoHash), 'freetorrent' => $FreeNeutral));
|
||||||
$Cache->delete_value('torrent_download_'.$TorrentID);
|
$Cache->delete_value('torrent_download_'.$TorrentID);
|
||||||
write_log($LoggedUser['Username']." marked torrent ".$TorrentID." freeleech type ".$FreeLeechType."!");
|
write_log($LoggedUser['Username']." marked torrent ".$TorrentID." freeleech type ".$FreeLeechType."!");
|
||||||
write_group_log($GroupID, $TorrentID, $LoggedUser['UserID'], "marked as freeleech type ".$FreeLeechType."!", 0);
|
write_group_log($GroupID, $TorrentID, $LoggedUser['ID'], "marked as freeleech type ".$FreeLeechType."!", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($GroupIDs as $GroupID) {
|
foreach($GroupIDs as $GroupID) {
|
||||||
|
@ -263,7 +263,7 @@
|
|||||||
|
|
||||||
$NumStaffPMs = $Cache->get_value('num_staff_pms_'.$LoggedUser['ID']);
|
$NumStaffPMs = $Cache->get_value('num_staff_pms_'.$LoggedUser['ID']);
|
||||||
if ($NumStaffPMs === false) {
|
if ($NumStaffPMs === false) {
|
||||||
$DB->query("SELECT COUNT(ID) FROM staff_pm_conversations WHERE Status='Unanswered' AND (AssignedToUser=".$LoggedUser['ID']." OR Level=".$LoggedUser['Class'].")");
|
$DB->query("SELECT COUNT(ID) FROM staff_pm_conversations WHERE Status='Unanswered' AND (AssignedToUser=".$LoggedUser['ID']." OR (Level >= ".$Classes[MOD]['Level']." AND Level <=".$LoggedUser['Class']."))");
|
||||||
list($NumStaffPMs) = $DB->next_record();
|
list($NumStaffPMs) = $DB->next_record();
|
||||||
$Cache->cache_value('num_staff_pms_'.$LoggedUser['ID'], $NumStaffPMs , 1000);
|
$Cache->cache_value('num_staff_pms_'.$LoggedUser['ID'], $NumStaffPMs , 1000);
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
include(SERVER_ROOT.'/classes/class_validate.php');
|
include(SERVER_ROOT.'/classes/class_validate.php');
|
||||||
|
|
||||||
$Val=NEW VALIDATE;
|
$Val=NEW VALIDATE;
|
||||||
|
|
||||||
if(!empty($_REQUEST['confirm'])) {
|
if(!empty($_REQUEST['confirm'])) {
|
||||||
@ -187,6 +188,8 @@
|
|||||||
send_email($_REQUEST['email'],'New account confirmation at '.SITE_NAME,$TPL->get(),'noreply');
|
send_email($_REQUEST['email'],'New account confirmation at '.SITE_NAME,$TPL->get(),'noreply');
|
||||||
update_tracker('add_user', array('id' => $UserID, 'passkey' => $torrent_pass));
|
update_tracker('add_user', array('id' => $UserID, 'passkey' => $torrent_pass));
|
||||||
$Sent=1;
|
$Sent=1;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} elseif($_GET['invite']) {
|
} elseif($_GET['invite']) {
|
||||||
|
@ -182,7 +182,8 @@
|
|||||||
list($GroupID) = $DB->next_record();
|
list($GroupID) = $DB->next_record();
|
||||||
delete_torrent($TorrentID);
|
delete_torrent($TorrentID);
|
||||||
write_log($Log);
|
write_log($Log);
|
||||||
write_group_log($GroupID, $TorrentID, $LoggedUser['ID'], "deleted torrent", 0);
|
$Log = "deleted torrent for the reason: ".$ResolveType['title'].". ( ".$Escaped['log_message']." )";
|
||||||
|
write_group_log($GroupID, $TorrentID, $LoggedUser['ID'], $Log, 0);
|
||||||
} else {
|
} else {
|
||||||
$Log = "No log message (Torrent wasn't deleted)";
|
$Log = "No log message (Torrent wasn't deleted)";
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,9 @@
|
|||||||
case 'assign':
|
case 'assign':
|
||||||
require('assign.php');
|
require('assign.php');
|
||||||
break;
|
break;
|
||||||
|
case 'make_donor':
|
||||||
|
require('makedonor.php');
|
||||||
|
break;
|
||||||
case 'responses':
|
case 'responses':
|
||||||
require('common_responses.php');
|
require('common_responses.php');
|
||||||
break;
|
break;
|
||||||
|
43
sections/staffpm/makedonor.php
Normal file
43
sections/staffpm/makedonor.php
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<?
|
||||||
|
if (!is_number($_GET['id'])) {
|
||||||
|
error(404);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!check_perms('users_give_donor')) {
|
||||||
|
error(403);
|
||||||
|
}
|
||||||
|
|
||||||
|
$ConvID = (int)$_GET['id'];
|
||||||
|
$DB->query("SELECT c.Subject, c.UserID, c.Level, c.AssignedToUser, c.Unread, c.Status, u.Donor
|
||||||
|
FROM staff_pm_conversations AS c
|
||||||
|
JOIN users_info AS u ON u.UserID = c.UserID
|
||||||
|
WHERE ID=$ConvID");
|
||||||
|
list($Subject, $UserID, $Level, $AssignedToUser, $Unread, $Status, $Donor) = $DB->next_record();
|
||||||
|
if ($DB->record_count() == 0) {
|
||||||
|
error(404);
|
||||||
|
}
|
||||||
|
|
||||||
|
$Message = "Thank for for helping to support the site. It's users like you who make all of this possible.";
|
||||||
|
|
||||||
|
if ((int)$Donor === 0) {
|
||||||
|
$Msg = db_string(sqltime() . ' - Donated: http://'.NONSSL_SITE_URL."/staffpm.php?action=viewconv&id=$ConvID\n\n");
|
||||||
|
$DB->query("UPDATE users_info
|
||||||
|
SET Donor='1',
|
||||||
|
AdminComment = CONCAT('$Msg',AdminComment)
|
||||||
|
WHERE UserID = $UserID");
|
||||||
|
$DB->query("UPDATE users_main SET Invites=Invites+2 WHERE ID = $UserID");
|
||||||
|
|
||||||
|
$Cache->delete_value('user_info_'.$UserID);
|
||||||
|
$Cache->delete_value('user_info_heavy_'.$UserID);
|
||||||
|
$Message .= " Enjoy your new love from us!";
|
||||||
|
} else {
|
||||||
|
$Message .= " ";
|
||||||
|
}
|
||||||
|
$DB->query("INSERT INTO staff_pm_messages (UserID, SentDate, Message, ConvID)
|
||||||
|
VALUES (".$LoggedUser['ID'].", '".sqltime()."', '".db_string($Message)."', $ConvID)");
|
||||||
|
$DB->query("UPDATE staff_pm_conversations
|
||||||
|
SET Date='".sqltime()."', Unread=true,
|
||||||
|
Status='Resolved', ResolverID=".$LoggedUser['ID']."
|
||||||
|
WHERE ID=$ConvID");
|
||||||
|
header('Location: staffpm.php');
|
||||||
|
?>
|
@ -26,7 +26,7 @@
|
|||||||
default:
|
default:
|
||||||
if ($IsStaff) {
|
if ($IsStaff) {
|
||||||
$ViewString = "My unanswered";
|
$ViewString = "My unanswered";
|
||||||
$WhereCondition = "WHERE (Level = $UserLevel OR AssignedToUser='".$LoggedUser['ID']."') AND Status='Unanswered'";
|
$WhereCondition = "WHERE ((Level >= ".$Classes[MOD]['Level']." AND Level <= $UserLevel) OR AssignedToUser='".$LoggedUser['ID']."') AND Status='Unanswered'";
|
||||||
} else {
|
} else {
|
||||||
// FLS
|
// FLS
|
||||||
$ViewString = "Unanswered";
|
$ViewString = "Unanswered";
|
||||||
@ -51,7 +51,7 @@
|
|||||||
ResolverID
|
ResolverID
|
||||||
FROM staff_pm_conversations
|
FROM staff_pm_conversations
|
||||||
$WhereCondition
|
$WhereCondition
|
||||||
ORDER BY Date DESC
|
ORDER BY IF(AssignedToUser = ".$LoggedUser['ID'].",0,1) ASC, Level DESC, Date DESC
|
||||||
LIMIT $Limit
|
LIMIT $Limit
|
||||||
");
|
");
|
||||||
|
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
// Get conversation info
|
// Get conversation info
|
||||||
$DB->query("SELECT Subject, UserID, Level, AssignedToUser, Unread, Status FROM staff_pm_conversations WHERE ID=$ConvID");
|
$DB->query("SELECT Subject, UserID, Level, AssignedToUser, Unread, Status FROM staff_pm_conversations WHERE ID=$ConvID");
|
||||||
list($Subject, $UserID, $Level, $AssignedToUser, $Unread, $Status) = $DB->next_record();
|
list($Subject, $UserID, $Level, $AssignedToUser, $Unread, $Status) = $DB->next_record();
|
||||||
|
$DB->query("SELECT Subject, UserID, Level, AssignedToUser, Unread, Status FROM staff_pm_conversations WHERE ID=$ConvID");
|
||||||
|
list($Subject, $UserID, $Level, $AssignedToUser, $Unread, $Status) = $DB->next_record();
|
||||||
|
|
||||||
if (!(($UserID == $LoggedUser['ID']) || ($AssignedToUser == $LoggedUser['ID']) || (($Level > 0 && $Level <= $LoggedUser['Class']) || ($Level == 0 && $IsFLS)))) {
|
if (!(($UserID == $LoggedUser['ID']) || ($AssignedToUser == $LoggedUser['ID']) || (($Level > 0 && $Level <= $LoggedUser['Class']) || ($Level == 0 && $IsFLS)))) {
|
||||||
// User is trying to view someone else's conversation
|
// User is trying to view someone else's conversation
|
||||||
@ -206,6 +208,10 @@
|
|||||||
<input type="submit" value="Send message" />
|
<input type="submit" value="Send message" />
|
||||||
<? } else { ?>
|
<? } else { ?>
|
||||||
<input type="button" value="Unresolve" onClick="location.href='staffpm.php?action=unresolve&id=<?=$ConvID?>';" />
|
<input type="button" value="Unresolve" onClick="location.href='staffpm.php?action=unresolve&id=<?=$ConvID?>';" />
|
||||||
|
<? }
|
||||||
|
if (check_perms('users_give_donor')) { ?>
|
||||||
|
<br />
|
||||||
|
<input type="button" value="Make Donor" onClick="location.href='staffpm.php?action=make_donor&id=<?=$ConvID?>';" />
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user