-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsignup.php
166 lines (140 loc) · 7.37 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
<?php
session_start();
include 'signupController.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>One meta Signup Page</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
</head>
<body class="bg-white">
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-7">
<h1 class="text-center text-dark mt-3 mb-4">Create an Account</h1>
<?php if (count($errors) > 0): ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<?php foreach($errors as $error): ?>
<li class="text-danger"><?php echo $error; ?></li>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php if (count($success) > 0): ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<?php foreach($success as $succes): ?>
<li class="text-success"><?php echo $succes; ?></li>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<?php endforeach; ?>
</div>
<?php endif; ?>
<div class="card w-100 trans shadow">
<form method="POST" id="signup_form" action="signup.php">
<div class="form-row mb-3 mt-3 mr-2 ml-2">
<div class="col">
<label for="full_name">Username</label>
<input type="text" class="form-control" name="username" value="<?= $user_name ?? '' ?>" required="">
</div>
<div class="col">
<label for="Email">Email Address</label>
<input type="text" class="form-control" name="email" id="email" value="<?= $email ?? '' ?>" required>
</div>
</div>
<div class="form-row mb-3 mt-3 mr-2 ml-2">
<div class="col">
<label for="full_name">First Name</label>
<input type="text" class="form-control" name="firstname" value="<?= $firstname ?? '' ?>" required="">
</div>
<div class="col">
<label for="Email">Last Name</label>
<input type="text" class="form-control" name="lastname" id="lastname" value="<?= $lastname ?? '' ?>" required>
</div>
</div>
<div class="form-row mb-3 mt-2 mr-2 ml-2">
<div class="col">
<label for="Password">Password</label>
<div class="input-group mb-3" id="show_hide_password">
<input type="password" class="form-control" name="password" value="<?= $code ?? '' ?>" required aria-label="password" aria-describedby="basic-addon2">
<div class="input-group-append">
<span class="input-group-text" id="basic-addon2"><a href=""><i class="fa fa-eye-slash" aria-hidden="true"></i></a></span>
</div>
</div>
</div>
<div class="col">
<label for="Password">Confirm Password</label>
<div class="input-group mb-3" id="confirm_password">
<input type="password" class="form-control" name="confirmpassword" value="<?= $confirm ?? '' ?>" required aria-label="password" aria-describedby="basic-addon2">
<div class="input-group-append">
<span class="input-group-text" id="basic-addon2"><a href=""><i class="fa fa-eye-slash" aria-hidden="true"></i></a></span>
</div>
</div>
</div>
</div>
<div class="form-row mb-3 mt-2 mr-2 ml-2">
<div class="col">
<div class="g-recaptcha w-100" data-sitekey="6LdTmk4cAAAAABdAY63Ks679Amk_TsqvCZkf5N3_"></div>
</div>
</div>
<div class="form-row mb-3 mt-4 mr-2 ml-2">
<div class="col">
<input type="submit" class="btn btn-outline-primary login w-100 mt-2 mb-3" id="signup_button" name="register" value="Sign up">
</div>
</div>
</form>
</div>
<div class="card w-100 mt-3 mb-4 trans shadow">
<p class="text-center mt-2">Already have an account? <a href="signin.php">Login</a></p>
</div>
</div>
</div>
</div>
<script src="js/jquery-3.5.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script>
"use strict";
$(`option[data-code=NG]`).attr('selected','');
$('select[name=country]').change(function(){
$('input[name=mobile_code]').val($('select[name=country] :selected').data('mobile_code'));
$('.mobile-code').text('+'+$('select[name=country] :selected').data('mobile_code'));
});
$('input[name=mobile_code]').val($('select[name=country] :selected').data('mobile_code'));
$('.mobile-code').text('+'+$('select[name=country] :selected').data('mobile_code'));
$(document).ready(function() {
$("#show_hide_password a").on('click', function(event) {
event.preventDefault();
if($('#show_hide_password input').attr("type") == "text"){
$('#show_hide_password input').attr('type', 'password');
$('#show_hide_password i').addClass( "fa-eye-slash" );
$('#show_hide_password i').removeClass( "fa-eye" );
}else if($('#show_hide_password input').attr("type") == "password"){
$('#show_hide_password input').attr('type', 'text');
$('#show_hide_password i').removeClass( "fa-eye-slash" );
$('#show_hide_password i').addClass( "fa-eye" );
}
});
$("#confirm_password a").on('click', function(event) {
event.preventDefault();
if($('#confirm_password input').attr("type") == "text"){
$('#confirm_password input').attr('type', 'password');
$('#confirm_password i').addClass( "fa-eye-slash" );
$('#confirm_password i').removeClass( "fa-eye" );
}else if($('#confirm_password input').attr("type") == "password"){
$('#confirm_password input').attr('type', 'text');
$('#confirm_password i').removeClass( "fa-eye-slash" );
$('#confirm_password i').addClass( "fa-eye" );
}
});
});
</script>
</body>
</html>