<LINK href="images/index.css" rel="stylesheet" type="text/css"><table width="100%"  border="0" cellspacing="8" cellpadding="8">
  <tr>
    <td>      <span class="tabContents">
      <?
include("../index.cma.db.php");
mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$mytable = "tab_polisi";
if(empty($action))
{
if (empty($order)) $order =  2;
if (empty($page2))  $page2  =  1;
if (empty($hits))  $hits  = 100;
$start = $hits*($page2-1);
$query = "SELECT * FROM $mytable ORDER BY p_id DESC";
$res = mysql_query("$query"); 
$xnum = mysql_num_rows($res);
$stw2 = (int)($xnum/$hits);
if ($xnum%$hits > 0) {$stw2++;}
$np = $page2+1;
$pp = $page2-1;
if ($page2 == 1) { $pp=1; }
if ($np > $stw2) { $np = $stw2;} 
echo "DAFTAR KEPOLISIAN <strong>$xnum</strong>";
//for ($i=1;$i<=$stw2;$i++) {if($page2==$i){
//echo "<b> HAL $i |</b> ";} 
//else{echo "<a href=\"?g=pratut&i=index&page2=$i#tab1\"> $i |</a>";}}
print ('<br><br>');
$query  = "SELECT * FROM $mytable ";
if(!empty($squery)) { $query .= "LIKE \"%$squery%\" ";}
$query .= "ORDER BY p_id DESC LIMIT $start,$hits";
$res = mysql_query($query);
print ('<table class="tableWithFloatingHeader" width="100%"  border="0" cellspacing="1" cellpadding="1" bgcolor="#B05800">
        <thead><tr>
<th width="90%"><strong>UNIT</strong></th>
<th width="10%"><strong>NO</strong></th>

</tr></thead>');
 $x=0;
  while($row = mysql_fetch_array($res))
  {
   $x++;
   if($x==2) {$barva = "FF6600";$x=0;} else {$barva = "FFFFCC";$x=1;}
   
//---------kolom 1
print ('<tbody><tr bgcolor=#'.$barva.'>');
print ('<td><b>'.$row['p_nama'] .'</b></td>');
print ('<td><center><b>'.$row['p_nomor'] .'</b></center></td>');

print ('</tr>');} 
print ('</tbody> </table>');
}
?>
    </span></td>
  </tr>
</table>
