<?php include_once "../config.php"; include_once "includes/lib.php"; session_start(); $_SESSION['user'] = isset($_SESSION['user']) ? $_SESSION['user'] : ''; $_SESSION['pass'] = isset($_SESSION['pass']) ? $_SESSION['pass'] : ''; if (isset($_POST["btnSubmit"])) { $user = isset($_POST['txtUser']) ? $_POST['txtUser'] : ''; $pass = isset($_POST['txtPass']) ? $_POST['txtPass'] : ''; if (dangnhap($user, $pass) == true) { header("Location: index.php"); } } if (xacthuc($_SESSION['user'], $_SESSION['pass']) == true) { header("Location: index.php"); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Đăng nhập hệ thống</title> <link href="css/csslogin.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="js/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="js/jquery.validate.js"></script> <script type="text/javascript" src="js/lib.js"></script> </head> <body>
include_once "../config.php"; include_once "includes/lib.php"; session_start(); //print_r($_SESSION); $_SESSION['user'] = isset($_SESSION['user']) ? $_SESSION['user'] : ''; $_SESSION['pass'] = isset($_SESSION['pass']) ? $_SESSION['pass'] : ''; $vModule = isset($_GET["mod"]) ? $_GET["mod"] : ''; $vType = isset($_GET["type"]) ? $_GET["type"] : ''; $vAct = isset($_GET["act"]) ? $_GET["act"] : ''; $vID = isset($_GET["id"]) ? $_GET["id"] : ''; $vMsgStatus = isset($_GET["msgstatus"]) ? $_GET["msgstatus"] : ''; if ($vModule == 'logout') { dangxuat(); } if (xacthuc($_SESSION['user'], $_SESSION['pass']) == false) { header("Location: login.php"); } ?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>PHP-01: LESSON 15</title> <script type="text/javascript" src="js/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="js/lib.js"></script>