-
Notifications
You must be signed in to change notification settings - Fork 0
/
restablecerclave.php
139 lines (112 loc) · 3.49 KB
/
restablecerclave.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
<?php
/*
*
* Archivo: restablecerclave.php
*
* Version: 1.0.0
* Fecha : 26/11/2022
* Se usa en :usuario.js ->RecuperarClave() -> en el mail enviado
*
* © Manuel Sánchez (www.elmaestroweb.es)
*
*/
header('Access-Control-Allow-Origin: *');
include "webapp/conexion.php";
include "webapp/MySQL/DataBase.class.php";
include "webapp/config.php";
include "webapp/config.mail.php";
$seguridad = $_GET['seguridad'];
if (isset($seguridad)){
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="default-src * 'self' 'unsafe-inline' 'unsafe-eval' data: gap: content:">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, viewport-fit=cover">
<title>Restablecer contraseña</title>
</head>
<body>
<style>
.container {
width: 80%;
margin: 0 auto;
background-color: #f7f7f7;
color: #757575;
font-family: 'Raleway', sans-serif;
text-align: left;
padding: 30px;
}
h2 {
font-size: 30px;
font-weight: 600;
margin-bottom: 10px;
}
.container p {
font-size: 18px;
font-weight: 500;
margin-bottom: 20px;
}
.regisFrm input[type="text"], .regisFrm input[type="email"], .regisFrm input[type="password"] {
width: 90%;
padding: 10px;
margin: 10px 0;
outline: none;
color: #000;
font-weight: 500;
font-family: 'Roboto', sans-serif;
}
.send-button {
text-align: center;
margin-top: 20px;
}
.send-button input[type="submit"] {
padding: 10px 0;
width: 70%;
font-family: 'Roboto', sans-serif;
font-size: 18px;
font-weight: 500;
border: none;
outline: none;
color: #FFF;
background-color: #f5bb40;
cursor: pointer;
}
.send-button input[type="submit"]:hover {
background-color: #f5bb40;
}
a.logout{float: right;}
p.success{color:#34A853;}
p.error{color:#EA4335;}
</style>
<p><img src='<?php echo $http.'://' . $_SERVER["HTTP_HOST"];?>/webapp/img/empresa/<?php echo LOGOEMPRESA;?>' width='240' height='auto' ></p>
<h2>Resetear tu clave de acceso</h2>
<div class="container">
<form action="userAccount.php" method="post" onsubmit="return myFunction();" class="regisFrm">
<input type="email" name="usuario" placeholder="Su email" required="">
<input type="password" id="pass1" name="password" placeholder="Contraseña" required="">
<input type="password" id="pass2" name="confirm_password" placeholder="Confirme contraseña" required="">
<div class="send-button">
<input type="hidden" name="seguridad" value="<?php echo $seguridad;?>"/>
<input type="submit" name="resetSubmit" value="Resetear">
</div>
</form>
</div>
<script>
function myFunction(){
pass1 = document.getElementById('pass1');
pass2 = document.getElementById('pass2');
if (pass1.value != pass2.value) {
alert("las contraseñas no coinciden");
return false;
}
else {
return true;
}
}
</script>
</body>
</html>
<?php
}
?>