<?PHP
include("index.db.php");
$mytable = "setoran";
//$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 'setoran'";
$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_setorandatunadd.php" method="post" enctype="multipart/form-data" name="form1">
      <table width="100%"  border="0" align="center" cellpadding="2" cellspacing="2">
        <tr>
          <td colspan="6">             <div align="center"></div>            
          <div align="center"><strong>SETORAN 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="6">&nbsp;</td>
        </tr>
        <tr>
          <td colspan="6"><strong>NOMOR SETORAN </strong>
            <hr size="1"></td>
        </tr>
        <tr>
          <td colspan="2">No Agenda Digital </td>
          <td width="2%"><div align="center">:</div></td>
          <td colspan="3"><input name="agenda" type="text" id="agenda" value="<?
echo "$next_increment";
?>" size="5" readonly>
</td>
        </tr>
        <tr>
          <td colspan="2">&nbsp;</td>
          <td><div align="center"></div></td>
          <td colspan="3">&nbsp;</td>
        </tr>
        <tr>
          <td colspan="6"><strong>ISIAN TANDA TERIMA SETORAN </strong>
            <hr size="1"></td>
          </tr>
        <tr>
          <td colspan="2">Tanggal Setoran </td>
          <td><div align="center">:</div></td>
          <td colspan="3"><input name="tgl" type="text" id="inputField" size="20">
            Format Tanggal xx/xx/xxxx contoh : 02/02/2018 </td>
        </tr>
        <tr>
          <td colspan="2">Setoran dalam Perkara An. </td>
          <td><div align="center">:</div></td>
          <td width="19%"><select name="perkara" id="perkara">
            <option value=0 selected>- Pilih Nama -</option>
            <?php
include "index.db.php";
?>
            <?php
$sql=mysql_query("select * from setorankat");
while ($data=mysql_fetch_array($sql)){
echo "<option>$data[d_nama]</option>";
}
?>
          </select></td>
          <td width="30%"><a href="?g=setorankatpost&d=inc" class="menudatun">BUAT KATEGORI JIKA BELUM ADA </a></td>
          <td width="23%">&nbsp;</td>
        </tr>
        <tr>
          <td width="21%">Jumlah Setoran </td>
          <td width="5%"><div align="center">Rp. </div></td>
          <td><div align="center">:</div></td>
          <td colspan="3"><b>
            <input name="senilai" type="text" id="senilai" size=30 />
*Masukkan tanpa rupiah dan tanpa sen (Format xxx.xxx.xxx) </b></td>
        </tr>
        <tr>
          <td colspan="2">Jenis Setoran </td>
          <td><div align="center">:</div></td>
          <td colspan="3"><input name="jenis" type="text" id="jenis" size="30"> 
          (Tunai, Pembayaran Ke-X) </td>
        </tr>
        <tr>
          <td colspan="2">Nama Penyetor </td>
          <td><div align="center">:</div></td>
          <td colspan="3"><input name="namapenyetor" type="text" id="namapenyetor" value="" size="40"></td>
        </tr>
        <tr>
          <td colspan="2">Petugas Penerima </td>
          <td><div align="center">:</div></td>
          <td colspan="3"><select name="petugas" id="petugas">
            <option value=0 selected>- Pilih Nama -</option>
            <?php
include("../index.cma.db.php");
?><?php
$sql=mysql_query("select * from tab_personil where daftar_jenis = '6'");
while ($data=mysql_fetch_array($sql)){
echo "<option>$data[daftar_nama]</option>";
}
?>
          </select></td>
        </tr>
        <tr>
          <td colspan="2" rowspan="2">&nbsp;</td>
          <td rowspan="2">&nbsp;</td>
          <td colspan="3">&nbsp;</td>
        </tr>
        <tr>
          <td colspan="3">&nbsp;</td>
        </tr>
        <tr>
          <td colspan="2">&nbsp;</td>
          <td>&nbsp;</td>
          <td colspan="3"><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 colspan="2">&nbsp;</td>
          <td>&nbsp;</td>
          <td colspan="3">&nbsp;</td>
        </tr>
        <tr>
          <td colspan="2">&nbsp;</td>
          <td>&nbsp;</td>
          <td colspan="3">&nbsp;</td>
        </tr>
      </table>
      </form></td>
  </tr>
</table>
