Esempio n. 1
0
File: login.php Progetto: roni5/sela
$objUser = new Model_User($objConnection);
$message = '';
if ($_pgR["act"] == Model_User::ACT_LOGIN) {
    $userName = $_pgR['txtUserName'];
    $userName = global_editor::rteSafe(html_entity_decode($userName, ENT_COMPAT, 'UTF-8'));
    $password = $_pgR['txtPassword'];
    $password = global_editor::rteSafe(html_entity_decode($password, ENT_COMPAT, 'UTF-8'));
    $remember = $_pgR['ckRemember'];
    $result = $objUser->login($userName, $password);
    if ($result) {
        $_SESSION[global_common::SES_C_USERINFO] = $result;
        $curPage = $_SESSION[global_common::SES_C_CUR_PAGE];
        if ($curPage) {
            global_common::redirect($curPage);
        } else {
            global_common::redirect("index.php");
        }
    } else {
        $message = 'Đăng nhập thất bại. Thông tin đăng nhập không hợp lệ.
		<br> Nếu quên mật khẩu hãy nhấn vào <a href="forgot_password.php">đây</a> để lấy lại mật khẩu ';
    }
}
?>

<?php 
include_once 'include/_header.inc';
include_once 'include/_menu.inc';
?>
<div id="login-page">
	<form method="POST"  class="form-horizontal">
		<div class="table-login">