<?php

include $_SERVER['DOCUMENT_ROOT'] . "/classes/access_user/access_user_class.php";
$act_password = new Access_user();
if (!empty($_GET['activate'])) {
    // this two variables are required for activating/updating the account/password
    if ($act_password->check_activation_password($_GET['activate'])) {
        // the activation/validation method
        $_SESSION['activation'] = $_GET['activate'];
        // put the activation string into a session or into a hdden field
    }
}
if (isset($_POST['Submit'])) {
    if ($act_password->activate_new_password($_POST['password'], $_POST['confirm'], $_SESSION['activation'])) {
        // this will change the password
        unset($_SESSION['activation']);
    }
    $act_password->user = $_POST['user'];
    // to hold the user name in this screen (new in version > 1.77)
}
$error = $act_password->the_msg;
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Reset password</title>
<link rel="stylesheet" type="text/css" href="/css/main.css"/>
</head>