<?php require_once '../../../../config/config.php'; $msg = ''; $error = FALSE; $act = isset($_REQUEST['act']) ? clean($_REQUEST['act']) : ''; $id = isset($_REQUEST['id']) ? clean($_REQUEST['id']) : ''; $kode_blok = isset($_REQUEST['kode_blok']) ? clean($_REQUEST['kode_blok']) : ''; $pola_bayar = isset($_REQUEST['pola_bayar']) ? to_number($_REQUEST['pola_bayar']) : 0; $sebelumnya = isset($_REQUEST['sebelumnya']) ? to_number($_REQUEST['sebelumnya']) : 0; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); ex_app('M'); ex_mod('M09'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); if ($act == 'Tambah') { ex_ha('M09', 'I'); ex_empty($kode_blok, 'Kode Blok harus diisi'); $query = "DELETE FROM DETAIL_POLA_BAYAR WHERE KODE_BLOK = '{$kode_blok}'"; $conn->Execute($query); $data = $conn->Execute("SELECT KODE_POLA_BAYAR AS POLA FROM POLA_BAYAR"); while (!$data->EOF) { $pola_bayar = $data->fields['POLA']; $harga_tanah = isset($_REQUEST['harga_tanah_' . $pola_bayar]) ? to_number($_REQUEST['harga_tanah_' . $pola_bayar]) : 0; $harga_bangunan = isset($_REQUEST['harga_bangunan_' . $pola_bayar]) ? to_number($_REQUEST['harga_bangunan_' . $pola_bayar]) : 0; if ($harga_bangunan == 0 && $harga_tanah == 0) { $data->movenext(); continue;
$msg = ''; $error = FALSE; $act = isset($_REQUEST['act']) ? clean($_REQUEST['act']) : ''; $id = isset($_REQUEST['id']) ? clean($_REQUEST['id']) : ''; $kode_jenis = isset($_REQUEST['kode_jenis']) ? clean($_REQUEST['kode_jenis']) : ''; $nama_jenis = isset($_REQUEST['nama_jenis']) ? clean($_REQUEST['nama_jenis']) : ''; $nama_file = isset($_REQUEST['nama_file']) ? clean($_REQUEST['nama_file']) : ''; //Mulai memorises data $file_name = $_FILES['data_upload']['name']; $file_size = $_FILES['data_upload']['size']; $folder = '../../../../../config/Template/'; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); // ex_app('P'); ex_mod('P04'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); if ($act == 'Tambah') { ex_ha('JB04', 'I'); ex_empty($kode_jenis, 'Kode harus diisi.'); ex_empty($nama_jenis, 'Jenis PAIJB harus diisi.'); ex_empty($nama_file, 'Nama File harus diisi.'); //cari extensi file dengan menggunakan fungsi explode $explode = explode('.', $file_name); $extensi = $explode[count($explode) - 1]; //check apakah type file sudah sesuai if (!in_array($extensi, $file_type)) { $eror = true; $msg .= '- Type file yang anda upload tidak sesuai<br />';
require_once '../../../../config/config.php'; $msg = ''; $error = FALSE; $act = isset($_REQUEST['act']) ? clean($_REQUEST['act']) : ''; $id = isset($_REQUEST['id']) ? clean($_REQUEST['id']) : ''; $kode_faktor = isset($_REQUEST['kode_faktor']) ? to_number($_REQUEST['kode_faktor']) : ''; $faktor_strategis = isset($_REQUEST['faktor_strategis']) ? clean($_REQUEST['faktor_strategis']) : ''; $nilai_tambah = isset($_REQUEST['nilai_tambah']) ? to_decimal($_REQUEST['nilai_tambah']) : ''; $nilai_kurang = isset($_REQUEST['nilai_kurang']) ? to_decimal($_REQUEST['nilai_kurang']) : ''; $status = isset($_REQUEST['status']) ? to_number($_REQUEST['status']) : '0'; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); ex_app('M'); ex_mod('M05'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); ex_ha('PM03', 'D'); $act = array(); $cb_data = $_REQUEST['cb_data']; ex_empty($cb_data, 'Pilih data yang akan dihapus.'); foreach ($cb_data as $id_del) { if ($conn->Execute("DELETE FROM FAKTOR WHERE KODE_FAKTOR = '{$id_del}'")) { $act[] = $id_del; } else { $error = TRUE; } } $msg = $error ? 'Sebagian data gagal dihapus.' : 'Data faktor strategis berhasil dihapus.';
$kode = isset($_REQUEST['kode']) ? clean($_REQUEST['kode']) : ''; $pecah_tanggal = explode("-", $bulan); $bln = $pecah_tanggal[0]; $thn = $pecah_tanggal[1]; //bulan depan $next_bln = $bln + 1; $next_thn = $thn; if ($bln > 12) { $next_bln = 1; $next_thn = $thn + 1; } if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); // ex_app('C'); ex_mod('C04'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); if ($act == 'Ubah') { ex_ha('C04', 'U'); ex_empty($jumlah, 'Jumlah harus diisi.'); $query = "\n\t\t\tUPDATE TAGIHAN_LAIN_LAIN SET TANGGAL = CONVERT(DATETIME,'01-{$bln}-{$thn}',105), NILAI = {$jumlah} \n\t\t\tWHERE KODE_BAYAR = {$id}\n\t\t\t"; ex_false($conn->execute($query), $query); $msg = 'Data Tagihan berhasil diubah.'; } elseif ($act == 'Tambah') { ex_ha('C04', 'I'); ex_empty($jenis_pembayaran, 'Jenis Pembayaran harus diisi.'); ex_empty($jumlah, 'Jumlah harus diisi.'); $query = "INSERT INTO TAGIHAN_LAIN_LAIN (KODE_BLOK, TANGGAL, KODE_BAYAR, NILAI, STATUS_BAYAR) \n\t\t\tVALUES('{$kode_blok}', CONVERT(DATETIME,'01-{$bln}-{$thn}',105), {$jenis_pembayaran}, {$jumlah}, 0)"; ex_false($conn->Execute($query), $query);
<?php require_once '../../../../../config/config.php'; $msg = ''; $error = FALSE; $act = isset($_REQUEST['act']) ? clean($_REQUEST['act']) : ''; $id = isset($_REQUEST['id']) ? clean($_REQUEST['id']) : ''; $tanggal_awal = isset($_REQUEST['tanggal_awal']) ? clean($_REQUEST['tanggal_awal']) : ''; $tanggal_akhir = isset($_REQUEST['tanggal_akhir']) ? clean($_REQUEST['tanggal_akhir']) : ''; $keterangan = isset($_REQUEST['keterangan']) ? clean($_REQUEST['keterangan']) : ''; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); // ex_app('C'); ex_mod('C02'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); if ($act == 'Tambah') { ex_ha('C02', 'I'); ex_empty($tanggal_awal, 'tangga awal harus diisi.'); ex_empty($tanggal_akhir, 'tanggal akhir harus diisi.'); ex_empty($keterangan, 'keterangan harus diisi.'); $query1 = "SELECT TANGGAL_AWAL FROM CS_HARI_LIBUR WHERE TANGGAL_AWAL = CONVERT(DATETIME,'{$tanggal_awal}',105)"; ex_found($conn->Execute($query1)->recordcount(), "Tanggal \"{$tanggal_awal}\" telah terdaftar."); $query1 = "SELECT TANGGAL_AWAL FROM CS_HARI_LIBUR WHERE TANGGAL_AKHIR = CONVERT(DATETIME,'{$tanggal_awal}',105)"; ex_found($conn->Execute($query1)->recordcount(), "Tanggal \"{$tanggal_awal}\" telah terdaftar."); if ($tanggal_awal <= $tanggal_akhir) { $query = "INSERT INTO CS_HARI_LIBUR (TANGGAL_AWAL, TANGGAL_AKHIR, KETERANGAN)\n\t\t\tVALUES(\n\t\t\t\tCONVERT(DATETIME,'{$tanggal_awal}',105),\n\t\t\t\tCONVERT(DATETIME,'{$tanggal_akhir}',105),\n\t\t\t\t'{$keterangan}'\n\t\t\t)"; ex_false($conn->execute($query), $query); $msg = "Data hari libur berhasil disimpan.";
require_once '../../../../../config/config.php'; $msg = ''; $error = FALSE; $user_id = isset($_REQUEST['s_user_id']) ? clean($_REQUEST['s_user_id']) : ''; $app_id = isset($_REQUEST['s_app_id']) ? clean($_REQUEST['s_app_id']) : ''; $ar_modul_id = isset($_REQUEST['ar_modul_id']) ? $_REQUEST['ar_modul_id'] : array(); $ar_ronly = isset($_REQUEST['r_ronly']) ? $_REQUEST['r_ronly'] : array(); $ar_edit = isset($_REQUEST['r_edit']) ? $_REQUEST['r_edit'] : array(); $ar_insert = isset($_REQUEST['r_insert']) ? $_REQUEST['r_insert'] : array(); $ar_delete = isset($_REQUEST['r_delete']) ? $_REQUEST['r_delete'] : array(); if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); //ex_app('A'); ex_mod('A05'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); ex_ha('A05', 'U'); ex_empty($user_id, 'Pilih user ID.'); ex_empty($app_id, 'Pilih App ID.'); foreach ($ar_modul_id as $i => $modul_id) { $conn->Execute("DELETE FROM APPLICATION_RIGHTS WHERE USER_ID = '{$user_id}' AND MODUL_ID = '{$modul_id}'"); $r_ronly = isset($ar_ronly[$modul_id]) ? $ar_ronly[$modul_id] : 'T'; $r_edit = isset($ar_edit[$modul_id]) ? $ar_edit[$modul_id] : 'T'; $r_insert = isset($ar_insert[$modul_id]) ? $ar_insert[$modul_id] : 'T'; $r_delete = isset($ar_delete[$modul_id]) ? $ar_delete[$modul_id] : 'T'; $query = "INSERT INTO APPLICATION_RIGHTS (USER_ID, MODUL_ID, R_RONLY, R_EDIT, R_INSERT, R_DELETE) VALUES \n\t\t\t(\n\t\t\t\t'{$user_id}',\n\t\t\t\t'{$modul_id}',\n\t\t\t\t\n\t\t\t\t'{$r_ronly}',\n\t\t\t\t'{$r_edit}',\n\t\t\t\t'{$r_insert}',\n\t\t\t\t'{$r_delete}'\n\t\t\t)"; ex_false($conn->Execute($query), $query); }
$pecah = explode('-', $tanggal_bayar); $tgl = $pecah[0]; $bln = $pecah[1]; $thn = $pecah[2]; //bulan depan $next_bln = $bln + 1; $next_thn = $thn; if ($bln > 12) { $next_bln = 1; $next_thn = $thn + 1; } if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); // ex_app('C'); ex_mod('C03'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); if ($act == 'Tambah') { ex_ha('C03', 'I'); //tanggal sekarang $user = $_SESSION['USER_ID']; $query = " SELECT *, a.KODE_BLOK as KODE FROM SPP a LEFT JOIN STOK b ON a.KODE_BLOK = b.KODE_BLOK\n\t\t\t\t\t\t\tLEFT JOIN LOKASI c ON b.KODE_LOKASI = c.KODE_LOKASI\n\t\t\t\t\t\t\tLEFT JOIN TIPE d ON b.KODE_TIPE = d.KODE_TIPE\n\t\t\t\t\t\t\tWHERE a.KODE_BLOK = '{$id}' "; $obj = $conn->execute($query); $nama_pembayar = $obj->fields['NAMA_PEMBELI']; $nomor_va = $obj->fields['NOMOR_CUSTOMER']; $alamat_1 = $obj->fields['ALAMAT_RUMAH']; $npwp = $obj->fields['NPWP']; $jenis = $obj->fields['IDENTITAS']; $luas_bangunan = $obj->fields['LUAS_BANGUNAN'];
<?php require_once '../../../../config/config.php'; $msg = ''; $error = FALSE; $act = isset($_REQUEST['act']) ? clean($_REQUEST['act']) : ''; $id = isset($_REQUEST['id']) ? clean($_REQUEST['id']) : ''; $nm = isset($_REQUEST['nm']) ? clean($_REQUEST['nm']) : ''; $kode_jenis = isset($_REQUEST['kode_jenis']) ? to_number($_REQUEST['kode_jenis']) : ''; $jenis_penjualan = isset($_REQUEST['jenis_penjualan']) ? clean($_REQUEST['jenis_penjualan']) : ''; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); ex_app('M'); ex_mod('M07'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); ex_ha('M07', 'U'); ex_empty($kode_jenis, 'Kode penjualan harus diisi.'); ex_empty($jenis_penjualan, 'Nama penjualan harus diisi.'); $query = "\n\t\t\tDELETE FROM JENIS_PENJUALAN \n\t\t\tWHERE\n\t\t\t\tKODE_JENIS = '{$id}'\n\t\t\t"; ex_false($conn->Execute($query), $query); $msg = 'Data jenis penjualan berhasil dihapus.'; $conn->committrans(); } catch (Exception $e) { $msg = $e->getmessage(); $error = TRUE; if ($conn) { $conn->rollbacktrans(); }
$kota = isset($_REQUEST['kota']) ? clean($_REQUEST['kota']) : ''; $pejabat_ppjb = isset($_REQUEST['pejabat_ppjb']) ? clean($_REQUEST['pejabat_ppjb']) : ''; $jabatan_ppjb = isset($_REQUEST['jabatan_ppjb']) ? clean($_REQUEST['jabatan_ppjb']) : ''; $nomor_sk = isset($_REQUEST['nomor_sk']) ? clean($_REQUEST['nomor_sk']) : ''; $jumlah_hari = isset($_REQUEST['jumlah_hari']) ? clean($_REQUEST['jumlah_hari']) : ''; $nomor_ppjb = isset($_REQUEST['nomor_ppjb']) ? to_number($_REQUEST['nomor_ppjb']) : ''; $reg_ppjb = isset($_REQUEST['reg_ppjb']) ? clean($_REQUEST['reg_ppjb']) : ''; $tanggal_sk = isset($_REQUEST['tanggal_sk']) ? clean($_REQUEST['tanggal_sk']) : ''; $nomor_ppjb_ph = isset($_REQUEST['nomor_ppjb_ph']) ? clean($_REQUEST['nomor_ppjb_ph']) : ''; $reg_ppjb_ph = isset($_REQUEST['reg_ppjb_ph']) ? clean($_REQUEST['reg_ppjb_ph']) : ''; $act = isset($_REQUEST['act']) ? clean($_REQUEST['act']) : ''; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); //ex_app('A01'); ex_mod('JB12'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); if ($act == 'save1') { //ex_ha('JB12', 'U'); $query = "SELECT * FROM CS_PARAMETER_PPJB WHERE NAMA_PT = '{$nama_pt}' AND NAMA_DEP = '{$nama_dep}' AND NAMA_PEJABAT = '{$nama_pejabat}' AND NAMA_JABATAN = '{$nama_jabatan}'\n\t\tAND UNIT = '{$unit}' AND KOTA = '{$kota}' "; ex_found($conn->Execute($query)->recordcount(), "Tidak ada data yang berubah."); $query = " UPDATE CS_PARAMETER_PPJB\n\t\tSET \n\t\tNAMA_PT='{$nama_pt}',\n\t\tNAMA_DEP='{$nama_dep}',\n\t\tNAMA_PEJABAT='{$nama_pejabat}',\n\t\tNAMA_JABATAN='{$nama_jabatan}', \n\t\tUNIT='{$unit}',\n\t\tKOTA='{$kota}'\n\t\t"; ex_false($conn->Execute($query), $query); $msg = 'Data Parameter berhasil diubah.'; } else { if ($act == 'save2') { //ex_ha('JB12', 'U'); $query = "SELECT * FROM CS_PARAMETER_PPJB WHERE PEJABAT_PPJB = '{$pejabat_ppjb}' and JABATAN_PPJB = '{$jabatan_ppjb}' AND NOMOR_SK = '{$nomor_sk}' AND TANGGAL_SK = CONVERT(DATETIME,'{$tanggal_sk}',105) AND NOMOR_PPJB = '{$nomor_ppjb}'\n\t\tAND REG_PPJB = '{$reg_ppjb}' AND JUMLAH_HARI = '{$jumlah_hari}' AND NOMOR_PPJB_PH = '{$nomor_ppjb_ph}' AND REG_PPJB_PH = '{$reg_ppjb_ph}' "; ex_found($conn->Execute($query)->recordcount(), "Tidak ada data yang berubah.");
<?php require_once '../../../../../config/config.php'; $msg = ''; $error = FALSE; $act = isset($_REQUEST['act']) ? clean($_REQUEST['act']) : ''; $id = isset($_REQUEST['id']) ? clean($_REQUEST['id']) : ''; $status_otorisasi = isset($_REQUEST['status_otorisasi']) ? clean($_REQUEST['status_otorisasi']) : ''; $kode_blok = isset($_REQUEST['kode_blok']) ? clean($_REQUEST['kode_blok']) : ''; $nomor_memo = isset($_REQUEST['nomor_memo']) ? clean($_REQUEST['nomor_memo']) : ''; $tanggal = f_tgl(date("Y-m-d")); if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); // ex_app('C'); ex_mod('C06'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); if ($act == 'Tambah') { ex_ha('C06', 'I'); ex_empty($kode_blok, 'Kode blok harus diisi.'); $query = "\n\t\t\tSELECT *\n\t\t\tFROM\n\t\t\t\tSPP a \n\t\t\t\tLEFT JOIN STOK b ON a.KODE_BLOK = b.KODE_BLOK\n\t\t\t\tLEFT JOIN TIPE c ON b.KODE_TIPE = c.KODE_TIPE\n\t\t\t\tLEFT JOIN HARGA_TANAH d ON b.KODE_SK_TANAH = d.KODE_SK\n\t\t\t\tLEFT JOIN HARGA_BANGUNAN e ON b.KODE_SK_BANGUNAN = e.KODE_SK\n\t\t\t\tLEFT JOIN FAKTOR f ON b.KODE_FAKTOR = f.KODE_FAKTOR\n\t\t\t\tLEFT JOIN CS_VIRTUAL_ACCOUNT g ON a.NOMOR_CUSTOMER = g.NOMOR_VA\t\t\n\t\t\tWHERE \n\t\t\t\ta.KODE_BLOK = '{$kode_blok}'"; $obj = $conn->execute($query); $luas_tanah = $obj->fields['LUAS_TANAH']; $luas_bangunan = $obj->fields['LUAS_BANGUNAN']; $tanah = $luas_tanah * $obj->fields['HARGA_TANAH']; $disc_tanah = round($tanah * $obj->fields['DISC_TANAH'] / 100, 0); $nilai_tambah = round(($tanah - $disc_tanah) * $obj->fields['NILAI_TAMBAH'] / 100, 0); $nilai_kurang = round(($tanah - $disc_tanah) * $obj->fields['NILAI_KURANG'] / 100, 0); $faktor = $nilai_tambah - $nilai_kurang;
<?php require_once '../../../../config/config.php'; $msg = ''; $error = FALSE; $act = isset($_REQUEST['act']) ? clean($_REQUEST['act']) : ''; $id = isset($_REQUEST['id']) ? clean($_REQUEST['id']) : ''; $user_id = isset($_REQUEST['user_id']) ? clean($_REQUEST['user_id']) : ''; $login_id = isset($_REQUEST['login_id']) ? clean($_REQUEST['login_id']) : ''; $passowrd_id = isset($_REQUEST['passowrd_id']) ? clean($_REQUEST['passowrd_id']) : ''; $full_name = isset($_REQUEST['full_name']) ? clean($_REQUEST['full_name']) : ''; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); ex_app('C01'); ex_mod('COL02'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); if ($act == 'Tambah') { ex_ha('COL02', 'I'); ex_empty($user_id, 'User id harus diisi.'); ex_empty($login_id, 'Login id harus diisi.'); ex_empty($passowrd_id, 'Password harus diisi.'); ex_empty($full_name, 'Nama harus diisi.'); $query = "SELECT COUNT(USER_ID) AS TOTAL FROM USER_APPLICATIONS WHERE USER_ID = '{$user_id}'"; ex_found($conn->Execute($query)->fields['TOTAL'], "User ID \"{$user_id}\" telah terdaftar."); $query = "SELECT COUNT(LOGIN_ID) AS TOTAL FROM USER_APPLICATIONS WHERE LOGIN_ID = '{$login_id}'"; ex_found($conn->Execute($query)->fields['TOTAL'], "login id \"{$login_id}\" telah terdaftar."); $query = "INSERT INTO USER_APPLICATIONS (USER_ID, LOGIN_ID, PASSOWRD_ID, FULL_NAME)\n\t\t\tVALUES('{$user_id}', '{$login_id}', '{$passowrd_id}', '{$full_name}')"; ex_false($conn->Execute($query), $query);
<?php require_once '../../../../../config/config.php'; $msg = ''; $error = FALSE; $act = isset($_REQUEST['act']) ? clean($_REQUEST['act']) : ''; $id = isset($_REQUEST['id']) ? clean($_REQUEST['id']) : ''; $app_name = isset($_REQUEST['app_name']) ? clean($_REQUEST['app_name']) : ''; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); //ex_app('A'); ex_mod('A01'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); if ($act == 'Edit') { ex_ha('A01', 'U'); ex_empty($app_name, 'App harus diisi.'); $ols_app_name = $conn->Execute("SELECT APP_NAME FROM APPLICATIONS WHERE APP_ID = '{$id}'")->fields['APP_NAME']; if ($app_name != $ols_app_name) { $query = "SELECT COUNT(APP_NAME) AS TOTAL FROM APPLICATIONS WHERE APP_NAME = '{$app_name}'"; ex_found($conn->Execute($query)->fields['TOTAL'], "login id \"{$app_name}\" telah terdaftar."); } $query = "\n\t\t\tUPDATE APPLICATIONS \n\t\t\tSET APP_NAME = '{$app_name}'\n\t\t\tWHERE\n\t\t\t\tAPP_ID = '{$id}'\n\t\t\t"; ex_false($conn->Execute($query), $query); $msg = 'Data app berhasil diubah.'; } $conn->committrans(); } catch (Exception $e) { $msg = $e->getmessage();
<?php require_once '../../../../config/config.php'; $msg = ''; $error = FALSE; $act = isset($_REQUEST['act']) ? clean($_REQUEST['act']) : ''; $id = isset($_REQUEST['id']) ? clean($_REQUEST['id']) : ''; $nomor_id = isset($_REQUEST['nomor_id']) ? clean($_REQUEST['nomor_id']) : ''; $nama = isset($_REQUEST['nama']) ? clean($_REQUEST['nama']) : ''; $alamat = isset($_REQUEST['alamat']) ? clean($_REQUEST['alamat']) : ''; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); ex_app('A01'); ex_mod('PM11'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); if ($act == 'Tambah') { ex_ha('PM11', 'I'); ex_empty($nomor_id, 'No ID harus diisi.'); ex_empty($nama, 'Nama harus diisi.'); ex_empty($alamat, 'Alamat harus diisi.'); $query = "SELECT COUNT(NOMOR_ID) AS TOTAL FROM CLUB_PERSONAL WHERE NOMOR_ID = '{$id}'"; ex_found($conn->Execute($query)->fields['TOTAL'], "Nomor ID \"{$id}\" telah terdaftar."); $query = "INSERT INTO CLUB_PERSONAL (NOMOR_ID, NAMA, ALAMAT)\n\t\t\tVALUES('{$nomor_id}', '{$nama}', '{$alamat}')"; ex_false($conn->Execute($query), $query); $msg = "Data Club Personal telah ditambahkan."; } elseif ($act == 'Ubah') { ex_ha('PM11', 'U'); ex_empty($nomor_id, 'Nomor id harus diisi.');
<?php require_once '../../../../config/config.php'; $msg = ''; $error = FALSE; $act = isset($_REQUEST['act']) ? clean($_REQUEST['act']) : ''; $id = isset($_REQUEST['id']) ? clean($_REQUEST['id']) : ''; $kode_blok = isset($_REQUEST['kode_blok']) ? clean($_REQUEST['kode_blok']) : ''; $nomor_va = isset($_REQUEST['nomor_va']) ? clean($_REQUEST['nomor_va']) : ''; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); ex_app('M'); ex_mod('M03'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); if ($act == 'Tambah') { ex_ha('M03', 'I'); //$query = "SELECT * FROM STOK WHERE STATUS_STOK = '0' AND TERJUAL = '0' AND NO_VA IS NULL"; $query = "SELECT * FROM STOK WHERE NO_VA IS NULL"; $obj = $conn->execute($query); $no = 1; while (!$obj->EOF) { $id = $obj->fields['KODE_BLOK']; $pecah_kode = explode("/", $id); $blok_nomor = $pecah_kode[1]; $pecah_blok = explode("-", $blok_nomor); $blok = $pecah_blok[0]; $nomor = $pecah_blok[1]; $va = '99' . $blok . $nomor . '0';
<?php require_once '../../../../config/config.php'; $msg = ''; $error = FALSE; $act = isset($_REQUEST['act']) ? clean($_REQUEST['act']) : ''; $id = isset($_REQUEST['id']) ? clean($_REQUEST['id']) : ''; $kode_bayar = isset($_REQUEST['kode_bayar']) ? to_number($_REQUEST['kode_bayar']) : ''; $jenis_bayar = isset($_REQUEST['jenis_bayar']) ? clean($_REQUEST['jenis_bayar']) : ''; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); ex_app('M'); ex_mod('M11'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); if ($act == 'Tambah') { ex_ha('M11', 'I'); ex_empty($kode_bayar, 'Kode jenis pembayaran harus diisi.'); ex_empty($jenis_bayar, 'Nama jenis pembayaran harus diisi.'); $query = "SELECT COUNT(KODE_BAYAR) AS TOTAL FROM JENIS_PEMBAYARAN WHERE KODE_BAYAR = '{$kode_bayar}'"; ex_found($conn->Execute($query)->fields['TOTAL'], "Kode jenis pembayaran \"{$kode_bayar}\" telah terdaftar."); $query = "SELECT COUNT(JENIS_BAYAR) AS TOTAL FROM JENIS_PEMBAYARAN WHERE JENIS_BAYAR = '{$jenis_bayar}'"; ex_found($conn->Execute($query)->fields['TOTAL'], "Nama jenis pembayaran \"{$jenis_bayar}\" telah terdaftar."); $query = "INSERT INTO JENIS_PEMBAYARAN (KODE_BAYAR, JENIS_BAYAR)\n\t\t\tVALUES('{$kode_bayar}', '{$jenis_bayar}')"; ex_false($conn->Execute($query), $query); $msg = "Data jenis pembayaran berhasil ditambahkan."; } elseif ($act == 'Ubah') { ex_ha('M11', 'U'); ex_empty($kode_bayar, 'Kode pembayaran harus diisi.');
$nilai_tambah = 0; $nilai_kurang = 0; $fs_harga_tanah = 0; $disc_harga_tanah = 0; $ppn_harga_tanah = 0; $harga_tanah = 0; $base_harga_bangunan = 0; $fs_harga_bangunan = 0; $disc_harga_bangunan = 0; $ppn_harga_bangunan = 0; $harga_bangunan = 0; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); ex_app('A01'); ex_mod('PT05'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); if ($act == 'Tambah') { ex_ha('PT05', 'I'); ex_empty($kode_blok, 'Kode Blok harus diisi.'); ex_empty($kode_desa, 'Desa harus diisi.'); ex_empty($kode_lokasi, 'Lokasi harus diisi.'); ex_empty($kode_unit, 'Unit harus diisi.'); ex_empty($kode_sk_tanah, 'SK tanah harus diisi.'); ex_empty($kode_faktor, 'Faktor harus diisi.'); ex_empty($kode_tipe, 'Tipe harus diisi.'); ex_empty($kode_sk_bangunan, 'SK bangunan harus diisi.'); ex_empty($kode_penjualan, 'Penjualan harus diisi.'); ex_empty($class, 'Pilih class.');
<?php require_once '../../../../config/config.php'; $msg = ''; $error = FALSE; $act = isset($_REQUEST['act']) ? clean($_REQUEST['act']) : ''; $id = isset($_REQUEST['id']) ? clean($_REQUEST['id']) : ''; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); //ex_app('A'); ex_mod('A06'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); if ($act == 'Pemulihan') { ex_ha('A06', 'U'); $act = array(); $cb_data = $_REQUEST['cb_data']; ex_empty($cb_data, 'Pilih data yang akan dipulihkan.'); foreach ($cb_data as $id_del) { if ($conn->Execute("UPDATE SPP SET TANGGAL_SPP = CONVERT(DATETIME,GETDATE(),105), TANGGAL_PROSES = CONVERT(DATETIME,GETDATE(),105)\n\t\t\t\tWHERE KODE_BLOK = '{$id_del}'")) { $act[] = $id_del; } else { $error = TRUE; } } $msg = $error ? 'Sebagian data gagal dipulihkan.' : 'Data berhasil dipulihkan.'; } $conn->committrans(); } catch (Exception $e) {
<?php require_once '../../../../config/config.php'; die_login(); $conn = conn($sess_db); die_conn($conn); $msg = ''; $error = FALSE; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); ex_app('M'); ex_mod('M26'); $conn = conn($sess_db); ex_conn($conn); ex_ha('M26', 'U'); $conn->begintrans(); $batas_distribusi = isset($_REQUEST['batas_distribusi']) ? clean($_REQUEST['batas_distribusi']) : ''; $tenggang_distribusi = isset($_REQUEST['tenggang_distribusi']) ? clean($_REQUEST['tenggang_distribusi']) : ''; $batas_reserve = isset($_REQUEST['batas_reserve']) ? clean($_REQUEST['batas_reserve']) : ''; $query = "SELECT * FROM CS_PARAMETER_MARK WHERE BATAS_DISTRIBUSI= '{$batas_distribusi}' AND TENGGANG_DISTRIBUSI = '{$tenggang_distribusi}' \n\t\t\t\tAND BATAS_RESERVE = '{$batas_reserve}'"; ex_found($conn->Execute($query)->recordcount(), "Tidak ada data yang berubah."); $conn->Execute("DELETE FROM CS_PARAMETER_MARK"); $query = "\n\t\tINSERT INTO CS_PARAMETER_MARK (\n\t\tBATAS_DISTRIBUSI, TENGGANG_DISTRIBUSI, BATAS_RESERVE\n\t\t)\n\t\tVALUES (\n\t\t'{$batas_distribusi}', '{$tenggang_distribusi}', '{$batas_reserve}'\n\t\t)\n\t\t"; ex_false($conn->Execute($query), $query); $conn->committrans(); $msg = 'Parameter berhasil diubah.'; } catch (Exception $e) { $msg = $e->getmessage(); $error = TRUE; $conn->rollbacktrans();
$CB36x = 0; $CB48x = 0; $KPA24x = 0; $KPA36x = 0; $eror = false; $folder = 'upload/'; //type file yang bisa diupload $file_type = array('xls', 'xlsx'); //tukuran maximum file yang dapat diupload $max_size = 100000000; // 100MB if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); ex_app('M'); ex_mod('M27'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); //Mulai memorises data $file_name = $_FILES['data_upload']['name']; $file_size = $_FILES['data_upload']['size']; //cari extensi file dengan menggunakan fungsi explode $explode = explode('.', $file_name); $extensi = $explode[count($explode) - 1]; //check apakah type file sudah sesuai if (!in_array($extensi, $file_type)) { $eror = true; $msg .= '- Type file yang anda upload tidak sesuai<br />'; } if ($file_size > $max_size) {
<?php require_once '../../../../config/config.php'; $msg = ''; $error = FALSE; $act = isset($_REQUEST['act']) ? clean($_REQUEST['act']) : ''; $id = isset($_REQUEST['id']) ? clean($_REQUEST['id']) : ''; $kode_lokasi = isset($_REQUEST['kode_lokasi']) ? to_number($_REQUEST['kode_lokasi']) : ''; $lokasi = isset($_REQUEST['lokasi']) ? clean($_REQUEST['lokasi']) : ''; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); ex_app('M'); ex_mod('M01'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); if ($act == 'Tambah') { ex_ha('M01', 'I'); ex_empty($kode_lokasi, 'Kode lokasi harus diisi.'); ex_empty($lokasi, 'Nama lokasi harus diisi.'); $query = "SELECT COUNT(KODE_LOKASI) AS TOTAL FROM LOKASI WHERE KODE_LOKASI = '{$kode_lokasi}'"; ex_found($conn->Execute($query)->fields['TOTAL'], "Kode lokasi \"{$kode_lokasi}\" telah terdaftar."); $query = "SELECT COUNT(LOKASI) AS TOTAL FROM LOKASI WHERE LOKASI = '{$lokasi}'"; ex_found($conn->Execute($query)->fields['TOTAL'], "Nama lokasi \"{$lokasi}\" telah terdaftar."); $query = "INSERT INTO LOKASI (KODE_LOKASI, LOKASI)\n\t\t\tVALUES('{$kode_lokasi}', '{$lokasi}')"; ex_false($conn->Execute($query), $query); $msg = "Data Lokasi \"{$lokasi}\" berhasil ditambahkan."; } elseif ($act == 'Ubah') { ex_ha('M01', 'U'); ex_empty($kode_lokasi, 'Kode lokasi harus diisi.');
require_once '../../../../config/config.php'; $msg = ''; $error = FALSE; $act = isset($_REQUEST['act']) ? clean($_REQUEST['act']) : ''; $id = isset($_REQUEST['id']) ? clean($_REQUEST['id']) : ''; $kode_bank = isset($_REQUEST['kode_bank']) ? to_number($_REQUEST['kode_bank']) : ''; $nama_bank = isset($_REQUEST['nama_bank']) ? clean($_REQUEST['nama_bank']) : ''; $alamat_bank = isset($_REQUEST['alamat_bank']) ? clean($_REQUEST['alamat_bank']) : ''; $npwp = isset($_REQUEST['npwp']) ? clean($_REQUEST['npwp']) : ''; $kode_va_unit = isset($_REQUEST['kode_va_unit']) ? clean($_REQUEST['kode_va_unit']) : ''; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); ex_app('M'); ex_mod('M08'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); ex_ha('M08', 'U'); ex_empty($kode_bank, 'Kode bank harus diisi.'); ex_empty($nama_bank, 'Nama bank harus diisi.'); $query = "\n\t\t\tDELETE FROM BANK \n\t\t\tWHERE\n\t\t\t\tKODE_BANK = '{$id}'\n\t\t\t"; ex_false($conn->Execute($query), $query); $msg = 'Data lembaga keuangan berhasil dihapus.'; $conn->committrans(); } catch (Exception $e) { $msg = $e->getmessage(); $error = TRUE; if ($conn) { $conn->rollbacktrans();
$act = isset($_REQUEST['act']) ? clean($_REQUEST['act']) : ''; $id = isset($_REQUEST['id']) ? clean($_REQUEST['id']) : ''; $nama_calon_pembeli = isset($_REQUEST['nama_calon_pembeli']) ? clean($_REQUEST['nama_calon_pembeli']) : ''; $tanggal_reserve = isset($_REQUEST['tanggal_reserve']) ? clean($_REQUEST['tanggal_reserve']) : ''; $berlaku_sampai = isset($_REQUEST['berlaku_sampai']) ? clean($_REQUEST['berlaku_sampai']) : ''; $alamat = isset($_REQUEST['alamat']) ? clean($_REQUEST['alamat']) : ''; $telepon = isset($_REQUEST['telepon']) ? clean($_REQUEST['telepon']) : ''; $agen = isset($_REQUEST['agen']) ? clean($_REQUEST['agen']) : ''; $no_npwp = isset($_REQUEST['no_npwp']) ? clean($_REQUEST['no_npwp']) : ''; $no_ktp = isset($_REQUEST['no_ktp']) ? clean($_REQUEST['no_ktp']) : ''; $koordinator = isset($_REQUEST['koordinator']) ? clean($_REQUEST['koordinator']) : ''; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); ex_app('M'); ex_mod('M29'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); if ($act == 'Reserve') { ex_ha('M29', 'I'); ex_empty($nama_calon_pembeli, 'Nama calon pembeli harus diisi.'); //ex_empty($tanggal_reserve, 'Tanggal reserve harus diisi.'); //ex_empty($berlaku_sampai, 'Tanggal berlaku sampai harus diisi.'); ex_empty($alamat, 'Alamat harus diisi.'); ex_empty($telepon, 'No Telepon harus diisi.'); //ex_empty($agen, 'Agen harus diisi.'); ex_empty($no_ktp, 'Identitas KTP harus diisi.'); ex_empty($koordinator, 'Koordinator harus diisi.'); $query = "SELECT COUNT(KODE_BLOK) AS TOTAL FROM RESERVE WHERE KODE_BLOK = '{$id}'"; ex_found($conn->Execute($query)->fields['TOTAL'], "Kode blok \\'{$id}\\' telah terdaftar.");
$r_disc_harga_tanah = ''; $r_ppn_tanah = ''; $r_ppn_harga_tanah = ''; $r_harga_tanah = ''; $r_luas_bangunan = ''; $r_base_harga_bangunan = ''; $r_disc_bangunan = ''; $r_disc_harga_bangunan = ''; $r_ppn_bangunan = ''; $r_ppn_harga_bangunan = ''; $r_harga_bangunan = ''; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); ex_app('M'); ex_mod('M18'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); if ($act == 'Spp') { ex_ha('M18', 'I'); ex_empty($nama, 'Nama pembeli harus diisi.'); ex_empty($alamat_rumah, 'Alamat rumah harus diisi.'); ex_empty($identitas, 'Identitas harus diisi.'); ex_empty($no_identitas, 'No identitas harus diisi.'); ex_empty($tgl_spp, 'Tanggal SPP harus diisi.'); ex_empty($koordinator, 'Koordinator harus diisi.'); ex_empty($jumlah_kpr, 'Jumlah KPR harus diisi.'); ex_empty($tanda_jadi, 'Tanda jadi harus diisi.'); $query = "SELECT COUNT(KODE_BLOK) AS TOTAL FROM SPP WHERE KODE_BLOK = '{$kode_blok}'"; ex_found($conn->Execute($query)->fields['TOTAL'], "Kode blok \"{$kode_blok}\" telah terdaftar.");
<?php require_once '../../../../../config/config.php'; $msg = ''; $error = FALSE; $act = isset($_REQUEST['act']) ? clean($_REQUEST['act']) : ''; $id = isset($_REQUEST['id']) ? clean($_REQUEST['id']) : ''; $app_id = isset($_REQUEST['app_id']) ? clean($_REQUEST['app_id']) : ''; $modul_name = isset($_REQUEST['modul_name']) ? clean($_REQUEST['modul_name']) : ''; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); ex_app('A01'); ex_mod('PU05'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); if ($act == 'Edit') { ex_ha('PU05', 'U'); ex_empty($app_id, 'Pilih app.'); ex_empty($modul_name, 'Modul harus diisi.'); $ols_modul_name = $conn->Execute("SELECT MODUL_NAME FROM APPLICATION_MODULS WHERE MODUL_ID = '{$id}'")->fields['MODUL_NAME']; if ($modul_name != $ols_modul_name) { $query = "SELECT COUNT(MODUL_NAME) AS TOTAL FROM APPLICATION_MODULS WHERE MODUL_NAME = '{$modul_name}'"; ex_found($conn->Execute($query)->fields['TOTAL'], "login id \"{$modul_name}\" telah terdaftar."); } $query = "\n\t\t\tUPDATE APPLICATION_MODULS \n\t\t\tSET APP_ID = '{$app_id}',\n\t\t\t\tMODUL_NAME = '{$modul_name}'\n\t\t\tWHERE\n\t\t\t\tMODUL_ID = '{$id}'\n\t\t\t"; ex_false($conn->Execute($query), $query); $msg = 'Data modul berhasil diubah.'; } $conn->committrans();
<?php require_once '../../../../config/config.php'; $msg = ''; $error = FALSE; $id = isset($_REQUEST['id']) ? clean($_REQUEST['id']) : ''; $nm = isset($_REQUEST['nm']) ? clean($_REQUEST['nm']) : ''; $nomor_id = isset($_REQUEST['nomor_id']) ? clean($_REQUEST['nomor_id']) : ''; $nama = isset($_REQUEST['nama']) ? clean($_REQUEST['nama']) : ''; $alamat = isset($_REQUEST['alamat']) ? clean($_REQUEST['alamat']) : ''; $jabatan = isset($_REQUEST['jabatan']) ? to_number($_REQUEST['jabatan']) : ''; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); ex_app('M'); ex_mod('M13'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); ex_ha('M13', 'U'); ex_empty($nomor_id, 'Nomor id harus diisi.'); $query = "\n\t\t\tDELETE FROM CLUB_PERSONAL\n\t\t\tWHERE\n\t\t\t\tNOMOR_ID = '{$id}' AND JABATAN_KLUB = '5'\n\t\t\t"; ex_false($conn->Execute($query), $query); $msg = 'Data Club personal berhasil dihapus.'; $conn->committrans(); } catch (Exception $e) { $msg = $e->getmessage(); $error = TRUE; if ($conn) { $conn->rollbacktrans(); }
$jumlah = isset($_REQUEST['jumlah']) ? to_number($_REQUEST['jumlah']) : ''; $diposting = isset($_REQUEST['diposting']) ? to_number($_REQUEST['diposting']) : ''; $tanggal = isset($_REQUEST['tanggal']) ? clean($_REQUEST['tanggal']) : ''; $tgl_terima = isset($_REQUEST['tgl_terima']) ? clean($_REQUEST['tgl_terima']) : ''; $via = isset($_REQUEST['via']) ? clean($_REQUEST['via']) : ''; $catatan = isset($_REQUEST['catatan']) ? clean($_REQUEST['catatan']) : ''; $catatan_kwt = isset($_REQUEST['catatan_kwt']) ? clean($_REQUEST['catatan_kwt']) : ''; $subtotal = isset($_REQUEST['subtotal']) ? to_number($_REQUEST['subtotal']) : ''; $ppn = isset($_REQUEST['ppn']) ? to_number($_REQUEST['ppn']) : ''; //$via = (isset($_REQUEST['bayar_secara'])) ? to_number($_REQUEST['bayar_secara']) : ''; $blok_baru = isset($_REQUEST['blok_baru']) ? clean($_REQUEST['blok_baru']) : ''; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); //ex_app(''); ex_mod('K01'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); if ($act == 'Ubah') { //ex_ha('', 'U'); ex_empty($tgl_terima, 'Tanggal Terima harus diisi.'); ex_empty($jenis_pembayaran, 'Jenis Pembayaran harus diisi.'); ex_empty($nama_pembayar, 'Telah Terima Dari harus diisi.'); ex_empty($keterangan, 'Untuk Pembayaran harus diisi.'); ex_empty($jumlah, 'Jumlah harus diisi.'); ex_empty($diposting, 'Diposting harus diisi.'); ex_empty($tanggal, 'Tanggal harus diisi.'); ex_empty($via, 'Via harus diisi.'); $query = "SELECT * FROM KWITANSI WHERE NAMA_PEMBAYAR = '{$nama_pembayar}' AND TANGGAL = CONVERT(DATETIME,'{$tanggal}',105) AND \n\t\t\tNILAI = {$jumlah} AND KETERANGAN = '{$keterangan}' AND NILAI_DIPOSTING = {$diposting} AND TANGGAL_BAYAR = CONVERT(DATETIME,'{$tgl_terima}',105) AND\n\t\t\tBAYAR_VIA = '{$via}' AND CATATAN = '{$catatan}'"; ex_found($conn->Execute($query)->recordcount(), "Tidak ada data yang berubah.");
$tgl_redistribusi = isset($_REQUEST['tgl_redistribusi']) ? clean($_REQUEST['tgl_redistribusi']) : ''; $kelengkapan = isset($_REQUEST['kelengkapan']) ? clean($_REQUEST['kelengkapan']) : ''; $keterangan = isset($_REQUEST['keterangan']) ? clean($_REQUEST['keterangan']) : ''; $catatan_penagihan = isset($_REQUEST['catatan_penagihan']) ? clean($_REQUEST['catatan_penagihan']) : ''; //DATA RENCANA & REALISASI $luas_tanah = isset($_REQUEST['luas_tanah']) ? clean($_REQUEST['luas_tanah']) : ''; $luas_bangunan = isset($_REQUEST['luas_bangunan']) ? clean($_REQUEST['luas_bangunan']) : ''; $tipe_bangunan = isset($_REQUEST['tipe_bangunan']) ? clean($_REQUEST['tipe_bangunan']) : ''; $total_tanah = isset($_REQUEST['total_tanah']) ? to_clean($_REQUEST['total_tanah']) : ''; $total_bangunan = isset($_REQUEST['total_bangunan']) ? to_clean($_REQUEST['total_bangunan']) : ''; $nomor_kwitansi = isset($_REQUEST['nomor_kwitansi']) ? clean($_REQUEST['nomor_kwitansi']) : ''; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); // ex_app('C'); ex_mod('C01'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); if ($act == 'Ubah') { ex_ha('C01', 'U'); $query = "\n\t\t\tUPDATE SPP\n\t\t\tSET\n\t\t\t\tCATATAN_PENAGIHAN = '{$catatan_penagihan}'\n\t\t\tWHERE\n\t\t\t\tKODE_BLOK = '{$id}'\n\t\t\t"; ex_false($conn->execute($query), $query); $msg = 'Data SPP berhasil diubah.'; } $conn->committrans(); } catch (Exception $e) { $msg = $e->getmessage(); $error = TRUE; if ($conn) { $conn->rollbacktrans();
<?php require_once '../../../../config/config.php'; $msg = ''; $error = FALSE; $id = isset($_REQUEST['id']) ? clean($_REQUEST['id']) : ''; $nm = isset($_REQUEST['nm']) ? clean($_REQUEST['nm']) : ''; $nomor_id = isset($_REQUEST['nomor_id']) ? clean($_REQUEST['nomor_id']) : ''; $nama = isset($_REQUEST['nama']) ? clean($_REQUEST['nama']) : ''; $alamat = isset($_REQUEST['alamat']) ? clean($_REQUEST['alamat']) : ''; $jabatan = isset($_REQUEST['jabatan']) ? to_number($_REQUEST['jabatan']) : ''; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); ex_app('M'); ex_mod('M14'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); ex_ha('M14', 'U'); ex_empty($nomor_id, 'Nomor id harus diisi.'); $query = "\n\t\t\tDELETE FROM CLUB_PERSONAL\n\t\t\tWHERE\n\t\t\t\tNOMOR_ID = '{$id}' AND JABATAN_KLUB = '4'\n\t\t\t"; ex_false($conn->Execute($query), $query); $msg = 'Data Club personal berhasil dihapus.'; $conn->committrans(); } catch (Exception $e) { $msg = $e->getmessage(); $error = TRUE; if ($conn) { $conn->rollbacktrans(); }
$nilai_tambah = 0; $nilai_kurang = 0; $fs_harga_tanah = 0; $disc_harga_tanah = 0; $ppn_harga_tanah = 0; $harga_tanah = 0; $base_harga_bangunan = 0; $fs_harga_bangunan = 0; $disc_harga_bangunan = 0; $ppn_harga_bangunan = 0; $harga_bangunan = 0; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); ex_app('M'); ex_mod('M28'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); if ($act == 'Tambah') { ex_ha('M28', 'I'); ex_empty($kode_blok, 'Kode Blok harus diisi.'); ex_empty($no_va, 'Nomor VA harus diisi.'); ex_empty($kode_lokasi, 'Tower harus diisi.'); ex_empty($kode_unit, 'Jenis unit harus diisi.'); ex_empty($kode_tipe, 'Tipe harus diisi.'); ex_empty($kode_penjualan, 'Jenis penjualan harus diisi.'); $query = "SELECT COUNT(KODE_BLOK) AS TOTAL FROM STOK WHERE KODE_BLOK = '{$kode_blok}'"; ex_found($conn->Execute($query)->fields['TOTAL'], "Kode blok \"{$kode_blok}\" telah terdaftar."); $query = "SELECT COUNT(KODE_BLOK) AS TOTAL FROM STOK WHERE NO_VA = '{$no_va}'"; ex_found($conn->Execute($query)->fields['TOTAL'], "Kode blok \"{$no_va}\" telah terdaftar.");
<?php require_once '../../../../../config/config.php'; $msg = ''; $error = FALSE; $act = isset($_REQUEST['act']) ? clean($_REQUEST['act']) : ''; $id = isset($_REQUEST['id']) ? clean($_REQUEST['id']) : ''; $daya_listrik = isset($_REQUEST['daya_listrik']) ? to_number($_REQUEST['daya_listrik']) : ''; $masa_bangun = isset($_REQUEST['masa_bangun']) ? to_number($_REQUEST['masa_bangun']) : ''; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); // ex_app('P'); ex_mod('P05'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); if ($act == 'Tambah') { ex_ha('JB05', 'I'); $msg = ''; } elseif ($act == 'Ubah') { ex_ha('JB05', 'U'); $query = "\n\t\t\tUPDATE TIPE\n\t\t\tSET \n\t\t\t\tDAYA_LISTRIK = '{$daya_listrik}',\n\t\t\t\tMASA_BANGUN = '{$masa_bangun}'\n\t\t\tWHERE\n\t\t\t\tKODE_TIPE = '{$id}'\n\t\t\t"; ex_false($conn->execute($query), $query); $msg = 'Data Tipe Bangunan berhasil diubah.'; } elseif ($act == 'Hapus') { ex_ha('JBF05', 'D'); $msg = ''; } $conn->committrans(); } catch (Exception $e) {