<table width="100%"  border="0" cellspacing="6" cellpadding="6">
  <tr>
    <td>SET JABATAN </td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="4" cellpadding="4">
  <tr>
    <td width="66%"><?PHP
include("../index.cma.db.php");
$uid1 = $_GET["uid"];
$query = "Select * from tab_personil where daftar_pegid = '$uid1'"; 
$result = mysql_query($query); 
if($row = mysql_fetch_array($result)){
?><form name="form1" method="post" action="index.pembinaan.editset.add.php">
      <table width="100%"  border="0" cellspacing="1" cellpadding="1">
        <tr>
          <td width="11%">Set Sebagai </td>
          <td width="2%">:</td>
          <td width="87%">              <select name="p_set" id="p_set">
            <option value="<?PHP echo htmlspecialchars($row['daftar_set']); ?>" selected>
            <?PHP if ($row['daftar_set'] == "pb") {echo "PETUGAS BESUK";} 
		elseif ($row['daftar_set'] == "pbb") {echo "PETUGAS BARANG BUKTI";} 
		elseif ($row['daftar_set'] == "kjr") {echo "KAJARI";} 
		elseif ($row['daftar_set'] == "ksb") {echo "KASUBAGBIN";} 
		elseif ($row['daftar_set'] == "kst") {echo "KASI INTEL";} 
		elseif ($row['daftar_set'] == "ksp") {echo "KASI PIDUM";} 
		elseif ($row['daftar_set'] == "kss") {echo "KASI PIDSUS";} 
		elseif ($row['daftar_set'] == "ksd") {echo "KASI DATUN";} 
		elseif ($row['daftar_set'] == "") {echo "CANCELATION";} 
   ?>
            </option>
                 <option value="pb">PETUGAS BESUK</option>
            <option value="pbb">PETUGAS BARANG BUKTI</option>
            <option value="kjr">KAJARI</option>
            <option value="ksb">KASUBAGBIN</option>
            <option value="kst">KASI INTEL</option>
            <option value="ksp">KASI PIDUM</option>
            <option value="kss">KASI PIDSUS</option>
            <option value="ksd">KASI DATUN</option>
			<option value="">CANCELATION</option>
          </select>
            <input type="submit" name="Submit22" value="Simpan">
            <input name="uid" type="hidden" id="uid" value="<?PHP echo htmlspecialchars($row['daftar_pegid']); ?>"></td></tr>
      </table>
    </form><? } ?></td>
  </tr>
  <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="25%">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%">PROSES</td>
		<td width="15%">DEL</td>
      </tr>');
                   


$SQL     = "SELECT * FROM tab_personil where daftar_status='0' 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'] == "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 ('<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=pembinaanedit&i=index&uid='.$row['daftar_pegid'].'" class="menu">EDIT</a></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>
