<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Informasi Tilang Online ( Versi Beta )</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="images/index.css" type="text/css" />
<style type="text/css">
<!--
body {
	background-image: url(tilang_bg.jpg);
}
-->
</style>
<style type="text/css">
#fixmetoo { position: absolute; right: 0px; bottom: 0px; width: 100%;
}
body > div#fixmetoo { position: fixed; }
.style1 {color: #FFFFFF}
.style3 {	color: #FFFFFF;
	font-size: 12px;
	font-weight: bold;
}
</style>
</head>

<body>
<div id="fixmetoo" align="center"> 
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><table width="100%"  border="0" cellspacing="2" cellpadding="2">
        <tr>
          <td><strong>BERDASARKAN TANGGAL SIDANG </strong></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td background="tahukahandabg.jpg"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
              <tr>
                <td><?PHP 
mysql_connect("localhost", "root", "benk");
mysql_select_db("cma_tilang");
$month1 = $_GET["month"];
$id1 = $_GET["id"];
$page = $_GET["page"];
$mytable = "$month1";
 if(empty($action))
 {
  if (empty($order)) $order =  2;
  if (empty($page))  $page  =  1;
  if (empty($hits))  $hits  = 100;
  $start = $hits*($page-1);
  //penghitung jumlah isi
  $query2 = "Select * from $mytable";
  $res2 = mysql_query("$query2");
  $xnum2 = mysql_num_rows($res2);
  // $xnum akan menghitung isi dimaksud
  $stw2 = (int)($xnum2/$hits);
  if ($xnum2%$hits > 0) {$stw2++;}
  $np = $page+1;
  $pp = $page-1;
  if ($page == 1) { $pp=1; }
  if ($np > $stw2) { $np = $stw2;} 
  echo "Total Berkas Perkara Tilang Bulan $id1 | <strong>$xnum2</strong> Pelanggar | ";
  for ($i=1;$i<=$stw2;$i++) {if($page==$i){echo "&nbsp;<b><font size=\"4\">$i</font></b>&nbsp;";} else{echo "&nbsp;<font size=\"2\"><a href=\"?month=$month1&id=$id1&page=$i\"> $i </A></font>&nbsp;";}}
  ///menampilkan isi data dari
 // $query  = "SELECT * from $mytable ORDER BY t_index desc LIMIT $start,$hits" ;
 $query2  = "SELECT * from $mytable ORDER BY t_id desc LIMIT $start,$hits" ;
  $res2 = mysql_query($query2);
  echo '<br><br><table id="myTable" cellspacing="1" width="100%" align="center" cellpadding="2" bgcolor="#999999" >';
  echo '<thead><tr>';

    					echo '<td width="4%">Urut</td>';
                       echo ' <td width="8%">No Tilang </td>';
					    echo ' <td width="10%">No Briva</td>';
                       echo ' <td width="7%">Nama</td>';
                       echo ' <td width="7%">Alamat</td>';
                       echo ' <td width="5%">Pasal</td>';
                       echo ' <td width="6%">Barbuk</td>';
                       echo ' <td width="8%">Jumlah Denda </td>';
					   echo '<td width="7%">Biaya Perkara </td>';
					    echo ' <td width="10%">Tgl Putusan </td>';
                       echo ' <td width="8%">Tgl Setor </td>';
                       echo ' <td width="10%">Asal Perkara </td>';
					    echo '<td width="10%">Cara Sidang </td>';
                      
  
  
  
				  
				  
				  
  echo '</tr></thead><tbody>';
  
$no=1; // fungsi nomor
 $x=0;
  while($ar2 = mysql_fetch_array($res2))
  {
   $x++;
   if($x==2) {$barva = "FFFFFF";$x=0;} else {$barva = "FFFFD9";$x=1;}


print ('<tr bgcolor=#'.$barva.'>');
print ('<td><center>'.$no++.'</center></td>');
   
//echo"<td>$ar[p_id]</td>";
  

    echo"
   <td>$ar2[t_nomor]</td>
    <td>$ar2[t_nomorbriva]</td>
   <td>$ar2[t_nama]</td>
   <td>$ar2[t_alamat]</td>
   <td>$ar2[t_pasal]</td>
   <td>$ar2[t_bb]</td>
   
   <td>$ar2[t_denda]</td>
   <td>$ar2[t_biayaperkara]</td>
   <td>$ar2[t_tglsidang]</td>
   <td>$ar2[t_tglambil]</td>
   <td>$ar2[t_asalsurat]</td>
   <td>$ar2[t_hadirverstek]</td>
   </tr>";
  }
  echo "</tbody></table><br>";
  echo "<br>$hits/Halaman";
 }
  ?></td>
              </tr>
          </table></td>
        </tr>
        <tr>
          <td><p>&nbsp; </p></td>
        </tr>
      </table></td>
    </tr>
  </table>
</div>
</body>
</html>
