<?php 
include 'header.php';
include '../db.php';
	
if (isset($_GET['num'])) {
    $tnumbs = $_GET['num'];
    $select = mysqli_query($link, "SELECT * FROM tracking WHERE tracking_number = '$tnumbs' ");
    if (mysqli_num_rows($select) > 0) {
      $row = mysqli_fetch_assoc($select);
        $senders_name = $row['sender_name'];  
         $senders_contact = $row['sender_contact'];  
         $senders_mail = $row['sender_email'];  
         $senders_address = $row['sender_address'];
         $receivers_name = $row['receiver_name'];  
         $receivers_contact = $row['receiver_contact'];  
         $receivers_mail = $row['receiver_email'];  
         $receivers_address = $row['receiver_address'];
         $statuss = $row['status'];  
         $dispatch_l = $row['dispatch_location'];  
         $dispatchh = $row['dispatch_date'];  
         $deliveryy = $row['delivery_date'];
         $current_loc = $row['current_location'];
         $desc = $row['pdesc'];
         $carrier = $row['carrier'];
         $carrier_ref = $row['carrier_ref'];
         $weight = $row['weight'];
         $payment_mode = $row['payment_mode'];
         $ship_mode = $row['ship_mode'];
         $quantity = $row['quantity'];
         $delivery_time = $row['delivery_time'];
         $image = $row['image'];
         $destination = $row['destination'];

    }else{
      echo "<script>window.location.href = 'dashboard.php'; </script>";
    }
  }else{
    echo "<script>window.location.href = 'dashboard.php'; </script>";
  }

?>

<style>
    .nftmax-adashboard .form-group {
    margin-bottom: 8px;
}

