mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-02-21 12:49:03 +00:00
Empty commit
This commit is contained in:
parent
0ade9fcc52
commit
e7537103fe
@ -22,4 +22,4 @@
|
||||
'status' => 'success'
|
||||
)
|
||||
);
|
||||
exit();
|
||||
die();
|
||||
|
@ -20,7 +20,7 @@
|
||||
'status' => 'dupe'
|
||||
)
|
||||
);
|
||||
exit();
|
||||
die();
|
||||
} else {
|
||||
$UserID = $LoggedUser['ID'];
|
||||
$DB->query("UPDATE reports SET ClaimerID = '$UserID' WHERE ID = '$ID'");
|
||||
@ -31,5 +31,5 @@
|
||||
'username' => $LoggedUser['Username']
|
||||
)
|
||||
);
|
||||
exit();
|
||||
die();
|
||||
}
|
20
sections/reports/ajax_unclaim_report.php
Normal file
20
sections/reports/ajax_unclaim_report.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
if (!check_perms('site_moderate_forums') || empty($_GET['id']) || empty($_GET['remove'])) {
|
||||
print
|
||||
json_encode(
|
||||
array(
|
||||
'status' => 'failure'
|
||||
)
|
||||
);
|
||||
die();
|
||||
}
|
||||
$ID = (int)$_GET['id'];
|
||||
$DB->query("UPDATE reports SET ClaimerID = '0' WHERE ID = '$ID'");
|
||||
print
|
||||
json_encode(
|
||||
array(
|
||||
'status' => 'success',
|
||||
)
|
||||
);
|
||||
die();
|
@ -30,6 +30,9 @@
|
||||
case 'claim':
|
||||
include(SERVER_ROOT.'/sections/reports/ajax_claim_report.php');
|
||||
break;
|
||||
case 'unclaim':
|
||||
include(SERVER_ROOT.'/sections/reports/ajax_unclaim_report.php');
|
||||
break;
|
||||
default:
|
||||
include(SERVER_ROOT.'/sections/reports/reports.php');
|
||||
break;
|
||||
|
@ -209,10 +209,12 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<? if ($ClaimerID) { ?>
|
||||
<? if ($ClaimerID == $LoggedUser['ID']) { ?>
|
||||
<span id="claimed_<?=$ReportID?>">Claimed by <?=Users::format_username($ClaimerID, false, false, false, false)?> <a href="#" onclick="unClaim(<?=$ReportID?>); return false;">[Unclaim]</a></span>
|
||||
<? } else if ($ClaimerID) { ?>
|
||||
<span id="claimed_<?=$ReportID?>">Claimed by <?=Users::format_username($ClaimerID, false, false, false, false)?></span>
|
||||
<? } else { ?>
|
||||
<a href="#" id="claim_<?=$ReportID?>" onclick="claim(<?=$ReportID?>); return false;"; return false;">Claim</a>
|
||||
<a href="#" id="claim_<?=$ReportID?>" onclick="claim(<?=$ReportID?>); return false;">Claim</a>
|
||||
<? } ?>
|
||||
|
||||
<a onclick="toggleNotes(<?=$ReportID?>); return false;" href="#">Toggle Notes</a>
|
||||
@ -231,7 +233,7 @@
|
||||
<input type="hidden" name="reportid" value="<?=$ReportID?>"/>
|
||||
<input type="hidden" name="action" value="takeresolve"/>
|
||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>"/>
|
||||
<input type="submit" onclick="return resolve(<?=$ReportID?>)" name="submit" value="Resolve"/>
|
||||
<input type="submit" onclick="return resolve(<?=$ReportID?>, <?=($ClaimerID == $LoggedUser['ID'] || !$ClaimerID) ? "true" : "false"?>)" name="submit" value="Resolve"/>
|
||||
</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
|
@ -846,6 +846,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
<p>Make sure all names are spelled correctly, or try making your search less specific.</p>
|
||||
<p>You might like (Beta): <? while (list($Tag)=$DB->next_record()) { ?><a href="torrents.php?taglist=<?=$Tag?>"><?=$Tag?></a> <? } ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
View::show_footer();die();
|
||||
}
|
||||
@ -859,6 +860,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
<p>You are requesting page <?=$Page?>, but the search returned only <?=$LastPage?> pages.</p>
|
||||
</div>
|
||||
<div class="linkbox">Go to page <?=$Pages?></div>
|
||||
</div>
|
||||
<?
|
||||
View::show_footer();die();
|
||||
}
|
||||
|
@ -35,13 +35,24 @@ function claim(id) {
|
||||
});
|
||||
}
|
||||
|
||||
function resolve(id) {
|
||||
if ($('#claimed_' + id).raw()) {
|
||||
var answer = confirm("This is a claimed report, are you sure you want to resolve it?");
|
||||
if (answer)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
function unClaim(id) {
|
||||
ajax.get('reports.php?action=unclaim&remove=1&id=' + id, function (response) {
|
||||
var json = JSON.parse(response);
|
||||
if (json['status'] == 'success') {
|
||||
$('#claimed_' + id).raw().innerHTML = '<a href="#" id="claim_' + id + '" onclick="claim(' + id + '); return false;"; return false;">Claim</a>';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function resolve(id, claimer) {
|
||||
if (!claimer) {
|
||||
if ($('#claimed_' + id).raw()) {
|
||||
var answer = confirm("This is a claimed report, are you sure you want to resolve it?");
|
||||
if (answer)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user