ok

Mini Shell

Direktori : /home2/selectio/www/lilyexpresslive/software/admin/
Upload File :
Current File : /home2/selectio/www/lilyexpresslive/software/admin/cargo-invoice-verify.php

<?php
ob_start();
session_start();
include("inc/config.php");
include("inc/functions.php");
include("inc/CSRF_Protect.php");
$csrf = new CSRF_Protect();
$error_message = '';
$success_message = '';
$error_message1 = '';
$success_message1 = '';

// Check if the user is logged in or not
if(!isset($_SESSION['user'])) {
	header('location: login.php');
	exit;
}
$clientId=$_SESSION['user']['id'];
$clientLocation=$_SESSION['user']['location'];
$clientType=$_SESSION['user']['role'];

$list_id=array();
$list_id=$_GET['list_id'];
$li=explode(",",$list_id);
$k=0;
foreach($li as $lid)
{
    $k++;
    $statement = $pdo->prepare("SELECT pk.invoice_no,pk.pincode,pk.invoice_value,pk.e_way_bill_no,tu.address as cust_address,tcu.cust_code as code,pk.read_status as read_status,pk.ref_no as bar,tcu.destination_city as dest,mat.short_desc as content,tu.phone as cust_phone,tu.short_location as short_location,tu.location as location,tu.full_name as cust_name,tu.location as client_destination,tcu.cust_name as client_name,pk.address as client_address,pk.city as client_city,pk.state as client_state,pk.phone as client_phone, pk.pics as pieces,pk.c_weight as c_weights,pk.a_weight as a_weights,pk.created_at as created,pk.content_desc as descrp,pk.total_charges as tc,pk.other_charges as oc,pk.payment_mode as pay_mode,pk.gst_no as gst,(SELECT full_desc FROM `material_desc` where id=pk.content_desc) as content_descs,pk.* FROM pickup_entry as pk INNER JOIN tbl_user as tu INNER JOIN tbl_customer as tcu INNER JOIN material_desc as mat on pk.client_id=tu.id AND pk.customer_id=tcu.cust_id AND mat.id=pk.content_desc WHERE pk.id='$lid'");
    $statement->execute();
    $result = $statement->fetchAll(PDO::FETCH_ASSOC);
    
    foreach ($result as $row) {
         
     $read_status[]=$row['read_status'];
     $cust_address[]=$row['cust_address'];
     $cust_phone[]=$row['cust_phone'];
     $cust_name[]=$row['cust_name'];
     $client_name[]=$row['client_name'];
     $client_address[]=$row['client_address'];
     $client_city[]=$row['client_city'];
     $client_state[]=$row['client_state'];
     $client_phone[]=$row['client_phone'];
     $pieces[]=$row['pieces'];
     $c_weights[]=$row['c_weights'];
     $gst[]=$row['gst'];
     $a_weights[]=$row['a_weights'];
     $total_charges[]=$row['tc'];
     $other_charges[]=$row['oc'];
     $desc[]=$row['content'];
     $pay_mode[]=$row['pay_mode'];
     $dest[]=$row['dest'];
     
     $client_destination[]=$row['client_destination'];
     
     $day=date_create($row['created']);
     $date[]=date_format($day,'d-m-Y');
     $bar[]=$row['bar'];
     $code[]=$row['code'];
     $short_location[]=$row['short_location'];
     $location[]=$row['location'];
     $invoice_no[]=$row['invoice_no'];
     $invoice_value[]=$row['invoice_value'];
     $e_way_bill_no[]=$row['e_way_bill_no'];
     $content_desc[]=$row['content_descs'];
     $pincode[]=$row['pincode'];
     
     $is_return_awb[]=$row['is_return_awb'];
     $parent_awb[]=$row['parent_awb'];
     
          $length1[]=$row['length1'];
     $width1[]=$row['width1'];
     $height1[]=$row['height1'];
     $nob1[]=$row['nob1'];
     $act_wt1[]=$row['act_wt1'];
     
     $length2[]=$row['length2'];
     $width2[]=$row['width2'];
     $height2[]=$row['height2'];
     $nob2[]=$row['nob2'];
     $act_wt2[]=$row['act_wt2'];
     
     $length3[]=$row['length3'];
     $width3[]=$row['width3'];
     $height3[]=$row['height3'];
     $nob3[]=$row['nob3'];
     $act_wt3[]=$row['act_wt3'];
     
     $length4[]=$row['length4'];
     $width4[]=$row['width4'];
     $height4[]=$row['height4'];
     $nob4[]=$row['nob4'];
     $act_wt4[]=$row['act_wt4'];
     
     $length5[]=$row['length5'];
     $width5[]=$row['width5'];
     $height5[]=$row['height5'];
     $nob5[]=$row['nob5'];
     $act_wt5[]=$row['act_wt5'];
     
     }
}

