mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-02-22 05:09:02 +00:00
Empty commit
This commit is contained in:
parent
0ade9fcc52
commit
e7537103fe
@ -22,4 +22,4 @@
|
|||||||
'status' => 'success'
|
'status' => 'success'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
exit();
|
die();
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
'status' => 'dupe'
|
'status' => 'dupe'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
exit();
|
die();
|
||||||
} else {
|
} else {
|
||||||
$UserID = $LoggedUser['ID'];
|
$UserID = $LoggedUser['ID'];
|
||||||
$DB->query("UPDATE reports SET ClaimerID = '$UserID' WHERE ID = '$ID'");
|
$DB->query("UPDATE reports SET ClaimerID = '$UserID' WHERE ID = '$ID'");
|
||||||
@ -31,5 +31,5 @@
|
|||||||
'username' => $LoggedUser['Username']
|
'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':
|
case 'claim':
|
||||||
include(SERVER_ROOT.'/sections/reports/ajax_claim_report.php');
|
include(SERVER_ROOT.'/sections/reports/ajax_claim_report.php');
|
||||||
break;
|
break;
|
||||||
|
case 'unclaim':
|
||||||
|
include(SERVER_ROOT.'/sections/reports/ajax_unclaim_report.php');
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
include(SERVER_ROOT.'/sections/reports/reports.php');
|
include(SERVER_ROOT.'/sections/reports/reports.php');
|
||||||
break;
|
break;
|
||||||
|
@ -209,10 +209,12 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<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>
|
<span id="claimed_<?=$ReportID?>">Claimed by <?=Users::format_username($ClaimerID, false, false, false, false)?></span>
|
||||||
<? } else { ?>
|
<? } 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>
|
<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="reportid" value="<?=$ReportID?>"/>
|
||||||
<input type="hidden" name="action" value="takeresolve"/>
|
<input type="hidden" name="action" value="takeresolve"/>
|
||||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>"/>
|
<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>
|
</td>
|
||||||
</tr>
|
</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>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>
|
<p>You might like (Beta): <? while (list($Tag)=$DB->next_record()) { ?><a href="torrents.php?taglist=<?=$Tag?>"><?=$Tag?></a> <? } ?></p>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<?
|
<?
|
||||||
View::show_footer();die();
|
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>
|
<p>You are requesting page <?=$Page?>, but the search returned only <?=$LastPage?> pages.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="linkbox">Go to page <?=$Pages?></div>
|
<div class="linkbox">Go to page <?=$Pages?></div>
|
||||||
|
</div>
|
||||||
<?
|
<?
|
||||||
View::show_footer();die();
|
View::show_footer();die();
|
||||||
}
|
}
|
||||||
|
@ -35,13 +35,24 @@ function claim(id) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function resolve(id) {
|
function unClaim(id) {
|
||||||
if ($('#claimed_' + id).raw()) {
|
ajax.get('reports.php?action=unclaim&remove=1&id=' + id, function (response) {
|
||||||
var answer = confirm("This is a claimed report, are you sure you want to resolve it?");
|
var json = JSON.parse(response);
|
||||||
if (answer)
|
if (json['status'] == 'success') {
|
||||||
return true;
|
$('#claimed_' + id).raw().innerHTML = '<a href="#" id="claim_' + id + '" onclick="claim(' + id + '); return false;"; return false;">Claim</a>';
|
||||||
else
|
}
|
||||||
return false;
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user