<?php
ob_start();
require("includes/check_auth_user.php");
require("includes/dbconnect.php");
include('includes/function.php');

$formname = "Hotel Status";

$myyear = $_SESSION["tit_" . $dbname];

$admin = $_SESSION["admin_" . $dbname];
$zdb = $_SESSION["zdbyear_" . $dbname];
$username = $_SESSION["username_" . $dbname];
$zroot = $_SESSION["zdir"];
$zcono = $_SESSION["comp_" . $dbname];
$modet = $_GET["mode"];
$vmidcolor = $_SESSION["vmidcolor"];

$yearalpha1 = substr($myyear, 0, 1);
$nyear = substr($myyear, -4);

$yearalpha = strtoupper($yearalpha1);

mysqli_select_db($conn, $zdb);
include("includes/linkshead.php");
?>


<!-- <script src="https://kit.fontawesome.com/3ada711723.js" crossorigin="anonymous"></script> -->
<script src="MyScript/hotelstatus.js?a=2" type="text/javascript"></script>
<!--<style rel="stylesheet" src="styles/tab_pane.css"></style>-->
<style>
    /* CSS */
    .button-29 {
        align-items: center;
        appearance: none;
        background: transparent;
        border: 2px solid <?= $vmidcolor; ?>;
        border-radius: 6px;
        box-sizing: border-box;
        color: #0b4c78;
        cursor: pointer;
        display: inline-flex;
        font-family: "JetBrains Mono", monospace;
        height: 38px;
        width: 88px;
        justify-content: center;
        line-height: 1;
        list-style: none;
        overflow: hidden;
        padding-left: 16px;
        padding-right: 16px;
        position: relative;
        text-align: left;
        text-decoration: none;
        transition: box-shadow .15s, transform .15s;
        user-select: none;
        -webkit-user-select: none;
        touch-action: manipulation;
        white-space: nowrap;
        will-change: box-shadow, transform;
        font-size: 18px;
    }

    .button-29:hover {
        box-shadow: rgba(45, 35, 66, .4) 0 4px 8px, rgba(45, 35, 66, .3) 0 7px 13px -3px, <?= $vmidcolor; ?> 0 -3px 0 inset;
        transform: translateY(-2px);
    }

    .button-29:active {
        box-shadow: <?= $vmidcolor; ?> 0 3px 7px inset;
        transform: translateY(2px);
    }

    .sksahil {
        border-radius: 10px;
        background: linear-gradient(91.9deg, rgb(82, 82, 155) 6.3%, rgb(179, 179, 242) 98.9%);
        margin-left: 1%;
    }

    .sksahil2 {
        border-radius: 10px;
        background-color: #fff;
        /* background-color:  rgb(192,192,192,0.1); */
        margin-top: 5px;
        margin-bottom: 5px;
    }


    .skk {
        border-bottom: 1px solid grey !important;
        color: white;
    }

    .slk {
        background: black !important;
    }

    .txtt {
        color: <?= $vmidcolor;?>;
        text-transform: uppercase;
        font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
        margin-bottom: -15px;
        background-color: #f9f9fa;
        overflow: overlay;
        padding: 8px;
    }

    #borderimg {
        border: 2px solid <?= $vmidcolor; ?>;
        padding: 4px;
        border-radius: 7px;
    }
</style>
</head>
<br>

<div class="text-center">
    <legend style="font-size:20px"><b>Hotel Status</b></legend>
</div>

<div class="row table-responsive" align="center">
    <div class="col-md-1"></div>
    <div class="col-md-2">
        <label class="txtt"><b>City</b></label>

        <p id="borderimg">
            <?php
            echo "<select name='city' class='scity skk  select2' style='width:100%;' autocomplete='off'> ";
            echo "<option value=''></option>";

            $gcity = mysqli_query($conn, "SELECT `code`,`name` FROM `city` ORDER BY `name`") or die(mysqli_error($conn));
            while ($icity = mysqli_fetch_array($gcity)) {
                echo "<option value='$icity[code]'>$icity[name]</option>";
            }

            echo "</select>";
            ?>
        </p>
    </div>

    <div class="col-md-2">
        <label class="txtt"><b>Hotel Name</b></label>

        <p id="borderimg">
            <?php
            echo "<select name='hotelnm' class='shotelnm skk  select2' style='width:100%' autocomplete='off' > ";

            echo "<option value=''></option>";
            $mhotl = mysqli_query($conn, "SELECT code,hotelnm FROM hotels  order by hotelnm ") or die(mysqli_error($conn));
            while ($thotl = mysqli_fetch_array($mhotl)) {
                echo "<option value='$thotl[code]'>$thotl[hotelnm]</option>";
            }
            echo "</select>";
            ?>
        </p>
    </div>

    <div class="col-md-2">
        <label class="txtt"><b>Room Category</b></label>
        <p id="borderimg">
            <?php
            echo "<select class='roomcatg skk select2' name='roomcatg' style='width:100%'>";
            echo "<option value=''></option>";
            $git = mysqli_query($conn, "SELECT `code`,`name` FROM `roomcatg` ORDER BY `name`") or die(mysqli_error($conn));
            while ($itm = mysqli_fetch_array($git)) {
                echo "<option value='$itm[code]'>$itm[name]</option>";
            }
            echo "</select>";
            ?>
        </p>
    </div>


    <div class="col-md-1" style="width:10%">
        <label class="txtt"><b>Check In</b></label>
        <p id="borderimg">
            <input type='date' min="<?php echo date('Y-m-d'); ?>" name='mcheckin' class='mcheckin' style="color:black;border-bottom:none" value="<?php echo date('Y-m-d'); ?>">
        </p>
    </div>

    <div class="col-md-1" style="width:10%">
        <label class="txtt"><b>Check Out</b></label>
        <p id="borderimg">
            <input type='date' name='mcheckout' min="<?php echo date('Y-m-d'); ?>" class='mcheckout' style="color:black;border-bottom:none" value="<?php echo date('Y-m-d'); ?>">
        </p>
    </div>

    <div class="col-md-1" style="margin-top:18px">
        <button class="button-29 sksearch" type="button">Search</button>
    </div>
</div>


<div class="row table-responsive hoteldetail" style="padding: 3%;padding-top:1%">



</div>


<?php include("includes/linksfoot.php"); ?>