Merge branch 'master' into lars
This commit is contained in:
@@ -7,8 +7,9 @@
|
||||
<h1>Welkom bij MyHyvesbook+</h1>
|
||||
<!-- Login content -->
|
||||
<form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"
|
||||
return= $correct
|
||||
method="post">
|
||||
return=$correct
|
||||
method="post"
|
||||
name="login">
|
||||
|
||||
<!-- Login name -->
|
||||
<div class="login_containerlogin">
|
||||
@@ -37,15 +38,79 @@
|
||||
<!-- Button for logging in -->
|
||||
<div class="login_containerlogin">
|
||||
<button type="submit"
|
||||
value="Login"
|
||||
name="submit"
|
||||
id="frm1_submit">
|
||||
Login
|
||||
value="login"
|
||||
name="submit"
|
||||
id="frm1_submit">
|
||||
Inloggen
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Button for going to the register screen -->
|
||||
<div class="login_containerlogin">
|
||||
<a href="https://myhyvesbookplus.nl/register" class="button">Registreer een account</a>
|
||||
<a href="https://myhyvesbookplus.nl/register" class="button">Registreer een account</a>
|
||||
|
||||
<!-- Trigger/Open The Modal -->
|
||||
<button id="myBtn" class="button">Wachtwoord vergeten</button>
|
||||
|
||||
<!-- The Modal -->
|
||||
<div id="myModal" class="modal">
|
||||
<form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"
|
||||
return= $correct
|
||||
method="post"
|
||||
name="forgotPassword">
|
||||
|
||||
<!-- Modal content -->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<span class="close">×</span>
|
||||
<h3>Voer uw emailadres in</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input type="text"
|
||||
placeholder="Voer uw email in"
|
||||
name="forgotEmail"
|
||||
title="Voer een email in">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="login_containerfault"><span><?php echo $resetErr; ?></span></div>
|
||||
<button type="submit"
|
||||
value="reset"
|
||||
name="submit"
|
||||
id="frm1_submit">
|
||||
Reset password
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
// Get the modal
|
||||
var modal = document.getElementById('myModal');
|
||||
|
||||
// Get the button that opens the modal
|
||||
var btn = document.getElementById("myBtn");
|
||||
|
||||
// Get the <span> element that closes the modal
|
||||
var span = document.getElementsByClassName("close")[0];
|
||||
|
||||
// When the user clicks the button, open the modal
|
||||
btn.onclick = function() {
|
||||
modal.style.display = "block";
|
||||
}
|
||||
|
||||
// When the user clicks on <span> (x), close the modal
|
||||
span.onclick = function() {
|
||||
modal.style.display = "none";
|
||||
}
|
||||
|
||||
// When the user clicks anywhere outside of the modal, close it
|
||||
window.onclick = function(event) {
|
||||
if (event.target == modal) {
|
||||
modal.style.display = "none";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<link rel="stylesheet"
|
||||
type="text/css"
|
||||
href="styles/index.css">
|
||||
<script src="js/jqeury.js"></script>
|
||||
<script src="js/jquery.js"></script>
|
||||
<script src="js/registerAndLogin.js"></script>
|
||||
<script src='https://www.google.com/recaptcha/api.js'></script>
|
||||
</head>
|
||||
|
||||
52
website/views/post-view.php
Normal file
52
website/views/post-view.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
$postID = $_GET['postID'];
|
||||
$post = selectPostById($postID)->fetch(PDO::FETCH_ASSOC);
|
||||
$fullname = $post['fname'] . " " . $post['lname'] . " (" . $post['username'] . ")";
|
||||
|
||||
echo("
|
||||
<div class='post-header header'>
|
||||
<h4>" . $post['title'] . "</h4>
|
||||
<span class='postinfo'>
|
||||
gepost door $fullname,
|
||||
<span class='posttime' title='" . $post['creationdate'] . "'>
|
||||
" . nicetime($post['creationdate']) . "
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class='post-content'>
|
||||
<p>" . $post['content'] . "</p>
|
||||
</div>
|
||||
"); ?>
|
||||
|
||||
<div class='post-comments'>
|
||||
<div class="commentfield">
|
||||
<form name="newcomment" method="post">
|
||||
<textarea placeholder="Laat een reactie achter..."></textarea> <br>
|
||||
<input type="submit" value="Reageer!">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$q = selectCommentsByPostId($postID);
|
||||
while($comment = $q->fetch(PDO::FETCH_ASSOC)) {
|
||||
$commentauthor = $comment['fname'] . " " . $comment['lname'] . " (" . $comment['username'] . ")";
|
||||
$commentdate = $comment['creationdate'];
|
||||
$commentnicetime = nicetime($commentdate);
|
||||
$commentcontent = $comment['content'];
|
||||
|
||||
echo("
|
||||
<div class='comment'>
|
||||
<div class='commentinfo'>
|
||||
$commentauthor
|
||||
<span class='commentdate', title='$commentdate'>
|
||||
$commentnicetime
|
||||
</span>
|
||||
</div>
|
||||
<div class='commentcontent'>
|
||||
$commentcontent
|
||||
</div>
|
||||
</div>
|
||||
");
|
||||
} ?>
|
||||
</div>
|
||||
@@ -2,21 +2,10 @@
|
||||
<div class="profile-box platform">
|
||||
<img class="left profile-picture" src="<?php echo $user["profilepicture"] ?>">
|
||||
|
||||
<form action="API/edit_friendship.php" method="post">
|
||||
<input type="hidden" name="userID" value="<?= $userID ?>">
|
||||
<?php
|
||||
if($userID != $_SESSION["userID"] AND $user["friend_status"] == 0) {
|
||||
echo "<input class='profile-button' type='submit' name='request' value='Stuur vriendschapsverzoek!'>";
|
||||
} else if($user["friend_status"] == 1) {
|
||||
echo "<input class='profile-button' type='submit' name='delete' value='Verwijder vriend!'>";
|
||||
} else if($user["friend_status"] == 2) {
|
||||
echo "<input class='profile-button' type='submit' name='accept' value='Accepteer vriendschapsverzoek!'>";
|
||||
echo "<input class='profile-button' type='submit' name='delete' value='Weiger vriendschapsverzoek!'>";
|
||||
} else if($user["friend_status"] == 3) {
|
||||
echo "<input class='profile-button' type='submit' name='delete' value='Trek vriendschapsverzoek in!'>";
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
<div class="friend-button-container">
|
||||
|
||||
</div>
|
||||
|
||||
<h1 class="profile-username"><?= $user["fname"]?> <?=$user["lname"]?></h1>
|
||||
<h5 class="profile-username"><?=$user["username"]?></h5>
|
||||
<p><?=$user["bio"]?></p>
|
||||
@@ -69,14 +58,32 @@
|
||||
|
||||
while($post = $posts->fetch()) {
|
||||
$nicetime = nicetime($post["creationdate"]);
|
||||
$postID = $post["postID"];
|
||||
echo "
|
||||
<div class='post platform'>
|
||||
<div class='post platform' onclick='requestPost(this)'>
|
||||
<h2>${post["title"]}</h2>
|
||||
<p>${post["content"]}</p>
|
||||
<p class=\"subscript\">${nicetime} geplaatst.</p>
|
||||
<p class=\"subscript\" title='" . $post["creationdate"] ."'>${nicetime} geplaatst.</p>
|
||||
<form>
|
||||
<input type='hidden'
|
||||
name='postID'
|
||||
value='$postID'
|
||||
/>
|
||||
</form>
|
||||
</div>
|
||||
";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="modal">
|
||||
<div class="modal-content platform">
|
||||
<div class="modal-close">
|
||||
×
|
||||
</div>
|
||||
<div class="modal-response" id="modal-response">
|
||||
<span class="modal-default">Aan het laden...</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -126,7 +126,7 @@
|
||||
<!-- Button for registering -->
|
||||
<div class="login_containerlogin">
|
||||
<!-- Button for going back to login screen -->
|
||||
<a href="https://myhyvesbookplus.nl/login.php" class="left-arrow">Login</a>
|
||||
<a href="https://myhyvesbookplus.nl/login.php" class="button">Annuleren</a>
|
||||
|
||||
<button type="submit"
|
||||
value="Registreer uw account"
|
||||
|
||||
47
website/views/resetpassword.php
Normal file
47
website/views/resetpassword.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
@import url(styles/main.css);
|
||||
@import url(styles/settings.css);
|
||||
@import url(styles/resetpassword.css);
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class='password-change'>
|
||||
<div class="top-logo"><img src="img/top-logo.png" alt="MyHyvesbook+"/></div>
|
||||
|
||||
<form class='settings platform item-box' method='post'>
|
||||
<h5>Voer een nieuw wachtwoord in</h5>
|
||||
<input type="hidden"
|
||||
name="u"
|
||||
value="<?=$_GET["u"]?>"
|
||||
>
|
||||
<input type="hidden"
|
||||
name="h"
|
||||
value="<?=$_GET["h"]?>"
|
||||
>
|
||||
<ul>
|
||||
<li>
|
||||
<label>Nieuw wachtwoord</label>
|
||||
<input type='password'
|
||||
name='password'
|
||||
placeholder='Nieuw wachtwoord'
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<label>Bevestig wachtwoord</label>
|
||||
<input type='password'
|
||||
name='password-confirm'
|
||||
placeholder='Bevestig wachtwoord'
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<label></label>
|
||||
<button type='submit'>Verander wachtwoord</button>
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -38,7 +38,7 @@ $group_count = countSomeGroups($search)->fetchColumn();
|
||||
</label>
|
||||
<input type="text"
|
||||
name="search"
|
||||
placeholder="zoek"
|
||||
placeholder="Zoek"
|
||||
value=<?php echo "$search";?>
|
||||
>
|
||||
<label for="filter">
|
||||
|
||||
Reference in New Issue
Block a user