<?php
// ini_set('display_errors','1');
// error_reporting(E_ALL);
$page="equipment";
include("../function/func.php");
session_start();
checkSession();
if($_REQUEST['insertOneTest']==1){
    $name=$_REQUEST['equipmentName'];
    addEquipment($name);
    header("refresh:0;url=equipmentList.php");
}
?>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>桂田技術顧問訂單管理系統</title>
    <link href="./css/common.css?id=<?php echo rand(0,10000);?>" rel="stylesheet">
    <link rel="stylesheet" href="//code.jquery.com/ui/1.13.1/themes/base/jquery-ui.css">
    <script src="https://code.jquery.com/jquery-3.6.0.js"></script>
    <script src="https://code.jquery.com/ui/1.13.1/jquery-ui.js"></script>
    <script>
        $( function() {
            $( "#productionDate" ).datepicker({
                showButtonPanel: true,
                dateFormat: 'yy-mm-dd'
            });
        } );
    </script>
  </head>
<body>
    <div class="bgBody">
        <?php include("./module/header.php");?>
        <div class="container">
            <?php include("./module/menu.php");?>
            <div class="mainContent">
                <div class="head">
                    <div class="item title">新增設備</div>
                    <a href="equipmentList.php?id=<?php echo $_REQUEST['id'];?>"><div class="item searchInput" style="padding-top:0.3em">回設備列表</div></a>
                    <div class="clear"></div>
                </div>
                <div class="testItemList">
                <div class="testItem gray">
                    <form action="insertEquipment.php?insertOneTest=1" method="post">
                        <div class="item">設備名稱 <input type="text" name="equipmentName" value=""></div>
                        <div class="input"><input type="submit" value="新增設備"></div>
                    </form>
                </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
<script src="cal.js"></script>
