<?PHP
include("index.db.php");
$mytable = "mou";
//$session1 = $HTTP_GET_VARS["session"];
//$query = "Select * from $mytable where uid = '$uid1'"; 
//$result = mysql_query($query); 
//if($row = mysql_fetch_array($result)){
//if ($row[k_session] == $session1){
//$tablename1      = "slm_perpustakaan";
$next_increment     = 0;
$qShowStatus        = "SHOW TABLE STATUS LIKE 'mou'";
$qShowStatusResult  = mysql_query($qShowStatus) or die ( "Query failed: " . mysql_error() . "<br/>" . $qShowStatus );
$row = mysql_fetch_assoc($qShowStatusResult);
$next_increment = $row['Auto_increment'];
?>
<script>

/*
Submit Once form validation- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

function submitonce(theform){
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}
}
</script>


</head>

<body>
<table width="100%"  border="0" cellspacing="2" cellpadding="2">
  <tr>
    <td bgcolor="#FFFFFF"><form action="inc/datun_mouadd.php" method="post" enctype="multipart/form-data" name="form1">
      <table width="100%"  border="0" align="center" cellpadding="2" cellspacing="2">
        <tr>
          <td colspan="3">             <div align="center"></div>            
          <div align="center"><strong>MOU <? $tgl=date("d/m/Y");
$th_skrg=date("Y");
$bl_skrg=date("m");
?>
          </strong></div>            
          <div align="right"></div></td>
          </tr>
        <tr>
          <td colspan="3">&nbsp;</td>
        </tr>
        <tr>
          <td colspan="3"><strong>AGENDA MOU </strong>
            <hr size="1"></td>
        </tr>
        <tr>
          <td width="24%">No Agenda Digital </td>
          <td width="2%"><div align="center">:</div></td>
          <td width="74%"><input name="agenda" type="text" id="agenda" value="<?
echo "$next_increment";
?>" size="5" readonly>
</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td><div align="center"></div></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td colspan="3"><strong>ISIAN MOU </strong>
            <hr size="1"></td>
          </tr>
        <tr>
          <td>Tanggal Penandatangan MOU </td>
          <td><div align="center">:</div></td>
          <td><input name="tglmou" type="text" id="datepicker" size="20"> 
          Format Tanggal xx/xx/xxxx contoh : 02/02/2018 </td>
        </tr>
        <tr>
          <td>No Mou </td>
          <td><div align="center">:</div></td>
          <td><b>
            <input name=nomou type=text id="nomou" size=60 />
          </b></td>
        </tr>
        <tr>
          <td>MOU  Dengan Instansi </td>
          <td><div align="center">:</div></td>
          <td><input name="moudengan" type="text" id="a22" size="30"></td>
        </tr>
        <tr>
          <td>MOU  Tentang </td>
          <td><div align="center">:</div></td>
          <td><input name="moutentang" type="text" id="a32" value="" size="80"></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td><input type="reset" name="Submit2" value="Reset">
            <input type="submit" name="Submit" value="Simpan">
* Cukup Sekali Tekan tombol simpan dan tunggu proses </td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </table>
      </form></td>
  </tr>
</table>
