<?php
include "../../config/config.php";
include "$path/header.php";
include "$path/title.php";

$menu_id = 43;
$SessionUser = $SESSION->get_session_user();
//($SessionUser['ses_uid']!='') ? $Session = $SessionUser : $Session = $SESSION->get_session(array('title'=>'GuestMenu', 'ses_name'=>'menu_without_login')); 
$USERAUTH->FrontEnd_check_akses_menu($menu_id, $SessionUser);


$bupt_ppt_tanggalawal = $_POST['bupt_ppt_tanggalawal'];
$bupt_ppt_tanggalakhir = $_POST['bupt_ppt_tanggalakhir'];
$tgl_awal_fix=format_tanggal_db2($bupt_ppt_tanggalawal);
$tgl_akhir_fix=format_tanggal_db2($bupt_ppt_tanggalakhir);
$bupt_ppt_noskpemindahtanganan = $_POST['bupt_ppt_noskpemindahtanganan'];
$satker = $_POST['skpd_id'];
$submit = $_POST['tampil_filter'];

	    
            
	    if (isset($submit)){
                if ($bupt_ppt_tanggalawal=="" && $bupt_ppt_tanggalakhir=="" && $bupt_ppt_noskpemindahtanganan=="" && $satker==""){
    ?>
                <script>var r=confirm('Tidak ada isian filter');
                            if (r==false){
                                document.location="<?php echo "$url_rewrite/module/pemindahtanganan/"; ?>penetapan_pemindahtanganan.php";
                            }
                    </script>
    <?php
            }
コード例 #2
0
 $hasil = mysql_query($query) or die(mysql_error());
 //cari aset_id
 $sql = "SELECT Aset_ID FROM Aset \n\t\t\t\tWHERE \n\t\t\t\t\tKelompok_ID='{$kelompok_id}' AND NamaAset='{$nm_brg}' AND NomorReg='{$noreg}' AND Alamat='{$alamat}'\n\t\t\t\t\tAND AsalUsul='{$asalusul}' AND NilaiPerolehan='{$harga}'";
 $cek_hasil = mysql_query($sql) or die(mysql_error());
 $result = mysql_fetch_object($cek_hasil);
 $aset_id = $result->Aset_ID;
 $tanah_id = get_auto_increment("Tanah");
 $query_insert_tanah = "INSERT INTO Tanah (Tanah_ID,Aset_ID,LuasTotal) VALUES ('','{$aset_id}','{$luas}')";
 $data_hasil = mysql_query($query_insert_tanah) or die(mysql_error());
 //buat nyari kelompoktanah id
 $query_select_kel_id = "SELECT Kelompok_ID FROM Kelompok WHERE Kode='{$no_tanah}'";
 $hsl = mysql_query($query_select_kel_id) or die(mysql_error());
 $hsl_fix = mysql_fetch_object($hsl);
 $hsl_fix_nokode = $hsl_fix->Kelompok_ID;
 //buat balikin tanggal
 $tanggal = format_tanggal_db2($tgl_dokumen);
 //buat status tanah
 if ($status_tanah == 'Tanah Pemda') {
     $status_tanah = 10;
 } elseif ($status_tanah == 'Tanah Negara') {
     $status_tanah = 20;
 } elseif ($status_tanah == 'Tanah Ulayat/Adat') {
     $status_tanah = 30;
 } elseif ($status_tanah == 'Tanah Hak Guna Bangunan') {
     $status_tanah = 41;
 } elseif ($status_tanah == 'Tanah Hak Pakai') {
     $status_tanah = 42;
 } elseif ($status_tanah == 'Tanah Hak Pengelolaan') {
     $status_tanah = 43;
 }
 $query2 = "INSERT INTO Jaringan (Jaringan_ID,Aset_ID,Konstruksi,Panjang,Lebar,TglDokumen,NoDokumen,StatusTanah,Tanah_ID,KelompokTanah_ID) \n\t\tVALUES ('', '{$aset_id}', '{$konstruksi}', '{$panjang}', '{$lebar}', '{$tanggal}','{$no_dokumen}','{$status_tanah}','{$tanah_id}','{$hsl_fix_nokode}')";
    <?php
        include "../../config/config.php"; 
        
        $tgl_awal=$_POST['peman_penet_bmd_filt_tglawal'];
        $tgl_akhir=$_POST['peman_penet_bmd_filt_tglakhir'];
        $tgl_awal_fix=format_tanggal_db2($tgl_awal);
        $tgl_akhir_fix=format_tanggal_db2($tgl_akhir);
        $no_penetapan_idle=$_POST['peman_penet_bmd_filt_nopenet'];
        $alasan=$_POST['peman_penet_bmd_filt_alasan'];
        $submit=$_POST['tampil_idle'];
			
			// pr($_POST);
            //open_connection();
        
       
            if ($tgl_awal_fix!=""){
            $query_tgl_awal="TglSKKDH LIKE '%$tgl_awal_fix%'";
            }
            if($tgl_akhir_fix!=""){
            $query_tgl_akhir="TglSKKDH LIKE '%$tgl_akhir_fix%'";
            }
            if($no_penetapan_idle!=""){
            $query_npi="NoSKKDH LIKE '%$no_penetapan_idle%'";
            }
            if($alasan!=""){
            $query_alasan="Keterangan LIKE '%$alasan%'";
            }

            $parameter_sql="";
            if($tgl_awal!=""){
            $parameter_sql=$query_tgl_awal;
<?php
include "../../config/config.php"; 

$menu_id = 30;
($SessionUser['ses_uid']!='') ? $Session = $SessionUser : $Session = $SESSION->get_session(array('title'=>'GuestMenu', 'ses_name'=>'menu_without_login')); 
$SessionUser = $SESSION->get_session_user();
$USERAUTH->FrontEnd_check_akses_menu($menu_id, $SessionUser);


$id=$_POST['id_hidden'];
$tgl_aset=$_POST['penggu_penet_eks_tglpenet'];
$change_tgl=  format_tanggal_db2($tgl_aset);
$noaset=$_POST['penggu_penet_eks_nopenet'];
$ket=$_POST['penggu_penet_eks_ket'];
$submit=$_POST['penggunaan_edit_eks'];
// pr($_POST);
// exit;
$data=$UPDATE->update_daftar_penetapan_penggunaan($id,$tgl_aset,$change_tgl,$noaset,$ket,$submit);

/*

if(isset($submit)){
    $query="UPDATE Penggunaan SET TglSKKDH='$change_tgl', NoSKKDH='$noaset', Keterangan='$ket', TglUpdate='$change_tgl' WHERE Penggunaan_ID='$id'";
    $exec=mysql_query($query);
    echo "<script>alert('Data Sudah di Edit !!!'); document.location='$url_rewrite/module/penggunaan/penggunaan_penetapan_daftar.php';</script>";
}
 * 
 */
echo "<script>alert('Data Berhasil Dirubah'); document.location='$url_rewrite/module/penggunaan/penggunaan_penetapan_daftar.php?pid=1';</script>";
?>
コード例 #5
0
    <?php
        include "../../config/config.php"; 
        include "$path/header.php";
        include "$path/title.php";
        
        $no_penetapan=$_POST['peman_valid_filt_nopenet'];
        $tgl_penetapan=$_POST['peman_valid_filt_tglpenet'];
        $tgl_fix=format_tanggal_db2($tgl_penetapan);
        $tipe_pemanfaatan=$_POST['peman_valid_filt_tipe'];
        $alasan=$_POST['peman_valid_filt_alasan'];
        $submit=$_POST['tampil_valid_filter'];
        
        //open_connection();
        
        if ($no_penetapan!=""){
            $query_no_penetapan="NoSKKDH LIKE '%$no_penetapan%'";
            }
            if($tgl_penetapan!=""){
            $query_tgl_penetapan="TglSKKDH LIKE '%$tgl_fix%'";
            }
            if($tipe_pemanfaatan!=""){
            $query_tipe_pemanfaatan="TipePemanfaatan LIKE '%$tipe_pemanfaatan%'";
            }
            if($alasan!=""){
            $query_alasan="Keterangan LIKE '%$alasan%'";
            }

            $parameter_sql="";
            if($no_penetapan!=""){
            $parameter_sql=$query_no_penetapan;
            }
コード例 #6
0
 public function retrieve_daftar_penetapan_penggunaan($data = array(), $debug = false)
 {
     // pr($data);
     $tgl_awal = $data['tglawal'];
     $tgl_akhir = $data['tglakhir'];
     $tgl_awal_fix = format_tanggal_db2($tgl_awal);
     $tgl_akhir_fix = format_tanggal_db2($tgl_akhir);
     $no_penetapan_penggunaan = $data['nopenet'];
     $kodeSatker = $data['kodeSatker'];
     $filter = "";
     if ($tgl_awal) {
         $filter .= " AND DATE(p.TglSKKDH) >= '{$tgl_awal}' ";
     }
     if ($tgl_akhir) {
         $filter .= " AND DATE(p.TglSKKDH) <= '{$tgl_akhir}' ";
     }
     if ($kodeSatker) {
         $filter .= " AND pa.kodeSatker = '{$kodeSatker}' ";
     }
     $username = $_SESSION['ses_uoperatorid'];
     // $tabeltmp = $_SESSION['penggunaan_penetapan']['jenisaset'];
     // $getTable = $this->getTableKibAlias($tabeltmp);
     // $tabel = $getTable['listTableAbjad'];
     // pr($_SESSION);exit; AND a.UserNm = '{$username}'
     $sql = array('table' => 'penggunaan AS p, Penggunaanaset AS pa', 'field' => 'p.*', 'condition' => "p.NotUse = 0 AND p.FixPenggunaan = 0 AND p.Status IS NULL {$filter} group by p.Penggunaan_ID ", 'limit' => '100', 'joinmethod' => "LEFT JOIN", 'join' => "p.Penggunaan_ID = pa.Penggunaan_ID");
     $res = $this->db->lazyQuery($sql, $debug);
     if ($res) {
         return $res;
     }
     return false;
 }
$asset_id=Array();
$no_reg=Array();
$nm_barang=Array();
$panjang=count($nmaset);

$no=$_POST['peman_penet_eks_nopenet'];
$tgl=$_POST['peman_penet_eks_tglpenet'];
$olah_tgl=  format_tanggal_db2($tgl);
$tipe=$_POST['peman_penet_eks_tipe'];
$ket=$_POST['peman_penet_eks_ket'];
$nama_partner=$_POST['peman_penet_eks_nmpartner'];
$alamat_partner=$_POST['peman_penet_eks_alamatpartner'];
$tgl_mulai=$_POST['peman_penet_eks_tglmulai'];
$olah_tgl_mulai=  format_tanggal_db2($tgl_mulai);
$tgl_selesai=$_POST['peman_penet_eks_tglselesai'];
$olah_tgl_selesai=  format_tanggal_db2($tgl_selesai);
$jangka_waktu=$_POST['peman_penet_eks_jangkawaktu'];	


// pr($_POST);

$data = $PEMANFAATAN->pemanfaatan_penetapan_tambah_proses($_POST);
if ($data){
    echo "<script>alert('Data Berhasil Disimpan'); document.location='$url_rewrite/module/pemanfaatan/pemanfaatan_penetapan_daftar.php?pid=1';</script>";

}


exit;
$pemanfaatan_id=get_auto_increment("Pemanfaatan");
 $query="insert into Pemanfaatan (Pemanfaatan_ID, NoSKKDH, TipePemanfaatan, AlamatPartner, 
コード例 #8
0
 public function update_daftar_penetapan_penghapusan_pmOLDs($data, $debug = false)
 {
     ////////////////////////////////////////pr($data);
     // exit;
     $id = $data['id'];
     $no = $data['bup_pp_noskpenghapusan'];
     $tgl = $data['bup_pp_tanggal'];
     $olah_tgl = format_tanggal_db2($tgl);
     $keterangan = $data['bup_pp_get_keterangan'];
     $submit = $data['submit'];
     if (isset($submit)) {
         $sql = array('table' => 'Penghapusan', 'field' => "NoSKHapus='{$no}', TglHapus='{$olah_tgl}', AlasanHapus='{$keterangan}'", 'condition' => "Penghapusan_ID='{$id}'");
         $res = $this->db->lazyQuery($sql, $debug, 2);
         // $query="UPDATE Penghapusan SET NoSKHapus='$no', TglHapus='$olah_tgl', AlasanHapus='$keterangan' WHERE Penghapusan_ID='$id'";
         // ////////////////////////////////////////////////pr($query);
         // $exec=$this->query($query) or die($this->error());
     }
     if ($res) {
         return $res;
     }
     return false;
 }
コード例 #9
0
 function store_mutasi_barang($data, $debug = false)
 {
     $jenisaset = $data['jenisaset'];
     $satker = $data['kodeSatker'];
     $nodok = $data['mutasi_trans_eks_nodok'];
     $tgl = $data['mutasi_trans_eks_tglproses'];
     $olah_tgl = format_tanggal_db2($tgl);
     $alasan = $data['mutasi_trans_eks_alasan'];
     $pemakai = $data['mutasi_trans_eks_pemakai'];
     $kodeKelompok = $data['kodeKelompok'];
     $satkerAwal = $data['lastSatker'];
     $kelompokAwal = $data['lastKelompok'];
     $lokasiAwal = $data['lastLokasi'];
     $registerAwal = $data['lastNoRegister'];
     $namaSatkerAwal = $data['lastNamaSatker'];
     $UserNm = $_SESSION['ses_uoperatorid'];
     // usernm akan diganti jika session di implementasikan
     $nmaset = $data['mutasi_nama_aset'];
     $asset_id = array();
     $no_reg = array();
     $nm_barang = array();
     $asetKapitalisasi = array_keys($_POST['asetKapitalisasi']);
     $asetKapitalisasiOri = $_POST['asetKapitalisasi'];
     $mutasi_id = get_auto_increment("Mutasi");
     // pr($jenisaset);
     $listTable = array('A' => 'tanah', 'B' => 'mesin', 'C' => 'bangunan', 'D' => 'jaringan', 'E' => 'asetlain', 'F' => 'kdp');
     $panjang = count($nmaset);
     // $query="INSERT INTO Mutasi (Mutasi_ID, NoSKKDH , TglSKKDH,
     //                     Keterangan, SatkerTujuan, NotUse, TglUpdate,
     //                     UserNm, FixMutasi, Pemakai)
     //                 values ('','$nodok','$olah_tgl',
     //                        '$alasan','$satker','','$olah_tgl','$UserNm','1','$pemakai')";
     $sql = array('table' => "Mutasi", 'field' => "NoSKKDH , TglSKKDH, Keterangan, SatkerTujuan, NotUse, TglUpdate, UserNm, FixMutasi, Pemakai", 'value' => "'{$nodok}','{$olah_tgl}', '{$alasan}','{$satker}',0,'{$olah_tgl}','{$UserNm}','0','{$pemakai}'");
     $res = $this->db->lazyQuery($sql, $debug, 1);
     for ($i = 0; $i < $panjang; $i++) {
         $getJenisAset = $this->getJenisAset($nmaset);
         $getKIB = $this->getTableKibAlias($getJenisAset[$i]);
         $tmp = $nmaset[$i];
         $tmp_olah = explode("<br/>", $tmp);
         $asset_id[$i] = $tmp_olah[0];
         $no_reg[$i] = $tmp_olah[1];
         $nm_barang[$i] = $tmp_olah[2];
         // $logData = $this->db->logIt(array($getKIB['listTableOri']), $asset_id[$i]);
         $lokasiBaru = ubahLokasi($lokasiAwal[$i], $satker);
         //buat gabung nomor registrasi akhir
         // $array=array($pemilik,$provinsi,$kabupaten,$row_kode_satker,$tahun,$row_kode_unit);
         $sqlSelect = array('table' => "Aset", 'field' => "MAX(noRegister) AS noRegister", 'condition' => "kodeKelompok = '{$kelompokAwal[$i]}' AND kodeLokasi = '{$lokasiBaru}'");
         $result = $this->db->lazyQuery($sqlSelect, $debug);
         // pr($result);
         $gabung_nomor_reg_tujuan = intval($result[0]['noRegister'] + 1);
         /*
         echo "<pre>";
         print_r($gabung);
         echo "</pre>";
         */
         $sql1 = array('table' => "MutasiAset", 'field' => "Mutasi_ID,Aset_ID,NamaSatkerAwal, NomorRegAwal,NomorRegBaru,SatkerAwal,SatkerTujuan", 'value' => "'{$mutasi_id}','{$asset_id[$i]}','{$namaSatkerAwal[$i]}','{$registerAwal[$i]}','{$gabung_nomor_reg_tujuan}','{$satkerAwal[$i]}','{$satker}'");
         $res1 = $this->db->lazyQuery($sql1, $debug, 1);
         if (!in_array($asset_id[$i], $asetKapitalisasi)) {
             $sql2 = array('table' => "Aset", 'field' => "kodeSatker='{$satker}', kodeLokasi = '{$lokasiBaru}', noRegister='{$gabung_nomor_reg_tujuan}', NotUse=0, StatusValidasi = 3, Status_Validasi_Barang = 3", 'condition' => "Aset_ID='{$asset_id[$i]}'");
             $res2 = $this->db->lazyQuery($sql2, $debug, 2);
         }
         // pr($getKIB);
         $sqlKib = array('table' => "{$getKIB['listTableOri']}", 'field' => "kodeSatker='{$satker}', kodeLokasi = '{$lokasiBaru}', noRegister='{$gabung_nomor_reg_tujuan}', StatusValidasi = 3, Status_Validasi_Barang = 3, StatusTampil = 3", 'condition' => "Aset_ID='{$asset_id[$i]}'");
         $resKib = $this->db->lazyQuery($sqlKib, $debug, 2);
         $sql3 = array('table' => "PenggunaanAset", 'field' => "StatusMutasi=1, Mutasi_ID='{$mutasi_id}'", 'condition' => "Aset_ID='{$asset_id[$i]}'");
         $res3 = $this->db->lazyQuery($sql3, $debug, 2);
         $sql = array('table' => 'aset', 'field' => "TipeAset", 'condition' => "Aset_ID={$asset_id[$i]}");
         $result = $this->db->lazyQuery($sql, $debug);
         $asetid[$asset_id[$i]] = $listTable[implode(',', $result[0])];
     }
     if ($result) {
         $noDok = array('penggu_penet_eks_nopenet', 'mutasi_trans_eks_nodok');
         foreach ($_POST as $key => $value) {
             if (in_array($value, $noDok)) {
                 $noDokumen = $_POST[$value];
             } else {
                 $noDokumen = '-';
             }
         }
         foreach ($asetid as $key => $value) {
             if (!in_array($key, $asetKapitalisasi)) {
                 $this->db->logIt($tabel = array($value), $Aset_ID = $key, $kd_riwayat = 3, $noDokumen = $nodok, $tglProses = $olah_tgl, $text = "Mutasi Pending Status");
             } else {
                 $this->db->logIt($tabel = array($value), $Aset_ID = $key, $kd_riwayat = 25, $noDokumen = $nodok, $tglProses = $olah_tgl, $text = "Mutasi Pending Status dengan mode kapitalisasi", $tmpSatker = $asetKapitalisasiOri[$key]);
             }
         }
         return true;
     }
     return false;
 }
コード例 #10
0
 function pemanfaatan_pengembalian_daftar($data, $debug = false)
 {
     $tgl_awal = $data['peman_pengem_filt_tglawal'];
     $tgl_akhir = $data['peman_pengem_filt_tglakhir'];
     $tgl_awal_fix = format_tanggal_db2($tgl_awal);
     $tgl_akhir_fix = format_tanggal_db2($tgl_akhir);
     $no_pemanfaatan_pengembalian = $data['peman_pengem_filt_nopenet'];
     $lokasibast = $data['peman_pengem_filt_lokasi'];
     $filter = "";
     if ($tgl_awal) {
         $filter .= " AND p.NoSKKDH = '{$tgl_awal}' ";
     }
     if ($tgl_akhir) {
         $filter .= " AND p.TglUpdate = '{$tgl_akhir}' ";
     }
     if ($no_pemanfaatan_pengembalian) {
         $filter .= " AND p.TipePemanfaatan = '{$no_pemanfaatan_pengembalian}'";
     }
     if ($lokasibast) {
         $filter .= " AND p.Keterangan = '{$lokasibast}'";
     }
     $query = "SELECT * FROM bast_pengembalian WHERE {$parameter_sql} AND FixPengembalian=1 ";
     $exec = mysql_query($query) or die(mysql_error());
     $sql = array('table' => "bast_pengembalian", 'field' => "*", 'condition' => "FixPengembalian=1 {$filter}", 'limit' => '100');
     $result = $this->db->lazyQuery($sql, $debug);
     if ($result) {
         return $result;
     }
     return false;
 }
$menu_id = 30;
($SessionUser['ses_uid']!='') ? $Session = $SessionUser : $Session = $SESSION->get_session(array('title'=>'GuestMenu', 'ses_name'=>'menu_without_login')); 
$SessionUser = $SESSION->get_session_user();
$USERAUTH->FrontEnd_check_akses_menu($menu_id, $SessionUser);

$submit=$_POST['penggunaan_eks'];

$UserNm=$_SESSION['ses_uname'];// usernm akan diganti jika session di implementasikan
$nmaset=$_POST['penggu_nama_aset'];
$penggunaan_id=get_auto_increment("Penggunaan");
$ses_uid=$_SESSION['ses_uid'];

$penggu_penet_eks_ket=$_POST['penggu_penet_eks_ket'];	
$penggu_penet_eks_nopenet=$_POST['penggu_penet_eks_nopenet'];	
$penggu_penet_eks_tglpenet=$_POST['penggu_penet_eks_tglpenet'];	
$olah_tgl=  format_tanggal_db2($penggu_penet_eks_tglpenet);

$data=$STORE->store_penetapan_penggunaan
    (
            $submit,
            $UserNm,
            $nmaset,
            $penggunaan_id,
            $ses_uid,
            $penggu_penet_eks_ket,
            $penggu_penet_eks_nopenet,
            $penggu_penet_eks_tglpenet,
            $olah_tgl
    );

/*
include "../../config/config.php";
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
$UserNm = $_SESSION['ses_uname'];
// usernm akan diganti jika session di implementasikan
$guid = $_SESSION['ses_uid'];
$id = $_POST['id'];
$no_penetapan = $_POST['NoBASP'];
$tgl_penetapan = $_POST['TglBAST'];
$no_bast = $_POST['bupt_bast_nobast'];
$tgl_bast = $_POST['bupt_bast_tglbast'];
$olah_tgl_penetapan = format_tanggal_db2($tgl_penetapan);
$olah_tgl_bast = format_tanggal_db2($tgl_bast);
$lokasi_basp = $_POST['LokasiBASP'];
$tipe_pemindahtanganan = $_POST['bupt_bast_tipepemindahtanganan'];
$peruntukan = $_POST['bupt_bast_peruntukan'];
$alamat_pihak_kedua = $_POST['bupt_bast_alamat'];
$nama1 = $_POST['bupt_bast_nama_1'];
$jabatan1 = $_POST['bupt_bast_jabatan_1'];
$nip1 = $_POST['bupt_bast_nip_1'];
$lokasi1 = $_POST['bupt_bast_lokasi_1'];
$nama2 = $_POST['bupt_bast_nama_2'];
$jabatan2 = $_POST['bupt_bast_jabatan_2'];
$nip2 = $_POST['bupt_bast_nip_2'];
$lokasi2 = $_POST['bupt_bast_lokasi_2'];
$submit = $_POST['btn_action'];
$data = $UPDATE->update_daftar_penetapan_pemindahtanganan($UserNm, $guid, $id, $no_penetapan, $tgl_penetapan, $no_bast, $tgl_bast, $olah_tgl_penetapan, $olah_tgl_bast, $lokasi_basp, $tipe_pemindahtanganan, $peruntukan, $alamat_pihak_kedua, $nama1, $jabatan1, $nip1, $lokasi1, $nama2, $jabatan2, $nip2, $lokasi2, $submit);
/*
    <?php
        include "../../config/config.php"; 
        include "$path/header.php";
        include "$path/title.php";
        
        $menu_id = 48;
        ($SessionUser['ses_uid']!='') ? $Session = $SessionUser : $Session = $SESSION->get_session(array('title'=>'GuestMenu', 'ses_name'=>'menu_without_login')); 
        $SessionUser = $SESSION->get_session_user();
        $USERAUTH->FrontEnd_check_akses_menu($menu_id, $SessionUser);
        
        $no_penetapan=$_POST['buph_val_noskpemusnahan'];
        $tgl_penetapan_awal=$_POST['buph_val_tgl_awal'];
        $tgl_awal_fix=format_tanggal_db2($tgl_penetapan_awal);
        $tgl_penetapan_akhir=$_POST['buph_val_tgl_akhir'];
        $tgl_akhir_fix=format_tanggal_db2($tgl_penetapan_akhir);
        $lokasi=$_POST['lokasi_id'];
        $submit=$_POST['tampil_filter'];
        
        
        $paging = $LOAD_DATA->paging($_GET['pid']);    
        $ses_uid=$_SESSION['ses_uid'];

        if (isset($submit))
                            {
                                        unset($_SESSION['ses_retrieve_filter_'.$menu_id.'_'.$SessionUser['ses_uid']]);
                                        $parameter = array('menuID'=>$menu_id,'type'=>'checkbox','param'=>$_POST,'paging'=>$paging,'ses_uid'=>$ses_uid);
                                        $data = $RETRIEVE->retrieve_validasi_pemusnahan($parameter);
                            } else {

        $sessi = $_SESSION['ses_retrieve_filter_'.$menu_id.'_'.$SessionUser['ses_uid']];
        $parameter = array('menuID'=>$menu_id,'type'=>'checkbox','param'=>$sessi,'paging'=>$paging,'ses_uid'=>$ses_uid);
<?php

include "../../config/config.php";
$UserNm = $_SESSION['ses_uname'];
// usernm akan diganti jika session di implementasikan
$nmaset = $_POST['peman_idle_nama_aset'];
$asset_id = array();
$no_reg = array();
$nm_barang = array();
$panjang = count($nmaset);
$peman_penet_bmd_eks_ket = $_POST['peman_penet_bmd_eks_ket'];
$peman_penet_bmd_eks_nopenet = $_POST['peman_penet_bmd_eks_nopenet'];
$peman_penet_bmd_eks_tglpenet = $_POST['peman_penet_bmd_eks_tglpenet'];
$olah_tgl = format_tanggal_db2($peman_penet_bmd_eks_tglpenet);
$menganggur_id = get_auto_increment("Menganggur");
$query = "insert into Menganggur (Menganggur_ID, NoSKKDH , TglSKKDH, \n                                    Keterangan, NotUse, TglUpdate, \n                                    UserNm, FixMenganggur) \n                                values (null,'{$peman_penet_bmd_eks_nopenet}','{$olah_tgl}',\n                                       '{$peman_penet_bmd_eks_ket}','','{$olah_tgl}','\n                                   {$UserNm}','1')";
$result = mysql_query($query) or die(mysql_error());
for ($i = 0; $i < $panjang; $i++) {
    $tmp = $nmaset[$i];
    $tmp_olah = explode("<br/>", $tmp);
    $asset_id[$i] = $tmp_olah[0];
    $no_reg[$i] = $tmp_olah[1];
    $nm_barang[$i] = $tmp_olah[2];
    /*echo  "No= $i <br/>
             Asset ID =$asset_id[$i] <br/>
             No register=$no_reg[$i] <br/>
             Nama barang =$nm_barang[$i] <br/>";
      * 
      */
    $query = "insert into MenganggurAset(Menganggur_ID,Aset_ID,StatusUsulan) values('{$menganggur_id}','{$asset_id[$i]}','0')";
    $result = mysql_query($query) or die(mysql_error());
コード例 #15
0
 public function retrieve_daftar_cetak_pemusnahan($parameter)
 {
     if (!isset($_SESSION['ses_retrieve_filter_' . $parameter['menuID'] . '_' . $this->UserSes['ses_uid']])) {
         $no_pemusnahan = $parameter['param']['buph_cdph_noskpemusnahan'];
         $tgl_pemusnahan_awal = $parameter['param']['buph_cdph_tanggalawal'];
         $tgl_awal_fix = format_tanggal_db2($tgl_pemusnahan_awal);
         $tgl_pemusnahan_akhir = $parameter['param']['buph_cdph_tanggalakhir'];
         $tgl_akhir_fix = format_tanggal_db2($tgl_pemusnahan_akhir);
         $lokasi = $parameter['param']['lokasi_id'];
         $submit = $parameter['param']['tampil_filter'];
         if ($no_pemusnahan != "") {
             $query_no_pemusnahan = "NoBAPemusnahan LIKE '%{$no_pemusnahan}%'";
         }
         if ($tgl_awal_fix != "") {
             $query_tgl_awal = "TglBAPemusnahan LIKE '%{$tgl_awal_fix}%'";
         }
         if ($tgl_akhir_fix != "") {
             $query_tgl_akhir = "TglBAPemusnahan LIKE '%{$tgl_akhir_fix}%'";
         }
         if ($lokasi != "") {
             $temp = explode(",", $lokasi);
             $panjang = count($temp);
             $cek = 0;
             for ($i = 0; $i < $panjang; $i++) {
                 $cek = 1;
                 if ($i == 0) {
                     $query_lokasi .= "Lokasi_ID ='{$temp[$i]}'";
                 } else {
                     $query_lokasi .= " or Lokasi_ID ='{$temp[$i]}'";
                 }
             }
             $query_change_satker = "SELECT KodeLokasi FROM Lokasi \n                                                            WHERE {$query_lokasi}";
             //print_r($query_change_satker);
             $exec_query_change_satker = $this->query($query_change_satker);
             while ($proses_kode = $this->fetch_array($exec_query_change_satker)) {
                 //$dataRow[]=$proses_kode;
                 echo "<pre>";
                 //print_r($proses_kode['Kode']);
                 echo "</pre>";
                 if ($proses_kode['KodeLokasi'] != "") {
                     $query_return_kode = "SELECT Lokasi_ID FROM Lokasi WHERE KodeLokasi LIKE '{$proses_kode['KodeLokasi']}%'";
                 }
                 echo "<pre>";
                 //print_r($query_return_kode);
                 echo "</pre>";
             }
             $exec_query_return_kode = $this->query($query_return_kode);
             while ($proses_kode2 = $this->fetch_array($exec_query_return_kode)) {
                 $dataRow2[] = $proses_kode2['Lokasi_ID'];
             }
             //$dataImplode = implode(',',$dataRow2);
             //print_r($dataImplode);
             if ($dataRow2 != "") {
                 $panjang = count($dataRow2);
                 //$query_lokasi_fix="(";
                 $cek = 0;
                 for ($i = 0; $i < $panjang; $i++) {
                     $cek = 1;
                     if ($i == 0) {
                         $query_lokasi_fix .= "c.Lokasi_ID = '" . $dataRow2[$i] . "'";
                     } else {
                         $query_lokasi_fix .= " or c.Lokasi_ID = '" . $dataRow2[$i] . "'";
                     }
                 }
             }
             $query_change_lokasi_fix = "SELECT a.BAPemusnahan_ID FROM BAPemusnahan AS a LEFT JOIN\n                                                                    BAPemusnahanAset AS b ON a.BAPemusnahan_ID=b.BAPemusnahan_ID\n                                                                    INNER JOIN Aset AS c ON b.Aset_ID=c.Aset_ID WHERE {$query_lokasi_fix}";
             //print_r($query_change_lokasi_fix);
             $exec_query_change_lokasi_fix = $this->query($query_change_lokasi_fix) or die($this->error());
             if ($this->num_rows($exec_query_change_lokasi_fix)) {
                 while ($proses_kode_fix = $this->fetch_array($exec_query_change_lokasi_fix)) {
                     $data_proses_kode_fix[] = $proses_kode_fix['BAPemusnahan_ID'];
                 }
                 $gabung = implode(',', $data_proses_kode_fix);
             }
             if ($gabung != "") {
                 $query_lokasi_fix2 = "BAPemusnahan_ID IN ({$gabung})";
             } else {
                 $query_lokasi_fix2 = "BAPemusnahan_ID IN (NULL)";
             }
         }
         //echo "lll";
         $parameter_sql = "";
         if ($tgl_pemusnahan_awal != "") {
             $parameter_sql = $query_tgl_awal;
         }
         if ($tgl_pemusnahan_akhir != "" && $parameter_sql != "") {
             $parameter_sql = "TglBAPemusnahan BETWEEN '{$tgl_awal_fix}' AND '{$tgl_akhir_fix}'";
         }
         if ($tgl_pemusnahan_akhir != "" && $parameter_sql == "") {
             $parameter_sql = $query_tgl_akhir;
         }
         if ($no_pemusnahan != "" && $parameter_sql != "") {
             $parameter_sql = $parameter_sql . " AND " . $query_no_pemusnahan;
         }
         if ($no_pemusnahan != "" && $parameter_sql == "") {
             $parameter_sql = $query_no_pemusnahan;
         }
         if ($lokasi != "" && $parameter_sql != "") {
             $parameter_sql = $parameter_sql . " AND " . $query_lokasi_fix2;
         }
         if ($lokasi != "" && $parameter_sql == "") {
             $parameter_sql = $query_lokasi_fix2;
         }
         if ($parameter_sql != "") {
             $parameter_sql = "WHERE " . $parameter_sql . " AND ";
         } else {
             $parameter_sql = " WHERE ";
         }
         //echo "$parameter_sql";
         $_SESSION['ses_retrieve_filter_' . $parameter['menuID'] . '_' . $this->UserSes['ses_uid']] = $parameter_sql;
     }
     echo '<pre>';
     //print_r($_SESSION);
     echo '</pre>';
     switch ($parameter['menuID']) {
         case '49':
             $query_condition = " FixPemusnahan=1 and Status=1 ";
             break;
     }
     if ($_SESSION['ses_retrieve_filter_' . $parameter['menuID'] . '_' . $this->UserSes['ses_uid']] != '') {
         $sql_param = " {$query_condition}";
     } else {
         $sql_param = " {$query_condition}";
     }
     //print_r($_SESSION);
     $query = "SELECT BAPemusnahan_ID FROM BAPemusnahan " . $_SESSION['ses_retrieve_filter_' . $parameter['menuID'] . '_' . $this->UserSes['ses_uid']] . " {$sql_param} ORDER BY BAPemusnahan_ID ASC LIMIT {$parameter['paging']}, 10";
     //print_r($query);
     $result = $this->query($query) or die($this->error());
     $rows = $this->num_rows($result);
     $data = '';
     $dataArray = '';
     while ($data = $this->fetch_object($result)) {
         $dataArray[] = $data;
     }
     //print_r($dataArray);
     $dataArr = '';
     $dataNoKontrak = '';
     if ($dataArray != '') {
         foreach ($dataArray as $BAPemusnahan_ID) {
             $query = "SELECT * \n                                        FROM BAPemusnahan\n                                        WHERE  BAPemusnahan_ID = {$BAPemusnahan_ID->BAPemusnahan_ID}\n                                        ORDER BY BAPemusnahan_ID asc";
             //print_r($query);
             $result = $this->query($query) or die($this->error());
             //$resultKontrak = $this->query($queryKontrak) or die($this->error());
             $check = $this->num_rows($result);
             $i = 1;
             while ($data = $this->fetch_array($result)) {
                 $dataArr[] = $data;
             }
             //print_r($dataArr);
             //while ($dataKontrak = $this->fetch_object($resultKontrak))
             //{
             //$dataNoKontrak[$dataKontrak->Aset_ID][] = $dataKontrak->NoKontrak;
             //}
         }
     }
     // kosongkan variabel untuk menghemat alokasi memory
     //$result = '';
     //$resultKontrak = '';
     //$result_apl = '';
     // nilai kembalian dalam bentuk array
     return array('dataArr' => $dataArr);
 }
コード例 #16
0
<?php

include "../../config/config.php";
include "{$path}/header.php";
include "{$path}/title.php";
open_connection();
$tgl_awl = format_tanggal_db2($_POST['bup_pu_tanggalawal']);
$tgl_ahr = format_tanggal_db2($_POST['bup_pu_tanggalakhir']);
if ($tgl_awl == '--' || $tgl_ahr == '--') {
    $tgl_awl = "";
    $tgl_ahr = "";
}
$no_sk_hps = $_POST['bup_pu_noskpenghapusan'];
$nm_satker = $_POST['kelompok'];
/*if($tgl_awl !=''){
		$qry_tglawl = " TglHapus = '".$tgl_awl."' ";
	}
	if($tgl_ahr !=''){
		$qry_tglahr = "TglHapus = '".$tgl_ahr."' ";
	}
	*/
if ($tgl_awl != '' && $tgl_ahr != '') {
    $qry_tglawlahr = " TglHapus between '" . $tgl_awl . "' and '" . $tgl_ahr . "' ";
}
if ($no_sk_hps != '') {
    $qry_so_skhps = "NoSKHapus = '" . $no_sk_hps . "' ";
}
if ($nm_satker != '') {
    $qry_nmsatker = "NamaSatker = '" . $nm_satker . "' ";
}
/*if($tgl_awl !=''){
コード例 #17
0
<?php
include "../../config/config.php"; 

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

$id=$_POST['Mutasi_ID'];
$satker=$_POST['skpd_id'];
$nodok=$_POST['mutasi_trans_eks_nodok'];
$tgl=$_POST['mutasi_trans_eks_tglproses'];
$olah_tgl=  format_tanggal_db2($tgl);
$alasan=$_POST['mutasi_trans_eks_alasan'];
$pemakai=$_POST['mutasi_trans_eks_pemakai'];
$nmaset=$_POST['mutasi_aset'];
$UserNm=$_SESSION['ses_uname'];// usernm akan diganti jika session di implementasikan

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

$panjang=count($nmaset);
// echo "panjang".$panjang;
// pr($_POST);
// exit;

// $UserNm="admin";// usernm akan diganti jika session di implementasikan


 $query="UPDATE Mutasi SET NoSKKDH='$nodok', TglSKKDH='$olah_tgl', Keterangan='$alasan', SatkerTujuan='$satker', 
コード例 #18
0
 public function retrieve_daftar_penetapan_pemindahtanganan_($parameter)
 {
     if (!isset($_SESSION['ses_retrieve_filter_' . $parameter['menuID'] . '_' . $this->UserSes['ses_uid']])) {
         $bupt_ppt_tanggalawal = $parameter['param']['bupt_ppt_tanggalawal'];
         $bupt_ppt_tanggalakhir = $parameter['param']['bupt_ppt_tanggalakhir'];
         $tgl_awal_fix = format_tanggal_db2($bupt_ppt_tanggalawal);
         $tgl_akhir_fix = format_tanggal_db2($bupt_ppt_tanggalakhir);
         $bupt_ppt_noskpemindahtanganan = $parameter['param']['bupt_ppt_noskpemindahtanganan'];
         $satker = $parameter['param']['skpd_id'];
         if ($tgl_awal_fix != "") {
             $query_tgl_awal = "TglBASP LIKE '%{$tgl_awal_fix}%'";
         }
         if ($tgl_akhir_fix != "") {
             $query_tgl_akhir = "TglBASP LIKE '%{$tgl_akhir_fix}%'";
         }
         if ($bupt_ppt_noskpemindahtanganan != "") {
             $query_no_pindah = "NoBASP LIKE '%" . $bupt_ppt_noskpemindahtanganan . "%' ";
         }
         if ($satker != "") {
             $temp = explode(",", $satker);
             $panjang = count($temp);
             //$query_satker="(";
             $cek = 0;
             for ($i = 0; $i < $panjang; $i++) {
                 $cek = 1;
                 if ($i == 0) {
                     $query_satker .= "Satker_ID ='{$temp[$i]}'";
                 } else {
                     $query_satker .= " or Satker_ID ='{$temp[$i]}'";
                 }
             }
             //if ($cek==1){
             //$query_satker.=")";}
             //else{
             //$query_satker="";}
             $query_change_satker = "SELECT KodeSektor, KodeSatker, NamaSatker FROM Satker \r\n                                                WHERE {$query_satker}";
             //print_r($query_change_satker);
             $exec_query_change_satker = $this->query($query_change_satker) or die($this->error());
             while ($proses_kode = $this->fetch_array($exec_query_change_satker)) {
                 //$dataRow[]=$proses_kode;
                 echo "<pre>";
                 //print_r($proses_kode['KodeSektor']);
                 echo "</pre>";
                 echo "<pre>";
                 //print_r($proses_kode['KodeSatker']);
                 echo "</pre>";
                 echo "<pre>";
                 //print_r($proses_kode['NamaSatker']);
                 echo "</pre>";
                 if ($proses_kode['KodeSektor'] != "" && $proses_kode['KodeSatker'] != "") {
                     $query_return_kode = "SELECT Satker_ID FROM Satker WHERE NGO=0 AND (KodeSatker LIKE '" . $proses_kode['KodeSektor'] . "%' OR KodeSatker='{$proses_kode['KodeSatker']}')";
                 }
                 if ($proses_kode['KodeSektor'] != "" && $proses_kode['KodeSatker'] == "") {
                     $query_return_kode = "SELECT Satker_ID FROM Satker WHERE NGO=0 AND (KodeSatker LIKE '" . $proses_kode['KodeSektor'] . "%')";
                 }
                 echo "<pre>";
                 //print_r($query_return_kode);
                 echo "</pre>";
             }
             $exec_query_return_kode = $this->query($query_return_kode) or die($this->error());
             while ($proses_kode2 = $this->fetch_array($exec_query_return_kode)) {
                 $dataRow2[] = $proses_kode2['Satker_ID'];
             }
             //$dataImplode = implode(',',$dataRow2);
             //print_r($dataImplode);
             if ($dataRow2 != "") {
                 $panjang = count($dataRow2);
                 //$query_satker_fix="(";
                 $cek = 0;
                 for ($i = 0; $i < $panjang; $i++) {
                     $cek = 1;
                     if ($i == 0) {
                         $query_satker_fix .= "c.LastSatker_ID = '" . $dataRow2[$i] . "'";
                     } else {
                         $query_satker_fix .= " or c.LastSatker_ID = '" . $dataRow2[$i] . "'";
                     }
                 }
                 //if ($cek==1){
                 //$query_satker_fix.=")";}
                 //else{
                 //$query_satker_fix="";}
                 //$query_satker_fix ="LastSatker_ID LIKE '%".$proses_kode2['Satker_ID']."%' ";
             }
             $query_change_satker_fix = "SELECT a.BASP_ID FROM BASP AS a LEFT JOIN BASPAset AS b ON a.BASP_ID=b.BASP_ID\r\n                                                                LEFT JOIN Aset AS c ON b.Aset_ID=c.Aset_ID WHERE {$query_satker_fix}";
             $exec_query_change_satker_fix = $this->query($query_change_satker_fix) or die($this->error());
             if ($this->num_rows($exec_query_change_satker_fix)) {
                 while ($proses_kode_fix = $this->fetch_array($exec_query_change_satker_fix)) {
                     $data_proses_kode_fix[] = $proses_kode_fix['BASP_ID'];
                 }
                 $gabung = implode(',', $data_proses_kode_fix);
             }
             if ($gabung != "") {
                 $query_satker_fix2 = "BASP_ID IN ({$gabung})";
             } else {
                 $query_satker_fix2 = "BASP_ID IN (NULL)";
             }
         }
         $parameter_sql = "";
         if ($bupt_ppt_tanggalawal != "") {
             $parameter_sql = $query_tgl_awal;
         }
         if ($bupt_ppt_tanggalakhir != "" && $parameter_sql != "") {
             $parameter_sql = "TglBASP BETWEEN '{$tgl_awal_fix}' AND '{$tgl_akhir_fix}'";
         }
         if ($bupt_ppt_tanggalakhir != "" && $parameter_sql == "") {
             $parameter_sql = $query_tgl_akhir;
         }
         if ($bupt_ppt_noskpemindahtanganan != "" && $parameter_sql != "") {
             $parameter_sql = $parameter_sql . " AND " . $query_no_pindah;
         }
         if ($bupt_ppt_noskpemindahtanganan != "" && $parameter_sql == "") {
             $parameter_sql = $query_no_pindah;
         }
         if ($satker != "" && $parameter_sql != "") {
             $parameter_sql = $parameter_sql . " AND " . $query_satker_fix2;
         }
         if ($satker != "" && $parameter_sql == "") {
             $parameter_sql = $query_satker_fix2;
         }
         //echo 'tes'.$parameter_sql;
         if ($parameter_sql != "") {
             $parameter_sql = "WHERE " . $parameter_sql . " AND ";
         } else {
             $parameter_sql = "WHERE ";
         }
         $_SESSION['ses_retrieve_filter_' . $parameter['menuID'] . '_' . $this->UserSes['ses_uid']] = $parameter_sql;
         //echo "$parameter_sql";
     }
     echo '<pre>';
     //print_r($_SESSION);
     echo '</pre>';
     switch ($parameter['menuID']) {
         case '43':
             // Katalog
             $query_condition = " FixPemindahtanganan=1 AND Status=0 ";
             break;
     }
     if ($_SESSION['ses_retrieve_filter_' . $parameter['menuID'] . '_' . $this->UserSes['ses_uid']] != '') {
         $sql_param = " {$query_condition}";
     } else {
         $sql_param = " {$query_condition}";
     }
     //print_r($_SESSION);
     $query = "SELECT BASP_ID FROM BASP " . $_SESSION['ses_retrieve_filter_' . $parameter['menuID'] . '_' . $this->UserSes['ses_uid']] . " {$sql_param} ORDER BY BASP_ID ASC LIMIT {$parameter['paging']}, 10";
     //print_r($query);
     $result = $this->query($query) or die($this->error());
     $rows = $this->num_rows($result);
     $data = '';
     $dataArray = '';
     while ($data = $this->fetch_object($result)) {
         $dataArray[] = $data;
     }
     //print_r($dataArray);
     $dataArr = '';
     $dataNoKontrak = '';
     if ($dataArray != '') {
         foreach ($dataArray as $BASP_ID) {
             $query = "SELECT * \r\n                                        FROM BASP\r\n                                        WHERE  BASP_ID = {$BASP_ID->BASP_ID}\r\n                                        ORDER BY BASP_ID asc  ";
             //print_r($query);
             //$queryKontrak = "SELECT a.NoKontrak, b.Aset_ID FROM Kontrak AS a LEFT JOIN KontrakAset As b ON a.Kontrak_ID = b.Kontrak_ID
             //              WHERE b.Aset_ID = $Aset_ID->Aset_ID";
             $result = $this->query($query) or die($this->error());
             //$resultKontrak = $this->query($queryKontrak) or die($this->error());
             $check = $this->num_rows($result);
             $i = 1;
             while ($data = $this->fetch_array($result)) {
                 $dataArr[] = $data;
             }
             //print_r($dataArr);
             //while ($dataKontrak = $this->fetch_object($resultKontrak))
             //{
             //$dataNoKontrak[$dataKontrak->Aset_ID][] = $dataKontrak->NoKontrak;
             //}
         }
     }
     return array('dataArr' => $dataArr);
 }