<?php /* TODO: Add code here */ require 'config/globalconfig.php'; include_once 'class/model_user.php'; include_once 'class/model_resetpassword.php'; $objUser = new Model_User($objConnection); $objReset = new Model_ResetPassword($objConnection); if ($_pgR["act"] == Model_User::ACT_REGISTER) { $userName = $_pgR['username']; $userName = html_entity_decode($userName, ENT_COMPAT, 'UTF-8'); $password = $_pgR['password']; $password = html_entity_decode($password, ENT_COMPAT, 'UTF-8'); $fullname = $_pgR['fullname']; $fullname = html_entity_decode($fullname, ENT_COMPAT, 'UTF-8'); $birthDate = $_pgR['birthdate']; $birthDate = html_entity_decode($birthDate, ENT_COMPAT, 'UTF-8'); $email = $_pgR['email']; $email = html_entity_decode($email, ENT_COMPAT, 'UTF-8'); $sex = $_pgR['sex']; $sex = html_entity_decode($sex, ENT_COMPAT, 'UTF-8'); if ($objUser->checkExistUserName($userName)) { $arrHeader = global_common::getMessageHeaderArr($banCode); //$banCode echo global_common::convertToXML($arrHeader, array('rs', 'inf'), array(2, 'Tên đăng nhập đã tồn tại'), array(0, 1)); return; } if ($objUser->checkExistEmail($email)) { $arrHeader = global_common::getMessageHeaderArr($banCode); //$banCode echo global_common::convertToXML($arrHeader, array('rs', 'inf'), array(3, 'Email đã tồn tại'), array(0, 1));
<?php /* TODO: Add code here */ require 'config/globalconfig.php'; include_once 'class/model_user.php'; include_once 'class/model_resetpassword.php'; $objUser = new Model_User($objConnection); $objReset = new Model_ResetPassword($objConnection); if ($_pgR["id"]) { global_common::clearSession(); $resetID = $_pgR['id']; $resetID = html_entity_decode($resetID, ENT_COMPAT, 'UTF-8'); $result = $objReset->checkResetPasswordByID($resetID); } ?> <?php include_once 'include/_header.inc'; include_once 'include/_menu.inc'; ?> <div id="forgot-page"> <form method="POST" id='form-reset' class="form-horizontal"> <div class="table-forgot"> <div class="control-group"> <div class="controls"> <h1 class="m-wrap title"> Thay đổi mật khẩu</h1> </div> </div> <?php if ($result) { ?>