<LINK href="images/index.css" rel="stylesheet" type="text/css"><style type="text/css">
<!--
.style1 {color: #FFFFFF}
-->
</style>
<table width="100%"  border="0" cellspacing="4" cellpadding="4">
  <tr>
    <td colspan="2"><table width="100%"  border="0" cellspacing="2" cellpadding="2">
      <tr>
        <td><strong>JAKSA <?PHP echo $satker; ?> </strong></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td width="8%">&nbsp;</td>
    <td width="92%"><?

print ('<table width="80%"  border="0" cellspacing="6" cellpadding="6">
  <tr>
    <td><table width="100%"  border="0" cellspacing="6" cellpadding="6">
      <tr>
         <td width="40%">Nama Jaksa </td>

		<td width="40%">Jumlah P16</td>
<td width="20%">Jumlah P16</td>
      </tr>');
                   


$SQL     = "SELECT * FROM tab_personil where daftar_jenis ='1' ORDER BY daftar_pegid ASC";
$results = mysql_query($SQL);
while ($row = mysql_fetch_array($results)){
print ('<tr bgcolor="#F3F3F3">
        <td><b><a href="index.hitungperkaradetail.php?id='.$row['daftar_pegid'] .'">'.$row['daftar_nama'] . '</a></b></br>');
		if ($row['daftar_pangkat'] == "1") {echo "YUANA DHARMA TU / II.A";} 
		elseif ($row['daftar_pangkat'] == "2") {echo "MUDA DHARMA TU/ II.B";} 
		elseif ($row['daftar_pangkat'] == "3") {echo "MADYA DHARMA TU / II.C";} 
		elseif ($row['daftar_pangkat'] == "4") {echo "SENA DHARMA TU / II.D";} 
		elseif ($row['daftar_pangkat'] == "5") {echo "YUANA WIRA TU / III.A";} 
		elseif ($row['daftar_pangkat'] == "6") {echo "MUDA WIRA TU / III.B";} 
		elseif ($row['daftar_pangkat'] == "7") {echo "MADYA WIRA TU / III.C";} 
		elseif ($row['daftar_pangkat'] == "8") {echo "SENA WIRA TU / III.D";} 
		elseif ($row['daftar_pangkat'] == "9") {echo "ADI WIRA TU / IV.A";} 
		elseif ($row['daftar_pangkat'] == "10") {echo "NINDYA WIRA TU / IV.B";} 
		elseif ($row['daftar_pangkat'] == "11") {echo "AJUN JAKSA MADYA / III.A";} 
  elseif ($row['daftar_pangkat'] == "12") {echo "AJUN JAKSA / III.B";} 
   elseif ($row['daftar_pangkat'] == "13") {echo "JAKSA PRATAMA / III.C";} 
    elseif ($row['daftar_pangkat'] == "14") {echo "JAKSA MUDA / III.D";} 
	else if ($row['daftar_pangkat'] == "15") {echo "JAKSA MADYA / IV.A";} 
	else if ($row['daftar_pangkat'] == "16") {echo "JAKSA UTAMA PRATAMA / IV.B";} 
	elseif ($row['daftar_pangkat'] == "17") {echo "JAKSA UTAMA MUDA / IV.C";} 
	elseif ($row['daftar_pangkat'] == "18") {echo "JAKSA UTAMA MADYA / IV.D";} 
	elseif ($row['daftar_pangkat'] == "19") {echo "JAKSA UTAMA / IV.E";}  
else if ($row['daftar_pangkat'] == "0") {echo "Pangkat tidak dapat ditampilan";}
print (' NIP:'.$row['daftar_nip'].'');

print ('</center></td><td>');
//---------------------------------
$idjaksa = $row['daftar_pegid'];
include("../index.cma.db.php");
$query = "Select * from tab_dataperkara where t_id = '1'"; 
$result = mysql_query($query); 
if($row2 = mysql_fetch_array($result)){ 
$mytable = $row2['t_table'];
}
//-------------------------

$link = mysql_connect("localhost", "root", "benk"); mysql_select_db("cma", $link);
$result = mysql_query("SELECT * FROM $mytable where p16_jaksa1 ='$idjaksa'", $link);
$num_rows = mysql_num_rows($result);
echo "<b>$num_rows</b>";


print ('</td>');
print ('<td>');
print ('<a href="?g=hitungspdpdetail&i=index&id='.$row['daftar_pegid'] .'" class="menu">DETAIL</a>');
print ('</td>');

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