ok

Mini Shell

Direktori : /home2/selectio/www/lilyexpresslive/software/admin/
Upload File :
Current File : /home2/selectio/www/lilyexpresslive/software/admin/delivery_status_update.php

<?php 
session_start();

include "db.php";
$clientLocation="Bangalore";
$pickup_id =$_POST['pickup_id'];
$status =$_POST['status'];
$r_name =$_POST['r_name'];
$r_mobile =$_POST['r_mobile'];
$r_relation=$_POST['r_relation'];
$r_delivery_date =$_POST['r_delivery_date'];
$reason =$_POST['reason'];
$remark =$_POST['remark'];
$destination=$_POST['destination'];
$status_date=$_POST['status_date'];
if($destination!="")
{
    $clientLocation=$destination;
}
if($r_delivery_date==''){
    $r_delivery_date=$status_date;
}

foreach($pickup_id as $id) 
{
    
        $sql="UPDATE  `pickup_entry` SET status='$status' WHERE id=$id";
        $result=$con->query($sql);
        
        $clientId=0;
        
        
         $sql = "SELECT * FROM pickup_entry where id=$id";
         $results = $con->query($sql);
         if ($results->num_rows > 0) {
            while($row = $results->fetch_assoc()) {
               $clientId=$row["client_id"];
            }
         }
    
    	/*Tracking Module Start*/
    	$statement ="INSERT INTO tbl_tracking (pickup_entry_id,user_id,location,status,description,remark,receiver_name,receiver_mobile,relation,reason,delivery_date,created_at) 
    	                                VALUES ($id,$clientId,'$clientLocation','$status','','$remark','$r_name','$r_mobile','$r_relation','$reason','$r_delivery_date','$status_date')";
    	//error_log('Delivery Status Update: '.$statement);
    	$result=$con->query($statement);
		/*Tracking Module End*/
}

if($result)
$response=1;
else
$response=0;


echo $response;
?>

Zerion Mini Shell 1.0