<?php
	ob_start();

$veh_num='';
$sdate_12 ='';
$page='1';
include("include/config.php");
require_once "include/Database_functions.php";
$sqlObj=new sqlclass();
	$ids = $_REQUEST['val'];
	$packcode =  $_REQUEST['pack'];
 	/*$sq_arr=mysql_query("select * from cf_vehicle where id = '".$ids."' ");
	$row = mysql_fetch_array($sq_arr);
	*/

$i=1;
$sq_arr="select * from cf_package_sub join cf_brand on cf_package_sub.brnch_id = cf_brand.brand_id join cf_liter on cf_liter.liter_id = cf_package_sub.litre_id   where cf_package_sub.pack_id = '$ids' ";
$sq_arr.=" order by cf_package_sub.pack_sub_id desc ";
$query=$sq_arr;
//echo $query;
$function="Searchdate";
include("pagingserch.php");
$sq_arr.=" LIMIT $start, $limit";

if(isset($_REQUEST['page'])){
$page=$_REQUEST['page'];
}else{
$page=1;
}

$array=mysql_query($sq_arr);
 ?>
<div class="viewEmployeeWrap" >
    <div class="viewEmployee">
  
    <h6 class="h6">Package Details of (PK-<?=$packcode?>)</h6>
     
      <table  border="0" cellspacing="0" cellpadding="0" class="tableList"  style="margin-left:20px; ">
  <tr class="heading">
    <td>No</td>    
    <td>Brand</td>
	
    <td>Liter</td>   
	<td>Quantity</td>    
	<td>Box</td>     
    <td>Date</td>
  </tr>
  
  <?php

$master = '';
$notification = '';
$trip = '';
$accounting = '';
$accpay = '';
$report = '';



$array=mysql_query($sq_arr);
if($array && mysql_num_rows($array)>0){
$pagecnt=$start;
while($res=mysql_fetch_array($array))
{
$pagecnt++;
  ?> 
  <tr>
    <td><?php echo $pagecnt;?></td>
    <td><?php echo $res['brand_name'];?></td>
	<td><?php echo $res['liter_qty'];?></td>     
    <td><?php echo $res['pack_qty'];?></td> 
    <td><?php echo $res['pack_box'];?></td>     
    <td><?php echo date(('d-m-Y'),strtotime($res['package_date']));?></td>     
        
    
  </tr>
  <?php 
    }}else{?>
	 <tr>
    <td class="errorMessage"  style="border-right:0px;border-bottom:0px; "><font color="#FF0000">No Records Found</font></td></tr>
	<? }
  ?>
</table>
     
    
    
    
    <?php /*?> <div><p style="float:right;"><a href="vechicle-details-entry.php?id=<?php echo $row['id']; ?>" style="background-color:#0099FF; text-align:center; padding:3px 10px; color:#FFFFFF; border-radius:3px;">Edit</a></p></div><?php */?>
    
     
    </div>
     
     </div>