<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Customer Master List<?php echo $mode.'/'.$dateFrom.'/'.$dateTo ?></title>
<link rel="stylesheet" href="<?php echo base_url()?>css/stylesheets.css" type="text/css" />
<style media="print" type="text/css">
	/*body{FONT-SIZE: 14px;FONT-FAMILY: Arial;COLOR: #000000}*/
	.printButton { display: none; }
</style>
<script language="javascript" type="text/javascript">	
function do_print(){
	window.print();
}
function do_printexcel(){
	var url = "<?php echo base_url()?>customer/customer_excel/<?php echo $mode?>/<?php echo $dateFrom?>/<?php echo $dateTo?>";
	window.location.href = url;
}
</script>
</head>
<div class="printButton" align="center">
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="0">
    <tr>
        <td align="center" colspan="2">
        	<?php 
			$js = 'onClick="do_print()" class="btn-icon btn-success-form Print" title="Print"';
			echo form_button('Print','<span class="i-printer">',$js);?>&nbsp;&nbsp; <?php
			$js = 'onClick="do_printexcel()" class="btn-icon btn-warning-form EXCEL" title="Download"';
			echo form_button('EXCEL','<span class="i-download">',$js);?>&nbsp;&nbsp; <?php
			$js = 'onClick="javascript:window.close();" class="btn-icon btn-danger-form Close" title="Close"';
			echo form_button('Close','<span class="i-switch">',$js);?>
        </td>
    </tr>
</table>
</div>
<div>
	<table border="1" cellpadding="1" cellspacing="0" width="100%">
		<thead>
		<tr>
			<th class="tac">#</th>
					<th><?php echo $this->lang->line('customerName');?></th>
					<th><?php echo $this->lang->line('city');?></th>
            		<th><?php echo $this->lang->line('phoneNumber1');?></th>
                    <th><?php echo $this->lang->line('fax');?></th> 
                    <th><?php echo $this->lang->line('email');?></th>
                               
		</tr>
		</thead>
		<tbody>
	<?php $bil = 0;
				if($datatbls){
				foreach($datatbls as $datatbl):
				$bil++?>
            	<tr>
              		<td  class="tac"><?php echo $bil; ?></td>
                	<td><?php echo $datatbl->customerName ?></td>
                	<td><?php echo $datatbl->city ?></td>
                    <td><?php echo $datatbl->phoneNumber1 ?></td>
                    <td><?php echo $datatbl->fax ?></td>
                    <td class="tac"><?php echo $datatbl->email ?></td>
                </tr>
            <?php endforeach; }?>
		</tbody>
	</table>                                         
</div>
<div style="page-break-after:always"></div>
</html>
