-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ebddb47
commit fa159a8
Showing
12 changed files
with
201 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,4 +101,5 @@ public function destroy() | |
|
||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
|
||
|
||
namespace App\Controller\Admin; | ||
|
||
|
||
use App\Model\User; | ||
use Core\Controller; | ||
use Core\Load; | ||
use Core\Validate; | ||
|
||
class PasswordRecoveryController extends Controller | ||
{ | ||
|
||
CONST SECRET = ""; | ||
|
||
public function forgot(){ | ||
|
||
$this->view("admin/esqueceu_senha",["template_admin" => $this->templateAdmin]); | ||
|
||
} | ||
|
||
public function enviarLinkRecuperarSenha(){ | ||
|
||
$validate = new Validate(); | ||
$data = $validate->validate([ | ||
"email" => "required:email" | ||
]); | ||
|
||
if($validate->hasErros()){ | ||
foreach($data as $field => $value){ | ||
flash("post_".$field,$data[$field]); | ||
} | ||
back(); | ||
} | ||
|
||
$config = (object) Load::file("/config.php"); | ||
$user = (new User())->select()->where("email",$data["email"])->first(); | ||
|
||
if(!$user){ | ||
echo("Não achou o e-mail: {$data["email"]}"); | ||
return false; | ||
}else{ | ||
$code = base64_encode(openssl_encrypt($dataRecovery["idrecovery"],"AES-128-ECB",User::SECRET)); | ||
dd($user); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
|
||
namespace App\Model; | ||
|
||
use App\Model\User; | ||
|
||
class Pessoa | ||
{ | ||
//# As Pessoas que serão assistidas pelo projeto, herdaram | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<title>PROJETO RESGATE | Login</title> | ||
<!-- Tell the browser to be responsive to screen width --> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<!-- Font Awesome --> | ||
<link rel="stylesheet" href="{{ template_admin }}/plugins/fontawesome-free/css/all.min.css"> | ||
<!-- Ionicons --> | ||
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css"> | ||
<!-- icheck bootstrap --> | ||
<link rel="stylesheet" href="{{ template_admin }}/plugins/icheck-bootstrap/icheck-bootstrap.min.css"> | ||
<!-- Theme style --> | ||
<link rel="stylesheet" href="{{ template_admin }}/dist/css/adminlte.min.css"> | ||
<!-- Google Font: Source Sans Pro --> | ||
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet"> | ||
</head> | ||
<body class="hold-transition login-page"> | ||
<div class="login-box"> | ||
<div class="login-logo"> | ||
<a href="../../index2.html"><b>PROJETO RESGATE</b></a> | ||
</div> | ||
<!-- /.login-logo --> | ||
<div class="card"> | ||
<div class="card-body login-card-body"> | ||
<p class="login-box-msg">Esqueceu sua senha?<br>Aqui você pode facilmente criar uma nova senha.</p> | ||
|
||
<form action="/forgot-password" method="post"> | ||
<div class="input-group mb-3"> | ||
<input type="email" class="form-control" name="email" placeholder="Email"> | ||
<div class="input-group-append"> | ||
<div class="input-group-text"> | ||
<span class="fas fa-envelope"></span> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-12"> | ||
<button type="submit" class="btn btn-primary btn-block">Enviar link por e-mail</button> | ||
</div> | ||
<!-- /.col --> | ||
</div> | ||
</form> | ||
</div> | ||
<!-- /.login-card-body --> | ||
</div> | ||
{{ message("success") }} | ||
{{ message("warning") }} | ||
</div> | ||
<!-- /.login-box --> | ||
|
||
<!-- jQuery --> | ||
<script src="{{ template_admin }}/plugins/jquery/jquery.min.js"></script> | ||
<!-- Bootstrap 4 --> | ||
<script src="{{ template_admin }}/plugins/bootstrap/js/bootstrap.bundle.min.js"></script> | ||
<!-- AdminLTE App --> | ||
<script src="{{ template_admin }}/dist/js/adminlte.min.js"></script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters