<script type="text/javascript">
$(document).ready(function() {
    $(function() {
        $("#theList tr:even").addClass("stripe1");
        $("#theList tr:odd").addClass("stripe2");

        $("#theList tr").hover(
            function() {
                $(this).toggleClass("highlight");
            },
            function() {
                $(this).toggleClass("highlight");
            }
        );
    });	
});
</script>
<?php
include '../../inc/inc.koneksi.php';
include '../../inc/fungsi_tanggal.php';

$userid	 = $_GET['userid'];
$tglawal = $_GET['tglawal'];
$tglakhir= $_GET['tglakhir'];

echo "<table id='theList' width='100%'>		
		<tr>
			<th>No.</th>
			<th>Tanggal</th>
			<th>Jam</th>
			<th>User</th>
			<th>Aktivitas</th>
			<th>Nomor Bukti</th>
			<th>Nama Barang</th>
			<th>Keterangan</th>
		</tr>";
		if(!empty($cari))
			$sql= "SELECT * FROM faktur_pj WHERE kode_pl='$userid' AND (nama_st LIKE '%$cari%' OR kode_st LIKE '%$cari%') ORDER BY tanggal";
		else
			$sql= "SELECT * FROM faktur_pj WHERE kode_pl='$userid' ORDER BY tanggal";
		$query = mysql_query($sql);
		
		$no=1;
		while($r=mysql_fetch_array($query)){
			echo "<tr>
				<td align='center'>$no</td>
				<td>".jin_date_str($r['tanggal'])."</td>
				<td align='center'>$r[jam]</td>
				<td>$r[user]</td>
				<td>$r[aktivitas]</td>
				<td>$r[no_bukti]</td>
				<td>$r[nama_st]</td>
				<td>$r[keterangan]</td>
			</tr>";
			$no++;
		}
	echo "</table>";
?>