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

$admin = $_SESSION["admin_" . $dbname];
$zdb = $_SESSION["zdbyear_" . $dbname];
$myyear = $_SESSION[$myyear];
mysqli_select_db($conn, $zdb);
//browse($myyear);
?>
<script src="MyScript/dashboard.js" type="text/javascript"></script>
</head>
<body>
    <div class="row">
        <div class="col-lg-12 pad">
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <h3 class="panel-title">Stock DashBoard (As On Date  <?php Echo Date("d-m-Y"); ?>)</h3>
                    <div class="actions pull-right">
                        <i class="fa fa-chevron-down"></i>
                    </div>
                </div>
                <div class="panel-body">
                    <div class="col-lg-12 pad" style="margin-left: 52px">
                        <div class="col-lg-12 pad">
                            <div class="col-lg-3 pad">
                                <label class="label-control">Brand</label>
                                <select class="form-control select2 brand" name="brand" id="brand">
                                    <option></option>
                                    <?php
                                    $getbrand = mysqli_query($conn, "SELECT * FROM `brand`")or die(mysqli_error($conn));
                                    while ($brand = mysqli_fetch_array($getbrand)) {
                                        Echo "<option value='$brand[code]'>$brand[name]</option>";
                                    }
                                    ?>
                                </select>
                            </div>
                            <div class="col-lg-2 pad">
                                <label class="label-control">Quality</label>
                                <select class="form-control quality select2" name="quality" id="quality">
                                    <option></option>
                                    <?
                                    $getquality = mysqli_query($conn, "SELECT * FROM `item`")or die(mysqli_error($conn));
                                    while ($quality = mysqli_fetch_array($getquality)) {
                                        Echo "<option vlaue='$quality[quality]'>$quality[quality]</option>";
                                    }
                                    ?>
                                </select>
                            </div>
                            <div class="col-lg-2 pad">
                                <label class="label-control">Shade</label>
                                <select class="form-control shade select2" name="shade" id="shade">
                                    <option></option>
                                    <?
                                    $getshade = mysqli_query($conn, "SELECT * FROM `item`")or die(mysqli_error($conn));
                                    while ($shade = mysqli_fetch_array($getshade)) {
                                        Echo "<option vlaue='$shade[shade]'>$shade[shade]</option>";
                                    }
                                    ?>
                                </select>
                            </div>
                            <div class="col-lg-2 pad">
                                <label class="label-control">Yarn</label>
                                <select class="form-control yarn select2" name="yarn" id="yarn">
                                    <option></option>
                                    <?
                                    $getyarn = mysqli_query($conn, "SELECT * FROM `item`")or die(mysqli_error($conn));
                                    while ($yarn = mysqli_fetch_array($getyarn)) {
                                        Echo "<option vlaue='$yarn[yarn]'>$yarn[yarn]</option>";
                                    }
                                    ?>
                                </select>
                            </div>
                            <div class="col-lg-2 pad">
                                <label class="label-control">Type</label>
                                <select class="form-control select2 type">
                                    <option value="">ALL</option>
                                    <option value="1">SUITING</option>
                                    <option value="2">SHIRTING</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-lg-12 pad text-center">
                            <input type="button" class="btn btn-primary query" id="query" value="Query" style="width: 215px"> 
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-lg-12 col-xs-12 pad text-center loader" style="display: none;">
            <img src="assets/img/loading.gif" alt="wait query is loading" style="width: 300px;">
        </div>
        <div class="MyAppend">

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