Exemplo n.º 1
0
    return ok;
}
</script>
<?php 
require_once dirname(dirname(dirname(__FILE__))) . '/config.php';
require_once SITE_ROOT . '/PHP/User.php';
$message = '';
$message_class = 'hidden';
if (isset($_POST['form'])) {
    switch ($_POST['form']) {
        case 'PasswordChange':
            try {
                //$password = $_POST['confirm'];
                $email = $_GET['email'];
                $sk = 1;
                if ($sk = USER::new_password_update($email, $_POST['confirm'])) {
                    $message = 'Success!';
                    $message_class = 'success';
                } else {
                    $message = 'ERROR: could not update password.';
                    $message_class = 'error';
                }
            } catch (Exception $e) {
                $message = $e->getMessage();
                $message_class = 'error';
            }
            break;
    }
}
?>