-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreset.php
More file actions
65 lines (64 loc) · 2.41 KB
/
Copy pathreset.php
File metadata and controls
65 lines (64 loc) · 2.41 KB
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
<?php
include 'dbcon.php';
session_start();
if (isset($_SESSION['id'])) {
header("Location: dashboard/index.php");
$sql = "SELECT * FROM `user` WHERE `User_ID` = " . $_SESSION['id'];
$result = $conn->query($sql);
if ($result->num_rows == 1) {
$row = $result->fetch_assoc();
if ($row["Role"] == "ADMIN") {
header("location: dashboard/index.php");
} else {
header("location: index.php");
}
} else {
echo "0 results";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://kit.fontawesome.com/64d58efce2.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="style.css" />
<title>Login</title>
</head>
<body>
<div class="container">
<div class="forms-container">
<div class="signin-signup">
<form action="resetotp.php" method="POST" class="sign-in-form">
<h3 class="title">Forgot Password</h3>
<div class="input-field">
<i class="fas fa-user"></i>
<input type="text" name="email" placeholder="Email" />
</div>
<input type="submit" name="reset" value="Submit" class="btn solid" />
</form>
</div>
</div>
<div class="panels-container">
<div class="panel left-panel">
<div class="content">
<h3>New Here?</h3>
<p>Create your Account Now!</p>
<a href="login.php"><button class="btn transparent">Sign up</button></a>
</div>
<img src="img/log.svg" class="image" alt="" />
</div>
<div class="panel right-panel">
<div class="content">
<h3>One of us ?</h3>
<p>Login to Portal Now!</p>
<a href="login.php"><button class="btn transparent">Sign up</button></a>
</div>
<img src="img/register.svg" class="image" alt="" />
</div>
</div>
</div>
<script src="app.js"></script>
</body>
</html>