Пример #1
0
        }
        $pass = $this->generatePassword(6);
        $md5 = md5($pass);
        $url = $this->getSetting("atikit_url");
        $this->query("UPDATE users SET user_password='******' WHERE id='{$user['id']}'");
        $this->sendMail($email, "Your new password", "\nWe have received a password change request for your account.\n\t\t\t\t\nYour new password is: {$pass}\n\t\t\t\t\nYou can change this by logging into the support portal at {$url} and clicking Options / My Profile");
        $json = [];
        $json['gtitle'] = 'Password Sent';
        $json['gbody'] = 'Your new password has been sent.';
        $json['action'] = 'fade';
        $this->jsone('success', $json);
    }
}
$mod = new login();
if (isset($_POST['email'])) {
    $mod->processLogin($_POST);
} else {
    if (isset($_GET['signup'])) {
        $mod->signup();
    } else {
        if (isset($_POST['createAccount'])) {
            $mod->createAccount($_POST);
        } else {
            if (isset($_POST['sendPassword'])) {
                $mod->sendPassword($_POST);
            } else {
                $mod->loginForm();
            }
        }
    }
}