ok
Direktori : /home2/selectio/www/lilyexpresslive/software/admin/ |
Current File : /home2/selectio/www/lilyexpresslive/software/admin/single-tracking.php |
<?php require_once('header.php'); $track_id=$_POST['track_id']; $type=$_POST['type']; $type=preg_replace('/\s+/', '', $type); $list_track_ids=preg_split('/\r\n|[\r\n]/', $track_id); $error_count=0; // $track_id=preg_replace('/\s+/', '', $track_id); ?> <style> table { border-collapse: collapse; } table, td, th { border: 1px solid black; } </style> <script> function printDiv(divName) { var printContents = document.getElementById(divName).innerHTML; var originalContents = document.body.innerHTML; document.body.innerHTML = printContents; window.print(); document.body.innerHTML = originalContents; } </script> <section class="content-header"> <div class="content-header-left"> <h1>View Shipment Tracking</h1> </div> <div class="content-header-right" style="margin-right: 1%;"> <a href="shipment_tracking.php" class="btn btn-primary btn-sm">Back</a>     <input type="button" class="btn btn-danger btn-sm" onclick="printDiv('printableArea')" value="Print" /> </div> </section> <section class="content"> <div id="printableArea"> <b><center><h4>Shipment Tracking</h4></center> <?php foreach($list_track_ids as $track_id){ if($type=="awb") { $statement = $pdo->prepare("SELECT pickup_entry.*,tbl_customer.cust_name as cname FROM `pickup_entry` INNER join tbl_customer on pickup_entry.ref_no=? and tbl_customer.cust_id=pickup_entry.customer_id"); } else { $statement = $pdo->prepare("SELECT pickup_entry.*,tbl_customer.cust_name as cname FROM `pickup_entry` INNER join tbl_customer on pickup_entry.awb_no=? and tbl_customer.cust_id=pickup_entry.customer_id"); } $statement->execute(array($track_id)); $total_id = $statement->rowCount(); $result = $statement->fetchAll(PDO::FETCH_ASSOC); if(!$result) { $error_track_id[]=$track_id; $error_count++; continue; } foreach ($result as $row) { $mani_fest=$row['manifest_id']; $pick_id=$row['id']; ?> <table style="width: 100%;line-height: 34px;"> <tr> <td style="text-align:left;padding-left: 2%;">AWB Number : <?php echo $row['ref_no']; ?> </td> <td style="text-align:left;padding-left: 2%;" >Booking Date :  <?php $day=date_create($row['pickup_created_date']); $new_date=date_format($day,'d-m-Y h:i:s'); echo $new_date; ?></td> <td style="text-align:left;padding-left: 2%;">Booking Type : <?php echo strtoupper($row['shipping_mode']); ?> </td> </tr> <tr> <td style="text-align:left;padding-left: 2%;">Customer Name : <?php echo $row['cname']; ?></td> <td style="text-align:left;padding-left: 2%;">Address : <?php echo $row['address']; ?></td> <td style="text-align:left;padding-left: 2%;">Phone Number : <?php echo $row['phone']; ?></td> </tr> </table> <?php } ?> <div class="row"> <div class="col-md-12"> <div > <div > <table style="width: 100%;line-height: 34px;" border=1> <thead> <tr> <th style="text-align:center">S.No</th> <th style="text-align:center">Status </th> <th style="text-align:center">Date</th> <th style="text-align:center">Location</th> <th style="text-align:center">Description</th> </tr> </thead> <tbody> <?php $i=0; $statement = $pdo->prepare("SELECT * FROM tbl_tracking where pickup_entry_id=?"); $statement->execute(array($pick_id)); $result = $statement->fetchAll(PDO::FETCH_ASSOC); foreach ($result as $row) { $i++; ?> <tr> <td style="text-align:center"><?php echo $i; ?></td> <td style="text-align:center"><?php echo ucwords($row['status']); ?></td> <td style="text-align:center"><?php $day=date_create($row['shipment_create_date']); $new_date=date_format($day,'d-m-Y h:i:s'); echo $new_date; ?></td> <td style="text-align:center"><?php echo $row['location']; ?></td> <td style="text-align:center"> <?php if($row['description']!=''){ echo $row['description'];} ?> <?php if($row['receiver_name']!=''){echo "Receiver Name : "; echo $row['receiver_name']; echo ",";}?> <?php if($row['receiver_mobile']!=''){echo "Receiver Mobile : "; echo $row['receiver_mobile']; echo ",";}?> <?php if($row['relation']!=''){echo "Relation : "; echo $row['relation']; } ?> <?php if($row['reason']!=''){echo "Reason : "; echo $row['reason']; }?> </td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </div><br> <?php } ?> </div> <br> <center> <div class="row"> <?php if($error_count>0) {?> <h4 style="color:red;">Incorrect AWB Numbers</h4><br> <?php $j=1; echo "<script>alert('$error_count - Incorrect Awb-Number');</script>"; foreach($error_track_id as $error_ids){ ?> <p><?php echo $j.' - '.$error_ids; ?></p> <?php $j++; } }?> </div></center> </section> <div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title" id="myModalLabel">Delete Confirmation</h4> </div> <div class="modal-body"> <p>Are you sure want to delete this item?</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> <a class="btn btn-danger btn-ok">Delete</a> </div> </div> </div> </div> <?php require_once('footer.php'); ?>