-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.php
215 lines (192 loc) · 8.92 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<?php
include_once 'dbconfig.php';
if(!$user->is_loggedin())
{
$user->redirect('index.php');
}
$user_id = $_SESSION['user_session'];
$stmt = $DB_con->prepare("SELECT * FROM users WHERE user_id=:user_id");
$stmt->execute(array(":user_id"=>$user_id));
$userRow=$stmt->fetch(PDO::FETCH_ASSOC);
?>
<!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">
<title>Fritter: a Social Network for who love cooking</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/style.css" rel="stylesheet">
<link href="css/font-awesome.css" rel="stylesheet">
</head>
<body>
<header>
<div class="container">
<img src="img/fritter100.png" class="logo" alt=""><h1>Fritter</h1><h5>A social network for who loves cooking</h5>
<form class="form-inline">
<div class="form-group">
<label class="sr-only" for="exampleInputEmail3">Email address</label>
<input type="email" class="form-control" id="exampleInputEmail3" placeholder="Enter email">
</div>
<div class="form-group">
<label class="sr-only" for="exampleInputPassword3">Password</label>
<input type="password" class="form-control" id="exampleInputPassword3" placeholder="Password">
</div>
<button type="submit" class="btn btn-default">Sign in</button><br>
<div class="checkbox">
<label>
<input type="checkbox"> Remember me
</label>
</div>
</form>
</div>
</header>
<nav class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="index.php">Home</a></li>
<li><a href="members.html">Members</a></li>
<li><a href="registration.php">Registration</a></li>
<li><a href="photos.html">Photos</a></li>
<li class="active"><a href="profile.html">Profile</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<section>
<div class="container">
<div class="row">
<div class="col-md-8">
<div class="profile">
<h1 class="page-header"><?php print($userRow['first_name']); print(' ' . $userRow['last_name']);?></h1>
<div class="row">
<div class="col-md-4">
<img src="img/user.png" class="img-thumbnail" alt="">
</div>
<div class="col-md-8">
<ul>
<li><strong>Name:</strong> <?php print($userRow['first_name']);?></li>
<li><strong>Last Name:</strong> <?php print($userRow['last_name']);?></li>
<li><strong>Email:</strong> <?php print($userRow['user_email']);?></li>
<li><strong>City:</strong> <?php print($userRow['city']);?></li>
<li><strong>Birthday:</strong> <?php print($userRow['birthday']);?></li>
</ul>
</div>
<form method="POST" action="\fritter/testgovernment.php?id=<?php echo $user_id; ?>">
<input type="submit" class="btn btn-default" value="Check Government" />
</form>
<form method="POST" action="\fritter/newsfeed.php?id=<?php echo $user_id; ?>">
<input type="submit" class="btn btn-default" value="newsfeed" />
</form>
</div><br>
<div class="right">
<label><a href="logout.php?logout=true"><?php
$user->logout();
//$user->redirect('index.php');
?>
<i class="glyphicon glyphicon-log-out"></i> logout</a></label>
</div>
<br>
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Profile Wall</h3>
</div>
<div class="panel-body">
<form>
<div class="form-group">
<textarea class="form-control" placeholder="Write on the wall"></textarea>
</div>
<button type="submit" class="btn btn-default">Submit</button>
<div class="pull-right">
<div class="btn-toolbar">
<button type="button" class="btn btn-default"><i class="fa fa-pencil"></i>Text</button>
<button type="button" class="btn btn-default"><i class="fa fa-file-image-o"></i>Image</button>
<button type="button" class="btn btn-default"><i class="fa fa-file-video-o"></i>Video</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-default friends">
<div class="panel-heading">
<h3 class="panel-title">My Friends</h3>
</div>
<div class="panel-body">
<ul>
<li><a href="profile.html" class="thumbnail"><img src="img/user.png" alt=""></a></li>
<li><a href="profile.html" class="thumbnail"><img src="img/user.png" alt=""></a></li>
<li><a href="profile.html" class="thumbnail"><img src="img/user.png" alt=""></a></li>
<li><a href="profile.html" class="thumbnail"><img src="img/user.png" alt=""></a></li>
<li><a href="profile.html" class="thumbnail"><img src="img/user.png" alt=""></a></li>
<li><a href="profile.html" class="thumbnail"><img src="img/user.png" alt=""></a></li>
<li><a href="profile.html" class="thumbnail"><img src="img/user.png" alt=""></a></li>
<li><a href="profile.html" class="thumbnail"><img src="img/user.png" alt=""></a></li>
<li><a href="profile.html" class="thumbnail"><img src="img/user.png" alt=""></a></li>
</ul>
<div class="clearfix"></div>
<form method="POST" action="\fritter/showpeople.php?id=<?php echo $user_id; ?>">
<input class="btn btn-primary" type="submit" value="Find Friends" />
</form>
</div>
</div>
<div class="panel panel-default groups">
<div class="panel-heading">
<h3 class="panel-title">Latest Groups</h3>
</div>
<div class="panel-body">
<div class="group-item">
<img src="img/group.png" alt="">
<h4><a href="#" class="">Sample Group One</a></h4>
<p>This is a paragraph of intro text, or whatever I want to call it.</p>
</div>
<div class="clearfix"></div>
<div class="group-item">
<img src="img/group.png" alt="">
<h4><a href="#" class="">Sample Group Two</a></h4>
<p>This is a paragraph of intro text, or whatever I want to call it.</p>
</div>
<div class="clearfix"></div>
<div class="group-item">
<img src="img/group.png" alt="">
<h4><a href="#" class="">Sample Group Three</a></h4>
<p>This is a paragraph of intro text, or whatever I want to call it.</p>
</div>
<div class="clearfix"></div>
<a href="#" class="btn btn-primary">View All Groups</a>
</div>
</div>
</div>
</div>
</div>
</section>
<footer>
<div class="container">
<p>Fritter ©, 2017</p>
</div>
</footer>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="js/bootstrap.js"></script>
</body>
</html>