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

$maindb = "accmast";
$formname = "Calendar";
$file = "calendar.php";
//$mgrpcode   = "0"; 
$zroot = $_SESSION["zdbroot"];

$admin = $_SESSION["admin_" . $dbname];
$zdb = $_SESSION["zdbyear_" . $dbname];
$myyear = $_SESSION[$myyear];
mysqli_select_db($conn, $zdb);
$fseries = $_SESSION["series_" . $dbname];

$cond = "";

$get = mysqli_query($conn, "SELECT * FROM `hallbook` WHERE series = '$fseries' ORDER by `name`") or die(mysqli_error($conn));
//print table($get);
$getno = mysqli_num_rows($get);

include("includes/linkshead.php");
?>
<script src="MyScript/calendar.js" type="text/javascript"></script>
<style>
    button {
 border: 2px solid green;
 background-color: green;
 border-radius: 0.9em;
 padding: 0.4em 0.4em 0.4em 0.5em;
 transition: all ease-in-out 0.2s;
 font-size: 15px;
}

button span {
 display: flex;
 justify-content: center;
 align-items: center;
 color: #fff;
 font-weight: 600;
}

/* button:hover {
 background-color: transparent;
} */
</style>
</head>

<body>
    <div class="container">
    <br>    
    <div class="row">

            <div class="col-lg-3 text-right pad">
                <!--<label class="label-control marg" style="color: #64CCFC;font-size: 18px">Month</label>-->
                <label class="label-control marg" style="color: red;font-size: 18px">Month</label>
            </div>
            <div class="col-lg-2 pad">
                <select class="form-control monthno" name="month">

                    <?php
                    $date = date("Y-m-d");

                    $getmnt1 = mysqli_query($conn, "Select * from $zroot.months where moncode = month('$date') ");
                    $fetmnth1 = mysqli_fetch_array($getmnt1);
                    echo "<option value='$fetmnth1[moncode]'>$fetmnth1[moncode] - $fetmnth1[descrip]</option>";

                    $getmnt = mysqli_query($conn, "Select * from $zroot.months order by moncode");
                    while ($fetmnth = mysqli_fetch_array($getmnt)) {
                        echo "<option value='$fetmnth[moncode]'> $fetmnth[moncode] - $fetmnth[descrip]</option>";
                    }
                    ?>
                </select>
            </div>
            <div class="col-lg-1 text-right pad">
                <!--<label class="label-control marg" style="color: #64CCFC;font-size: 18px">Year</label>-->
                <label class="label-control marg" style="color: red;font-size: 18px">Year</label>
            </div>
            <div class="col-lg-2 pad">
                <select class="form-control yearno" name="yearno">
                    <?php
                    $getyr1 = mysqli_query($conn, "SELECT * FROM $zroot.yeartab where yearname = year('$date') ");
                    $fetyr1 = mysqli_fetch_array($getyr1);
                    echo "<option value='$fetyr1[yearname]'>$fetyr1[yearname]</option>";
                    $getyear = mysqli_query($conn, "Select * from $zroot.yeartab order by yearname");
                    while ($fetyear = mysqli_fetch_array($getyear)) {
                        echo "<option value='$fetyear[yearname]'>$fetyear[yearname]</option>";
                    }
                    ?>
                </select>
            </div>
            <div class="col-lg-4 text-right">
                <button>
                    <span><a href="hallbooking.php?mode=true&series=<?php echo $fseries; ?>" style="color:#fff">New Booking</span>
                </button>
            </div>
            <div class="col-lg-12 pad">

                <table class="table-bordered table-hover table-striped" width="100%" align="center">
                    <tbody class="tbody">

                    </tbody>
                    <tfoot>
                        <tr>
                            <td colspan="9">
                                <hr />
                            </td>
                        </tr>
                    </tfoot>
                </table>
            </div>
        </div>
    </div>

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

</html>
<?
?>