-
Notifications
You must be signed in to change notification settings - Fork 1
/
registro.php
183 lines (159 loc) · 7.19 KB
/
registro.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
<?php include("includes/a_config.php"); ?>
<!DOCTYPE html>
<html lang="es">
<head>
<?php include("includes/head-tag-contents.php"); ?>
</head>
<body>
<?php include("includes/navbar.php"); ?>
<main class="container">
<section class="registro section-bg wow fadeInUp pt-5 mt-5 mb-5 align-items-center">
<div class="row justify-content-left align-content-center">
<div class="form col-md-6">
<h2> ¡BIENVENIDOS A FANBASE!</h2>
<form action="sesionUsuario.php" method="post" class="" role="form" class="registro form">
<div class="form-row">
<div class="form-group col-md-6">
<input required type="text" name="name" class="form-control" id="name" placeholder="Nombre" minlength="3" pattern="[a-zA-Z ]{3,254}" data-msg="Introduce al menos 4 letras" />
</div>
<div class="form-group col-md-6">
<input required type="text" name="usuario" class="form-control" id="usuario" placeholder="Usuario" minlength="3" data-msg="Introduce al menos 4 letras" />
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12">
<input required type="mail" name="mail" class="form-control" id="mail" placeholder="Correo electrónico" minlength="5" title="3 characters minimum" data-msg="Introduce un mail valido" />
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12">
<input required type="mail" name="mail" class="form-control" id="mail" placeholder="Vuelva a introducir tu correo electrónico" minlength="5" data-msg="Introduce un mail valido" />
</div>
</div>
<div class="form-row ">
<div class="form-group col-md-6 input-group">
<input required type="password" name="password" class="form-control" id="password" placeholder="Contraseña" minlength="5" data-msg="Introduce al menos 4 letras" />
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">
<div id="ojoPocho" class="input-group-addon"><a><i id="iOjoPocho" class="fas fa-eye-slash"></i></a></div>
</span>
</div>
</div>
<div class="form-group col-md-6 input-group">
<input required type="password" name="password-copy" class="form-control" id="password-copy" placeholder="Vuelva a introducir tu contraseña" minlength="5" data-msg="Introduce al menos 4 letras" />
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon2">
<div id="ojoPochoCopia" class="input-group-addon"><a><i class="fas fa-eye-slash"></i></a></div>
</span>
</div>
</div>
</div>
<div class="form-row">
<div id="errorPs" class="form-group col-md-12 text-center d-none text-danger">
<div class="validation">
<p>Las contraseñas no coinciden entre si</p>
</div>
</div>
</div>
<div class="mb-3">
<div class="row">
<div class="col-3">
<?php
include("assets/Composer/captcha.php");
$_SESSION['captcha'] = simple_php_captcha();
echo '<img class="card-img-top" src="' . $_SESSION['captcha']['image_src'] . '" alt="CAPTCHA code">';
?>
</div>
<div class="col-9">
<input class="mt-1" class="form-control w-100" type="text" name="captcha">
</div>
</div>
</div>
<div class="text-center"><button type="submit" id="btnRegistro" name="registro">Registrarse</button></div>
</form>
</div>
<div class="col-md-6 ">
<div class="row">
<div class="form col-md-12">
<h4> ¿Que tiene fanbase que no tienen los demas?
</div>
<div class="col-md-2 text-center d-inline-block"><i class="fas fa-star-half-alt fa-4x text-secondary"></i></div>
<div class="col-md-10 ">
<h5 class="mt-3">¡Valora tus juegos favoritos!</h5>
</div>
</div>
<hr />
<div class="row">
<div class="col-md-2 text-center d-inline-block"><i class="fas fa-comments fa-4x text-primary"></i></div>
<div class="col-md-10 ">
<h5 class="mt-3">¡Comenta tus videos favoritos de tus juegos FAVORITOS!</h5>
</div>
</div>
<hr />
<div class="row">
<div class="col-md-2 text-center d-inline-block"><i class="fas fa-users fa-4x text-secondary"></i></i></div>
<div class="col-md-10 ">
<h5 class="mt-3">¡COMPARTE EL AMOR POR TODO CON LAS DEMAS PERSONAS!</h5>
</div>
</div>
</div>
</div>
</section>
</main>
<script>
$("#ojoPocho").mousedown(function (e) {
$("#iOjoPocho").removeClass("fa-eye-slash");
$("#iOjoPocho").addClass("fa-eye");
$("#password").attr("type", "text");
});
$("#ojoPocho").mouseup(function () {
$("#iOjoPocho").removeClass("fa-eye");
$("#iOjoPocho").addClass("fa-eye-slash");
$("#password").attr("type", "password");
});
$("#ojoPochoCopia").mousedown(function (e) {
$("#iOjoPocho").removeClass("fa-eye-slash");
$("#iOjoPocho").addClass("fa-eye");
$("#password").attr("type", "text");
});
$("#ojoPochoCopia").mouseup(function () {
$("#iOjoPochoCopia").removeClass("fa-eye");
$("#iOjoPochoCopia").addClass("fa-eye-slash");
$("#password-copy").attr("type", "password");
});
$("#password-copy").keyup(function(e) {
e.preventDefault();
let clave1 = $("#password-copy").val();
let clave2 = $("#password").val();
if (clave1 == clave2) {
$("#errorPs").addClass("d-none");
$("#errorPs").removeClass("d-block");
$("#btnRegistro").attr("enabled", "enabled");
$("#btnRegistro").removeAttr("disabled");
} else {
$("#errorPs").removeClass("d-none");
$("#errorPs").addClass("d-block");
$("#btnRegistro").attr("disabled", "disabled");
$("#btnRegistro").removeAttr("enabled");
}
});
$("#password-copy").keyup(function(e) {
e.preventDefault();
let clave1 = $("#password-copy").val();
let clave2 = $("#password").val();
if (clave1 == clave2) {
$("#errorPs").addClass("d-none");
$("#errorPs").removeClass("d-block");
$("#btnRegistro").attr("enabled", "enabled");
$("#btnRegistro").removeAttr("disabled");
} else {
$("#errorPs").removeClass("d-none");
$("#errorPs").addClass("d-block");
$("#btnRegistro").attr("disabled", "disabled");
$("#btnRegistro").removeAttr("enabled");
}
});
</script>
<?php include("includes/footer.php"); ?>
</body>
</html>