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

include("includes/menu_rights.php");
$admin = $_SESSION["admin_" . $dbname];
$usertype = $_SESSION["usertype_" . $dbname];
$zroot = $_SESSION["zdir"];
include("includes/linkshead.php");
?>
<!--<script src="MyScript/outward.js" type="text/javascript"></script>-->
<style>
    .flex-container {
        display: flex;
        flex-wrap: wrap;
        background-color: transparent;
    }

    .flex-container > div {
        background-color: #8cc4f5;
        width: 340px;
        height: 300px;
        margin: 13px;
        text-align: center;
        line-height: 75px;
        font-size: 12px;
        margin-bottom: 65px;
    }
    .flex-container > div:hover {

        /*cursor: pointer;*/
    }
    td {
        font-weight: bold;
        color: snow;
    }
    th {
        background: darkgray;
        position: sticky;
        top: 0; 
    }
    .chead {
        font-weight: bold;
        font-size: 20px;
    }
    .ttotal {
        background-color: #337ab7;
        text-align: right;
        font-weight: bolder;
    }

    .subtd {
        color: black;
        font-weight: bold;
    }
    .tottd{
        font-size: 20px;
    }
    .currdt {
        text-align: center;
        font-weight: bold;
        font-size: 15px;
    }
</style>
<script type="text/javascript">
    $(document).ready(function () {
        $("body").on("click", ".proc", getData);
        getData();
        function getData() {
            var curdt = $(".curdt").val();
            if (curdt != "") {
                $(".tabbody").html("");

                $.post("get_default_data.php", {curdt: curdt}, function (data) {
                    $(".tabbody").html(data);
                });
            }
        }
    })
</script>
</head>
<body>

    <?php
    $dt = date("Y-m-d");
    $currdt = date("d-m-Y", strtotime($dt));
    ?>
    <br>
    <div class="row" style="padding-top:1%">
        <div class="col-lg-4 text-right">
            <label class="label-control marg">Date</label>
        </div>
        <div class="col-lg-2">
            <input type="date" name="curdt" class="form-control curdt" value="<?php echo $dt; ?>"></h5>
        </div>
        <div class="col-lg-1">
            <button type="button" class="proc form-control btn mySearchTr" style="color:white">Proceed</button>
        </div>
    </div>
    <div class="flex-container tabbody">
    </div>

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