<table width="100%"  border="0" cellspacing="2" cellpadding="2">
  <tr>
    <td><strong>DAFTAR SETORAN / CICILAN PEMBAYARAN </strong></td>
  </tr>
  <tr>
    <td><table width="100%"  border="0" cellspacing="2" cellpadding="2">
      <tr>
        <td width="82%">Daftar Setoran Uang yang telah dilakukan bidang Datun untuk diketahui pimpinan</td>
        <td width="18%"><a href="?g=setorandatunpost&d=inc" class="menu">TAMBAH BARU </a></td>
      </tr>
    </table>

      <table width="100%"  border="0" cellspacing="4" cellpadding="4">
        <tr>
          <td><?
include("index.db.php");
$page = $_GET["page"];
$mytable = "setoran";
if(empty($action))
{
if (empty($order)) $order =  2;
if (empty($page))  $page  =  1;
if (empty($hits))  $hits  = 100;
$start = $hits*($page-1);
$query = "SELECT * FROM $mytable";
$res = mysql_query("$query"); 
$xnum = mysql_num_rows($res);
$stw2 = (int)($xnum/$hits);
if ($xnum%$hits > 0) {$stw2++;}
$np = $page+1;
$pp = $page-1;
if ($page == 1) { $pp=1; }
if ($np > $stw2) { $np = $stw2;} 
echo "JUMLAH SETORAN <strong>$xnum</strong> | ";
for ($i=1;$i<=$stw2;$i++) {if($page==$i){
echo "Halaman <b>$i</b> ";} 
else{echo " <font size=\"2\"><a href=\"index.page.php?g=setoran&d=inc&page=$i\">$i</A></font> ";}}
print ('<br><br>');
$query  = "SELECT * FROM ".$mytable." ";
if(!empty($squery)) { $query .= "WHERE i_id LIKE \"%$squery%\" ";}
$query .= "ORDER BY d_id DESC LIMIT $start,$hits";
$res = mysql_query($query);
print ('<table id="myTable" width="100%"  border="0" cellspacing="1" cellpadding="1" bgcolor="#B0B0B0">
        <thead><tr>
<td width="5%"><span class="style1"><strong>NO</strong></span></td>
<td width="10%"><span class="style1"><strong>TGL SETOR</strong></span></td>
<td width="20%"><span class="style1"><strong>SETORAN (Rp.)</strong></span></td>
<td width="50%"><span class="style1"><strong>TRANSAKSI & PETUGAS PENERIMA</strong></span></td>
<td width="15%"><span class="style1"><strong>VIEW/PRINT/DEL</strong></span></td>
</tr></thead><tbody>');
 $x=0;
  while($row = mysql_fetch_array($res))
  {
   $x++;
   if($x==2) {$barva = "FFFFFF";$x=0;} else {$barva = "FFFFD9";$x=1;}


print ('<tr bgcolor=#'.$barva.'>');
print ('<td><center>'.$row['d_id'].'</center></td>');
print ('<td>'.$row['d_tglsetor'].'</td>');

print ('<td><b>'.$row['d_senilai'].'</b></td>');

print ('<td><b>'.$row['d_perkara'].'</b><br>');
print (''.$row['d_namapenyetor'].'<br>');
print ('Petugas:'.$row['d_petugas'].'');
print ('</td>');
print ('<td><a href="inc/datun_setoranprint.php?uid='. $row['d_agenda'].'" class="menudatun" target="_blank">VIEW</a></td>');
print ('</tr>');
}
print ('</tbody></table>');
echo "<br><br>Ditampilkan $hits /Halaman";
}
?>
          </td>
        </tr>
      </table>
  </td>
  </tr>
</table>
