// $ses_uid
                // );
        $data_post=$PENGHAPUSAN->apl_userasetlistHPS("USPMD");
        $POST=$_POST;
        // //pr($POST);
        $POST_data=$PENGHAPUSAN->apl_userasetlistHPS_filter($data_post);
        $POST['penghapusan_nama_aset']=$POST_data;

		// pr($_POST);
  //       pr($POST);
  //       exit;
		$data = $PENGHAPUSAN->store_tambahan_usulan_penghapusan_pmd($POST);
        
        $data_postRVW=$PENGHAPUSAN->apl_userasetlistHPS("RVWUSPMD");
        if($data_postRVW){
         $data_delete=$PENGHAPUSAN->apl_userasetlistHPS_del("RVWUSPMD");
        }
        if($data_post){
         $data_delete=$PENGHAPUSAN->apl_userasetlistHPS_del("USPMD");
        }
        
        if(isset($POST['usulanID'])){
            $id=$POST['usulanID'];
            echo "<script>
                    alert('Data Berhasil Disimpan');
                    document.location='$url_rewrite/module/penghapusan/dftr_review_edit_aset_usulan_pmd.php?id=$id';
                </script>";
        }else{
            echo "<script>
                    alert('Data Berhasil Disimpan');
                    document.location='$url_rewrite/module/penghapusan/dftr_usulan_pmd.php?pid=1';
    $SessionUser = $SESSION->get_session_user();
    $USERAUTH->FrontEnd_check_akses_menu($menu_id, $SessionUser);
    
    

    $data_post=$PENGHAPUSAN->apl_userasetlistHPS("DELUSPMD");
    $POST=$_POST;

    $POST_data=$PENGHAPUSAN->apl_userasetlistHPS_filter($data_post);
    $POST['penghapusan_nama_aset']=$POST_data;
    // pr($POST);
    // $data=$DELETE->delete_update_daftar_validasi_penghapusan($id);
	// pr($_POST);
    // exit;
		$data = $PENGHAPUSAN->delete_usulan_penghapusan_asetid_pmd($POST);
    $id=$POST['usulanID'];

    $data_delete=$PENGHAPUSAN->apl_userasetlistHPS_del("DELUSPMD");
    /*
    
    echo "$id";

    $query="UPDATE Penghapusan SET Status=0 WHERE Penghapusan_ID='$id'";
    $exec=mysql_query($query) or die(mysql_error());
    
    $query2="UPDATE PenghapusanAset SET Status=0 WHERE Penghapusan_ID='$id'";
    $exec=mysql_query($query2) or die(mysql_error());
    */
    echo "<script>alert('Data Berhasil Dihapus'); document.location='$url_rewrite/module/penghapusan/dftr_review_edit_aset_usulan_pmd.php?id=$id';</script>";
?>
$ses_uid=$_SESSION['ses_uid'];

$parameter=array('submit'=>$submit, 'ses_uid'=>$ses_uid);
// $data=$UPDATE->update_validasi_penghapusan($parameter);

         $data_post=$PENGHAPUSAN->apl_userasetlistHPS("VLDUSPMS");
        // pr($data_post);
        $POST=$_POST;
        // //pr($POST);
        $POST_data=$PENGHAPUSAN->apl_userasetlistHPS_filter($data_post);
        $POST['ValidasiPenghapusan']=$POST_data;
		// pr($_POST);
		$data = $PENGHAPUSAN->update_validasi_penghapusan_pms($_POST);

        if($data_post){
         $data_delete=$PENGHAPUSAN->apl_userasetlistHPS_del("VLDUSPMS");
        }
/*

$query = "SELECT aset_list FROM apl_userasetlist WHERE aset_action = 'ValidasiPenghapusan' AND UserSes = '$_SESSION[ses_uid]'";
//print_r($query);
$result = mysql_query($query) or die (mysql_error());


$numRows = mysql_num_rows($result);
if ($numRows)
{
    $dataID = mysql_fetch_object($result);
}

    $explodeID = explode(',',$dataID->aset_list);
				$tmpVal[] = $sign.addslashes($val).$sign;
			}
		}
		
		$implodeField = implode (',',$tmpField);
		$implodeVal = implode (',',$tmpVal);
		
		$AddField = "action,changeDate,TglPerubahan,NilaiPerolehan_Awal,Kd_Riwayat";
		$action = "Update Ruangan ".$kodeSatker.'_'.$kodeRuang;
		$changeDate = date('Y-m-d');
		$TglPerubahan = $tgl;
		$NilaiPerolehan_Awal = $resultqueryKibSelect->NilaiPerolehan;
		$Kd_Riwayat = '4';
		
		//insert log
		$QueryLog  = "INSERT INTO $tableLog ($implodeField,$AddField)
					VALUES ($implodeVal,'$action','$changeDate','$TglPerubahan','$NilaiPerolehan_Awal','$Kd_Riwayat')";
	
		// pr($QueryLog);
		$exeQueryLog = $DBVAR->query($QueryLog);
	}
	
	if($data_post){
	 $data_delete=$PENGHAPUSAN->apl_userasetlistHPS_del("KIRASET");
	}
	// exit;
  echo "<script>
			alert('Data Berhasil Disimpan');
		</script>";	
redirect($url_rewrite.'/module/kir/filter_ruangan_kir.php');
?>
            // $ses_uid,
            // $penghapusan_id
    // );
		// pr($_POST);
        
        $data_post=$PENGHAPUSAN->apl_userasetlistHPS("PTUSPMS");
        $POST=$_POST;
        // pr($POST);
        $POST_data=$PENGHAPUSAN->apl_userasetlistHPS_filter($data_post);
        $POST['penghapusan_nama_aset']=$POST_data;
        // pr($POST);
        // pr($_POST);
        // exit;
		$data = $PENGHAPUSAN->store_penetapan_penghapusan_pms($POST);

        $data_delete=$PENGHAPUSAN->apl_userasetlistHPS_del("RVWPTUSPMS");

        $data_delete=$PENGHAPUSAN->apl_userasetlistHPS_del("PTUSPMS");
        

/*
$asset_id=Array();
$no_reg=Array();
$nm_barang=Array();

$panjang=count($nmaset);

$penghapusan_id=get_auto_increment("Penghapusan");
 $query="INSERT INTO Penghapusan (Penghapusan_ID, NoSKHapus, TglHapus, AlasanHapus, Status, UserNm, FixPenghapusan) 
                                values ('','$no', '$olah_tgl', '$keterangan', '0','$UserNm', '1')";
 $result=  mysql_query($query) or die(mysql_error());