<?PHP
include("index.db.php");
$mytable = "fungsidatun";
//$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 'fungsidatun'";
$qShowStatusResult  = mysql_query($qShowStatus) or die ( "Query failed: " . mysql_error() . "<br/>" . $qShowStatus );
$row = mysql_fetch_assoc($qShowStatusResult);
$next_increment = $row['Auto_increment'];
?>
<link rel="stylesheet" type="text/css" media="all" href="jsDatePick_ltr.min.css" />
<script language="JavaScript" type="text/javascript" src="wysiwyg.js">
<script type="text/javascript" src="jsDatePick.min.1.3.js"></script>
<script type="text/javascript">
	window.onload = function(){
		new JsDatePick({
			useMode:2,
			target:"inputField",
			dateFormat:"%d/%m/%Y"
		});
	};
</script>

<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_fungsidatunadd.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>FUNGSI DAN WEWENANG DATUN <? $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 LAYANAN DATUN </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 FUNGSI DAN WEWENANG DATUN </strong>
            <hr size="1"></td>
          </tr>
        <tr>
          <td>Tanggal Layanan </td>
          <td><div align="center">:</div></td>
          <td><input name="tgl" type="text" id="inputField" size="20">
            Format Tanggal xx/xx/xxxx contoh : 02/02/2018 </td>
        </tr>
        <tr>
          <td>Jenis Layanan </td>
          <td><div align="center">:</div></td>
          <td><select name="jenis" id="jenis">
            <option value="1">PENEGGAKAN HUKUM</option>
            <option value="2">BANTUAN HUKUM</option>
            <option value="3">PERTIMBANGAN HUKUM</option>
            <option value="4">PELAYANAN HUKUM</option>
            <option value="5">TINDAKAN HUKUM LAIN</option>
            <option selected>--PILIH---</option>
          </select></td>
        </tr>
        <tr>
          <td>No Surat</td>
          <td><div align="center">:</div></td>
          <td><b>
            <input name="no" type="text" id="no" size=60 />
          </b></td>
        </tr>
        <tr>
          <td>Layanan Diberikan Kepada </td>
          <td><div align="center">:</div></td>
          <td><input name="kepada" type="text" id="kepada" size="30"></td>
        </tr>
        <tr>
          <td>Isi Layanan </td>
          <td><div align="center">:</div></td>
          <td><textarea name="isi" cols="80" rows="6" wrap="VIRTUAL" id="isi"></textarea></td>
        </tr>
        <tr>
          <td>Scan Surat Layanan Yang Telah dilakukan </td>
          <td><div align="center">:</div></td>
          <td>DAPAT DILAKUKAN SETELAH POSTING INI </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>
