Merge branch 'master' into hendrik-testing
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<div class="content">
|
||||
<div class="profile-box platform">
|
||||
<img class="left group-picture" src="<?= $group['picture'] ?>">
|
||||
<img class="left main-picture" src="<?= $group['picture'] ?>">
|
||||
<div class="profile-button">
|
||||
<p><img src="img/leave-group.png"> Groep verlaten</p>
|
||||
</div>
|
||||
|
||||
@@ -19,9 +19,12 @@
|
||||
|
||||
require_once ("../queries/checkInput.php");
|
||||
require_once ("../queries/connect.php");
|
||||
require_once ("../queries/user.php");
|
||||
|
||||
session_start();
|
||||
|
||||
if(!isset($_SESSION["userID"])){
|
||||
header("location:login.php");
|
||||
}
|
||||
} else {
|
||||
updateLastActivity();
|
||||
}
|
||||
|
||||
@@ -25,8 +25,7 @@ $userinfo = getHeaderInfo();
|
||||
</div>
|
||||
<?=$userinfo["fname"]?>
|
||||
</div>
|
||||
<img id="own-profile-picture" class="profile-picture" src="<?=$userinfo["profilepicture"]?>"/>
|
||||
<i id="open-notifications" class="fa fa-bars"></i>
|
||||
<img id="own-profile-picture" class="profile-picture" src="<?=$userinfo["profilepicture"]?>"/><i id="open-notifications" class="fa fa-bars"></i>
|
||||
</div>
|
||||
</header>
|
||||
<?php include("notification-center.php"); ?>
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
include_once ("../queries/user.php");
|
||||
|
||||
// auth
|
||||
$userinfo = getRoleByID($_SESSION['userID'])->fetch(PDO::FETCH_ASSOC);
|
||||
$role = getRoleByID($_SESSION['userID']);
|
||||
|
||||
if ($userinfo['role'] == 'admin' OR $userinfo['role'] == 'owner') {
|
||||
if ($role == 'admin' OR $role == 'owner') {
|
||||
echo "<a href=\"admin.php\" data-title=\"Admin\"><i class=\"fa fa-lock\"></i></a>";
|
||||
echo "<style>@import url('styles/adminbutton.css'); </style>";
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ echo("
|
||||
<div class="commentfield">
|
||||
<form id="newcommentform" onsubmit="return false;">
|
||||
<input type="hidden" id="newcomment-textarea" name="postID" value="<?= $postID ?>">
|
||||
<textarea id="newcomment" name="newcomment-content" placeholder="Laat een reactie achter..."></textarea> <br>
|
||||
<textarea id="newcomment" name="newcomment-content" placeholder="Laat een reactie achter..." maxlength="1000"></textarea><span></span> <br>
|
||||
<button onclick="postComment('reaction')" name="button" value="reaction">Reageer!</button>
|
||||
<button onclick="postComment('nietslecht')" name="button" value="nietslecht" class="nietslecht">
|
||||
<?php
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<div class="content">
|
||||
<div class="user-box">
|
||||
<img class="profile-picture main-picture" src="<?= $user["profilepicture"] ?>"><br />
|
||||
<img class="profile-picture main-picture <?= $user["onlinestatus"] ?>" src="<?= $user["profilepicture"] ?>"><br />
|
||||
<div class="platform">
|
||||
<div class="status-buttons-container">
|
||||
<button disabled class="gray">
|
||||
<?= $user["onlinestatus"] ?>
|
||||
<?= $user["onlinestatus"] ?>
|
||||
</button>
|
||||
<button disabled class="gray"><?= $user["role"] ?></button>
|
||||
</div>
|
||||
@@ -29,7 +29,7 @@
|
||||
<h3>Informatie</h3>
|
||||
<p>
|
||||
<ul>
|
||||
<li>Geboren op: <?= $user["birthdate"] ?></li>
|
||||
<li>Leeftijd: <?= getAge($user["birthdate"]) ?> jaar</li>
|
||||
<li>Locatie: <?= $user["location"] ?></li>
|
||||
<li>Lid sinds: <?= nicetime($user["creationdate"]) ?></li>
|
||||
</ul>
|
||||
|
||||
@@ -21,10 +21,8 @@ if (isset($_GET['filter'])) {
|
||||
}
|
||||
|
||||
$user_n = ($user_currentpage - 1) * $user_perpage;
|
||||
$user_count = countSomeUsers($search)->fetchColumn();
|
||||
|
||||
$group_n = ($group_currentpage - 1) * $group_perpage;
|
||||
$group_count = countSomeGroups($search)->fetchColumn();
|
||||
?>
|
||||
|
||||
<div class="content">
|
||||
@@ -40,8 +38,10 @@ $group_count = countSomeGroups($search)->fetchColumn();
|
||||
id="search-input"
|
||||
name="search"
|
||||
onkeyup="
|
||||
searchUsers(<?= $user_n ?>, <?= $user_perpage ?>);
|
||||
searchGroups(<?= $group_n ?>, <?= $group_perpage ?>);"
|
||||
$('#user-pagenumber, #group-pagenumber').prop('value', 1);
|
||||
searchUsers();
|
||||
searchGroups();
|
||||
pageNumber();"
|
||||
placeholder="Zoek"
|
||||
value=<?php echo "$search";?>
|
||||
>
|
||||
@@ -66,26 +66,12 @@ $group_count = countSomeGroups($search)->fetchColumn();
|
||||
<div class="platform item-box searchleft" id="search-friends-output">
|
||||
<h4>Gebruikers</h4>
|
||||
|
||||
<select class="user-pageselect"
|
||||
name="user-pageselect"
|
||||
id="user-pageselect"
|
||||
form="search-form"
|
||||
onchange="this.form.submit()">
|
||||
<?php
|
||||
for ($i=1; $i <= ceil($user_count / $user_perpage); $i++) {
|
||||
if ($user_currentpage == $i) {
|
||||
echo "<option value='$i' selected>$i</option>";
|
||||
} else {
|
||||
echo "<option value='$i'>$i</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<div id="user-pageselect"></div>
|
||||
|
||||
<ul id='search-users-list' class='nav-list'>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
searchUsers(<?= $user_n ?>, <?= $user_perpage ?>);
|
||||
searchUsers();
|
||||
});
|
||||
</script>
|
||||
</ul>
|
||||
@@ -94,26 +80,12 @@ $group_count = countSomeGroups($search)->fetchColumn();
|
||||
<div class="platform item-box searchright" id="search-group-output">
|
||||
<h4>Groepen</h4>
|
||||
|
||||
<select class="group-pageselect"
|
||||
name="group-pageselect"
|
||||
id="group-pageselect"
|
||||
form="search-form"
|
||||
onchange="this.form.submit()">
|
||||
<?php
|
||||
for ($i=1; $i <= ceil($group_count / $group_perpage); $i++) {
|
||||
if ($group_currentpage == $i) {
|
||||
echo "<option value='$i' selected>$i</option>";
|
||||
} else {
|
||||
echo "<option value='$i'>$i</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<div id="group-pageselect"></div>
|
||||
|
||||
<ul id="search-groups-list" class="nav-list">
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
searchGroups(<?= $group_n ?>, <?= $group_perpage ?>);
|
||||
searchGroups();
|
||||
});
|
||||
</script>
|
||||
</ul>
|
||||
|
||||
36
website/views/searchPageNumber.php
Normal file
36
website/views/searchPageNumber.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
if ($option == "user") {
|
||||
echo "<select class=\"user-pageselect\"
|
||||
name=\"user-pageselect\"
|
||||
id='user-pagenumber'
|
||||
form=\"search-form\"
|
||||
onchange=\"pageNumber(); searchUsers();\">";
|
||||
|
||||
for ($i=1; $i <= ceil($user_count / $user_perpage); $i++) {
|
||||
if ($user_currentpage == $i) {
|
||||
echo "<option value='$i' selected>$i</option>";
|
||||
} else {
|
||||
echo "<option value='$i'>$i</option>";
|
||||
}
|
||||
}
|
||||
|
||||
echo "</select>";
|
||||
} else {
|
||||
echo "<select class=\"group-pageselect\"
|
||||
name=\"group-pageselect\"
|
||||
id='group-pagenumber'
|
||||
form=\"search-form\"
|
||||
onchange=\"pageNumber(); searchGroups();\">";
|
||||
|
||||
for ($i=1; $i <= ceil($group_count / $group_perpage); $i++) {
|
||||
if ($group_currentpage == $i) {
|
||||
echo "<option value='$i' selected>$i</option>";
|
||||
} else {
|
||||
echo "<option value='$i'>$i</option>";
|
||||
}
|
||||
}
|
||||
|
||||
echo "</select>";
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -99,7 +99,8 @@ $settings = getSettings();
|
||||
rows="5"
|
||||
title="bio"
|
||||
id="bio"
|
||||
><?=$settings["bio"]?></textarea>
|
||||
maxlength="1000"
|
||||
><?=$settings["bio"]?></textarea><span></span>
|
||||
</li>
|
||||
<li>
|
||||
<label></label>
|
||||
|
||||
Reference in New Issue
Block a user