<script type="text/javascript">	
$(document).ready(function() {
    var cari 	= $("#txt_cari").val();
	$("#tabs").tabs({selected:0});
	$("#form").load('modul/customer/form.php');
	$("#tampil_data").load('modul/customer/tampil_data.php?cari='+cari);
	
	$("#txt_cari").keyup(function(){
		var cari 	= $("#txt_cari").val();
		
		$.ajax({
			type	: "GET",
			url		: "modul/customer/tampil_data.php",
			data	: "cari="+cari,
			success	: function(data){
				$("#tampil_data").html(data);
			}
		});
	});
	
	$("#cetak_cs").click(function(){
		window.location.href='modul/laporan/daftar_pl.php';
	});
	
	$("#tutup_cs").click(function(){
		document.location='?module=home';
	});
	
	$("#tutup_disk").click(function(){
		document.location='?module=home';
	});
});
</script>


<style type="text/css">
#info {
	font-size:12px;
	font-weight:bold;
	color:#F00;
}
</style>
<?php
echo "<div id='tabs'>";
echo "<ul >
	       <li><a href='#form'>BUAT DATA PELANGGAN</a></li>
	       <li><a href='#data'>DAFTAR PELANGGAN</a></li>
      </ul>";
	echo "<div id='form'></div>";
	
	echo "<div id='data'>
		<div id='pencarian'>
			<fieldset>
			<legend>Filter Data</legend>
			
			<input type='text' name='txt_saldo' id='txt_saldo' size='10' class='input' hidden />
			<table width='100%'>
				<tr>
					<td>Cari data : <input type='text' name='txt_cari' id='txt_cari' size='50'></td>
					<td align='right'>
						<button name='cetak_cs' id='cetak_cs'>Cetak</button>
						<button name='tutup_cs' id='tutup_cs'>Tutup</button>
					</td>
				</tr>
			</table>
			</fieldset>
			<div id='tampil_data' align='center' style='overflow-x: auto;height: 400px;scroll-behavior: smooth'></div>
		</div><br>
	</div>";
	
echo "<div id='info' align='center'></div>";

echo "</div>";
?>
