-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
83 lines (65 loc) · 2.39 KB
/
index.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
<?php
require_once 'authController.php';
// verify the user login token
if (isset($_GET['token'])) {
$token = $_GET['token'];
verifyUser($token);
}
// verify the user login token
if (isset($_GET['password-token'])) {
$passwordToken = $_GET['password-token'];
resetPassword($passwordToken);
}
if (!isset($_SESSION['id'])) {
header('location: login.php');
exit();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!-- CSS only -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
<title>Homepage</title>
</head>
<header>
<div class="overlay"></div>
<nav>
<h2 style="color: white;">Login Page</h2>
</nav>
</header>
<body>
<img src="image/girl.png" style="position:fixed; right:1200px; bottom:180px; width:370px; height:330px; border:none;">
<img src="image/boy.png" style="position:fixed; right:200px; bottom:195px; width:300px; height:320px; border:none;">
<div class="container">
<div class="row">
<div class="col-md-4 offset-md-4 form-div login">
<?php if(isset($_SESSION['message'])): ?>
<div class="alert <?php echo $_SESSION['alert-class']; ?>">
<?php
echo $_SESSION['message'];
unset($_SESSION['message']);
unset($_SESSION['alert-class']);
?>
</div>
<?php endif; ?>
<h3> Welcome, <?php echo $_SESSION['username']; ?> </h3>
<a href="index.php?logout=1" class="logout"></a>
<?php if(!$_SESSION['verified']): ?>
<div class="alert alert-warning">
You need to verify your account before proceeding!
Sign in to your email account and click on the verification link that has been sent to you at
<strong><?php echo $_SESSION['email']; ?></strong>
</div>
<?php endif; ?>
<?php if($_SESSION['verified']): ?>
<button class="btn btn-block btn-lg btn-primary">
<a href="index1.php" style="color:white;"> You have been verified!</button>
<?php endif; ?>
</div>
</div>
</div>
</body>
</html>