mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-05 22:10:11 +00:00
Empty commit
This commit is contained in:
parent
c87186d11a
commit
c1b5e99afc
@ -72,12 +72,7 @@
|
|||||||
</form>
|
</form>
|
||||||
<a href="#" onclick="if (confirm('Are you sure?') == true) { $('#delete_<?=$Question['ID']?>').raw().submit(); } return false;" class="brackets">Delete</a>
|
<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="">
|
<a href="#" id="<?=$Question['ID']?>" class="brackets ignore_link">Ignore</a>
|
||||||
<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="answer_link brackets">Answer</a>
|
<a href="#" id="<?=$Question['ID']?>" class="answer_link brackets">Answer</a>
|
||||||
</span>
|
</span>
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
authorize();
|
authorize();
|
||||||
|
|
||||||
$DB->query("SELECT COUNT(1) FROM user_questions WHERE UserID = '$LoggedUser[ID]'");
|
$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.");
|
error("You have asked too many questions for the time being.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
<?
|
<?
|
||||||
|
authorize();
|
||||||
|
|
||||||
if (!check_perms("users_mod")) {
|
if (!check_perms("users_mod")) {
|
||||||
error(404);
|
error(404);
|
||||||
}
|
}
|
||||||
$ID = $_POST['question_id'];
|
$ID = $_POST['id'];
|
||||||
|
|
||||||
if (!is_number($ID)) {
|
if (!is_number($ID)) {
|
||||||
error(404);
|
error(404);
|
||||||
@ -15,4 +16,3 @@
|
|||||||
VALUES
|
VALUES
|
||||||
('$ID', '$LoggedUser[ID]')");
|
('$ID', '$LoggedUser[ID]')");
|
||||||
|
|
||||||
header("Location: questions.php");
|
|
||||||
|
@ -44,5 +44,22 @@ $(document).ready(function() {
|
|||||||
respDiv.toggle();
|
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