<?php
//ini_set('display_errors','1');
//error_reporting(E_ALL);
include("../function/func.php");
session_start();
if($_REQUEST['username']){
    $result=checkUser($_REQUEST['username'],$_REQUEST['password']);
    if($result==true)
    {
        $_SESSION['user']=$_REQUEST['username'];
        header("Location:main.php?user=".$_REQUEST['username']);
    }
}
?>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>桂田技術顧問訂單管理系統</title>
    <link href="./css/common.css?id=<?php echo rand(0,10000);?>" rel="stylesheet">
  </head>
  <body>
  <div class="loginBgBody">
  
  <div class="loginContainer">
  <!--<div class="logo"><img src="image/4249.jpeg"></div>-->
      <div class='login'>
        <div class="title">
            <div class="up">桂田技術顧問訂單管理系統</div>
            <div class="down"></div>
        </div>
        <div class="flexContainer">
          
          <form action="index.php" method="post">
              <div>帳號：<input type="text" name="username"></div>
              <div>密碼：<input type="password" name="password"></div>
              <div><input type="submit" value="送出" style="width:60%;margin-left:2.3em;"></div>
          </form>
      </div>
    </div>
    
  </div>
  </div>
  </body>
</html>