<?PHP
$ukey1 = $_GET["ukey"];
$table1 = $_GET["t"];
include("index.db.php");
$query = "Select * from $table1 where UKEY = '$ukey1'"; 
$result = mysql_query($query); 
if($row = mysql_fetch_array($result)){
//if ($row[k_session] == $session1){
?><title>UPDATE BB</title><LINK href="images/index.css" rel="stylesheet" type="text/css"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
  <tr>
    <td><form action="index.editbb.add.php" method="post" enctype="multipart/form-data" name="form1">
      <table width="100%"  border="0" align="center" cellpadding="5" cellspacing="5">
        <tr>
          <td colspan="4"><table width="100%"  border="0" align="center" cellpadding="4" cellspacing="4">
            <tr>
              <td> <div align="right"><?php
echo $ukey1 = $_GET['ukey'];

?>
                      <input name="ukey" type="hidden" id="ukey" value="<?PHP echo $uid1 = $_GET['ukey']; ?>">
                      <input name="table" type="hidden" id="table" value="<?PHP echo $table1 = $_GET['t']; ?>">
                      </div></td>
              </tr>
          </table></td>
          </tr>
        <tr>
          <td width="26%">&nbsp;</td>
          <td width="2%">&nbsp;</td>
          <td width="72" colspan="2">&nbsp;</td>
        </tr>
        <tr>
          <td>NAMA TERDAKWA </td>
          <td width="2%">:</td>
          <td colspan="2"><?PHP echo htmlspecialchars($row['TERDAKWA']); ?></td>
        </tr>
        <tr>
          <td>NO REGISTER BB </td>
          <td width="2%">:</td>
          <td colspan="2"><input name="rb" type="text" id="rb" value="<?PHP echo htmlspecialchars($row['RB']); ?>" size="50">
          </td>
        </tr>
        <tr>
          <td>NO REGISTER PERKARA </td>
          <td width="2%">:</td>
          <td colspan="2"><input name="pdm" type="text" id="pdm" value="<?PHP echo htmlspecialchars($row['PDM']); ?>" size="50"></td>
        </tr>
        <tr>
          <td>NAMA BARANG</td>
          <td width="2%">:</td>
          <td colspan="2"><input name="namabarang" type="text" id="namabarang" value="<?PHP echo htmlspecialchars($row['NAMABARANG']); ?>" size="50">      </td>
        </tr>
        <tr>
          <td>NO IJIN PENETAPAN SITA </td>
          <td width="2%">:</td>
          <td colspan="2"><input name="ijinsita" type="text" id="ijinsita" value="<?PHP echo htmlspecialchars($row['IJINSITA']); ?>" size="50"></td>
        </tr>
        <tr>
          <td>DISIMPAN DI </td>
          <td width="2%">:</td>
          <td colspan="2"><select name="lokasi" id="lokasi">
          <option value="1">GUDANG KEJARI</option>
          <option value="2">RUBASAN</option>
          <option value="3">PENITIPAN</option>
          <option value="4">LAINNYA</option>
          <?PHP if ($row['LOKASI'] == "1") {print ('<option value="1">GUDANG KEJARI</option>');} 
 elseif ($row['LOKASI'] == "2") {print ('<option value="2">RUBASAN</option>');} 
 elseif ($row['LOKASI'] == "3") {print ('<option value="3">PENITIPAN</option>');} 
 elseif ($row['LOKASI'] == "4") {print ('<option value="4">LAINNYA</option>');} 
 elseif ($row['LOKASI'] == "0") {print ('ERROR');} 
 ?>

            </select></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td colspan="2">&nbsp;          </td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td colspan="2"><input type="submit" name="Submit3" value="UPDATE BB INI"></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td colspan="2">* Cukup Sekali Tekan tombol simpan dan tunggu proses, Jika terjadi doubleclik tombol simpan akan terkunci </td>
        </tr>
      </table>
    </form></td>
</tr>
</table>
<? } ?>