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

mysqli_query($conn, "SET NAMES 'utf8'");
mysqli_query($conn, 'SET CHARACTER SET utf8');

ini_set('display_errors', 1);
error_reporting(E_ERROR);

$zdir = $dbname;
$usercode = $_SESSION["usercode"];
$usertype = $_SESSION["usertype_" . $dbname];
$ztit = $_SESSION["tit_" . $dbname];
$menucolor = $_SESSION["menucolor"];

if ($menucolor == "#5f2b54"){
   $bgrowback = "#846d7fff";
}else{
    $bgrowback = "#d5bdaf";
}

$maindb = 'recruitmain';
$trandb = 'recruittran';
$trandb2 = 'category';

$projectid = $_REQUEST['projectid'];
if (!empty($projectid)) {
    $projectcond = "AND code = '$projectid'";
} else {
    $projectcond = "";
}

$file = 'project_main.php';
$keyfld = "vouchno";

$keycond = "";

$admin = $_SESSION["admin_" . $dbname];
$zdb = $_SESSION["zdbyear_" . $dbname];
$myyear = $_SESSION[$myyear];
$compcd = $_SESSION["comp_" . $dbname];

$zroot = $_SESSION["zdir"];
mysqli_select_db($conn, $zdb);

include("includes/linkshead.php");
?>
<!-- <script src="MyScript/entry.js" type="text/javascript"></script> -->
<script src="MyScript/deststockrep_search.js?a=<?= mt_rand() ?>" type="text/javascript"></script>
<style>
     .project-details {
        display: inline-block;
        font-size: 16px;
        letter-spacing: 0.5px;
        word-spacing: 5px;
        font-size: 1.5rem;
        font-weight: 600;
        margin: 0;
        color: <?= $menucolor ?>;
        padding-top: 12px;
        padding-bottom: 6px;
    }

    .form-control {
        background-color: #ffffff;
        border-radius: 4px;
    }


    .Sticky {
        position: sticky;
        top: 0;
        background-color: #f8f9fa;
        z-index: 1;
    }

    .bg-row {
        background-color: <?= $bgrowback ?>;

        /* background-color: #d5bdaf; */
        align-items: center;
        vertical-align: center;
        padding-top: 12px;
        margin-left: 0px;
        margin-right: 0px;
        line-height: 2.7;
    }

    .combodiv {
        background-color: <?= $menucolor ?>;
        color: #ffffff;
        margin-left: 0px;
        margin-right: 0px;
    }

    .combodiv1 {
        /* background-color: #a98467; */
        /* color: #ffffff; */
        margin-left: 0px;
        margin-right: 0px;
    }

    th,
    td {
        white-space: nowrap;
    }

    .table-responsive .table th,
    .table-responsive .table td {
        white-space: nowrap;
    }

    .searchBtn {
        margin-top: -8px !important;
        height: 30px;
        border-radius: 4px;
    }
</style>
</head>

<body>
    <form action='' method='POST'>
        <div class="col-lg-12">
            <div class="panel panel-default shadow-sm border-0">
                <div class="row combodiv text-center">
                    <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 text-right pad ">
                        <label class="label-control marg">Destination</label>
                    </div>
                    <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 pad ">
                        <select id="destination" name="destination" class="form-control destination select2"
                            style="width:100%">
                            <?php
                            // echo "<option value=''></option>";
                            $getdest = mysqli_query($conn, "SELECT `destination` FROM `shipment` group by destination order by destination") or die(mysqli_error($conn));
                            while ($fetdest = mysqli_fetch_array($getdest)) {
                                echo "<option value='$fetdest[destination]'>$fetdest[destination]</option>";
                            }
                            ?>
                        </select>
                    </div>
                </div>
                <div class="dataDiv">
                </div>
                
                <div class="row">
                    <div class="col-xs-11 text-right search-action-bar">
                        <input type="button" class="btn btn-primary sprev" style="border-radius: 4px;margin-bottom:5px"
                            value="Previous">
                        <input type="button" class="btn btn-primary snext" style="border-radius: 4px;margin-bottom:5px"
                            value="Next">
                    </div>
                </div>
            </div>
        </div>

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

</html>