Merge branch 'master' into hendrik-post
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<?php include("../views/head.php"); ?>
|
||||
|
||||
<script src="js/masonry.js"></script>
|
||||
<script src="js/post.js"></script>
|
||||
<style>
|
||||
@@ -27,6 +28,15 @@ $profile_friends = selectAllFriends($userID);
|
||||
$profile_groups = selectAllUserGroups($userID);
|
||||
$posts = selectAllUserPosts($userID);
|
||||
|
||||
|
||||
if ($userID == $_SESSION["userID"]) {
|
||||
$friendship_status = -1;
|
||||
$masonry_mode = 1;
|
||||
} else {
|
||||
$friendship_status = $user["friend_status"];
|
||||
$masonry_mode = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* This view adds the main layout over the screen.
|
||||
* Header, menu, footer.
|
||||
@@ -39,5 +49,28 @@ include("../views/profile.php");
|
||||
/* This adds the footer. */
|
||||
include("../views/footer.php");
|
||||
?>
|
||||
|
||||
<script src="js/friendButtons.js"></script>
|
||||
<script src="js/masonry.js"></script>
|
||||
<script>
|
||||
var posts;
|
||||
|
||||
$(document).ready(function() {
|
||||
userID = <?= $userID ?>;
|
||||
placeFriendButtons();
|
||||
|
||||
masonry(<?= $masonry_mode ?>);
|
||||
// alert("blap");
|
||||
// $.post("API/getPosts.php", { usr : userID }, "json")
|
||||
// .done(function(data) {
|
||||
// posts = JSON.parse(data);
|
||||
// alert(posts[0]["content"]);
|
||||
// }).fail(function() {
|
||||
// alert("failure...");
|
||||
// });
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user