mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-12 18:36:29 +00:00
Empty commit
This commit is contained in:
parent
c87186d11a
commit
c1b5e99afc
@ -72,12 +72,7 @@
|
||||
</form>
|
||||
<a href="#" onclick="if (confirm('Are you sure?') == true) { $('#delete_<?=$Question['ID']?>').raw().submit(); } return false;" class="brackets">Delete</a>
|
||||
-
|
||||
<form class="hidden" id="ignore_<?=$Question['ID']?>" method="post" action="">
|
||||
<input type="hidden" name="action" value="take_ignore_question" />
|
||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
<input type="hidden" name="question_id" value="<?=$Question['ID']?>" />
|
||||
</form>
|
||||
<a href="#" onclick="if (confirm('Are you sure?') == true) { $('#ignore_<?=$Question['ID']?>').raw().submit(); } return false;" class="brackets">Ignore</a>
|
||||
<a href="#" id="<?=$Question['ID']?>" class="brackets ignore_link">Ignore</a>
|
||||
-
|
||||
<a href="#" id="<?=$Question['ID']?>" class="answer_link brackets">Answer</a>
|
||||
</span>
|
||||
|
@ -4,7 +4,8 @@
|
||||
authorize();
|
||||
|
||||
$DB->query("SELECT COUNT(1) FROM user_questions WHERE UserID = '$LoggedUser[ID]'");
|
||||
if ($DB->record_count() >= MAX_QUESTIONS) {
|
||||
list($Results) = $DB->next_record();
|
||||
if ($Results >= MAX_QUESTIONS) {
|
||||
error("You have asked too many questions for the time being.");
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,10 @@
|
||||
<?
|
||||
authorize();
|
||||
|
||||
if (!check_perms("users_mod")) {
|
||||
error(404);
|
||||
}
|
||||
$ID = $_POST['question_id'];
|
||||
$ID = $_POST['id'];
|
||||
|
||||
if (!is_number($ID)) {
|
||||
error(404);
|
||||
@ -15,4 +16,3 @@
|
||||
VALUES
|
||||
('$ID', '$LoggedUser[ID]')");
|
||||
|
||||
header("Location: questions.php");
|
||||
|
@ -44,5 +44,22 @@ $(document).ready(function() {
|
||||
respDiv.toggle();
|
||||
}
|
||||
});
|
||||
|
||||
$(".ignore_link").click(function(e) {
|
||||
e.preventDefault();
|
||||
var id = this.id;
|
||||
$.ajax({
|
||||
type : "POST",
|
||||
url : "questions.php?action=take_ignore_question",
|
||||
data : {
|
||||
"auth" : authkey,
|
||||
"id" : id
|
||||
}
|
||||
}).done(function() {
|
||||
$("#question" + id).remove();
|
||||
$("#answer" + id).remove();
|
||||
$("#responses_for_" + id).remove();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user