-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreset.php
100 lines (75 loc) · 3.06 KB
/
reset.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
<?php
include_once('lib/test.php');
// include_once('lib/header.php');
require_once('functions/alert.php');
require_once('functions/user.php');
//check if token is set
if(!is_user_loggedIn() && !is_token_set()){
$_SESSION["error"] = "You are not authorized to view that page";
header("Location: login.php");
}
?>
<div class='body'>
<div class="signup-wrapper">
<div class="img">
<a
<?php
if(is_user_loggedIn() && $_SESSION['role'] == 'Admin'){
echo " href='admindashboard.php'";
}
if(is_user_loggedIn() && $_SESSION['role'] == 'patient'){
echo " href='dashboard.php'";
}
if(is_user_loggedIn() && $_SESSION['role'] == 'Medical Team (MT)' && $_SESSION['department'] == 'Laboratory'){
echo "href='mtdashboard.php'";
}
if(is_user_loggedIn() && $_SESSION['role'] == 'Medical Team (MT)' && $_SESSION['department'] == 'General Surgery'){
echo "href='surgerydashboard.php'";
}
if(is_user_loggedIn() && $_SESSION['role'] == 'Medical Team (MT)' && $_SESSION['department'] == 'Radiology Unit'){
echo "href='radiologydashboard.php'";
}
?>
href ='dashboard.php' > <img class="imgs" src="./img/logo.png"> </a>
</div>
<form method="POST" id="registration_form" action="processreset.php">
<p>
<?php print_alerts(); ?>
</p>
<div class="login-containe" id="del">
<h2>Reset Password <br><span>Enter your email to reset your password</span></h2>
<div class="for-group">
<p> <label for="email">Email Adress</label></p>
<input
<?php
if(isset($_SESSION['email'])){
echo "value=" . $_SESSION['email'];
}
?>
type="email"
name="email"
placeholder="Email"
title=""
id="email"
/>
<span class="error_form" id="email_error_message"></span>
<p> <label for='password'> New Password </label></p>
<input
id='password'
type="password"
name="password"
placeholder="Password"
/>
<span class="error_form" id="password_error_message"></span>
<p>
</div>
<button class='buttons' type="submit">RESET PASSWORD</button>
</div>
</div>
</div>
</form>
</div>
</div>
<script type='text/javascript'>
</script>
<?php include_once('lib/footer.php'); ?>