"Niet slecht."-button!
This commit is contained in:
@@ -5,7 +5,8 @@ session_start();
|
||||
require("../../queries/post.php");
|
||||
require("../../queries/connect.php");
|
||||
require("../../queries/checkInput.php");
|
||||
if ($_POST["button"] == "reaction") {
|
||||
print_r($_POST);
|
||||
if ($_POST['button'] == 'reaction') {
|
||||
if (empty($_POST['newcomment-content'])) {
|
||||
echo 0;
|
||||
} else {
|
||||
@@ -17,7 +18,7 @@ if ($_POST["button"] == "reaction") {
|
||||
echo 0;
|
||||
}
|
||||
}
|
||||
} elseif ($_POST["button"] == "nietslecht") {
|
||||
} else if ($_POST['button'] == 'nietslecht') {
|
||||
if (makeNietSlecht($_POST["postID"], $_SESSION["userID"])) {
|
||||
echo 1;
|
||||
} else {
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
function postComment() {
|
||||
function postComment(buttonValue) {
|
||||
formData = $("#newcommentform").serializeArray();
|
||||
formData.push({name: "button", value: buttonValue});
|
||||
$.post(
|
||||
"API/postComment.php",
|
||||
$("#newcommentform").serialize()
|
||||
formData
|
||||
);
|
||||
|
||||
$("#newcomment").val("");
|
||||
@@ -13,6 +15,4 @@ function postComment() {
|
||||
).done(function (data) {
|
||||
$('#modal-response').html(data);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -8,6 +8,7 @@
|
||||
<style>
|
||||
@import url("styles/profile.css");
|
||||
@import url("styles/post-popup.css");
|
||||
@import url('https://fonts.googleapis.com/css?family=Anton');
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -72,6 +72,6 @@
|
||||
}
|
||||
|
||||
.nietslecht {
|
||||
font-family: Impact, sans-serif;
|
||||
font-family: Impact, Anton, sans-serif;
|
||||
text-shadow: -1.5px 0 1px black, 0 1.5px 1px black, 1px 0 1.5px black, 0 -1.5px 1px black;
|
||||
}
|
||||
Reference in New Issue
Block a user