-
Notifications
You must be signed in to change notification settings - Fork 0
/
signup.php
200 lines (165 loc) · 10 KB
/
signup.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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<?php
// Report the errors
error_reporting(E_ALL);
ini_set('display_errors', 1);
// Include the core file
include_once(__DIR__ . "/Settings/core.php");
// Include the general functions
include_once(__DIR__ . "/Functions/general_function.php");
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Login</title>
<!-- Prevent the demo from appearing in search engines -->
<meta name="robots" content="noindex">
<!-- Perfect Scrollbar -->
<link type="text/css" href="assets/vendor/perfect-scrollbar.css" rel="stylesheet">
<!-- App CSS -->
<link type="text/css" href="assets/css/app.css" rel="stylesheet">
<link type="text/css" href="assets/css/app.rtl.css" rel="stylesheet">
<!-- Material Design Icons -->
<link type="text/css" href="assets/css/vendor-material-icons.css" rel="stylesheet">
<link type="text/css" href="assets/css/vendor-material-icons.rtl.css" rel="stylesheet">
<!-- Font Awesome FREE Icons -->
<link type="text/css" href="assets/css/vendor-fontawesome-free.css" rel="stylesheet">
<link type="text/css" href="assets/css/vendor-fontawesome-free.rtl.css" rel="stylesheet">
<!-- ion Range Slider -->
<link type="text/css" href="assets/css/vendor-ion-rangeslider.css" rel="stylesheet">
<link type="text/css" href="assets/css/vendor-ion-rangeslider.rtl.css" rel="stylesheet">
</head>
<body class="layout-login-centered-boxed">
<div class="layout-login-centered-boxed__form">
<div class="d-flex flex-column justify-content-center align-items-center mt-2 mb-4 navbar-light">
<a href="index.html" class="text-center text-light-gray mb-4">
<!-- LOGO -->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 40 40" width="60" height="60">
<g transform="matrix(1.6666666666666667,0,0,1.6666666666666667,0,0)">
<path d="M12.177,7.4c-0.23,0-0.416,0.186-0.417,0.416v1.17c-0.011,0.23,0.166,0.426,0.396,0.437s0.426-0.166,0.437-0.396 c0.001-0.014,0.001-0.027,0-0.041V7.819c0.001-0.23-0.185-0.418-0.415-0.419C12.178,7.4,12.177,7.4,12.177,7.4z M7.51,18.486 c-0.23,0-0.416,0.186-0.416,0.416l0,0v0.585c-0.011,0.23,0.166,0.426,0.396,0.437s0.426-0.166,0.437-0.396 c0.001-0.014,0.001-0.027,0-0.041V18.9C7.925,18.671,7.739,18.487,7.51,18.486z M20.15,4.04c-0.232-0.047-0.4-0.252-0.4-0.489V2 c0-1.105-0.895-2-2-2H5.25c-1.637,0-2.972,1.311-3,2.948c0,0.017,0,18.052,0,18.052c0,1.657,1.343,3,3,3h14.5c1.105,0,2-0.895,2-2 V6C21.75,5.049,21.081,4.23,20.15,4.04z M4.25,3c0-0.552,0.448-1,1-1h12c0.276,0,0.5,0.224,0.5,0.5v1c0,0.276-0.224,0.5-0.5,0.5 h-12C4.698,4,4.25,3.552,4.25,3z M9.427,16.569c0,0.423-0.141,0.833-0.4,1.167c0.259,0.334,0.4,0.744,0.4,1.167v0.583 c-0.003,1.057-0.86,1.912-1.917,1.914H6.344c-0.414,0-0.75-0.336-0.75-0.75v-5.831c0-0.414,0.336-0.75,0.75-0.75H7.51 c1.058,0.002,1.915,0.859,1.917,1.917V16.569z M14.093,12.486c0,0.414-0.336,0.75-0.75,0.75s-0.75-0.336-0.75-0.75v-1.167 c-0.011-0.23-0.207-0.407-0.437-0.396c-0.214,0.011-0.386,0.182-0.396,0.396v1.167c0,0.414-0.336,0.75-0.75,0.75 s-0.75-0.336-0.75-0.75V7.819c0.024-1.058,0.902-1.897,1.96-1.873c1.024,0.023,1.849,0.848,1.873,1.873V12.486z M18.01,19.9 c0.414,0,0.75,0.336,0.75,0.75s-0.336,0.75-0.75,0.75c-1.702-0.002-3.081-1.382-3.083-3.084v-1.163 c0.002-1.702,1.381-3.082,3.083-3.084c0.414,0,0.75,0.336,0.75,0.75s-0.336,0.75-0.75,0.75c-0.874,0.001-1.582,0.71-1.583,1.584 v1.166C16.429,19.192,17.137,19.899,18.01,19.9z M7.51,15.569c-0.23,0-0.416,0.186-0.416,0.416l0,0v0.585 C7.083,16.8,7.26,16.996,7.49,17.007s0.426-0.166,0.437-0.396c0.001-0.014,0.001-0.027,0-0.041v-0.583 C7.927,15.757,7.74,15.57,7.51,15.569z" stroke="none" fill="currentColor" stroke-width="0" stroke-linecap="round" stroke-linejoin="round"></path>
</g>
</svg>
</a>
</div>
<div class="card card-body">
<form id="signupForm" action="Actions/register_user.php" method="POST" novalidate>
<div class="form-group">
<label class="text-label" for="email_2">First Name:</label>
<div class="input-group input-group-merge">
<input id="fname" type="text" name="fname" required="" class="form-control form-control-prepended" placeholder="john">
<div class="input-group-prepend">
<div class="input-group-text">
<span class="far fa-user"></span>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="text-label" for="email_2">Last Name:</label>
<div class="input-group input-group-merge">
<input id="lname" type="text" name="lname" required="" class="form-control form-control-prepended" placeholder="doe">
<div class="input-group-prepend">
<div class="input-group-text">
<span class="far fa-user"></span>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="text-label" for="email_2">Email Address:</label>
<div class="input-group input-group-merge">
<input id="email" type="email" name="email" required="" class="form-control form-control-prepended" placeholder="john@doe.com">
<div class="input-group-prepend">
<div class="input-group-text">
<span class="far fa-envelope"></span>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="text-label" for="password_2">Password:</label>
<div class="input-group input-group-merge">
<input id="password" type="password" name="password" required="" class="form-control form-control-prepended" placeholder="Enter your password">
<div class="input-group-prepend">
<div class="input-group-text">
<span class="fa fa-key"></span>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="text-label" for="password_2">Confirm Password:</label>
<div class="input-group input-group-merge">
<input id="confirm_password" type="password" name="confirm_password" required="" class="form-control form-control-prepended" placeholder="Enter your password">
<div class="input-group-prepend">
<div class="input-group-text">
<span class="fa fa-key"></span>
</div>
</div>
</div>
</div>
<div class="form-group mb-1">
<button id="signupButton" class="btn btn-block btn-primary" type="submit">Sign Up</button>
</div>
<div class="form-group text-center mb-0">
Have an account? <a class="text-underline" href="login.php">Login</a>
</div>
</form>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<?php
if (isset($_SESSION['message']) && $_SESSION['message'] == "firstname") {
// echo sweet alert
echo '
<script type="text/javascript">
$(document).ready(function(){
const Toast = Swal.mixin({
toast: true,
position: "top-end",
showConfirmButton: false,
timer: 3000,
timerProgressBar: true,
didOpen: (toast) => {
toast.onmouseenter = Swal.stopTimer;
toast.onmouseleave = Swal.resumeTimer;
}
});
Toast.fire({
icon: "error",
title: "Incorrect first name format."
});
});
</script>
';
// unset the session
unset($_SESSION['message']);
}
?>
<!-- jQuery -->
<script src="assets/vendor/jquery.min.js"></script>
<!-- Bootstrap -->
<script src="assets/vendor/popper.min.js"></script>
<script src="assets/vendor/bootstrap.min.js"></script>
<!-- Perfect Scrollbar -->
<script src="assets/vendor/perfect-scrollbar.min.js"></script>
<!-- DOM Factory -->
<script src="assets/vendor/dom-factory.js"></script>
<!-- MDK -->
<script src="assets/vendor/material-design-kit.js"></script>
<!-- Range Slider -->
<script src="assets/vendor/ion.rangeSlider.min.js"></script>
<script src="assets/js/ion-rangeslider.js"></script>
<!-- App -->
<script src="assets/js/toggle-check-all.js"></script>
<script src="assets/js/check-selected-row.js"></script>
<script src="assets/js/dropdown.js"></script>
<script src="assets/js/sidebar-mini.js"></script>
<script src="assets/js/app.js"></script>
<!-- App Settings (safe to remove) -->
<script src="assets/js/app-settings.js"></script>
</body>
</html>