<?php
include('../../../function/__data_app_db.php');
$__data_ction = 'false';
 $_name_in_jsnj  = $__go_to = $errData = $sub_array=$type_desc='';
if(isset($_POST['process'])){
   $i = 1;
$query_quot = mysqli_query($_conn_db,"select * from tbl_courier where action='1' order by cid desc");
$i = 1;
while($data_quot = mysqli_fetch_array($query_quot)){
    $id = show_jsnj_data($data_quot['cid']);
    $doc_no = show_jsnj_data($data_quot['doc_no']);
    $ship_name = show_jsnj_data($data_quot['ship_name']);
    $ship_phone = show_jsnj_data($data_quot['phone']);
    $ship_add = show_jsnj_data($data_quot['s_add']);
    $rev_name = show_jsnj_data($data_quot['rev_name']);
    $r_phone = show_jsnj_data($data_quot['r_phone']);
    $r_add = show_jsnj_data($data_quot['r_add']);
    $book_date = show_jsnj_data(date('d-m-Y', strtotime($data_quot['book_date'])));
    $count = $i++;
    $sub_array.= "<tr>
<td><div class='checkbox'><input type='checkbox' class='checkbox-input dsdata' id='$id-$i' value='$id'><label for='$id-$i'></label></div></td>
        <td>$count</td>
        <td><a href='$http://$host$uri/../../track-order?inq=$doc_no' class='text-info' data-container='body'>$doc_no</a></td>
        <td>$book_date</td>
        <td>$ship_name - $ship_phone<br>$ship_add</td>
        <td>$rev_name - $r_phone<br>$r_add</td>
        <td><a href='$http://$host$uri/../../track-order?inq=$doc_no' class='btn btn-success btn-sm btn-labeled' data-container='body'><i class='demo-pli-receipt-4 btn-label'></i>Update</a>
        <a href='$http://$host$uri/../../track-order?inq=$doc_no' class='btn btn-info btn-sm btn-labeled' data-container='body'><i class='demo-pli-receipt-4 btn-label'></i>View</a></td>
    </tr>";
};
    $output = array(
        "tr" => $sub_array,
        "res"  =>  'true'
    );
    echo json_encode($output);
} else {
 echo 'error found';
};
?>
