ok

Mini Shell

Direktori : /proc/thread-self/root/home2/selectio/www/lilyexpresslive/software/admin/
Upload File :
Current File : //proc/thread-self/root/home2/selectio/www/lilyexpresslive/software/admin/assign_manifest.php

<?php 
session_start();
$clientId=$_SESSION['user']['id'];
$clientLocation=$_SESSION['user']['location'];
include "db.php";

    $driver_id = $_POST['driver_id'];
    $awb_id = $_POST['awb_id'];
    $t_name = $_POST['t_name'];
    $e_date = $_POST['e_date'];
    $ori = $_POST['orig'];
    $dest = $_POST['dest'];
    $vechicle_no = $_POST['vechicle_no'];
  //  $cid = $_POST['cid'];
    $send = $_POST['send'];
    $no_of_entry=count($awb_id);
    
    
    
                                    $auto_id=mysqli_query($con,"SHOW TABLE STATUS LIKE 'manifest'");
                                    $get_auto_id=mysqli_fetch_array($auto_id);
		                        	$ai_id=$get_auto_id[10];
	                                
    
    
// //    **********************************  Generate Manifest No Start ********************************************
                    
                                    $g=mysqli_query($con,"SELECT * FROM manifest ORDER BY id DESC LIMIT 1");
                                    $response=mysqli_fetch_array($g);
                                    $bid=$response['id'];
                                    if($bid!='')
                                    {
                                        $manifest_ids=$bid+1;
                                        $manifest_id=1000000+$manifest_ids;
                                    } 
                                    else
                                    {
                                        $manifest_id=1000001;
                                    }

							
	
                      // // 	**********************************  Generate Manifest No End ********************************************
    
    
                            	$sql1="INSERT INTO `manifest`(`manifest_id`, `origin`, `destination`, `entry_date`, `transport_name`, `sending_through`, `no_of_entry`, `driver_id`,`vechicle_no`) 
                            	VALUES ('$manifest_id','$ori','$dest','$e_date','$t_name','$send','$no_of_entry','$driver_id','$vechicle_no')";
                                $result1=$con->query($sql1);
                                if($result1)
                                {
                                foreach($awb_id as $awb) {
                                 $sql2="UPDATE  `pickup_entry` SET manifest_id='$manifest_id',status='manifest' WHERE id='$awb'";
                                 $result2=$con->query($sql2);
                                if($result2)
                                {
                                  $resp=1;
                                }
                                else
                                {
                                  $resp=0;
                                }
                                	/*Tracking Module Start*/
	
		                                $statement ="INSERT INTO tbl_tracking (pickup_entry_id,manifest_id,user_id,location,status,description,remark,created_at) VALUES ($awb,$manifest_id,$clientId,'$clientLocation','manifest','Manifest Created Successfully','','$e_date')";
	                                    $results=$con->query($statement);
			
		                            /*Tracking Module End*/
                                
                                   }
                                }
                                
                                 $datas[] = array('resp' => $resp,'manifest_id' =>$ai_id);
                      echo json_encode($datas);
                      ?>

Zerion Mini Shell 1.0