<table width="100%"  border="0" cellspacing="4" cellpadding="4">
  <tr>
    <td width="81%"><strong>SURAT MASUK PIDSUS LAPORAN TERJADINYA TINDAK PIDANA KORUPSI </strong></td>
    <td width="19%">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2">&nbsp;      </td>
  </tr>
  <tr>
    <td colspan="2"><table width="100%"  border="0" align="center" cellpadding="4" cellspacing="4" class="panel">
      <tr>
        <td><table width="100%"  border="0" cellspacing="4" cellpadding="4">
          <tr>
            <td width="12%" bgcolor="#FFCC00"><div align="center">TIPS</div></td>
            <td width="88%">Pencatatan laporan masuk ini adalah olah digital dari data sumber manual ke elektronik. beberapa data yang sangat penting agar tidak disertakan dalam aplikasi 'inisial&quot; atau gunakan minimal data hingga proses penuntutan baru dilakukan perbaikan. </td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td colspan="2"></td>
  </tr>
  <tr>
    <td colspan="2">&nbsp;</td>
  </tr>
  <tr bgcolor="#CCCCCC">
    <td colspan="2"><table width="100%"  border="0" cellspacing="2" cellpadding="2">
      <tr>
        <td><table width="100%"  border="0" cellspacing="6" cellpadding="6">
          <tr>
            <td valign="top" bgcolor="#FF99CC">LAPORAN / PENGADUAN MASUK DAN TELAH LOLOS TELAHAAN | PENYIDIKAN DILAKUKAN OLEH KEJAKSAAN </td>
          </tr>
          <tr>
            <td valign="top"><?
mysql_connect("localhost", "root", "benk");
mysql_select_db("cma_pidsus");
$mytable = "p_laporan";
if(empty($action))
{
if (empty($order)) $order =  2;
if (empty($page))  $page  =  1;
if (empty($hits))  $hits  = 20;
$start = $hits*($page-1);
$query = "SELECT * FROM $mytable where p_tsk !=''";
$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 "LAPORAN/PENGADUAN <strong>$xnum</strong> | ";
for ($i=1;$i<=$stw2;$i++) {if($page==$i){
echo "Halaman <b>$i</b> ";} 
else{echo " <font size=\"2\"><a href=\"?id=$id1&page=$i\">$i</A></font> ";}}
print ('<br><br>');
$query  = "SELECT * FROM ".$mytable." ";
if(!empty($squery)) { $query .= "WHERE uid LIKE \"%$squery%\" ";}
$query .= "where p_tsk !='' ORDER BY p_uid DESC LIMIT $start,$hits";
$res = mysql_query($query);
print ('<table id="myTable" width="100%"  border="0" cellspacing="1" cellpadding="1" bgcolor="#663333">
        <thead><tr>
<td width="5%"><span class="style1"><strong>NO</strong></span></td>

<td width="35%"><span class="style1"><strong>NAMA TERSANGKA</strong></span></td>
<td width="30%"><span class="style1"><strong>PASAL</strong></span></td>
<td width="30%"><span class="style1"><strong>KASUS POSISI</strong></span></td>

</tr></thead><tbody>');
 $x=0;
  while($row = mysql_fetch_array($res))
  {
   $x++;
   if($x==2) {$barva = "CB9898";$x=0;} else {$barva = "FFCCFF";$x=1;}


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




print ('<td>'.$row['p_tsk'].'</td>');
print ('<td>'.$row['p_pasal'].'</td>');
print ('<td>'.$row['p_kasusposisi'].'</td>');





//print ('<td>');
//if ($row['uid_laporan'] == "") {
//print ('<a href="?g=perkaraview1&d=inc&id='.$row['uid'] .'" class="menupidsus">LIHAT</a>');
//} 
 //elseif ($row['uid_laporan'] !== "") {
//print ('<a href="?g=perkaraview2&d=inc&id='.$row['uid'] .'" class="menupidsus">LIHAT</a>');
// } 
//print ('</td>');










print ('</tr>');
}
print ('</tbody></table>');
echo "<br><br>Ditampilkan $hits /Halaman";
}
?></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td colspan="2">&nbsp;</td>
  </tr>
  <tr bgcolor="#CCCCCC">
    <td colspan="2"><table width="100%"  border="0" cellspacing="2" cellpadding="2">
      <tr>
        <td><table width="100%"  border="0" cellspacing="6" cellpadding="6">
            <tr>
              <td valign="top" bgcolor="#FF99CC">SPDP MASUK </td>
            </tr>
            <tr>
              <td valign="top"><?
mysql_connect("localhost", "root", "benk");
mysql_select_db("cma_pidsus");
$mytable = "p_perkara";
if(empty($action))
{
if (empty($order)) $order =  2;
if (empty($page))  $page  =  1;
if (empty($hits))  $hits  = 20;
$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 "DAFTAR PERKARA / SPDP <strong>$xnum</strong> | ";
for ($i=1;$i<=$stw2;$i++) {if($page==$i){
echo "Halaman <b>$i</b> ";} 
else{echo " <font size=\"2\"><a href=\"?id=$id1&page=$i\">$i</A></font> ";}}
print ('<br><br>');
$query  = "SELECT * FROM ".$mytable." ";
if(!empty($squery)) { $query .= "WHERE uid LIKE \"%$squery%\" ";}
$query .= "ORDER BY uid DESC LIMIT $start,$hits";
$res = mysql_query($query);
print ('<table id="myTable" width="100%"  border="0" cellspacing="1" cellpadding="1" bgcolor="#663333">
        <thead><tr>
<td width="5%"><span class="style1"><strong>NO</strong></span></td>
<td width="10%"><span class="style1"><strong>SUMBER PENYIDIKAN</strong></span></td>
<td width="25%"><span class="style1"><strong>NAMA TERSANGKA</strong></span></td>
<td width="35%"><span class="style1"><strong>PASAL</strong></span></td>
<td width="25%"><span class="style1"><strong>POSISI TAHAP</strong></span></td>



</tr></thead><tbody>');
 $x=0;
  while($row = mysql_fetch_array($res))
  {
   $x++;
   if($x==2) {$barva = "CB9898";$x=0;} else {$barva = "FFCCFF";$x=1;}


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

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


print ('<td>'.$row['spdp_namatsk'].'</td>');
print ('<td>'.$row['spdp_pasal'].'</td>');

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














print ('</tr>');
}
print ('</tbody></table>');
echo "<br><br>Ditampilkan $hits /Halaman";
}
?></td>
            </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
