forked from rahbirul/PHP_MongoDB_Packt_Book_Code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.php
52 lines (48 loc) · 1.81 KB
/
profile.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
<?php
require('session.php');
require('user.php');
$user = new User();
if (!$user->isLoggedIn()){
header('location: login.php');
exit;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" href="style.css" />
<title>Welcome <?php echo $user->username; ?></title>
</head>
<body>
<div id="contentarea">
<div id="innercontentarea">
<a style="float:right;" href="logout.php">Log out</a>
<h1>Hello <?php echo $user->username; ?></h1>
<ul class="profile-list">
<li>
<span class="field">Username</span>
<span class="value"><?php echo $user->username; ?></span>
<div class="clear"> </div>
</li>
<li>
<span class="field">Name</span>
<span class="value"><?php echo $user->name; ?></span>
<div class="clear"> </div>
</li>
<li>
<span class="field">Birthday</span>
<span class="value"><?php echo date('j F, Y',$user->birthday->sec); ?></span>
<div class="clear"> </div>
</li>
<li>
<span class="field">Address</span>
<span class="value"><?php echo $user->address; ?></span>
<div class="clear"> </div>
</li>
</ul>
</div>
</div>
</body>
</html>