<LINK href="images/index.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
    function refreshAndClose() {
        window.opener.location.reload(true);
        window.close();
    }
</script>
<body onbeforeunload="refreshAndClose();">
<?php
include("../index.cma.db.php");
$mytable = $_POST['table'];
$do1 = $_POST['do'];
$id1 = $_POST['id'];
$day1 = $_POST['day'];
$month1 = $_POST['month'];
$year1 = $_POST['year'];
$tanggalexec = "$day1/$month1/$year1";
//----------STEP
if ($do1 == "tahap2"){
$query = "UPDATE $mytable Set berkas_tahap2tgl  = '$tanggalexec' where uid = '$id1'";  
$result = mysql_query($query); 
$query = "UPDATE $mytable SET late_spdp = '1', late_p21 = '1', late_berkas = '1', late_spdpkembali = '1', late_p31 = '1' WHERE uid = '$id1'"; //UNTUK PENYETINGAN SEMENTARA JIKA SUDAH BERI TANDA //
$result = mysql_query($query);
$query = "UPDATE $mytable Set berkas_riwayat  = 'SUDAH TAHAP 2' where uid = '$id1'";  
$result = mysql_query($query); 
print ('<LINK href="images/index.css" rel="stylesheet" type="text/css"><table width="100%"  border="0" cellspacing="2" cellpadding="2">
  <tr>
    <td bgcolor="#FF3300">PROSES TANGGAL TAHAP 2 TELAH DILAKUKAN </td>
  </tr>
  <tr>
    <td bgcolor="#FF6633">SILAHKAN TUTUP JENDELA INI, JIKA ANDA INGIN MELAKUKAN SIDIK DIGITAL LAKUKAN PADA MENU YANG TERSEDIA</td>
  </tr>
</table>');
}
//----------ENDSTEP
//----------STEP
if ($do1 == "p31"){
$query = "UPDATE $mytable Set berkas_limpahp31tgl  = '$tanggalexec' where uid = '$id1'";  
$result = mysql_query($query); 
$query = "UPDATE $mytable SET late_spdp = '1', late_p21 = '1', late_berkas = '1', late_spdpkembali = '1', late_p31 = '1' WHERE uid = '$id1'"; //UNTUK PENYETINGAN SEMENTARA JIKA SUDAH BERI TANDA //
$result = mysql_query($query);
$query = "UPDATE $mytable Set berkas_riwayat  = 'SUDAH DILIMPAHKAN' where uid = '$id1'";  
$result = mysql_query($query); 
echo "<b>POSTING TAHAP PELIMPAHAN (p-31) TELAH DISIMPAN SILAHKAN TUTUP JENDELA INI</b>";
}
//----------ENDSTEP
//----------ENDSTEP
if ($do1 == "DIVERSI"){
$query = "UPDATE $mytable Set berkas_diversitut = '$tanggalexec' where uid = '$id1'";  
$result = mysql_query($query); 
$query = "UPDATE $mytable Set berkas_skpp = '$tanggalexec' where uid = '$id1'";  
$result = mysql_query($query); 
$query = "UPDATE $mytable SET late_spdp = '1', late_p21 = '1', late_berkas = '1', late_spdpkembali = '1', late_p31 = '1' WHERE uid = '$id1'"; //UNTUK PENYETINGAN SEMENTARA JIKA SUDAH BERI TANDA //
$result = mysql_query($query);
$query = "UPDATE $mytable Set berkas_riwayat  = 'DIVERSI' where uid = '$id1'";  
$result = mysql_query($query); 
echo "<b>POSTING BERKAS SKPP/DIVERSI BERHASIL DI PENUNTUTAN TELAH DISIMPAN SILAHKAN TUTUP JENDELA INI</b>";
}
//----------ENDSTEP
if ($do1 == "SKPP"){
$query = "UPDATE $mytable Set berkas_skpp = '$tanggalexec' where uid = '$id1'";  
$result = mysql_query($query); 
$query = "UPDATE $mytable SET late_spdp = '1', late_p21 = '1', late_berkas = '1', late_spdpkembali = '1', late_p31 = '1' WHERE uid = '$id1'"; //UNTUK PENYETINGAN SEMENTARA JIKA SUDAH BERI TANDA //
$result = mysql_query($query);
$query = "UPDATE $mytable Set berkas_riwayat  = 'DIHENTIKAN/SKPP' where uid = '$id1'";  
$result = mysql_query($query); 
echo "<b>POSTING BERKAS SKPP/DIVERSI BERHASIL DI PENUNTUTAN TELAH DISIMPAN SILAHKAN TUTUP JENDELA INI</b>";
}
//----------ENDSTEP
?>