ok

Mini Shell

Direktori : /home2/selectio/public_html/lilyexpresslive/software/admin/
Upload File :
Current File : /home2/selectio/public_html/lilyexpresslive/software/admin/get_unique_awb1.php

<?php 
ob_start();
session_start();
include("inc/config.php");
                 
                    $awb = $_POST['awb'];
                    $type = $_POST['type'];
                    if(isset($_POST['courier_id'])){ $courier_id = $_POST['courier_id']; }
                    
                        if($type=='ref_no'){
                        	$statement = $pdo->prepare("SELECT * FROM `pickup_entry` WHERE ref_no='$awb'");
							$statement->execute();
							$result = $statement->fetchAll(PDO::FETCH_ASSOC);
							$count = $statement->rowCount();
							if($count>0)
							{
							    $txt='Ref Number is already taken';
							    $error='1';
							}
							else
							{
							    $txt='Ref Number is available';
							    $error='0';
							}
                            
                            }
                 if($type=='pod'){
                            $awb_type = $_POST['awb_type'];
                            if($awb_type=='ref_no'){ $var='AWB Number'; }
                            
                        	$statement = $pdo->prepare("SELECT * FROM `pickup_entry` WHERE ref_no='$awb'");
							$statement->execute();
							$result = $statement->fetchAll(PDO::FETCH_ASSOC);
							$count = $statement->rowCount();
							if($count>0)
							{
							    $txt=$var.' is Available';
							    $error='0';
							}
							else
							{
							    $txt=$var.' is not available';
							    $error='1';
							}
                            
                            }
                              $datas[] = array('txt' => $txt, 'error' => $error);
                              
                         echo json_encode($datas);     
                         
?>

Zerion Mini Shell 1.0