Merge branch 'master' into hendrik-post
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<div class="content">
|
||||
<div class="chat">
|
||||
<nav class="nav-list chat-left left platform chat-recent">
|
||||
<nav class="nav-list platform" id="chat-recent-panel">
|
||||
<h5>Chats</h5>
|
||||
<ul>
|
||||
<?php
|
||||
@@ -16,8 +16,9 @@
|
||||
|
||||
// Set default values of a friend.
|
||||
$username = $friend["username"];
|
||||
$name = $friend["name"];
|
||||
$userID = $friend["userID"];
|
||||
$pf = "img/notbad.jpg";
|
||||
$pf = "img/avatar-standard.png";
|
||||
|
||||
// Change values if needed.
|
||||
if (!empty($friend["profilepicture"]))
|
||||
@@ -28,17 +29,25 @@
|
||||
<li class='friend-item' id='friend-item-$userID' onclick='switchUser(\"$userID\")'>
|
||||
<div class='friend'>
|
||||
<img alt='PF' class='profile-picture' src='$pf'/>
|
||||
$username
|
||||
<div class='friend-name'>
|
||||
$name<br/>
|
||||
<span style='color: #666'>$username</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
";
|
||||
";
|
||||
}
|
||||
|
||||
$chatID = $_GET["chatID"];
|
||||
if (isset($chatID) && $chatID != "") {
|
||||
echo "<script>$(document).ready(function(){switchUser('$chatID')});</script>";
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</nav>
|
||||
<div class="chat-right">
|
||||
<div id="chat-history" class="chat-history platform">
|
||||
</div>
|
||||
<div id="chat-history" class="chat-history platform">
|
||||
</div>
|
||||
<div>
|
||||
<form id="lastIDForm">
|
||||
<input type="hidden"
|
||||
id="lastID"
|
||||
|
||||
3
website/views/loadFriends.php
Normal file
3
website/views/loadFriends.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
|
||||
echo json_encode(selectAllFriends($_SESSION["userID"])->fetchAll());
|
||||
@@ -7,6 +7,7 @@
|
||||
<link rel="stylesheet"
|
||||
type="text/css"
|
||||
href="styles/index.css">
|
||||
<script src="/js/jqeury.js"></script>
|
||||
<script src="/js/registerAndLogin.js"></script>
|
||||
<script src="js/jqeury.js"></script>
|
||||
<script src="js/registerAndLogin.js"></script>
|
||||
<script src='https://www.google.com/recaptcha/api.js'></script>
|
||||
</head>
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
foreach ($friends as $i => $friend) {
|
||||
$username = $friend["username"];
|
||||
$name = $friend["name"];
|
||||
$extraItem = "";
|
||||
$pf = $friend["profilepicture"];
|
||||
|
||||
@@ -49,7 +50,10 @@
|
||||
value='$username'>
|
||||
<div class='friend'>
|
||||
<img alt='PF' class='profile-picture' src='$pf'/>
|
||||
$username
|
||||
<div class='friend-name'>
|
||||
$name<br/>
|
||||
<span style='color: #666'>$username</span>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
</form>
|
||||
@@ -127,4 +131,4 @@
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</nav>
|
||||
</nav>
|
||||
@@ -5,12 +5,20 @@
|
||||
<a href="profile.php"><i class="fa fa-user" data-title="Profiel"></i></a>
|
||||
<a href="logout.php"><i class="fa fa-sign-out" data-title="Uitloggen"></i></a>
|
||||
</section>
|
||||
<section id="notifocationCenter">
|
||||
<section>
|
||||
<h4>
|
||||
Vriendchapsverzoeken
|
||||
</h4>
|
||||
<ul class="nav-list" id="friendrequestslist">
|
||||
|
||||
</ul>
|
||||
</section>
|
||||
<section>
|
||||
<h4>
|
||||
Nieuwe berichten
|
||||
</h4>
|
||||
<ul class="nav-list" id="unreadChatlist">
|
||||
|
||||
</ul>
|
||||
</section>
|
||||
</nav>
|
||||
@@ -1,11 +1,24 @@
|
||||
<div class="content">
|
||||
<div class="profile-box platform">
|
||||
<img class="left profile-picture" src="<?php echo $user["profilepicture"] ?>">
|
||||
<div class="profile-button">
|
||||
<p><img src="/img/add-friend.png"> Als vriend toevoegen</p>
|
||||
</div>
|
||||
<h1 class="profile-username"><?=$user["username"]?></h1>
|
||||
<h5 class="profile-username"><?= $user["fname"]?> <?=$user["lname"]?></h5>
|
||||
|
||||
<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>
|
||||
<h1 class="profile-username"><?= $user["fname"]?> <?=$user["lname"]?></h1>
|
||||
<h5 class="profile-username"><?=$user["username"]?></h5>
|
||||
<p><?=$user["bio"]?></p>
|
||||
</div>
|
||||
|
||||
@@ -14,7 +27,7 @@
|
||||
<p>
|
||||
<?php
|
||||
while($friend = $profile_friends->fetch()) {
|
||||
echo "<a href='/profile/${friend["username"]}/' data-title='${friend["username"]}'><img class='profile-picture' src='${friend["profilepicture"]}' alt='${friend["username"]}'s profielfoto></a>";
|
||||
echo "<a href='profile.php?username=${friend["username"]}' data-title='${friend["username"]}'><img class='profile-picture' src='${friend["profilepicture"]}' alt='${friend["username"]}'s profielfoto></a>";
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +60,7 @@
|
||||
<div class="post platform">
|
||||
<form>
|
||||
<input type="text" class="newpost" placeholder="Titel">
|
||||
<textarea class="newpost">Schrijf een berichtje...</textarea>
|
||||
<textarea class="newpost" placeholder="Schrijf een berichtje..."></textarea>
|
||||
<input type="submit" value="Plaats!">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -41,11 +41,12 @@
|
||||
<!-- Register birthday -->
|
||||
<div class="login_containerregister">
|
||||
<label><b>Geboortedatum</b></label>
|
||||
<input type="date"
|
||||
<input type="text"
|
||||
name="bday"
|
||||
value="<?php echo $bday ?>"
|
||||
id="bday"
|
||||
placeholder="01/01/1900"
|
||||
placeholder="1996/01/01"
|
||||
data-fv-date-max=""
|
||||
>
|
||||
*<span class="error"> <?php echo $bdayErr;?></span>
|
||||
</div>
|
||||
@@ -95,7 +96,7 @@
|
||||
|
||||
<!-- Register location -->
|
||||
<div class="login_containerregister">
|
||||
<label><b>Woonplaats</b></label>
|
||||
<label><b>Locatie</b></label>
|
||||
<input type="text"
|
||||
placeholder="Voer uw woonplaats in"
|
||||
name="location"
|
||||
@@ -117,18 +118,23 @@
|
||||
*<span class="error"> <?php echo $emailErr;?></span>
|
||||
</div>
|
||||
|
||||
<!-- Button for registering -->
|
||||
<div class="login_containerregister">
|
||||
<div class="g-recaptcha" data-sitekey="6Lc72xIUAAAAADumlWetgENm7NGd9Npyo0c_tYYQ"></div>
|
||||
<span class="error"> <?php echo $captchaErr;?></span>
|
||||
</div>
|
||||
|
||||
<!-- 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>
|
||||
|
||||
<button type="submit"
|
||||
value="Registreer uw account"
|
||||
name="Submit"
|
||||
id="frm1_submit">
|
||||
Registreer
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
<div class="login_containerlogin">
|
||||
<!-- Button for going back to login screen -->
|
||||
<a href="https://myhyvesbookplus.nl/login.php" class="left-arrow">Login</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,9 +6,9 @@ $settings = getSettings();
|
||||
<div class="settings">
|
||||
<?php
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
echo "<div class='platform settings-message ". $result->getClass()."'>".
|
||||
$result->getMessage().
|
||||
"</div>";
|
||||
echo "<div class='platform settings-message $alertClass '>
|
||||
$alertMessage
|
||||
</div>";
|
||||
}
|
||||
?>
|
||||
<form class="settings-profile platform" method="post">
|
||||
@@ -81,7 +81,8 @@ $settings = getSettings();
|
||||
<label>Selecteer foto</label>
|
||||
<input type="file"
|
||||
name="pp"
|
||||
accept="image/jpeg,image/gif,image/png"
|
||||
accept="image/*"
|
||||
size="4000000"
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
Reference in New Issue
Block a user