<LINK href="images/index.css" rel="stylesheet" type="text/css">
   <script type="text/javascript">
      function updateText1()
    {	
    var dd = document.getElementById("s_jks1");
    var ddtext = dd.options[dd.selectedIndex].text;
    var sp_ddtext = ddtext.replace(/[^. a-zA-Z]+/g,'');
    document.getElementById("jaksa1").value = sp_ddtext;
    }
	</script>
	<script type="text/javascript">
	      function updateText2()
    {	
    var dd = document.getElementById("s_jks2");
    var ddtext = dd.options[dd.selectedIndex].text;
    var sp_ddtext = ddtext.replace(/[^. a-zA-Z]+/g,'');
    document.getElementById("jaksa2").value = sp_ddtext;
    }
    </script>

<?PHP
include("../index.globalconfig.php");
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'];
$id = $_GET['uid'];
$table1 = $_GET['table'];
$noagenda1 = $_GET['noagenda'];

?>
<table width="100%"  border="0" cellspacing="4" cellpadding="4" class="panel">
  <tr>
    <td height="36" bgcolor="#CCCCCC"><strong>SILAHKAN UPDATE JAKSA SEBELUM MELAKUKAN EKSPEDISI</strong></td>
  </tr>
  <tr>
    <td><form name="form1" method="post" action="index.pratut.post.disposisi.spdp.add.php">
      <table width="100%"  border="0" cellspacing="4" cellpadding="4">
        <tr>
          <td colspan="3">SPDP Dari :<?PHP echo $asal = $_GET['asal'];?>  <input name="sms1" type="hidden" id="sms1" value="<?PHP echo $asal = $_GET['asal'];?> : <?PHP echo $oke = $_GET['surat'];?>">
            <input name="sms2" type="hidden" id="sms2" value="Info P16 <?PHP echo $oke = $_GET['surat'];?>">
            No Agenda : <?PHP echo "$noagenda1";?> Dalam table : <?PHP echo "$table1";?> (Ket : <?PHP echo $oke = $_GET['surat'];?>)</td>
          </tr>
        <tr>
          <td colspan="3">&nbsp;</td>
        </tr>
        <tr>
          <td width="25%">Jaksa Ke-1 </td>
          <td width="2%">:</td>
          <td width="73%"><select name="s_jks1" id="s_jks1" onChange="updateText1();">
                    <option value=0 selected>- Pilih Jaksa Ke-1 -</option>
                    <?php
mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$sql=mysql_query("select * from tab_personil where daftar_jenis ='1'");
while ($data=mysql_fetch_array($sql)){
print('<option value="'.$data["daftar_pegid"].'">'.$data["daftar_nama"].'</option>');
}
?>
                  </select>
            <input name="uid" type="hidden" id="uid" value="<?PHP echo $id; ?>">
            <strong>            </strong>
            <input name="table" type="hidden" id="table" value="<?PHP echo "$table1";?>">
			<input name="noagenda" type="hidden" id="noagenda" value="<?PHP echo "$noagenda1";?>">
			<input name="jaksa1" type="hidden" id="jaksa1"></td>
          </tr>
        <tr>
          <td>Jaksa Ke-2 </td>
          <td>:</td>
          <td><select name="s_jks2" id="s_jks2" onChange="updateText2();">
            <option value=0 selected>- Pilih Jaksa Ke-2 -</option>
            <?php
mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$sql=mysql_query("select * from tab_personil where daftar_jenis ='1'");
while ($data=mysql_fetch_array($sql)){
print('<option value="'.$data["daftar_pegid"].'">'.$data["daftar_nama"].'</option>');
}
?>
          </select>
            <input name="jaksa2" type="hidden" id="jaksa2"></td>
          </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          </tr>
        <tr>
          <td colspan="3">Modul SMS Penyidik (<strong>Optional</strong>) Aplikasi akan mengirim SMS kepada penyidik untuk informasi Jaksa yang telah ditunjuk dan tahapan perkara secara otomatis. Jika tidak load artinya penerimaan surat tidak mencatat nama penyidik dan nomor telpnya.</td>
          </tr>
        <tr>
          <td>Nama Penyidik * </td>
          <td>:</td><?php 
		mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
		  $query3 = "Select * from $mytable WHERE spdp_noagenda = '$noagenda1'"; 
$result3 = mysql_query($query3); 
if($row3 = mysql_fetch_array($result3)){ 
?>
          <td><input name="namapenyidik" type="text" id="namapenyidik" value="<?PHP echo $penyidik = $row3['spdp_namapenyidik']; ?>">
          *</td>
          </tr>
        <tr>
          <td>No Hp Penyidik (<strong>Optional</strong>) </td>
          <td>:</td>
          <td>            <input name="telppenyidik" type="text" id="telppenyidik2" value="<?PHP echo $penyidik = $row3['spdp_telppenyidik']; ?>">
            *</td>
          </tr><? }
		  ?>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td><input type="submit" name="Submit" value="SIMPAN ISIAN INI"></td>
          </tr>
      </table>
    </form></td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<?PHP
}
?>