comments
This commit is contained in:
@@ -1,4 +1,9 @@
|
|||||||
|
|
||||||
|
/**
|
||||||
|
* Posts a comment or "Niet slecht." on a post.
|
||||||
|
* Button specifies between comment and "Niet slecht.".
|
||||||
|
* Alerts or redirects if frozen or not logged in.
|
||||||
|
*/
|
||||||
function postComment(buttonValue) {
|
function postComment(buttonValue) {
|
||||||
formData = $("#newcommentform").serializeArray();
|
formData = $("#newcommentform").serializeArray();
|
||||||
formData.push({name: "button", value: buttonValue});
|
formData.push({name: "button", value: buttonValue});
|
||||||
@@ -24,6 +29,10 @@ function postComment(buttonValue) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes a post given by postID, closes modal and reloads posts.
|
||||||
|
* @param postID
|
||||||
|
*/
|
||||||
function deletePost(postID) {
|
function deletePost(postID) {
|
||||||
var formData = [{name: "postID", value: postID}];
|
var formData = [{name: "postID", value: postID}];
|
||||||
$.post(
|
$.post(
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// Checks if user is logged in and offers to logout.
|
||||||
function checkLoggedIn() {
|
function checkLoggedIn() {
|
||||||
if (confirm("U bent al ingelogd!\nWilt u uitloggen?\nKlik ok om uit te loggen.") == true) {
|
if (confirm("U bent al ingelogd!\nWilt u uitloggen?\nKlik ok om uit te loggen.") == true) {
|
||||||
window.location.href = "logout.php";
|
window.location.href = "logout.php";
|
||||||
@@ -6,18 +7,22 @@ function checkLoggedIn() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Alert for validation mail.
|
||||||
function emailAlert(){
|
function emailAlert(){
|
||||||
alert("Bevestigingsemail is gestuurd!\n");
|
alert("Bevestigingsemail is gestuurd!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Alert for banned account.
|
||||||
function bannedAlert(){
|
function bannedAlert(){
|
||||||
alert("Uw account is geband!");
|
alert("Uw account is geband!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Alert for frozen account.
|
||||||
function frozenAlert(){
|
function frozenAlert(){
|
||||||
alert("Uw account is bevroren!\n");
|
alert("Uw account is bevroren!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Alert for unconfirmed email.
|
||||||
function emailNotConfirmed(){
|
function emailNotConfirmed(){
|
||||||
alert("Uw account is nog niet bevestigd!\nEr is een nieuwe email gestuurd om uw account te bevestigen");
|
alert("Uw account is nog niet bevestigd!\nEr is een nieuwe email gestuurd om uw account te bevestigen");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user