<script type="text/javascript">	
	window.print();
</script>

<?php
	include '../../inc/inc.koneksi.php';
	
	$tgllap =date('d-m-Y');
		
	$sql	= mysql_query("SELECT * FROM company");
	$r	= mysql_fetch_assoc($sql);
	$kop1 = $r[nama1];
	$kop2 = $r[nama2];
	$kop3 = $r[alamat];
	
	echo "<table width='100%'>
		<tr>
			<td style='font:arial 11px'><b>$kop1</b></td>
		</tr>
		<tr>
			<td style='font:arial 11px'>$kop2</td>
		</tr>
		<tr>
			<td style='font:arial 11px'>$kop3</td>
		</tr>
	</table>
		
	<table width='100%'>
		<tr>
			<td align='center' style='font:arial 14px'><b>DAFTAR PENGEMUDI</b></td>
		</tr>
		<tr>
			<td align='center' style='font:arial 14px'><b>PER TANGGAL $tgllap</b></td
		</tr>
	</table>
	<br>
	
	<table width='600' border='1' style='font:11px arial;border-collapse:collapse'>
		<tr>
			<th>No.</th>
			<th>Kode</th>
			<th>Nama Pengemudi</th>
			<th>Alamat</th>
			<th>Nomor HP</th>
		</tr>";
	
		$query = mysql_query("SELECT * FROM driver ORDER BY kode_sl");
		
		$no=1;
		while($r_data=mysql_fetch_array($query)){
			echo "<tr>
				<td align='center'>$no</td>
				<td>$r_data[kode_dv]</td>
				<td>$r_data[nama_dv]</td>
				<td>$r_data[alamat]</td>
				<td>$r_data[nomorhp]</td>
			</tr>";
			$no++;
		}
	echo "</table>";
?>