本文整理汇总了PHP中ex_mod函数的典型用法代码示例。如果您正苦于以下问题:PHP ex_mod函数的具体用法?PHP ex_mod怎么用?PHP ex_mod使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ex_mod函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
<?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;
示例2: isset
$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 />';
示例3: isset
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.';
示例4: isset
$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);
示例5: isset
<?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.";
示例6: isset
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);
}
示例7: explode
$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'];
示例8: isset
<?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();
}
示例9: isset
$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.");
示例10: isset
<?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;
示例11: isset
<?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);
示例12: isset
<?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();
示例13: isset
<?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.');
示例14: isset
<?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';
示例15: isset
<?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.');