-
Notifications
You must be signed in to change notification settings - Fork 0
/
BBTChangePass.php
133 lines (133 loc) · 5.29 KB
/
BBTChangePass.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
<?php session_start();
include("db_connect.php");
if(isset($_SESSION['Username'])){
$user_name = $_SESSION['Username'];
}
//if no existing session, user logged out
if(!isset($_SESSION['Username'])){
header("Location: Login.php");
return;
echo $_SESSION['Username'];
}
?>
<!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">
<meta name="description" content="">
<meta name="author" content="">
<title>READ - Stories</title>
<link rel="shortcut icon" href="img/Readfavicon.ico"/>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/business-casual.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link href="js/jquery.tablesorter.pager.css" rel="stylesheet">
<script type="text/javascript" src="js/jquery.tablesorter.pager.js"></script>
<script src="js/jquery-metadata.js"></script>
<script src="js/jquery-1.12.0.min.js"></script>
</head>
<body>
<div class="brand">READ</div>
<!-- Navigation -->
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- navbar-brand is hidden on larger screens, but visible when the menu is collapsed -->
<a class="navbar-brand" href="UserHomePage.php">READ MENU</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li>
<a href="BBTHomePage.php">Home</a>
</li>
<li>
<a href="BBTFeedback.php">Sessions</a>
</li>
<li>
<a href="BBTUploadBooks.php">Upload books</a>
</li>
<li>
<a href="Logout.php">Log out</a>
</li>
<li>
<a href="BBTChangePass.php"><span title = "change password" class="glyphicon glyphicon-cog" class = "glyphicon glyphicon-pencil"></span></a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<!--container starts here-->
<div class="container">
<div class="row">
<div class="box">
<b>Welcome, </b> <?php echo $_SESSION ['Username'];?>
<!--not to be moved above-->
<div class="col-lg-12">
<hr>
<h2 class="intro-text text-center">Change
<strong>Password</strong>
</h2>
<hr>
<form role="form" method="post" action="BBTChangePassScript.php" enctype="multipart/form-data" accept-charset='UTF-8'>
<div class="row">
<div class="form-group col-lg-4">
<label>Current password</label>
<div class="input-group input-group-md">
<span class="input-group-addon">
<span class="glyphicon glyphicon-lock"></span> </span>
<input type="password" class="form-control" id="password" name="oldpassword" maxlength="40" pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,}" placeholder="Enter the current password" title="Must contain at least one number and one uppercase and lowercase letter, and at least 6 or more characters" required>
</div>
<br>
<label>New password</label>
<div class="input-group input-group-md">
<span class="input-group-addon">
<span class="glyphicon glyphicon-lock"></span> </span>
<input type="password" class="form-control" id="password" name="newpassword" maxlength="40" pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,}" placeholder="Enter a new password" title="Must contain at least one number and one uppercase and lowercase letter, and at least 6 or more characters" required>
</div>
</div>
</div>
<button type="submit" name="Submit" class="btn btn-default"><span class="glyphicon glyphicon-ok"></span>  Update</button>
<b><?php if(isset($_GET['nopass'])){echo $_GET['nopass']; }?></b>
<b><?php if(isset($_GET['newpass'])){echo $_GET['newpass']; }?></b>
</form>
</style>
</div>
</div>
</div>
<div class="row">
<div class="box">
<div class="col-lg-12">
<footer>
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h6>Copyright © Mugurel 2016<h6>
</div>
</div>
</div>
</footer>
</div>
</div>
</div>
</div>
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
<!-- Script to Activate the Carousel -->
</body>
</html>