<?php
if($xls == 1 ) {
header("Content-Disposition: attachment; filename=\"STB_QC.xls\"");
header("Content-Type: application/vnd.ms-excel");	
}
$this->load->view('includes/header.php');
echo '<font class="title">'.$menu_path.'</font>';
echo '<br>';
echo '<br>';
			/* Display system message */
			$this->fungsi->disp_sys_msg();
			echo validation_errors('<p class="field_error">', '</p>');
			
			//foreach ($cpv_pus  as $cpv_puss)
?>

<style type="text/css" media="print">
.no-print		{ display:none; }
</style>
<script language="Javascript1.2">
  <!--
  function printpage() {
  window.print();
  }
  //-->
</script>
<?php
if($xls == 0 ) {
	?>
<input type="button" class="no-print" value="Print this Page" onclick="window.print();">
<form name="form1" method="post" action="<?php echo $form_action ?>">
  <input type="submit" name="button" class="no-print" id="button" value="Export To Excel" />
</form>
<?php } ?>
<table width="1113" border="1" cellpadding="1" cellspacing="1" bordercolor="#000000">
  <tr>
    <th width="124" height="41">STB. NO</th>
    <th width="86">STB DATE</th>
    <th width="195">SUMBER</th>
    <th width="109">WATER CONTENT</th>
    <th width="84">FATTY ACID</th>
    <th width="93">DENSITY</th>
    <th width="88">RESIDU</th>
    <th width="91">FUEL</th>
  </tr>
<?php 
$total = 0;
foreach ($cpv_data as $cpv_datas)
{ 

if($bg==0)
											   {
											   echo '<tr style=background-color:#eeeeee;>';
											   $bg++;
											   }
											else
												{
												echo '<tr style=background-color:#;>';
												$bg--;
												}		


?>  
    
      <td><?php echo $cpv_datas->idstb; ?></td>
    <td ><?php echo  date("d.m.Y", strtotime($cpv_datas->posting)) ; ?></td>
    <td><?php echo $cpv_datas->suppname; ?></td>
    <td align="center"><?php echo $cpv_datas->qcair; ?></td>
    <td align="center"><?php echo $cpv_datas->qctbk; ?></td>
    <td align="center"><?php echo $cpv_datas->qct; ?></td>
    <td align="center"><?php echo $cpv_datas->qcresidu; ?></td>
    <?php /*?><td align="right"><?php 
	if($this->session->userdata('uid')=='sugeng')
	{
		echo number_format($cpv_datas->amount_trf);
	}
	else
	{
	echo $this->fungsi->format_idr($cpv_datas->amount_trf); 
	}
	?></td><?php */?>
    <td align="center"><?php echo $cpv_datas->qcbakar; ?></td>
    
    </tr>
<?php 
$total = $cpv_datas->vol + $total;
}
?>
<tr>
    <td bgcolor="#FFFF00">&nbsp;</td>
    <td bgcolor="#FFFF00">&nbsp;</td>
    <td bgcolor="#FFFF00">&nbsp;</td>
    <td bgcolor="#FFFF00">&nbsp;</td>
    <td bgcolor="#FFFF00">&nbsp;</td>
    <td bgcolor="#FFFF00">&nbsp;</td>
    
    <td align="right" bgcolor="#FFFF00">&nbsp;</td>
    <td align="right" bgcolor="#FFFF00">&nbsp;</td>
  </tr>
</table>
 <?php
if ( ! empty($link))
	{
		echo '<p id="bottom_link" class="no-print">';
		foreach($link as $links)
		{
			echo $links . ' ';
		}
		echo '</p>';
	}
$this->load->view('includes/footer.php');
	?>
