<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';

$cari	= $_GET['cari'];

echo "<table id='theList' width='100%'>
		<tr>
			<th width='2%'>No.</th>
			<th>Kode</th>
			<th>Nama Kelompok</th>
			<th>Kategori</th>
		</tr>";
	if (!empty($cari))
		$sql= "SELECT * FROM st_group WHERE (nama_gr LIKE '%$cari%' OR kategori LIKE '%$cari%' ) ORDER by kode_gr";		
	else
		$sql= "SELECT * FROM st_group ORDER by kode_gr";
	
	$query = mysql_query($sql);
		
	$no=1;
	while($r_data=mysql_fetch_array($query)){
		echo "<tr>
			<td align='center'>$no</td>
			<td align='center'>$r_data[kode_gr]</td>
			<td>$r_data[nama_gr]</td>
			<td>$r_data[kategori]</td>					
		</tr>";
		$no++;
	}	
	echo "</table>";
?>