<table width="100%"  border="0" cellspacing="4" cellpadding="4">
  <tr>
    <td><?
$link = mysql_connect("$server", "$username", "$password"); mysql_select_db("$database", $link);
$result = mysql_query("SELECT * FROM tab_personil where daftar_status='0'", $link);
$num_rows = mysql_num_rows($result);
echo "Jumlah Personil Aktif $num_rows Orang\n<br><br>";
print ('<table width="100%"  border="0" cellspacing="2" cellpadding="2" class="panel">
  <tr>
    <td><table width="100%"  border="0" cellspacing="2" cellpadding="2">
      <tr>
         <td width="40%">Nama Pegawai </td>
		 <td width="10%">Bidang </td>
		 <td width="10%">Nomor HP </td>
		 <td width="5%">AKTIF</td>
 		<td width="35%">RUN</td>

      </tr>');
                   


$SQL     = "SELECT * FROM tab_personil where daftar_status='0' ORDER BY daftar_pegid ASC";
$results = mysql_query($SQL);
while ($row = mysql_fetch_array($results)){
print ('<tr bgcolor="#FFFFCC">
        <td><b>'.$row['daftar_nama'] . '</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 ('<br>NIP:'.$row['daftar_nip'].'</td>');
print ('<td>');
if ($row['daftar_jenis'] == "1") {echo "JAKSA";} 
		elseif ($row['daftar_jenis'] == "2") {echo "PEMBINAAN";} 
		elseif ($row['daftar_jenis'] == "3") {echo "INTEL";} 
		elseif ($row['daftar_jenis'] == "4") {echo "PIDUM";} 
		elseif ($row['daftar_jenis'] == "5") {echo "PIDSUS";} 
		elseif ($row['daftar_jenis'] == "6") {echo "DATUN";} 
		elseif ($row['daftar_jenis'] == "7") {echo "HONORER";} 
		
		
		
		
print ('</td>');
print ('<td>'.$row['daftar_nohp'].'</td><td><center>');
if ($row['daftar_status'] == "0") {echo "<img src=\"images/aktif.jpg\" width=\"10\" height=\"10\">";} 
elseif ($row['daftar_status'] == "1") {echo "<img src=\"images/nonaktif.jpg\" width=\"10\" height=\"10\">";} 
print ('</center></td>');

print ('<td><a href="index.php?g=pembinaaneditrun&i=index&uid='.$row['daftar_pegid'].'" class="menu">RUN/OFF</a></td>');


} 
print ('
    </tr></table></td>
  </tr>
</table>');
?></td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="4" cellpadding="4">
  <tr>
    <td><?
$link = mysql_connect("$server", "$username", "$password"); mysql_select_db("$database", $link);
$result = mysql_query("SELECT * FROM tab_personil where daftar_status='3'", $link);
$num_rows = mysql_num_rows($result);
echo "Jumlah Personil Tidak Aktif $num_rows Orang\n<br><br>";
print ('<table width="100%"  border="0" cellspacing="2" cellpadding="2" class="panel">
  <tr>
    <td><table width="100%"  border="0" cellspacing="2" cellpadding="2">
      <tr>
         <td width="40%">Nama Pegawai </td>
		 <td width="10%">Bidang </td>
		 <td width="10%">Nomor HP </td>
		 <td width="5%">AKTIF</td>
 			<td width="5%">RUN</td>
		 <td width="15%">SET</td>

		<td width="15%">DEL</td>
      </tr>');
                   


$SQL     = "SELECT * FROM tab_personil where daftar_status='3' ORDER BY daftar_jenis ASC";
$results = mysql_query($SQL);
while ($row = mysql_fetch_array($results)){
print ('<tr bgcolor="#FFFFCC">
        <td><b>'.$row['daftar_nama'] . '</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 "AJUN JAKSA MADYA / III.A";} 
  elseif ($row['daftar_pangkat'] == "10") {echo "AJUN JAKSA / III.B";} 
   elseif ($row['daftar_pangkat'] == "11") {echo "JAKSA PRATAMA / III.C";} 
    elseif ($row['daftar_pangkat'] == "12") {echo "JAKSA MUDA / III.D";} 
	else if ($row['daftar_pangkat'] == "13") {echo "JAKSA MADYA / IV.A";} 
	else if ($row['daftar_pangkat'] == "14") {echo "JAKSA UTAMA PRATAMA / IV.B";} 
	elseif ($row['daftar_pangkat'] == "15") {echo "JAKSA UTAMA MADYA / IV.C";} 
	elseif ($row['daftar_pangkat'] == "16") {echo "JAKSA UTAMA / IV.D";} 
else if ($row['daftar_pangkat'] == "0") {echo "Pangkat tidak dapat ditampilan";}
print ('<br>NIP:'.$row['daftar_nip'].'</td>');
print ('<td>');
if ($row['daftar_jenis'] == "1") {echo "JAKSA";} 
		elseif ($row['daftar_jenis'] == "2") {echo "PEMBINAAN";} 
		elseif ($row['daftar_jenis'] == "3") {echo "INTEL";} 
		elseif ($row['daftar_jenis'] == "4") {echo "PIDUM";} 
		elseif ($row['daftar_jenis'] == "5") {echo "PIDSUS";} 
		elseif ($row['daftar_jenis'] == "6") {echo "DATUN";} 
		elseif ($row['daftar_jenis'] == "7") {echo "HONORER";} 
		
		
		
		
print ('</td>');
print ('<td>'.$row['daftar_nohp'].'</td><td><center>');
if ($row['daftar_status'] == "0") {echo "<img src=\"images/aktif.jpg\" width=\"10\" height=\"10\">";} 
elseif ($row['daftar_status'] == "3") {echo "<img src=\"images/nonaktif.jpg\" width=\"10\" height=\"10\">";} 
print ('</center></td>');

print ('<td><a href="index.php?g=pembinaaneditrun&i=index&uid='.$row['daftar_pegid'].'" class="menu">RUN/OFF</a></td>');


print ('<td>');
if ($row['daftar_set'] == "") {
print ('<a href="index.php?g=pembinaaneditset&i=index&uid='.$row['daftar_pegid'].'" class="menu">SET</a>');
} 
elseif ($row['daftar_set'] !== "") 
if ($row['daftar_set'] == "pb") {
print ('<a href="index.php?g=pembinaaneditset&i=index&uid='.$row['daftar_pegid'].'">PETUGAS BESUK</a>');
} 
elseif ($row['daftar_set'] == "pbb") {
print ('<a href="index.php?g=pembinaaneditset&i=index&uid='.$row['daftar_pegid'].'">PETUGAS BARANG BUKTI</a>');
} 
		elseif ($row['daftar_set'] == "kjr") {

		print ('<a href="index.php?g=pembinaaneditset&i=index&uid='.$row['daftar_pegid'].'">KAJARI</a>');

		} 
		elseif ($row['daftar_set'] == "ksb") {
print ('<a href="index.php?g=pembinaaneditset&i=index&uid='.$row['daftar_pegid'].'">KASUBAGBIN</a>');

		} 
		elseif ($row['daftar_set'] == "kst") {
		print ('<a href="index.php?g=pembinaaneditset&i=index&uid='.$row['daftar_pegid'].'">KASI INTEL</a>');

		} 
		elseif ($row['daftar_set'] == "ksp") {
		print ('<a href="index.php?g=pembinaaneditset&i=index&uid='.$row['daftar_pegid'].'">KASI PIDUM</a>');

		} 
		elseif ($row['daftar_set'] == "kss") {
		print ('<a href="index.php?g=pembinaaneditset&i=index&uid='.$row['daftar_pegid'].'">KASI PIDSUS</a>');

		} 
		elseif ($row['daftar_set'] == "ksd") {
		print ('<a href="index.php?g=pembinaaneditset&i=index&uid='.$row['daftar_pegid'].'">KASI DATUN/a>');

		} 
		elseif ($row['daftar_set'] == "") {
		print ('<a href="index.php?g=pembinaaneditset&i=index&uid='.$row['daftar_pegid'].'">CANCELATION</a>');

		} 

print ('</td>');

print ('<td><a href="index.php?g=pembinaandel&i=index&uid='.$row['daftar_pegid'].'" class="menu">DELETE</a></td>');
} 
print ('
    </tr></table></td>
  </tr>
</table>');
?></td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
