This commit is contained in:
Your Name
2020-07-02 17:27:30 +03:00
parent 25a8c8c078
commit 4dfd676d95
8 changed files with 179 additions and 2 deletions

View File

@@ -80,7 +80,48 @@ function addcard($id, $date) {
}
function restoration_kuri(){
if (isset($_POST['reset_mail'])){
$email = $_POST['reset_mail'];
$title = 'Восстановление пароля';
$hash = api_restore_mail($mail);
if ($hash !== false) {
$hashlink = SITE.'resetlink/'.$hash;
}
echo $hashlink;
$tempcontent = VIEWPATH.'restore_add.phtml';
include VIEWPATH.'layout.phtml';
}
else {
$title = 'Восстановление пароля';
$tempcontent = VIEWPATH.'restore.phtml';
include VIEWPATH.'layout.phtml';
}
return true;
}
function resetlink_kuri($hash){
$res = api_restore_hash($hash);
if (!$res){
}
else {
header("HTTP/1.1 301 Moved Permanently");
header("Location: ${SITE}/resetpwd/"); exit();
}
}