diff --git a/website/public/API/getPosts.php b/website/public/API/getPosts.php new file mode 100644 index 0000000..eef8261 --- /dev/null +++ b/website/public/API/getPosts.php @@ -0,0 +1,24 @@ +fetchAll(PDO::FETCH_ASSOC); + +for($i = 0; $i < sizeof($results); $i++) { + $results[$i]["nicetime"] = nicetime($results[$i]["creationdate"]); +} + +//$results[0]["niceTime"] = nicetime($results[0]["creationdate"]); + +echo json_encode($results); \ No newline at end of file diff --git a/website/public/API/loadFriendRequestNotifications.php b/website/public/API/loadFriendRequest.php similarity index 100% rename from website/public/API/loadFriendRequestNotifications.php rename to website/public/API/loadFriendRequest.php diff --git a/website/public/API/loadFriends.php b/website/public/API/loadFriends.php new file mode 100644 index 0000000..38158c9 --- /dev/null +++ b/website/public/API/loadFriends.php @@ -0,0 +1,16 @@ + $friend) { + $friendshipStatus = getFriendshipStatus($friend->userID); + + if ($limit != 0 && $i >= $limit) + $extra = "extra-friend-item"; + else + $extra = ""; + ?> +
  • +
    + +
    + 1) { + ?> +
    + + + + + +
    + +
  • + $limit) { + ?> +
  • + Meer vrienden... +
  • + + + diff --git a/website/public/bits/group-item.php b/website/public/bits/group-item.php new file mode 100644 index 0000000..0a5831c --- /dev/null +++ b/website/public/bits/group-item.php @@ -0,0 +1,38 @@ + $group) { + ?> +
  • +
    + +
    +
  • + +
  • +
    + + + +
    +
  • diff --git a/website/public/emailconfirm.php b/website/public/emailconfirm.php index 97eb2f6..2812eaa 100644 --- a/website/public/emailconfirm.php +++ b/website/public/emailconfirm.php @@ -1,5 +1,6 @@ prepare(" SELECT @@ -18,11 +19,11 @@ if (array_key_exists("u", $_GET) and array_key_exists("h", $_GET)) { if ($role == "unconfirmed") { doActivate($email); } else { - echo "Ongeldige link."; + messagePage("Ongeldige link."); } } else { - echo "Ongeldige link."; + messagePage("Ongeldige link."); } function doActivate(string $email) { @@ -39,11 +40,10 @@ function doActivate(string $email) { $confirmUser->bindParam(":userID", $_GET["u"]); $confirmUser->execute(); if ($confirmUser->rowCount()) { - echo "Email bevestigd
    - U wordt automatisch doorgestuurd naar de login pagina over 5 seconden. "; - header("refresh:5;url=login.php"); + messagePage("Email bevestigd
    + Klik hier om terug te gaan naar de login pagina."); } } else { - echo "Ongeldige link."; + messagePage("Ongeldige link."); } } \ No newline at end of file diff --git a/website/public/index.php b/website/public/index.php index 914192b..7ad8b59 100644 --- a/website/public/index.php +++ b/website/public/index.php @@ -1,5 +1,9 @@ - - - - - \ No newline at end of file +"); + $form = $postInput.append($("
    ")); + + $form.append($("")); + $form.append($("
    + +
    + + + fetch(PDO::FETCH_ASSOC)) { + $commentauthor = $comment['fname'] . " " . $comment['lname'] . " (" . $comment['username'] . ")"; + $commentdate = $comment['creationdate']; + $commentnicetime = nicetime($commentdate); + $commentcontent = $comment['content']; + + echo(" +
    +
    + $commentauthor + + $commentnicetime + +
    +
    + $commentcontent +
    +
    + "); + } ?> + \ No newline at end of file diff --git a/website/views/profile.php b/website/views/profile.php index 6b7b283..4a9c116 100644 --- a/website/views/profile.php +++ b/website/views/profile.php @@ -43,6 +43,7 @@
    + @@ -67,5 +68,47 @@ // "; // } // ?> + + + + + + + + +fetch()) { +// $nicetime = nicetime($post["creationdate"]); +// $postID = $post["postID"]; +// echo " +//
    +//

    ${post["title"]}

    +//

    ${post["content"]}

    +//

    ${nicetime} geplaatst.

    +//
    +// +//
    +//
    +// "; +// } +// ?> +
    + + \ No newline at end of file diff --git a/website/views/register-view.php b/website/views/register-view.php index f970a6f..5f39472 100644 --- a/website/views/register-view.php +++ b/website/views/register-view.php @@ -126,7 +126,7 @@
    - Login + Annuleren