<?php //xu ly dang nhap if (isset($_POST["btnSubmitChangePass"])) { include "../../BUS/UsersBUS.php"; $id = $_POST["idUser"]; $oldpass = $_POST["txtOldPassword"]; $newpass = $_POST["txtNewPassword"]; $repass = $_POST["txtRePassword"]; //header("Location:../dichvu.php?do=login"); $result = UsersBus::checkPassword($oldpass); // echo "<br>result=".$result; if ($result == null || $newpass != $repass) { header("Location:../doimatkhau.php?error=error"); } else { $resultChange = UsersBus::SetPassword($id, $newpass); echo "<br>resultChange=" . $resultChange; if ($resultChange == false) { header("Location:../doimatkhau.php?error=failed"); } else { header("Location:../doimatkhau.php?do=login"); } } } ?>
<?php //xu ly dang nhap if (isset($_POST["btn_Login"])) { include "../BUS/UsersBUS.php"; $user = $_POST["txtUsernameLogin"]; $pass = $_POST["txtPasswordLogin"]; $result = UsersBus::Login($user, $pass); if ($result == null) { $fLogin = false; } else { $_SESSION["curUser"] = $result; if ($result["role"] == 1) { header("Location:../admin/"); } else { //xet timeout in file php.ini search words: session.gc_maxlifetime // $timeout = 600; // ini_set('session.gc_maxlifetime', $timeout); // echo ini_get("session.gc_maxlifetime"); $_SESSION["time_start"] = time(); $_SESSION["flag"] = true; header("Location:thanhvien.php?id=" . $result['id']); } } } if (isset($fLogin) && $fLogin == false) { echo "<script language='javascript' type='text/javascript'>"; echo "document.getElementById('messRegister').innerHTML='Bạn đã nhập sai tên hoặc mật khẩu';"; echo "document.getElementById('messRegister').style.color='blue';"; echo "document.getElementById('popup').style.visibility = 'visible';"; echo "</script>"; }
$summary->Height = 300; if (isset($_GET['update']) && $_GET['update'] != null) { $summary->Value = $capnhatDV['mota']; } else { $summary->Value = ""; } $summary->Create(); ?> </td> </tr> </table><br> <!--THÔNG TIN LIÊN HỆ --> <table cellspacing="0" cellpadding="2" width="100%" border="0"> <?php if ($curUser != null) { include "../BUS/UsersBUS.php"; $result = UsersBus::GetUserByEmail($curUserEmail); } ?> <tr style="background:#00397C;"> <td colspan="2" class="ButtonWithbackground">THÔNG TIN LIÊN HỆ</td> </tr> <tr bgcolor="#F2F5F9" height="30px"> <td>Họ và Tên:</td> <td><span id="infoHoTen" name="infoHoTen"> <?php echo $result['hoten']; ?> </span></td> </tr> <tr bgcolor="#F2F5F9" height="30px">