📁
SKYSHELL MANAGER-
🛒
PHP v7.4.33
Create Folder
Create File
Current Path:
home
/
oshofree
/
public_html
/
chbluxuries.com
/
boot
/
Name
Size
Permissions
Actions
📁
..
-
0755
🗑️
🔒
📁
css
-
0755
🗑️
🔒
📁
js
-
0755
🗑️
🔒
📄
config.php
7.06 KB
0444
🗑️
⬇️
✏️
🔒
📄
error_log
329.44 KB
0644
🗑️
⬇️
✏️
🔒
Editing: ctrack.php
<?php // session_start(); ?><?php include "header2.php"; ?><?php include "every.php";?> <body onLoad="getLocation()"> <main id="main"> <section id="pricing" class="pricing"> <div class="container" data-aos="fade-up"> <div class="row content" align="center"> <div class="col-lg-12" style=" margin:auto; width:100%;"> <h2 style="color:#FF339A; font-weight:bolder;">TRACK YOUR PACKAGE</h2> <p><form method="post" action=""> <input type="text" Placeholder="Enter Your Tracking ID" class="form-control" name="ordid" required/><br> <input type="submit" name="submit" id="button" value="Track" class="submitn" style="background-color:#FF339A; border:#FF339A; color:#FFFFFF;" /></font> </form></p><br> <?php include "connect_to_mysqli.php"; // Get images from the database $user = $_POST['ordid']; $check = "select all* from parcel where id = '".$user."'"; $query = mysqli_query($con,$check); if (mysqli_affected_rows($con) == 0) { echo ""; } else { $sql ="select all* from parcel where id = '".$user."' "; $sql2 = mysqli_query($con,$sql); while($row = mysqli_fetch_array($sql2)) { $id = $row["s"]; $drid=$row['did']; $numa=$row['dnum']; $sta = $row["status"]; } $sql ="select all* from rider where id = '".$drid."' "; $sql2 = mysqli_query($con,$sql); while($row = mysqli_fetch_array($sql2)) { $id = $row["s"]; $va= $row["vech"]; $la= $row["lise"]; $imageUR = 'rider/upload/'.$row["file_name"]; } $sql ="select all* from dip where id = '".$drid."' "; $sql2 = mysqli_query($con,$sql); while($row = mysqli_fetch_array($sql2)) { $id = $row["s"]; $usip = $row["ip"]; $loca = $row["locat"]; } if (mysqli_affected_rows($con) == 0) { echo ""; } else { function curl_get_contents($url) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); $data = curl_exec($ch); curl_close($ch); return $data; } function getGeoCode($address) { // geocoding api url $url = "https://maps.googleapis.com/maps/api/geocode/json?address=$address&sensor=true&key=AIzaSyD6MS4bUOjkP0fYUklsVzIKYmGmb_MheGQ"; // send api request $geocode = curl_get_contents($url); $json = json_decode($geocode); $data['lat'] = $json->results[0]->geometry->location->lat; $data['lng'] = $json->results[0]->geometry->location->lng; return $data; } $address =$loca; $address = str_replace(' ', '+', $address); $result = getGeoCode($address); $lat=$result['lat']; $lon= $result['lng']; } if($sta == "Not Assigned") { $fail = "<p style='color:#FF339A;'>YOUR ORDER IS CURRENTLY BEING ASSIGNED</p>"; } if($sta == "Assigned") { $fail = '<center style="color:black;">CONTACT DETAILS</center> <p style="color:black;" >DRIVER ID - '.$drid.'<br>DRIVER PHONE NUMBER - '.$numa.'<br>DRIVER VECHICLE - '.$va.'<br>DRIVER LICENSE NO - '.$la.'</p> <p><img src="'.$imageUR.'" alt="" style="max-width:100%; max-height:100%;"/></p><p style="color:black;">RIDER ESTIMATED ARRIVAL TIME - In less than an Hour</p>'; } if($sta == "Out For Delivery") { $fail = ' <center style="color:black;">CONTACT DETAILS</center> <p style="color:black;">DRIVER ID - '.$drid.'<br>DRIVER PHONE NUMBER - '.$numa.'<br>DRIVER VECHICLE - '.$va.'<br>DRIVER LICENSE NO - '.$la.'</p> <p><img src="'.$imageUR.'" alt="" style="max-width:100%; max-height:100%;"/></p><p><div id="map"></div></p> '; } if ($sta == "Failed") { $fail = ' <p><form action="walle1.php" method="post" > <input type="text" value="'.$user.'" name="ordid" required hidden> <input type="submit" name="submit" value="Order Again" class="submitn" ></form></p>'; } else { echo "";} if ($sta == "Success") { $fail = '<center style="color:black;" >CONTACT DETAILS</center> <p style="color:black;" >DRIVER ID - '.$drid.'<br>DRIVER PHONE NUMBER - '.$numa.'<br>DRIVER VECHICLE - '.$va.'<br>DRIVER LICENSE NO - '.$la.'</p> <p><img src="'.$imageUR.'" alt="" style="max-width:100%; max-height:100%;"/></p> <p><form action="suser.php" method="post" > <input type="text" value="'.$user.'" name="ordid" required hidden> <input type="submit" name="submit" value="View Details" class="submitn" ></form></p>'; } $sql ="select all* from parcel where id = '".$user."' "; $sql2 = mysqli_query($con,$sql); while($row = mysqli_fetch_array($sql2)) { $id = $row["s"]; $drid=$row['did']; $sta = $row["status"]; echo '<section id="pricing" class="pricing"> <div class="container"> <center><div class="row"> <div class="col-lg-12 col-md-12" data-aos="fade-up"> <div class="box"> <h3 style="text-align:center;">ORDER '.$row['id'].'</h3> <b> <p style="color:black;">ORDER STATUS - '.$row['status'].'</p> <center>DESTINATION</center> <p style="color:black;">FROM - '.$row['address'].'<br>TO- '.$row['adress'].'</p> <center>ITEM DETAILS</center> <p style="color:black;">ITEM WORTH - '.$row['item'].'<br>ITEM SIZE- '.$row['size'].'<br>ITEM DESCRIPTION - '.$row['deb'].'</p> <center>RIDE DETAILS</center> <p style="color:black;">DISTANCE - '.$row['distan'].'<br>TIME - '.$row['timer'].'<br>COST - '.$row['coster'].'</p> '.$fail.' </b> '; } } ?> <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyD6MS4bUOjkP0fYUklsVzIKYmGmb_MheGQ&callback=initMap&libraries=&v=weekly" async ></script> <style> body, html { height:100%;margin:0;padding:0;box-sizing:border-box; } #map { width:100%;height:20vh; margin:auto;float:none; } </style> <script>// Initialize and add the map function initMap() { // The location of Uluru const uluru = { lat: <?php echo $lat; ?>, lng: <?php echo $lon; ?>}; // The map, centered at Uluru const map = new google.maps.Map(document.getElementById("map"), { zoom: 13, center: uluru, }); // The marker, positioned at Uluru const marker = new google.maps.Marker({ position: uluru, map: map, }); }// JavaScript Document</script> <!-- Async script executes immediately and must be after any DOM elements used in callback. --> </div> </div> </div> </center> </div> </div></div> </section> </main><!-- End #main --> </main><!-- End #main --> <?php include "footer2.php"; ?>
💾 Save Changes