require AC_INCLUDE_PATH . 'vitals.inc.php'; require_once AC_INCLUDE_PATH . 'classes/DAO/UsersDAO.class.php'; if (isset($_POST['cancel'])) { $msg->addFeedback('CANCELLED'); header('Location: ' . $_base_href . 'login.php'); exit; } if (isset($_GET['e'], $_GET['id'], $_GET['m'])) { $id = intval($_GET['id']); $m = $_GET['m']; $e = $addslashes($_GET['e']); $usersDAO = new UsersDAO(); if ($row = $usersDAO->getUserByID($id)) { $code = substr(md5($_GET['e'] . $row['creation_date'] . $id), 0, 10); if ($code == $m) { $usersDAO->setEmail($id, $e); $msg->addFeedback('CONFIRM_GOOD'); header('Location: ' . $_base_href . 'index.php'); exit; } else { $msg->addError('CONFIRM_BAD'); } } else { $msg->addError('CONFIRM_BAD'); } } else { if (isset($_GET['id'], $_GET['m'])) { $id = intval($_GET['id']); $m = $_GET['m']; $usersDAO = new UsersDAO(); $row = $usersDAO->getUserByID($id);