<?php
if($xls == 1 ) {
header("Content-Disposition: attachment; filename=\"list_supplier.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 } ?>
<br />
<table width="100%" border="1" cellpadding="1" cellspacing="1" bordercolor="#000000">
  <tr>
    <th width="83" bgcolor="#CCCCCC">ID SUPP.</th>
    <th width="84" bgcolor="#CCCCCC">NO. SAP</th>
    <th width="71" height="41" bgcolor="#CCCCCC">PPN</th>
    <th width="69" bgcolor="#CCCCCC">TOP</th>
    <th width="214" bgcolor="#CCCCCC">NAMA</th>
    <th width="356" bgcolor="#CCCCCC">ALAMAT</th>
    <th width="78" bgcolor="#CCCCCC">KOTA</th>
    <th width="245" bgcolor="#CCCCCC">PROV.</th>
    <th width="134" bgcolor="#CCCCCC">NO. TELP.</th>
    <th width="102" bgcolor="#CCCCCC">FAX</th>
    
  </tr>
  <?php 
$bg = 0;
foreach ($supp as $supps)
{ 
											if($bg==0)
											   {
											   echo '<tr style=background-color:#eeeeee;>';
											   $bg++;
											   }
											else
												{
												echo '<tr style=background-color:#;>';
												$bg--;
												}		
?>
       
        
          
            
                 
                    <td align="center"><?php echo $supps->idsupp; ?></td>
                    <td align="center"><?php echo $supps->codevendor; ?></td>
                    <td align="center"><?php if($supps->ppn==0 ) { echo 'Tidak'; } else {echo 'Ya'; } ?></td>
    <td align="center"><?php echo $supps->desc; ?></td>
                  <td><?php echo $supps->suppname; ?></td>
              <td align="left"><?php echo $supps->addr; ?></td>
            <td><?php echo $supps->city; ?></td>
            <td><?php echo $supps->prov; ?></td>
        <td align="center"><?php echo $supps->phone; ?></td>
      <td align="center"><?php echo $supps->fax; ?></td>
  </tr>
  <?php 
}
?>
</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');
	?>
