-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrecuperarsenha.php
169 lines (157 loc) · 6.06 KB
/
recuperarsenha.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
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
require "config.php";
session_start();
include "sessao.php";
if(isset($_SESSION['email'])){
header('Location: '.$urlHost);
}
if(isset($_GET['codigo'])){
$reset_code = $_GET['codigo'];
//$user_id = $_GET['id'];
$stmt2 = $pdo->prepare("SELECT * FROM usuarios_cadastrados WHERE resetar_codigo_senha = ?");
$stmt2->execute(array($reset_code));
$row2 = $stmt2->fetch();
$count2 = $stmt2->rowCount();
include "enviar_senha.php";
if($count2 == 1){
?>
<html lang="pt-br">
<head>
<?php
include 'analytics.inc.php';
?>
<meta charset="utf-8">
<meta name="description" content="Esqueceu a senha? Resete-a por aqui"/>
<meta name="keywords" content=""/>
<link rel="stylesheet" type="text/css" href="css/index.css" id="pagesheet"/>
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<script src="scripts/html5shiv-printshiv"></script>
<![endif]-->
<title>Recuperação de Senha | Casamento em Detalhes</title>
<link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Fredoka+One' rel='stylesheet' type='text/css'>
<?php
include "fpixels.inc.php";
?>
</head>
<body>
<?php include "jivochat.inc.php";?>
<header>
<?php //include "header.inc.php";?>
</header>
<main>
<div id="conteudo">
<center>
<img src="/images/hearts.png" width="20%" height="auto" />
<br/><br/><br/><br/>
<p style="font-size:15px; font-weight: bold; color:#09F; font-family:Verdana, Geneva, sans-serif;">Agora resete a sua senha, escolhendo uma nova. E repita-a para confirmação.</p><br/>
<span style="font-size:9px;">*Dica de senha: pelo menos 8 caracteres - números, maiúsculas e minúsculas</span></<br>
<form class="formulario" enctype="multipart/form-data" name="senha" method="post" action="">
<div class="alinharelementos2">
<label></label><input class="caixadetexto" name="senha1" type="password" id="senha1" pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}" title="pelo menos 8 caracteres - números, maiúsculas e minúsculas" required placeholder="Nova Senha"><br>
<label></label><input class="caixadetexto" name="senha2" type="password" id="senha2" placeholder="Redigite a Nova Senha"><br>
<input class="botao" name="send1" type="submit" id="send" value="Salvar Senha">
</div>
</form>
<br/><br/>
<?php
if(isset($validationmessages)){
if($validationmessages == true){
echo '<ul class="mensagemdevalidacao">';
foreach($errsenha as $valuesenha){
echo '<li>' . $valuesenha . '</li>';
}
echo '</ul>';
}
}
//--------SEPARADOR ----------------//
}else{
if(!isset($_POST['send1'])){
header('Location: '.$urlHost);
exit;
}
}
}else{
//$reset_code = $_GET['codigo'];
//$user_id = $_GET['id'];
include "enviar_senha.php";
?>
<html>
<head lang="pt-br">
<?php
include 'analytics.inc.php';
?>
<meta charset="utf-8">
<meta name="description" content="Forgot you senha? Reset it here"/>
<meta name="keywords" content=""/>
<link rel="stylesheet" type="text/css" href="css/index.css" id="pagesheet"/>
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<script src="scripts/html5shiv-printshiv"></script>
<![endif]-->
<title>Recuperaçao de Senha | Casamento em Detalhes</title>
<link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Fredoka+One' rel='stylesheet' type='text/css'>
<?php
include "fpixels.inc.php";
?>
</head>
<body>
<?php include "jivochat.inc.php";?>
<header>
<?php //include "header.inc.php";?>
</header>
<main>
<div id="conteudo">
<!-- style="padding:4%; margin-left:auto; margin-right:auto; overflow:auto; position:relative; width:80%; height:auto; text-align:center;" -->
<center>
<img src="images/hearts.png" width="20%" height="auto" />
<br/><br/><br/><br/>
<p style="font-size:15px; font-weight: bold; color:#09F; font-family:Verdana, Geneva, sans-serif;">Caso tenha esquecido de vez sua senha, entre com o seu email cadastrado no campo abaixo. Depois, siga as instruções enviadas para o seu email a fim de resetar a conta.</p><br/>
<form class="formulario" enctype="multipart/form-data" name="senha" method="post" action="">
<div class="alinharelementos2">
<label></label><input class="caixadetexto" name="email2" type="text" id="email" placeholder="Digite seu Email"><br>
<input class="botao" name="send" type="submit" id="send" value="Resetar Senha">
</div>
</form>
<br/><br/>
<ul class="mensagemdevalidacao">
<?php
if(isset($followinstructions)){
if($followinstructions == true){
echo '<li>Siga as instruções enviadas para '.$email.' e resete a sua senha.</li>';
//echo $row['senha'];
}
}
if(isset($emptyfield)){
if($emptyfield == true){
echo '<li>Campo vazio ou inválido. Vamos lá! Digite o seu email por favor.</li>';
}
}
if(isset($incorrectemail)){
if($incorrectemail == true){
echo '<li>Seu email não corresponde ao cadastrado: ou está incorreto ou não existe.</li>';
}
}
}
?>
</ul>
</center>
</div>
</main>
<div class="footerdiv clearfix">
<footer>
<?php include "rodape.inc.php"; ?>
</footer>
</div>
</body>
</html>