<?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);

$usertype = $_SESSION["usertype_" . $dbname];
$origin = $_REQUEST["origin"];

$maindb = 'shipment';
$trandb = 'shiptran';

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

$keycond = "";

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

if ($origin != "") {
    ?>

    <div class="row gy-3 bg-row">
        <div class="col-lg-2 col-md-2 col-sm-8 col-xs-8 pad">
            <select class="form-control sfield">
                <option value="1">Shipment</option>
                <option value="2">Customer</option>
                <option value="3">Container No.</option>
                <option value="4">Destination</option>
            </select>
        </div>

        <div class="col-lg-2 col-md-2 col-sm-8 col-xs-8 pad">
            <select class="form-control soperator">
                <option value="">Type of Search</option>
                <option value="%">Like</option>
                <option value="=">Exactly</option>
            </select>
        </div>

        <div class="col-lg-3 col-md-3 col-sm-8 col-xs-8 pad">
            <input type="text" class="form-control ssearch" placeholder="Search Here" style="background-color: #ffffff;border-radius: 4px;height:27px">
        </div>

        <div class="col-lg-1 col-md-1 col-sm-2 col-xs-2 pad">
            <input type="button" class="btn btn-primary searchBtn sload" value="Search">
        </div>

    </div>
        

    <div class="col-lg-12 sloader text-center mt-3"></div>
    <div class="col-lg-12 snoRecord text-center mt-2">
        <h5 class="text-danger">NO RECORDS FOUND</h5>
    </div>
    
    <div class="table-responsive ssload mt-4" style="overflow-y: scroll;height:100%;overflow-x: scroll">
        <table class="table table-striped1 table-bordered1 table-hover mb-0" width="200%">
            <thead class="table-light position-sticky top-0 z-1">
                <tr class="mySearchTr">
                
                    <th style="width:5%;">Shipment</th>
                    <th style="width:6%;">Booking</th>
                    <th style="width:6%;">Status</th>
                    <th style="width:6%;">Whatsapp</th>
                    <th style="width:14%;">Customer</th>
                    <th style="width:6%;">Cartons</th>
                    <th style="width:14%;">Supplier</th>
                    <th style="width:14%;">Description</th>
                    <th style="width:6%;">Pcs</th>
                    <th style="width:6%;">Unit</th>
                    <th style="width:6%;">Marka</th>
                    <th style="width:6%;">Total CBM</th>
                    <th style="width:6%;">Weight</th>
                    <th style="width:10%;">Container</th>
                    <th style="width:6%;">Sailing</th>
                    <th style="width:6%;">Destination</th>
                    <th style="width:6%;">Estimate</th>
                    <th style="width:6%;">Delivery</th>
                    <th style="width:6%;">Mobile</th>
                </tr>
            </thead>

            <tbody class="sTbody">
                <!-- Dynamically loaded data here -->
            </tbody>
            <tfoot class="sTotalFoot"></tfoot>

        </table>
    </div>

  
<?php } ?>