-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviewprofile.php
80 lines (67 loc) · 2.48 KB
/
viewprofile.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
<?php require_once("./controller/deps.php"); ?>
<?php header_section("Dashboard | View Profile"); ?>
<?php
if ($_SESSION['login'] == false) {
header("Location: login.php");
exit();
}
$time = "";
$new_date = "";
$time = strtotime(isset($_SESSION['dob']) ? $_SESSION['dob'] : "");
$new_date = date("d/m/Y", $time);
?>
<main class="clearfix">
<div class="profile-info">
<table>
<tbody>
<?php if (isset($_SESSION['name']) && !empty($_SESSION['name'])) : ?>
<tr>
<td>Name:</td>
<td><?php echo $_SESSION['name']; ?></td>
</tr>
<?php endif; ?>
<?php if (isset($_SESSION['email']) && !empty($_SESSION['email'])) : ?>
<tr>
<td>Email:</td>
<td><?php echo $_SESSION['email']; ?></td>
</tr>
<?php endif; ?>
<?php if (isset($_SESSION['gender']) && !empty($_SESSION['gender'])) : ?>
<tr>
<td>Phone:</td>
<td><?php echo ucwords($_SESSION['gender']); ?></td>
</tr>
<?php endif; ?>
<?php if (isset($_SESSION['location']) && !empty($_SESSION['location'])) : ?>
<tr>
<td>Location:</td>
<td><?php echo $_SESSION['location']; ?></td>
</tr>
<?php endif; ?>
<?php if (isset($_SESSION['type']) && !empty($_SESSION['type'])) : ?>
<tr>
<td>Type:</td>
<td><?php echo ucwords($_SESSION['type']); ?></td>
</tr>
<?php endif; ?>
<tr>
<td><a href="./editprofile.php">Edit Profile</a></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div class="profile-pic">
<table>
<tbody>
<tr>
<td><img src="<?php echo isset($_SESSION['purl']) && !empty($_SESSION['purl']) ? $_SESSION['purl'] : "./images/defaultprofile.png" ?>" alt="Profile Picture"></td>
</tr>
<tr>
<td><a href="./changepp.php">Change Profile Picture</a></td>
</tr>
</tbody>
</table>
</div>
</main>
<?php footer_section(); ?>