Пример #1
0
<?php

session_start();
//ob_start();
if (@$_SESSION["Username"]) {
    header('location: administrator.php');
}
require 'config.php';
require DIR . 'class.quantri.php';
$qt = new quantri();
if (isset($_POST["btnLogin"])) {
    $un = $_POST["un"];
    $pa = $_POST["pa"];
    $kiemtra = $qt->KiemTraLogin($un, $pa);
    if ($kiemtra == true) {
        header("location:administrator.php");
    } else {
        $error = "Tên đăng nhập hoặc mật khẩu sai.<br />";
    }
}
?>
<!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>Untitled Document</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
<div style="width:240px; height:260px; background:url(img/bg-dangnhap.gif) repeat-x; padding:10px; border:solid 1px #a9c1d4; margin-left:auto; margin-right:auto">