Merge branch 'master' into lars

This commit is contained in:
Lars van Hijfte
2017-01-26 14:12:27 +01:00
15 changed files with 235 additions and 150 deletions

View File

@@ -0,0 +1,23 @@
<?php
function messagePage(string $content) {
$webpage = ("
<!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'><a href='login.php'><img src='img/top-logo.png' alt='MyHyvesbook+'/></a></div>
<div class='item-box platform'>$content</div>
</div>
</body>
</html>
");
echo $webpage;
}

View File

@@ -21,8 +21,9 @@ echo("
<div class='post-comments'>
<div class="commentfield">
<form name="newcomment" method="post">
<textarea placeholder="Laat een reactie achter..."></textarea> <br>
<form id="newcommentform" action="javascript:postComment();">
<input type="hidden" id="newcomment-textarea" name="postID" value="<?= $postID ?>">
<textarea id="newcomment" name="newcomment-content" placeholder="Laat een reactie achter..."></textarea> <br>
<input type="submit" value="Reageer!">
</form>
</div>

View File

@@ -5,7 +5,7 @@
<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>
@@ -43,37 +43,7 @@
</div>
<div class="posts">
<?php
if ($_SESSION["userID"] === $userID) {
?>
<div class="post platform">
<form>
<input type="text" class="newpost" placeholder="Titel">
<textarea class="newpost" placeholder="Schrijf een berichtje..."></textarea>
<input type="submit" value="Plaats!">
</form>
</div>
<?php
}
while($post = $posts->fetch()) {
$nicetime = nicetime($post["creationdate"]);
$postID = $post["postID"];
echo "
<div class='post platform' onclick='requestPost(this)'>
<h2>${post["title"]}</h2>
<p>${post["content"]}</p>
<p class=\"subscript\" title='" . $post["creationdate"] ."'>${nicetime} geplaatst.</p>
<form>
<input type='hidden'
name='postID'
value='$postID'
/>
</form>
</div>
";
}
?>
</div>
<div class="modal">

View File

@@ -1,47 +1,38 @@
<!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>
<?php
function passwordResetFields() {
$username = $_GET['u'];
$hash = $_GET['h'];
$content ="
<form class='settings' method = 'post' >
<h5 > Voer een nieuw wachtwoord in </h5 >
<input type = 'hidden'
name = 'u'
value = '$username'
>
<input type = 'hidden'
name = 'h'
value = '$hash'
>
<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 >";
return $content;
}