.nftmax-adashboard .form-row {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.nftmax-adashboard .form-row .form-group {
    width: 48%;
}

.center-image {
            max-width: 80%; /* Adjust the width of the image */
            max-height: 80%; /* Ensure the image doesn't overflow the screen */
            border: 2px solid #ddd; /* Optional border */
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Optional shadow */
        }

</style>

    <!-- NFTmax Dashboard -->
<section class="nftmax-adashboard nftmax-show">
    <div class="container-fluid">
        <div class="row">
            <div class="col-lg-12 setting-main">
                <div class="d-flex align-items-start">
                    <div class="tab-content" id="v-pills-tabContent">
                        <div class="tab-pane fade show active" id="v-pills-home" role="tabpanel" aria-labelledby="v-pills-home-tab">
                            <div class="row">
                                <div class="col-lg-12">
                                    <!-- <div class="personal-informations-head">
                                        <h3>Add Tracking</h3>
                                    </div> -->
                                    <div class="card">
                                        <div class="card-body">
                                            <label style="font-weight: bold; font-size: 25px;">TRACKING NUMBER</label>
                                            <input type="text" readonly="" value="<?php echo $tnumbs ?>" name="tracking_number" class="form-control" placeholder="Tracking Number">
                                        </div>
                                    </div> <br> <br>
                                    <form action="" method="POST" enctype="multipart/form-data">
                                        <!-- Sender Information -->
                                        <h5>Sender Information</h5>
                                        <div class="form-row">
                                            <div class="form-group col-md-6">
                                                <label for="sname">Sender's Name</label>
                                                <input type="text" name="sname" id="sname" class="form-control" value="<?php echo $senders_name; ?>">
                                            </div>
                                            <div class="form-group col-md-6">
                                                <label for="scontact">Sender's Contact</label>
                                                <input type="text" name="scontact" id="scontact" class="form-control" value="<?php echo $senders_contact; ?>">
                                            </div>
                                        </div>
                                        <div class="form-row">
                                            <div class="form-group col-md-6">
                                                <label for="smail">Sender's Email</label>
                                                <input type="email" name="smail" id="smail" class="form-control" value="<?php echo $senders_mail; ?>">
                                            </div>
                                            <div class="form-group col-md-6">
                                                <label for="saddress">Sender's Address</label>
                                                <input type="text" name="saddress" id="saddress" class="form-control" value="<?php echo $senders_address; ?>">
                                            </div>
                                        </div>

                                        <!-- Receiver Information -->
                                        <h5>Receiver Information</h5>
                                        <div class="form-row">
                                            <div class="form-group col-md-6">
                                                <label for="rname">Receiver's Name</label>
                                                <input type="text" name="rname" id="rname" class="form-control" value="<?php echo $receivers_name; ?>">
                                            </div>
                                            <div class="form-group col-md-6">
                                                <label for="rcontact">Receiver's Contact</label>
                                                <input type="text" name="rcontact" id="rcontact" class="form-control" value="<?php echo $receivers_contact; ?>">
                                            </div>
                                        </div>
                                        <div class="form-row">
                                            <div class="form-group col-md-6">
                                                <label for="rmail">Receiver's Email</label>
                                                <input type="email" name="rmail" id="rmail" class="form-control" value="<?php echo $receivers_mail; ?>">
                                            </div>
                                            <div class="form-group col-md-6">
                                                <label for="raddress">Receiver's Address</label>
                                                <input type="text" name="raddress" id="raddress" class="form-control" value="<?php echo $receivers_address; ?>">
                                            </div>
                                        </div>

                                        <!-- Package Information -->
                                        <h5>Package Information</h5>
                                        <div class="form-row">
                                            <div class="form-group col-md-6">
                                                <label for="status">Status</label>
                                                <select name="status" class="form-control">
                                                    <option value="Pending" <?php echo $statuss == 'Pending' ? 'selected' : ''; ?>>Pending</option>
                                                    <option value="Active" <?php echo $statuss == 'Active' ? 'selected' : ''; ?>>Active</option>
                                                    <option value="Inactive" <?php echo $statuss == 'Inactive' ? 'selected' : ''; ?>>Inactive</option>
                                                    <option value="Picked Up" <?php echo $statuss == 'Picked Up' ? 'selected' : ''; ?>>Picked Up</option>
                                                    <option value="Arrived" <?php echo $statuss == 'Arrived' ? 'selected' : ''; ?>>Arrived</option>
                                                    <option value="Delivered" <?php echo $statuss == 'Delivered' ? 'selected' : ''; ?>>Delivered</option>
                                                    <option value="On hold" <?php echo $statuss == 'On hold' ? 'selected' : ''; ?>>On Hold</option>
                                                </select>
                                            </div>
                                            <div class="form-group col-md-6">
                                                <label for="dispatchl">Dispatch Location</label>
                                                <input type="text" name="dispatchl" class="form-control" value="<?php echo $dispatch_l; ?>">
                                            </div>
                                        </div>
                                        <div class="form-row">
                                            <div class="form-group col-md-6">
                                                <label for="dispatchh">Dispatch Date</label>
                                                <input type="date" name="dispatchh" class="form-control" value="<?php echo $dispatchh; ?>">
                                            </div>
                                            <div class="form-group col-md-6">
                                                <label for="deliveryy">Delivery Date</label>
                                                <input type="date" name="deliveryy" class="form-control" value="<?php echo $deliveryy; ?>">
                                            </div>
                                        </div>
                                        <div class="form-row">
                                            <div class="form-group col-md-6">
                                                <label for="desc">Description</label>
                                                <input type="text" name="desc" class="form-control" value="<?php echo $desc; ?>">
                                            </div>
                                            <div class="form-group col-md-6">
                                                <label for="carrier">Carrier</label>
                                                <input type="text" name="carrier" class="form-control" value="<?php echo $carrier; ?>">
                                            </div>
                                        </div>
                                        <div class="form-row">
                                            <div class="form-group col-md-6">
                                                <label for="carrier_ref">Carrier Reference</label>
                                                <input type="text" name="carrier_ref" class="form-control" value="<?php echo $carrier_ref; ?>">
                                            </div>
                                            <div class="form-group col-md-6">
                                                <label for="weight">Weight</label>
                                                <input type="number" step="0.01" name="weight" class="form-control" value="<?php echo $weight; ?>">
                                            </div>
                                        </div>
                                        <div class="form-row">
                                            <div class="form-group col-md-6">
                                                <label for="payment_mode">Payment Mode</label>
                                                <input type="text" name="payment_mode" class="form-control" value="<?php echo $payment_mode; ?>">
                                            </div>
                                            <div class="form-group col-md-6">
                                                <label for="ship_mode">Shipping Mode</label>
                                                <input type="text" name="ship_mode" class="form-control" value="<?php echo $ship_mode; ?>">
                                            </div>
                                        </div>
                                        <div class="form-row">
                                            <div class="form-group col-md-6">
                                                <label for="quantity">Quantity</label>
                                                <input type="text" name="quantity" class="form-control" value="<?php echo $quantity; ?>">
                                            </div>
                                            <div class="form-group col-md-6">
                                                <label for="delivery_time">Delivery Time</label>
                                                <input type="time" name="delivery_time" class="form-control" value="<?php echo $delivery_time; ?>">
                                            </div>
                                        </div>
                                        <div class="form-row">
                                            <div class="form-group col-md-6">
                                                <label for="destination">Destination</label>
                                                <input type="text" name="destination" class="form-control" value="<?php echo $destination; ?>">
                                            </div>
                                            
                               
                                       </div>
                                       <center>
                                        <label for="Packageimage">Package Image</label>
                                             <div class="form-group col-md-12">
                                             
                                             <img src="../uploads/<?php echo $image; ?>" alt="Centered Image" class="center-image">
                                            </div>
                                       </center>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

    </div>

    <script src="assets/js/jquery-3.6.3.min.js"></script>
    <script src="assets/js/slick.min.js"></script>
    <script src="assets/js/bootstrap.bundle.min.js"></script>
    <script src="assets/js/custom.js"></script>


    <script>
        //Theme controll 
        let darkMode = false
        if (darkMode) {
            document.getElementById("dark-icon").style.setProperty("display", "block")
            document.getElementById("light-icon").style.setProperty("display", "none")
            document.getElementsByClassName("logo")[0].style.setProperty("display", "none")
            document.getElementsByClassName("logo-dark")[0].style.setProperty("display", "block")
        } else {
            document.getElementById("dark-icon").style.setProperty("display", "none")
            document.getElementById("light-icon").style.setProperty("display", "block")
            document.getElementsByClassName("logo")[0].style.setProperty("display", "block")
            document.getElementsByClassName("logo-dark")[0].style.setProperty("display", "none")
        }



        document.getElementById("theme-controll").addEventListener("click", event => {
            darkMode = !darkMode
            const main = document.querySelector("html")
            main.classList.toggle("dark")

            if (darkMode) {

                document.documentElement.style.setProperty("--headding-color", "#fff")
                document.documentElement.style.setProperty("--paragraph-color", "#E2E8F0")
                document.documentElement.style.setProperty("--primary-color", "#b8e2f2")
                document.documentElement.style.setProperty("--warning-color", "#FACC15")
                document.documentElement.style.setProperty("--alerts-color", "#FF4747")
                document.documentElement.style.setProperty("--other-color", "#FF784B")
                document.documentElement.style.setProperty("--grey-color", "#2A313C")
                document.documentElement.style.setProperty("--grey-color-border", "#edf2f7")
                document.documentElement.style.setProperty("--body-bg-color", "#23262B")
                document.documentElement.style.setProperty("--bg-color", "#1D1E24")
                document.documentElement.style.setProperty("--greyscale-3", "#191B1F")
                document.documentElement.style.setProperty("--greyscale-4", "#293644")
                document.documentElement.style.setProperty("--greyscale-200", "rgba(226, 232, 240, 0.7)")
                document.documentElement.style.setProperty("--greyscale-1", "#2A313C")
                document.documentElement.style.setProperty("--bg-color-2", "#23262B")
                document.documentElement.style.setProperty("--bg-rgb", "#1D1E24")

                document.getElementById("dark-icon").style.setProperty("display", "block")
                document.getElementById("light-icon").style.setProperty("display", "none")
                document.getElementsByClassName("logo")[0].style.setProperty("display", "none")
                document.getElementsByClassName("logo-dark")[0].style.setProperty("display", "block")
            } else {

                document.documentElement.style.setProperty("--headding-color", "#111827")
                document.documentElement.style.setProperty("--paragraph-color", "#747681")
                document.documentElement.style.setProperty("--primary-color", "#b8e2f2")
                document.documentElement.style.setProperty("--warning-color", "#FACC15")
                document.documentElement.style.setProperty("--alerts-color", "#FF4747")
                document.documentElement.style.setProperty("--other-color", "#FF784B")
                document.documentElement.style.setProperty("--grey-color", "#F7FAFC")
                document.documentElement.style.setProperty("--grey-color-border", "#edf2f7")
                document.documentElement.style.setProperty("--bg-color", "#FAFAFA")
                document.documentElement.style.setProperty("--body-bg-color", "#F6F6F6")
                document.documentElement.style.setProperty("--greyscale-200", "rgba(42, 49, 60, 0.7)")
                document.documentElement.style.setProperty("--greyscale-1", "#EDF2F7")
                document.documentElement.style.setProperty("--greyscale-3", "#EEEFF2")
                document.documentElement.style.setProperty("--greyscale-4", "#CBD5E0")
                document.documentElement.style.setProperty("--bg-color-2", "#f7fafc")
                document.documentElement.style.setProperty("--bg-rgb", "rgba(237, 242, 247, 0.5)")

                document.getElementById("dark-icon").style.setProperty("display", "none")
                document.getElementById("light-icon").style.setProperty("display", "block")
                document.getElementsByClassName("logo")[0].style.setProperty("display", "block")
                document.getElementsByClassName("logo-dark")[0].style.setProperty("display", "none")
            }
        })
    </script>
</body>


<!-- Mirrored from quomodosoft.com/html/bankcohtml/setting.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 04 Jan 2025 01:45:36 GMT -->
</html>