<?PHP
$uid1 = $_GET["uid"];
$table1 = $_GET["table"];
include("../index.cma.db.php");
mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$query = "Select * from tab_surat where s_id = '1'"; 
$result = mysql_query($query); 
if($row2 = mysql_fetch_array($result)){ 
$mytable = $row2['s_nama'];
$edisi = $row2['s_tahun'];
$query = "Select * from $table1 where tu_id = '$uid1'"; 
$result = mysql_query($query); 
if($row = mysql_fetch_array($result)){
//if ($row[k_session] == $session1){
?><title>UPDATE NO Agenda</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.edit.surat.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 $uid1 = $_GET['uid'];

?>
                      <input name="uid" type="hidden" id="uid" value="<?PHP echo $uid1 = $_GET['uid']; ?>">
                      <input name="table" type="hidden" id="table" value="<?PHP echo $table1 = $_GET['table']; ?>">
                      </div></td>
              </tr>
          </table></td>
          </tr>
        <tr>
          <td width="26%"> No Agenda </td>
          <td width="2%">:</td>
          <td width="72%" colspan="2"><input name="tu_noagenda" type="text" id="tu_noagenda" value="<?PHP echo htmlspecialchars($row['tu_noagenda']); ?>" size="10">      </td>
        </tr>
        <tr>
          <td>Tanggal Surat</td>
          <td width="2%">:</td>
          <td colspan="2"><input name="tu_tglsrt" type="text" id="tu_tglsrt" value="<?PHP echo htmlspecialchars($row['tu_tglsrt']); ?>" size="10"></td>
        </tr>
        <tr>
          <td>Asal Surat </td>
          <td width="2%">:</td>
          <td colspan="2"><input name="tu_asalsrt" type="text" id="tu_asalsrt" value="<?PHP echo htmlspecialchars($row['tu_asalsrt']); ?>" size="40">
          </td>
        </tr>
        <tr>
          <td>No Surat</td>
          <td width="2%">:</td>
          <td colspan="2"><input name="tu_nosrt" type="text" id="tu_nosrt2" value="<?PHP echo htmlspecialchars($row['tu_nosrt']); ?>" size="50"></td>
        </tr>
        <tr>
          <td>Jumlah Lampiran </td>
          <td width="2%">:</td>
          <td colspan="2"><input name="tu_lamp" type="text" id="tu_lamp" value="<?PHP echo htmlspecialchars($row['tu_lamp']); ?>" size="10">      </td>
        </tr>
        <tr>
          <td>Tanggal Agenda </td>
          <td width="2%">:</td>
          <td colspan="2"><input name="tu_tglterima" type="text" id="tu_tglterima" value="<?PHP echo htmlspecialchars($row['tu_tglterima']); ?>" size="10"></td>
        </tr>
        <tr>
          <td>Perihal / Isi Surat </td>
          <td width="2%">:</td>
          <td colspan="2"><input name="tu_perihal" type="text" id="textarea2" value="<?PHP echo htmlspecialchars($row['tu_perihal']); ?>" size="50"></td>
        </tr>
        <tr>
          <td colspan="4">&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td colspan="2">              <input type="submit" name="Submit3" value="UPDATE SURAT INI">
          </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">* Cukup Sekali Tekan tombol simpan dan tunggu proses, Jika terjadi doubleclik tombol simpan akan terkunci </td>
        </tr>
      </table>
    </form></td>
</tr>
</table>
<? }} ?>