<LINK href="images/index.css" rel="stylesheet" type="text/css"><? include("../index.cma.db.php");
$mytable = $_GET['table'];
$id1 = $_GET['uid'];
$do1 = $_GET['do'];
$query = "Select * from $mytable where uid = '$id1'"; 
$result = mysql_query($query); 
if($row = mysql_fetch_array($result)){ 
$day = date("d");
$month = date("m");
$year = date("Y");
?><style type="text/css">
<!--
body {
	background-color: #FF9900;
}
-->
</style><table width="100%"  border="0" cellspacing="4" cellpadding="4" class="panel">
  <tr>
    <td>Tersangka / Terdakwa <b><? echo $namatersangka = $row['spdp_namatsk']; ?></b> | Pasal : <b><? echo $namatersangka = $row['spdp_pasal']; ?></b></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><? if ($do1 == "editisi"){ ?>
		<strong>PROSES EDIT ISI</strong>. lakukan tekan tombol simpan hanya 1 kali.<br>
		<br>
		<form name="form1" method="post" action="index.toolsedit.add.php">                
		<table width="100%"  border="0" cellspacing="2" cellpadding="2">
                  <tr>
                    <td width="100%"><input name="id" type="hidden" id="id" value="<? echo $id1;?>">
                      <input name="do" type="hidden" id="do" value="<? echo $do1;?>">
                    <input name="table" type="hidden" id="table" value="<? echo $mytable;?>"></td>
                  </tr>
                </table>
        <table width="100%"  border="0" cellspacing="4" cellpadding="4">
          <tr>
            <td width="25%">Apakah Ini Perkara ANAK</td>
            <td width="1%">:</td>
            <td width="74%"><select name="berkasanak" id="berkasanak">
            <option value="0" selected>BUKAN</option>
			<?PHP if ($row["berkas_anak"] == '0') {
print ('<option value="0" selected>BUKAN</option><option value="1">YA INI PERKARA ANAK</option>');
}
elseif ($row["berkas_anak"] == '1') {
print ('<option value="0">BUKAN</option><option value="1" selected>YA INI PERKARA ANAK</option>');
		  }
?>
        
          </select>  </td>
          </tr>
          <tr>
            <td>Nama Tersangka </td>
            <td width="1%">:</td>
            <td width="74%"><input name="s_nama" type="text" id="s_nama" style="text-transform:uppercase;" onKeyUp="javascript:this.value=this.value.toUpperCase();" value="<?PHP echo $row["spdp_namatsk"]; ?>" size="60"></td>
          </tr>
          <tr>
            <td>No Induk Kependudukan </td>
            <td>:</td>
            <td><input name="s_nik" type="text" id="s_nik" value="<?PHP echo $nama = $row["spdp_nik"]; ?>" size="40">
      Isikan &quot;0&quot; jika tidak ada </td>
          </tr>
          <tr>
            <td>Tanggal SPDP</td>
            <td>:</td>
            <td><input name="tglspdp" type="text" id="tglspdp" value="<?PHP echo $nama = $row["spdp_tgl"]; ?>"> 
            Format : DD/MM/YYYY </td>
          </tr>
          <tr>
            <td>Nomor SPDP </td>
            <td>:</td>
            <td><input name="s_nomorspdp" type="text" id="s_nomorspdp" value="<?PHP echo $nama = $row["spdp_no"]; ?>" size="40"></td>
          </tr>
          <tr>
            <td>Nomor Laporan</td>
            <td>:</td>
            <td><input name="s_nolaporan" type="text" id="s_nolaporan" value="<?PHP echo $nama = $row["spdp_nolp"]; ?>" size="40"></td>
          </tr>
          <tr>
            <td>SPDP Terima Tanggal </td>
            <td>:</td>
            <td><input name="spdpterimatanggal" type="text" id="spdpterimatanggal" value="<?PHP echo $nama = $row["spdp_terimatgl"]; ?>">
            Format : DD/MM/YYYY </td>
          </tr>
          <tr>
            <td>SPDP Dari</td>
            <td>:</td>
            <td><select name="s_spdpdari" id="s_spdpdari">
                <option value=0>- Pilih Asal SPDP -</option>
                <?php
mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$sql=mysql_query("select * from tab_polisi");
while ($data=mysql_fetch_array($sql)){
print('<option value="'.$data["p_nomor"].'" selected>'.$data["p_nama"].'</option>');
}
?>
              </select>
            </td>
          </tr>
          <tr>
            <td>Pasal SPDP </td>
            <td>:</td>
            <td><input name="s_pasalspdp" type="text" id="s_pasalspdp" value="<?PHP echo $nama = $row["spdp_pasal"]; ?>" size="60"></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="Submit3" value="SIMPAN ISIAN INI"></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table>
		</form>
        <?
}
?>
        <? if ($do1 == "editsop"){ ?>
		<form name="form1" method="post" action="index.toolsedit.add.php">
           <table width="100%"  border="0" cellspacing="2" cellpadding="2">
                  <tr>
                    <td colspan="3"><strong>PROSES EDIT SOP</strong>. PROSES PEMBENAHAN TANGGAL AKAN MEMPENGARUHI PROSES SOP SEHINGGA SELURUH NOTIFIKASI AKAN DI NETRALKAN. APAKAH ANDA YAKIN. Jika Ya lakukan tekan tombol simpan hanya 1 kali.</td>
                  </tr>
                  <tr>
                    <td width="24%"><input name="id2" type="hidden" id="id2" value="<? echo $id1;?>">
                      <input name="do2" type="hidden" id="do2" value="<? echo $do1;?>">
                      <input name="table2" type="hidden" id="table2" value="<? echo $mytable;?>"></td>
                    <td width="1%">&nbsp;</td>
                    <td width="75%">&nbsp;</td>
                  </tr>
                  <tr>
                    <td colspan="3"><table width="100%"  border="0" cellspacing="2" cellpadding="2" class="panel">
                      <tr>
                        <td><table width="100%"  border="0" cellspacing="4" cellpadding="4">
                          <tr>
                            <td>FORMAT TANGGAL BAKU ADALAH <strong>DD/MM/YYYY</strong> Contoh : 04/03/2017 Contoh Lagi : 14/12/2017 </td>
                          </tr>
                        </table></td>
                      </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td width="1%">&nbsp;</td>
                    <td width="75%">&nbsp;</td>
                  </tr>
                  <tr>
                    <td>Tanggal P17 </td>
                    <td>:</td>
                    <td><input name="11" type="text" id="11" value="<? echo $row['berkas_tahap1p17tgl']; ?>" size="20">
                    *Jika Kosong Jangan Diubah/Di Isi. </td>
                  </tr>
                  <tr>
                    <td>Tanggal Berkas Tahap 1 </td>
                    <td>:</td>
                    <td><input name="12" type="text" id="12" value="<?PHP echo $row["berkas_tahap1tgl"]; ?>" size="20">
*Jika Kosong Jangan Diubah/Di Isi. </td>
                  </tr>
                  <tr>
                    <td>Tanggal P18 </td>
                    <td>:</td>
                    <td><input name="13" type="text" id="13" value="<?PHP echo $row["berkas_tahap1p18tgl"]; ?>" size="20">
*Jika Kosong Jangan Diubah/Di Isi. </td>
                  </tr>
                  <tr>
                    <td>Tanggal P19 </td>
                    <td>:</td>
                    <td><input name="14" type="text" id="14" value="<?PHP echo $row["berkas_tahap1p19tgl"]; ?>" size="20">
*Jika Kosong Jangan Diubah/Di Isi. </td>
                  </tr>
                  <tr>
                    <td>Tanggal P20 </td>
                    <td>:</td>
                    <td><input name="15" type="text" id="15" value="<?PHP echo $row["berkas_p20"]; ?>" size="20">
*Jika Kosong Jangan Diubah/Di Isi. </td>
                  </tr>
                  <tr>
                    <td>Tanggal P21 </td>
                    <td>:</td>
                    <td><input name="16" type="text" id="16" value="<?PHP echo $row["berkas_tahap1p21tgl"]; ?>" size="20">
*Jika Kosong Jangan Diubah/Di Isi. </td>
                  </tr>
                  <tr>
                    <td>Tanggal Tahap 2 </td>
                    <td>:</td>
                    <td><input name="17" type="text" id="17" value="<?PHP echo $row["berkas_tahap2tgl"]; ?>" size="20">
*Jika Kosong Jangan Diubah/Di Isi. </td>
                  </tr>
                  <tr>
                    <td>Tanggal P31 </td>
                    <td>&nbsp;</td>
                    <td><input name="18" type="text" id="18" value="<?PHP echo $row["berkas_limpahp31tgl"]; ?>" size="20">
*Jika Kosong Jangan Diubah/Di Isi. </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"></td>
                  </tr>
                </table>
        </form>
        <?
}
?><? if ($do1 == "delete"){ ?>
		<form name="form1" method="post" action="index.toolsedit.add.php">                
		<table width="100%" border="0" cellspacing="4" cellpadding="4">
                  <tr>
                    <td colspan="3">APAKAH ANDA INGIN MENGHAPUS RECORD DIBAWAH INI. JIKA YA TEKAN TOMBOL DIBAWAH INI. JIKA TIDAK TUTUP JENDELA INI
                      <input name="id3" type="hidden" id="id3" value="<? echo $id1;?>">
                      <input name="do3" type="hidden" id="do3" value="<? echo $do1;?>">
                      <input name="table3" type="hidden" id="table3" value="<? echo $mytable;?>"></td>
                  </tr>
                  <tr>
                    <td width="12%">&nbsp;</td>
                    <td width="2%">&nbsp;</td>
                    <td width="86%"><input type="submit" name="Submit22" value="YA SAYA HAPUS"></td>
                  </tr>
          </table>
        </form>
    <?
}
?></td>
  </tr>
</table>
<? } ?>
