Merge branch 'kevin-prototype' into 'master'
FIXED VISIBILITY ON PROFILE See merge request !183
This commit was merged in pull request #187.
This commit is contained in:
@@ -14,12 +14,7 @@
|
|||||||
include_once("../queries/group_page.php");
|
include_once("../queries/group_page.php");
|
||||||
|
|
||||||
$group = selectGroupByName($_GET["groupname"]);
|
$group = selectGroupByName($_GET["groupname"]);
|
||||||
$members = selectGroupMembers(2);
|
$members = selectGroupMembers($group["groupID"]);
|
||||||
|
|
||||||
?>
|
|
||||||
<script>alert("<?= $members[0] ?>");</script>
|
|
||||||
<script>alert("<?= $members[1] ?>");</script>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This view adds the main layout over the screen.
|
* This view adds the main layout over the screen.
|
||||||
|
|||||||
@@ -21,13 +21,19 @@ include_once("../queries/calcAge.php");
|
|||||||
|
|
||||||
if(empty($_GET["username"])) {
|
if(empty($_GET["username"])) {
|
||||||
$userID = $_SESSION["userID"];
|
$userID = $_SESSION["userID"];
|
||||||
|
$showProfile = True;
|
||||||
} else {
|
} else {
|
||||||
$userID = getUserID($_GET["username"]);
|
$userID = getUserID($_GET["username"]);
|
||||||
|
$showProfile = False;
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = selectUser($_SESSION["userID"], $userID);
|
$user = selectUser($_SESSION["userID"], $userID);
|
||||||
$profile_friends = selectAllFriends($userID);
|
$profile_friends = selectAllFriends($userID);
|
||||||
$profile_groups = selectAllUserGroups($userID);
|
$profile_groups = selectAllUserGroups($userID);
|
||||||
|
$showProfile = $showProfile || $user["showProfile"] || ($user["status"] == 'confirmed');
|
||||||
|
echo " friendship status: " . $user["status"];
|
||||||
|
echo " showprofile: $showProfile";
|
||||||
|
echo " userID: " . $user["userID"];
|
||||||
|
|
||||||
|
|
||||||
if ($userID == $_SESSION["userID"]) {
|
if ($userID == $_SESSION["userID"]) {
|
||||||
|
|||||||
@@ -81,7 +81,10 @@ function selectGroupMembers(int $groupID) {
|
|||||||
`username`,
|
`username`,
|
||||||
`fname`,
|
`fname`,
|
||||||
`lname`,
|
`lname`,
|
||||||
`profilepicture`
|
IFNULL(
|
||||||
|
`profilepicture`,
|
||||||
|
'../img/avatar-standard.png'
|
||||||
|
) AS profilepicture
|
||||||
FROM
|
FROM
|
||||||
`group_member`
|
`group_member`
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
|
|||||||
@@ -69,6 +69,10 @@ function selectUser($me, $other) {
|
|||||||
`role`,
|
`role`,
|
||||||
`fname`,
|
`fname`,
|
||||||
`lname`,
|
`lname`,
|
||||||
|
`showBday`,
|
||||||
|
`showEmail`,
|
||||||
|
`showProfile`,
|
||||||
|
`status`,
|
||||||
CASE `status` IS NULL
|
CASE `status` IS NULL
|
||||||
WHEN TRUE THEN 0
|
WHEN TRUE THEN 0
|
||||||
WHEN FALSE THEN
|
WHEN FALSE THEN
|
||||||
|
|||||||
@@ -27,6 +27,10 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="noposts platform">
|
||||||
|
<p>Geen posts meer!</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="modal">
|
<div class="modal">
|
||||||
<div class="modal-content platform">
|
<div class="modal-content platform">
|
||||||
<div class="modal-close">
|
<div class="modal-close">
|
||||||
|
|||||||
@@ -15,16 +15,18 @@
|
|||||||
<div class="profile-info">
|
<div class="profile-info">
|
||||||
<h2><?= $user["fname"]?> <?=$user["lname"]?></h2>
|
<h2><?= $user["fname"]?> <?=$user["lname"]?></h2>
|
||||||
<h5><?=$user["username"]?></h5>
|
<h5><?=$user["username"]?></h5>
|
||||||
<?php if (strlen($user["bio"]) <= 50) {
|
<?php
|
||||||
|
if (strlen($user["bio"]) <= 50 and $showProfile) {
|
||||||
echo "<p>" . $user["bio"] . "</p>";
|
echo "<p>" . $user["bio"] . "</p>";
|
||||||
} ?>
|
} ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php if (strlen($user["bio"]) > 50) {
|
<?php if (strlen($user["bio"]) > 50 and $showProfile) {
|
||||||
echo "<div class='platform'><h3>Bio:</h3><p>" . $user["bio"] . "</p></div>";
|
echo "<div class='platform'><h3>Bio:</h3><p>" . $user["bio"] . "</p></div>";
|
||||||
} ?>
|
} ?>
|
||||||
|
|
||||||
|
<?php if($showProfile) { ?>
|
||||||
<div class="item-box platform">
|
<div class="item-box platform">
|
||||||
<h3>Informatie</h3>
|
<h3>Informatie</h3>
|
||||||
<p>
|
<p>
|
||||||
@@ -90,4 +92,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
Reference in New Issue
Block a user