-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile.php
101 lines (92 loc) · 3.4 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
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
<?php
include_once 'includes/db_connect.php';
include_once 'includes/functions.php';
include_once 'includes/profile.inc.php';
sec_session_start();
unsetLabelingProcessData();
?>
<!DOCTYPE html>
<html lang="pt">
<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>User Profile</title>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="styles/main.css" />
<link rel="stylesheet" href="styles/sticky-footer-navbar.css" />
</head>
<body>
<header></header>
<nav></nav>
<?php showAlert(); ?>
<?php if (login_check($mysqli) == true) : ?>
<header>
<nav class="navbar navbar-default">
<div class="container">
<div class="navbar-header navbar-left">
<a class="navbar-brand" href="index.php">Opinion-meter</a>
</div>
<p class="navbar-text">
-- Hello, <?php echo htmlentities($_SESSION['username']); ?>!
</p>
<div id="navbar" class="collapse navbar-collapse navbar-right">
<ul class="nav navbar-nav">
<li><a href="profile.php">Profile</a></li>
<li><a href="help.php">Help</a></li>
<li><a href="includes/logout.php">Log out</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
</header>
<div class="container" >
<div class="row" align="center" >
<div class="col-md-6">
<div class="panel panel-primary">
<div class="panel-heading text-center " >
<h1 class="panel-title">Profile</h1>
</div>
<table class="table table-hover table-bordered table-condensed" >
<tr>
<td>User</td>
<td><?php echo $_SESSION['username']; ?></td>
</tr>
<tr>
<td>Email</td>
<td><?php echo getUserEmail($mysqli); ?></td>
</tr>
</table>
</div>
</div>
</div>
<div class= "row">
<div class="col-md-6">
<form action="changePassword.php" ">
<button class="btn btn-default btn-block " type="submit">Change Password</button>
</form>
</div>
</div>
</div>
<?php else : ?>
<p>
<span class="error">Access Denied.</span>
You need to <a href="index.php">log in</a>.
</p>
<?php endif; ?>
<footer class="footer">
<div class="container">
<p class="text-muted">
This work is from <a xmlns:cc="http://creativecommons.org/ns#" href="http://labic.icmc.usp.br/" property="cc:attributionName" rel="cc:attributionURL">LABIC | ICMC-USP</a>
and it is licensed by <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Atribuição 4.0 Internacional</a>.
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Licença Creative Commons" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/80x15.png" /></a>
</p>
</div>
</footer>
</body>
</html>