<table width="100%"  border="0" cellspacing="1" cellpadding="0">
  <tr>
    <td width="9%"><a href="?g=viewsuratjenis&i=index&jenissurat=1" class="menu">UMUM</a></td>
    <td width="9%"><a href="?g=viewsuratjenis&i=index&jenissurat=2" class="menu">DALAM</a></td>
    <td width="12%"><a href="?g=viewsuratjenis&i=index&jenissurat=3" class="menu">NOTA DINAS </a></td>
    <td width="11%"><a href="?g=printspdp&i=index" class="menu">SPDP</a></td>
    <td width="16%"><a href="?g=viewsuratjenis&i=index&jenissurat=5" class="menu">KEPUTUSAN</a></td>
    <td width="13%"><a href="?g=viewsuratjenis&i=index&jenissurat=6" class="menu">PRINT</a></td>
    <td width="13%"><a href="?g=viewsuratjenis&i=index&jenissurat=7" class="menu">PENGANTAR</a></td>
    <td width="17%"><a href="?g=viewsuratjenis&i=index&jenissurat=8" class="menu">RAHASIA</a></td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="8" cellpadding="8">
  <tr>
    <td><table width="100%"  border="0" cellspacing="4" cellpadding="4" class="panel">
      <tr>
        <td><table width="100%"  border="0" cellspacing="6" cellpadding="6">
          <tr>
            <td>Untuk mengulang print Disposisi SPDP klik nama tersangka | Jika kolom jaksa kosong artinya belum ditunjuk gunakan F3 pada keyboard untuk pencarian </td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><?
include("../index.cma.db.php");
mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$query = "Select * from tab_dataperkara where t_id = '1'"; 
$result = mysql_query($query); 
if($row2 = mysql_fetch_array($result)){ 
$mytable = $row2['t_table'];
$edisi = $row2['t_tahun'];
$page2 = $_GET["page2"];
if(empty($action))
{
if (empty($order)) $order =  2;
if (empty($page2))  $page2  =  1;
if (empty($hits))  $hits  = 500;
$start = $hits*($page2-1);
$query = "SELECT * FROM $mytable ORDER BY uid 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 "TOTAL PERKARA $edisi SEBANYAK <strong>$xnum</strong> TERSANGKA | ";
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 uid DESC LIMIT $start,$hits";
$res = mysql_query($query);
print ('<table id="myTable" width="100%"  border="0" cellspacing="1" cellpadding="1" bgcolor="#B05800">
        <thead><tr>
<td width="10%"><span class="style1"><strong>N.A.</strong></span></td>
<td width="25%"><span class="style1"><strong>Nama Tersangka</strong></span></td>
<td width="10%"><span class="style1"><strong>Asal SPDP</strong></span></td>
<td width="20%"><span class="style1"><strong>Pasal</strong></span></td>
<td width="20%"><span class="style1"><strong>Jaksa</strong></span></td>
<td width="7%"><span class="style1"><strong>P16</strong></span></td>
<td width="8%"><span class="style1"><strong>CETAK</strong></span></td>
</tr></thead><tbody>');
 $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>'.$row['spdp_noagenda'] .'</td>');
print ('<td><b><a href="index.pratut.post.spdp.print.php?uid='.$row['uid'].'">'.$row['spdp_namatsk'] .'</a></b></td>');
print ('<td>');
$polisi1 = $row['spdp_dari'];
mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$sql=mysql_query("select * from tab_polisi where p_nomor = '$polisi1'");
while ($data=mysql_fetch_array($sql)){
print(''.$data['p_nama'].'');
}
print ('</td>');
print ('<td><i>'. $row['spdp_pasal'].'</i></td>');
print ('<td>');
$jaksa1 = $row['p16_jaksa1'];
 mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$sql=mysql_query("select * from tab_personil where daftar_pegid = '$jaksa1'");
while ($data=mysql_fetch_array($sql)){
print('<b>'.$data['daftar_nama'].'</b>');
}
print ('</td>');
print ('<td>');
if ($jaksa1 !== "0") {
print ('<center><b><a href="index.pratut.post.spdp.print.php?uid='.$row['uid'].'" target="_blank">DISPOSISI P16</a></b></center>');
} 
elseif ($jaksa1 == "0") {
$id = $row['uid'];
echo "<a href=\"index.print.spdp.disposisi.php?uid=$id&table=$mytable\" onclick=\"NewWindow(this.href,'mywin','700','400','yes','center');return false\" onfocus=\"this.blur()\"  class=\"menupidum\" >SET</a>";
}
print ('</td>');
print ('<td>');
if ($row['ntfy_spdpprint'] == "2") {
print ('<center><b><a href="index.print.spdp.disposisi.plain.php?uid='.$row['uid'].'" target ="_blank" >DONE</a></b></center>');
} 
elseif ($row['ntfy_spdpprint'] == "0") {
print ('<a href="index.print.spdp.disposisi.plain.php?uid='.$row['uid'].'" target ="_blank" class="menu">DISPOSISI</a>');
}
print ('</td>');
print ('</tr>');} 
print ('</tbody> </table>');
echo "<br><br>Ditampilkan $hits /Halaman";
}
}
?></td>
  </tr>
</table>