function address_limit($addr){
      // strip tags to avoid breaking any html
    $string = strip_tags($addr);
    if (strlen($string) > 110) {
    
        // truncate string
        $stringCut = substr($string, 0, 110);
        $endPoint = strrpos($stringCut, ' ');
    
        //if the string doesn't contain any space then it will cut without word basis.
        $string = $endPoint? substr($stringCut, 0, $endPoint) : substr($stringCut, 0);
        $string .= '...';
    }
    echo $string;
}

function no_limit($addr){
      // strip tags to avoid breaking any html
    $string = strip_tags($addr);
    if (strlen($string) > 18) {
    
        // truncate string
        $stringCut = substr($string, 0, 18);
        $endPoint = strrpos($stringCut, ' ');
    
        //if the string doesn't contain any space then it will cut without word basis.
        $string = $endPoint? substr($stringCut, 0, $endPoint) : substr($stringCut, 0);
        $string .= '..';
    }
    echo $string;
}
?>

<?php for($is=0;$is<$k;$is++) {?>
<?php for($i=1;$i<=4;$i++){ ?>
<body onload="window.print();setTimeout(window.close, 0);">
<?php if($i==1 || $i==3){ ?><div style="min-height:297mm;max-height:287mm;"><?php } ?>
<table style="border: none;" class="watermark">
    <tr>
        <td style="border: none;">    
<table style="border-bottom: none;">
	<tr>
		<td width="18%" style="border-right: none;padding-left: 2px;border-bottom: none;">
			<img src="img/logo.png" style="width: 100%;">
		</td>
		<td width="22%" style="border-left: none;padding: 2px;vertical-align: top;border-bottom: none;">
	        <p style="font-size:10px;margin-left:2%;">
	        	<b style="font-size:12px;font-weight: 900">SPEED LINK SERVICE</b><br>
		    	#6, Huskur Main Road,<br>
				Makali, Bangalore-562123<br>
				Ph : +9180 2963 0029,<br>
				Mb no : +91 9880963232<br>
				E-mail : info@speedlinkservices.in<br>
			 	<b>GST NO : 29ALUPM9087C1ZB</b></p>
		</td>
		<td width="28%" style="padding: 2px;vertical-align: top;border-bottom: none;">
			<table style="vertical-align: top;">
				<tr style="vertical-align: top;">
					<td style="padding: 2px;vertical-align: top;border-bottom:none;" class="bg">
						<center style="font-size:12px;">BOOKING DATE</center>
					</td>				
				</tr>
				<tr style="border: none;text-align:center">
					<td style="padding: 3px;border-top:none;">
						<b><?=$date[$is]?></b>
					</td>				
				</tr>
					<tr style="border: none;vertical-align: top;">
					<td style="padding: 2px;vertical-align: top;border-bottom:none;" class="bg">
						<center style="font-size:12px;">DESTINATION</center>
					</td>				
				</tr>
				<tr style="border: none;text-align:center">
					<td style="padding: 3px;border-top:none;">
					<?php if($is_return_awb[$is]==0){ ?>	<b><?=$dest[$is]?></b> <?php }else{ ?> <b><?=$client_destination[$is]?></b> <?php } ?>
					</td>				
				</tr>
			</table>
			
		</td>
		<td width="25%" style="vertical-align: top;border-bottom: none;padding-top: 2px;">
			<table style="border: none;vertical-align: top;border-bottom: none;">
				<tr style="border: none;vertical-align: top;">
				
					<td style="border: none;text-align:center" >
						<center>AWB No:<br><img alt="testing" class="img_bar" src="barcode/barcode.php?codetype=Code39&amp;size=40&amp;text=<?=$bar[$is]?>&amp;" style="width: 80%;height:40px"><br><b style="font-size:20px;font-weight:900;"><?=$bar[$is]?></b></center>
					</td>
				</tr>
			<!--	<tr style="border: none;">
									
				</tr>-->
			</table>
		</td>
	</tr>
</table>
<table style="border:none;">
	<tr>
		<td width="38%" style="">
			<table style="border:none;font-size:10px;">
				<tr>
					<td class="bg" width="7%" rowspan="7" style="text-align: center;border-top: none;font-size:12px;border-left: none;border-bottom: none;"><b style="font-weight:bold;writing-mode: vertical-rl;">CONSIGNOR</b></td>
					
					<td style="border:none ;padding:3px;padding-left:10px;">
					<p style="line-height: 14px;font-weight: bold;">
					 <?php if($is_return_awb[$is]==0){ ?>   
					    <b><?=$cust_name[$is]?></b><br>
					    <?=nl2br($cust_address[$is])?>
					    <?php if($gst[$is]!=""){ echo "<br>GST NO: ".$gst[$is]; } ?>
			         <?php }else{ ?>
			         <?php if($code[$is]!=""){ echo "<b style='font-size:14px;font-weight:900;'>CODE : ".$code[$is]."</b><br>"; } ?>
					    <b><?php echo $client_name[$is];  ?></b><br>
					     <?=nl2br($client_address[$is])?>
					    <?php if($client_city[$is]!=""){ echo "<br>".$client_city[$is]; } ?>
					    <?php if($client_state[$is]!=""){ echo ",".$client_state[$is]; } ?><?php if($pincode[$is]!=""){ echo "-".$pincode[$is]; } ?>
					    <?php if($client_phone[$is]!=""){ echo "<br>Phone : ".$client_phone[$is]; } ?>
			         
			         <?php }?>
					</p>
					</td>
					<td width="0%" style="border:none ;padding:0px;">
					    <p style="border:none ;padding:0px;min-height:140px;"></p>
					</td>
				</tr>
				
			</table>
		</td>
		<td width="50%" style="vertical-align:top;">
			<table style="border:none;font-size:10px;">
				<tr>
					<td class="bg" width="7%" rowspan="7" style="text-align: center;font-size:12px;border-left: none;border-bottom: none;border-top: none;"><b style="font-weight:bold;writing-mode: vertical-lr;">CONSIGNEE</b></td>
					
				<td style="border:none ;padding:3px;padding-left:10px;">
					<p style="line-height: 14px;font-weight: bold;">
				 <?php if($is_return_awb[$is]==0){ ?>
					    <?php if($code[$is]!=""){ echo "<b style='font-size:14px;font-weight:900;'>CODE : ".$code[$is]."</b><br>"; } ?>
					    <b><?php echo $client_name[$is];  ?></b><br>
					     <?=nl2br($client_address[$is])?>
					    <?php if($client_city[$is]!=""){ echo "<br>".$client_city[$is]; } ?>
					    <?php if($client_state[$is]!=""){ echo ",".$client_state[$is]; } ?><?php if($pincode[$is]!=""){ echo "-".$pincode[$is]; } ?>
					    <?php if($client_phone[$is]!=""){ echo "<br>Phone : ".$client_phone[$is]; } ?>
				<?php }else{ ?>
				    <b><?=$cust_name[$is]?></b><br>
					    <?=nl2br($cust_address[$is])?>
					    <?php if($gst[$is]!=""){ echo "<br>GST NO: ".$gst[$is]; } ?>
				<?php } ?>
					</p>
					</td>
					<td width="0%" style="border:none ;padding:0px;vertical-align:top;">
					    <p style="border:none ;padding:0px;min-height:140px;"></p>
					</td>
				</tr>
			</table>
		</td>

		
	</tr>

	<tr>
			<td colspan="2" style="border-bottom:none;">
				<table style="border:none;text-align: center;font-size: 10px;">
					<tr>
					<td  rowspan="6" width="43%" style="vertical-align:top;padding-left:2px;padding-right:2px;padding-top:2px;border-top-color:white;border-left-color: white;border-bottom:none;">
						<table style="text-align: center;">
							<tr>
								<td class="bg" colspan="5" style="border-bottom:none;">DIMENSIONS</td>
							</tr>
							<tr style="border:none;font-size:12px;">
								<td class="bg" style="padding:2px;border:none;">Length</td>
								<td class="bg" style="padding:2px;border:none;">Width</td>
								<td class="bg" style="padding:2px;border:none;">Height</td>
								<td class="bg" style="padding:2px;border:none;">No of Box</td>
								<td class="bg" style="padding:2px;border:none;">Act WT</td>
							</tr>
						<tr  style="vertical-align: center;font-size:12px;">
								<td style="padding:2px;"><b><? if($length1[$is]!="" && $length1[$is]!="0" && $length1[$is]!="0.00"){ echo $length1[$is]; } ?></b>&nbsp;</td>
								<td style="padding:2px;"><b><? if($width1[$is]!="" && $width1[$is]!="0" && $width1[$is]!="0.00"){ echo $width1[$is]; } ?> </b>&nbsp;</td>
								<td style="padding:2px;"><b><? if($height1[$is]!="" && $height1[$is]!="0" && $height1[$is]!="0.00"){ echo $height1[$is]; } ?> </b>&nbsp;</td>
								<td style="padding:2px;"><b><? if($nob1[$is]!="" && $nob1[$is]!="0" && $nob1[$is]!="0.00"){ echo $nob1[$is]; } ?> </b>&nbsp;</td>
								<td style="padding:2px;"><b><? if($act_wt1[$is]!="" && $act_wt1[$is]!="0" && $act_wt1[$is]!="0.00"){ echo $act_wt1[$is]; } ?> </b>&nbsp;</td>
							</tr>
								<tr  style="vertical-align: center;font-size:12px;">
								<td style="padding:2px;"><b><? if($length2[$is]!="" && $length2[$is]!="0" && $length2[$is]!="0.00"){ echo $length2[$is]; } ?></b>&nbsp;</td>
								<td style="padding:2px;"><b><? if($width2[$is]!="" && $width2[$is]!="0" && $width2[$is]!="0.00"){ echo $width2[$is]; } ?> </b>&nbsp;</td>
								<td style="padding:2px;"><b><? if($height2[$is]!="" && $height2[$is]!="0" && $height2[$is]!="0.00"){ echo $height2[$is]; } ?> </b>&nbsp;</td>
								<td style="padding:2px;"><b><? if($nob2[$is]!="" && $nob2[$is]!="0" && $nob2[$is]!="0.00"){ echo $nob2[$is]; } ?> </b>&nbsp;</td>
								<td style="padding:2px;"><b><? if($act_wt2[$is]!="" && $act_wt2[$is]!="0" && $act_wt2[$is]!="0.00"){ echo $act_wt2[$is]; } ?> </b>&nbsp;</td>
							</tr>
							
								<tr  style="vertical-align: center;font-size:12px;">
								<td style="padding:2px;"><b><? if($length3[$is]!="" && $length3[$is]!="0" && $length3[$is]!="0.00"){ echo $length3[$is]; } ?></b>&nbsp;</td>
								<td style="padding:2px;"><b><? if($width3[$is]!="" && $width3[$is]!="0" && $width3[$is]!="0.00"){ echo $width3[$is]; } ?> </b>&nbsp;</td>
								<td style="padding:2px;"><b><? if($height3[$is]!="" && $height3[$is]!="0" && $height3[$is]!="0.00"){ echo $height3[$is]; } ?> </b>&nbsp;</td>
								<td style="padding:2px;"><b><? if($nob3[$is]!="" && $nob3[$is]!="0" && $nob3[$is]!="0.00"){ echo $nob3[$is]; } ?> </b>&nbsp;</td>
								<td style="padding:2px;"><b><? if($act_wt3[$is]!="" && $act_wt3[$is]!="0" && $act_wt3[$is]!="0.00"){ echo $act_wt3[$is]; } ?> </b>&nbsp;</td>
							</tr>
							
								<tr  style="vertical-align: center;font-size:12px;">
								<td style="padding:2px;"><b><? if($length4[$is]!="" && $length4[$is]!="0" && $length4[$is]!="0.00"){ echo $length4[$is]; } ?></b>&nbsp;</td>
								<td style="padding:2px;"><b><? if($width4[$is]!="" && $width4[$is]!="0" && $width4[$is]!="0.00"){ echo $width4[$is]; } ?> </b>&nbsp;</td>
								<td style="padding:2px;"><b><? if($height4[$is]!="" && $height4[$is]!="0" && $height4[$is]!="0.00"){ echo $height4[$is]; } ?> </b>&nbsp;</td>
								<td style="padding:2px;"><b><? if($nob4[$is]!="" && $nob4[$is]!="0" && $nob4[$is]!="0.00"){ echo $nob4[$is]; } ?> </b>&nbsp;</td>
								<td style="padding:2px;"><b><? if($act_wt4[$is]!="" && $act_wt4[$is]!="0" && $act_wt4[$is]!="0.00"){ echo $act_wt4[$is]; } ?> </b>&nbsp;</td>
							</tr>
								<tr  style="vertical-align: center;font-size:12px;">
								<td style="padding:2px;"><b><? if($length5[$is]!="" && $length5[$is]!="0" && $length5[$is]!="0.00"){ echo $length5[$is]; } ?></b>&nbsp;</td>
								<td style="padding:2px;"><b><? if($width5[$is]!="" && $width5[$is]!="0" && $width5[$is]!="0.00"){ echo $width5[$is]; } ?> </b>&nbsp;</td>
								<td style="padding:2px;"><b><? if($height5[$is]!="" && $height5[$is]!="0" && $height5[$is]!="0.00"){ echo $height5[$is]; } ?> </b>&nbsp;</td>
								<td style="padding:2px;"><b><? if($nob5[$is]!="" && $nob5[$is]!="0" && $nob5[$is]!="0.00"){ echo $nob5[$is]; } ?> </b>&nbsp;</td>
								<td style="padding:2px;"><b><? if($act_wt5[$is]!="" && $act_wt5[$is]!="0" && $act_wt5[$is]!="0.00"){ echo $act_wt5[$is]; } ?> </b>&nbsp;</td>
							</tr>
							

						</table>				
					</td>
					<td  style="vertical-align:top;padding-left:2px;border-top-color:white; border-bottom:none;padding-top:2px;padding-right:2px;">
					    <table style="text-align: center;font-size:12px;">	
					    	<tr  style="vertical-align: center;">
								<td class="bg" style="padding:2px;border-bottom:none;">INVOICE NO</td>
								<td class="bg" style="padding:2px;border-bottom:none;">INVOICE VALUE</td>
								<td class="bg" style="padding:2px;border-bottom:none;">E-WAY BILL NO</td>
							</tr>
								<tr  style="vertical-align: center;">
								<td  style="padding:2px;border-top:none;"><b><?=no_limit($invoice_no[$is])?></b>&nbsp;</td>
								<td  style="padding:2px;border-top:none;"><b><?=no_limit($invoice_value[$is])?></b>&nbsp;</td>
								<td  style="padding:2px;border-top:none;"><b><?=no_limit($e_way_bill_no[$is])?></b>&nbsp;</td>
							</tr>
							<tr  style="vertical-align: center;">
								<td class="bg" style="padding:2px;border-bottom:none;">NO Of PCS</td>
								<td class="bg" style="padding:2px;border-bottom:none;">ACTUAL WEIGHT</td>
								<td class="bg"  style="padding:2px;border-bottom:none;">CHARGED WEIGHT</td>
							</tr>
							<tr  style="vertical-align: center;">
								<td style="padding:2px;border-top:none;"><b><?=$pieces[$is]?></b>&nbsp;</td>
								<td style="padding:2px;border-top:none;"><b><?=$a_weights[$is]?></b>&nbsp;</td>
								<td style="padding:2px;border-top:none;" ><b><!--<?=$c_weights[$is]?>--></b>&nbsp;</td>
							</tr>
							
							<!--<tr  style="vertical-align: center;">
								<td class="bg" colspan="3" style="padding:2px;border:none;border-bottom:none;"><b>DESCRIPTION OF GOODS</b></td>
							</tr>
							<tr  style="vertical-align: center;">
								<td colspan="3" style="padding:2px;border-top:none;"><b><?=$content_desc[$is]?></b>&nbsp;</td>
							</tr>-->
							<tr  style="vertical-align: center;">
								<td class="bg" style="padding:2px;border-bottom:none;">DESCRIPTION OF GOODS</td>
								<td class="bg" style="padding:2px;border-bottom:none;">DOCKET TYPE</td>
								<td class="bg"  style="padding:2px;border-bottom:none;"><?php if($is_return_awb[$is]==0){ echo "";}else{ echo '';}?></td>
							</tr>
							<tr  style="vertical-align: center;">
								<td style="padding:2px;border-top:none;"><b><?=$content_desc[$is]?></b>&nbsp;</td>
								<td style="padding:2px;border-top:none;"><b><?php if($is_return_awb[$is]==0){ echo "FORWARD";}else{ echo "REVERSE";}?></b>&nbsp;</td>
								<td style="padding:2px;border-top:none;" ><b><?php if($is_return_awb[$is]==0){ echo "";}else{ echo '';}?></b>&nbsp;</td>
							</tr>
							
							<tr  style="vertical-align: center;">
								<td  class="bg" colspan="3" style="padding:2px;"><b>RECEIVED IN GOODS CONDITION</b></td>
							</tr>
						
						</table>
					    
					</td>
					</tr>
				</table>

			</td>
	</tr>
	<tr>
			<td colspan="2" style="border-top: none;vertical-align:top;">
				<table style="border:none;text-align: center;font-size: 10px;vertical-align:top;">
					<tr>
					    <td style="padding-left: 5px;padding: 2px;border-top: none;border-left: none;vertical-align:top;" width="13%">
					            <!--<img src="img/qrcode.png" >-->
					            <img width="80%" src="https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl=https://speedlinkservices.com/track_details.php?track_id=<?php echo $bar[$is] ?>&choe=UTF-8" title="Speedlink Services" />
					        <span style="font-size:9px;">Scan QR Code For Your Shipment Tracking...</span>
					        </td>
						<td style="padding-left: 5px;padding: 2px;border-top: none;border-left: none;vertical-align:top;" width="30%">
							<table style="border:none;font-size: 10px;">
							<tr>
									<td  colspan="2" style="border:none;text-align: center;padding: 2px;">
										<b style="font-size: 10px;text-align: center;">Consignor's Declaretion</b>
									</td>
								</tr>
								<tr>
									<td colspan="2" style="border:none;text-align: left;padding-left: 5px;padding: 2px;"><p>I / We have read carefully & verified the contents filled in this Docket and agree to the terms and coditions printed overleaf of the Docket and will pay all charges as per tariff mentioned in this Docket or as per the agreement.</p></td>
								</tr>
								<!--<tr>
									<td style="border:none;text-align: left;padding: 2px;height: 60px;vertical-align: bottom;text-align:center;"><b>Signature</b></td>
									<td style="border:none;text-align: left;padding: 2px;height: 60px;vertical-align: bottom;text-align:center;"><b>Date : </b></td>
								</tr>-->
								<tr>
									<td style="border:none;text-align: left;padding: 2px;height: 15px;vertical-align: bottom;text-align:center;" colspan="2"><b>For </b></td>
								</tr>
								<tr>
									<td style="border:none;text-align: left;padding: 2px;height: 15px;vertical-align: bottom;text-align:center;" colspan="2"><b><?=$cust_name[$is]?> </b></td>
								</tr>
							</table>
</td>
						<td rowspan="2" style="vertical-align:top;padding: 2px;border-top: none;border-right: none;border-bottom: none;">
							
							<table style="border:none;font-size: 8px;font-weight: bold;text-align:left;">
							    
								<tr>
									<td width="50%" style="border:none;padding: 2px;padding-top: 5px;opacity: 0.5;font-weight: 900;">NAME</td>
									<td style="border:none;padding: 2px;padding-top: 5px;padding-left: 30px;font-weight: 900;opacity: 0.5;">DATE & TIME</td>
								</tr>
								<tr>
									<td style="border:none;padding: 2px;height: 90px;opacity: 0.5;font-weight: 900;">SEAL</td>
									<td style="border:none;padding: 2px;height: 90px;padding-left: 30px;opacity: 0.5;font-weight: 900;">RELATION</td>
								</tr>
								
								<tr>
									<td style="border:none;padding: 1px;padding-bottom: 3px;vertical-align:bottom;opacity: 0.5;font-weight: 900;">SIGNATURE</td>
									<td style="border:none;padding: 2px;padding-bottom: 1px;padding-left: 30px;vertical-align:bottom;opacity: 0.5;font-weight: 900;">REMARK</td>
								</tr>
							</table>

						</td>
					</tr>
				
				</table>
			</td>
	</tr>
</table>
</td style="border-bottom: none;">
<td style="border: none;padding:5px;" class="bg">
<b style="font-weight:bold;writing-mode: vertical-rl;"><?php  if($i==1){ echo "CONSIGNOR";}else if($i==2){ echo "CONSIGNEE"; }else if($i==3){ echo "POD";}else{ echo "ACCOUNTS";}?></b>
</td>
</tr>
</table>

<?php if($i%2==1){ ?>
<hr class="dashed">

<?php if($i==2 || $i==4){ ?></div><?php } ?>

<?php }else{ } } 
 ?>
<?php   }?>
</body>
<style type="text/css">
	table,th {
  border: 1px solid;
}
td {
  border: 1px solid;
  padding: 0px;
}

table {
  width: 100%;
  border-collapse: collapse;
}
.watermark {
  display: block;
  position: relative;
}

.watermark::after {
  content: "";
    background: url(img/logo.png);
    opacity: 0.07;
    top: 10%;
    left: 16%;
    bottom: 0%;
    background-size: 500px 300px;
    background-repeat: no-repeat;
    right: 0%;
    text-align: center;
    position: absolute;
    z-index: -1; 
}

 @page{
     size: auto;   /* auto is the initial value */ 
    margin: 5mm 5mm 5mm 5mm;
 }
@media print  
{ 
    * {
         
        -webkit-print-color-adjust: exact;
    }
     
    
}
.bg{
   
   color: black;
   /*font-weight: bold;*/
   -webkit-print-color-adjust: exact; 
   }
   .dashed {border-style: dashed;
    margin-top: 25px;
    margin-bottom: 25px;
   }
   .old-dashed {border-style: dashed;
    margin-top: 25px;
    margin-bottom: 25px;
   }
</style>

Zerion Mini Shell 1.0