예제 #1
0
파일: login.php 프로젝트: Mayyad/Tigers
<?php

ob_start();
session_start();
function __autoload($name)
{
    include_once "files/" . $name . ".php";
}
$login = new uLogin();
$validate = new validation();
//echo $_SESSION['type'];
$validate->checkCookie();
if (isset($_SESSION['cafeteriaSystem'])) {
    if ($_SESSION['type'] == "1") {
        header("location:orders.php");
    } else {
        header("location:index.php");
    }
}
if (isset($_GET['logout'])) {
    //echo("aaaaa");
    session_destroy();
    unset($_COOKIE['cafeteriaSystem']);
    setcookie("cafeteriaSystem", null, time() - 3600);
    header("location:login.php");
}
?>
<html>
	<head>
	<title>Cafeteria System | Login</title>
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min">