-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.php
105 lines (78 loc) · 3 KB
/
home.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?php
require 'includes/header.php';
require 'db/conn.php';
if(!isset($_SESSION["username"]) && !isset($_SESSION["email"])) {
header("location: login.php");
}
$posts = getAllPosts($conn);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Home</title>
<link rel="icon" type="image/x-icon" href="images/fevicon.jpg">
<link rel="stylesheet" href="styles/index.css">
<link rel="stylesheet" href="styles/home.css">
</head>
<body>
<?php
include "includes/navbar.php";
?>
<div id="main-container" class="border">
<div id="left-profile" class="border">
<div class="profile-card border">
<div class="sub-profile-div">
<img src="<?php echo getUserProfileUrl($conn, $_SESSION["email"]) ?>" class="profile-img rounded" alt="user profile">
</div>
<div class="sub-profile-div">
<?php echo $_SESSION["username"] ?>
</div>
<div class="sub-profile-div">
<a href="profile.php" class="link-btn small-btn">profile</a>
</div>
</div>
</div>
<div id="feed" class="border">
<div class="post" id="create-post-div">
<h3>Create a Post</h3>
<form action="new_post.php" class="post" method="post">
<textarea name="new_post" id="create-post-textarea" cols="30" rows="10"></textarea>
<div class="right-aligned">
<input type="submit" class="link-btn small-btn" id="post-btn" value="Post">
</div>
</form>
</div>
<?php
include "includes/posts.php";
?>
<!-- post templet -->
<!-- <div class="post">
<div class="post-header">
<div class="post-header-img-div">
<img src="images/savan.jpg" alt="post author pfp" class="post-header-img rounded">
</div>
<div class="header-info">
<span style="margin-top: 4px;">Name</span><br>
<div class="datetime"><small>date and time</small></div><br>
</div>
</div>
<div class="post-body">
<p>Hello guys welcome to our community. this is dumy post.</p>
</div>
<button class="link-btn small-btn">like</button>
</div> -->
</div>
<div id="right" class="border">
<div class="group-title">
GROUPS
<a href="#" class="link-btn add-group"> + </a>
</div>
<div class="group-list">
</div>
</div>
</div>
</body>
</html>