function getASB2($id) { $sql = "select kk.* from kelompok_kegiatan kk where kk.id = " . $id . ""; $result = gcms_query($sql); while ($data = gcms_fetch_object($result)) { $ret["belanja"]["pegawai"]["rerata"] = $data->rata_pegawai; $ret["belanja"]["pegawai"]["deviasi"] = $data->std_deviasi_pegawai; $ret["belanja"]["barang"]["rerata"] = $data->rata_barang; $ret["belanja"]["barang"]["deviasi"] = $data->std_deviasi_barang; $ret["belanja"]["modal"]["rerata"] = $data->rata_modal; $ret["belanja"]["modal"]["deviasi"] = $data->std_deviasi_modal; for ($i = 1; $i <= 4; $i++) { $nama = "nama_indikator_" . $i; $koef = "koefisien_" . $i; if (!empty($data->{$nama})) { $ret["indikator"][$i]["nama"] = $data->{$nama}; $ret["indikator"][$i]["koef"] = $data->{$koef}; } } $ret["konstanta"] = $data->konstanta; } // $ret .= "<input id='btn' type='submit' name='asb' value='asb'></div></div> <!-- asb -->\n"; //$ret .= ""; return $ret; }
function getKegiatan($id) { $sql = 'select first 1 k.id ' . 'from KELOMPOK_KEGIATAN kk ' . 'join kegiatan k on k.ID_KELOMPOK = kk.ID ' . 'where id = ' . $id; $result = gcms_query($sql); while ($row = gcms_fetch_object($result)) { $id_kel[] = $row->id; } return $id_kel; }
function main_page_content() { echo '<div id="main_content">'; $lbl = array(); $cnt = array(); /* ambil isi .main tiap modul */ $csql = "select cpath from " . PREFIX . "moduls"; $nresult = gcms_query($csql); while ($opath = gcms_fetch_object($nresult)) { $mainfile = translate_modul_path(str_replace(".php", ".main.php", strtolower($opath->cpath))); if (file_exists($mainfile)) { $ainfo = b_readinit(translate_modul_path(str_replace(".php", ".init.php", strtolower($opath->cpath)))); $lbl[] = $ainfo['name']; $cnt[] = $mainfile; } } $sel = false; if (count($lbl) > 0) { echo '<div id="gcms_main_tab" class="yui-navset"> ' . "\n" . ' <ul class="yui-nav"> ' . "\n"; if ($_REQUEST['page'] || $_REQUEST['mod']) { $sel = true; echo ' <li class="selected"><a href="#gcms_main_tab_menu"><em>' . ($_REQUEST['page'] ? menu_get_title($_REQUEST['page']) : 'Utama') . '</em></a></li> ' . "\n"; } foreach ($lbl as $k => $v) { echo ' <li'; if (!$sel) { $sel = true; echo ' class="selected"'; } echo '><a href="#gcms_main_tab' . $k . '" ><em>' . $v . '</em></a></li> ' . "\n"; } echo ' </ul> ' . "\n" . ' <div class="yui-content"> ' . "\n"; foreach ($cnt as $k => $v) { echo ' <div id="gcms_main_tab' . $k . '">'; include $v; echo '</div> ' . "\n"; } if ($_REQUEST['page'] || $_REQUEST['mod']) { echo ' <div id="gcms_main_tab_menu"><p>'; } } /* masukkan isi halaman sesuai menu disini */ if ($_REQUEST['page']) { menu_get_content($_REQUEST['page']); } else { if ($_REQUEST['mod']) { menu_get_content_by_mod($_REQUEST['mod'], $_REQUEST['func']); } } if (count($lbl) > 0) { if ($_REQUEST['page'] || $_REQUEST['mod']) { echo '</p></div> ' . "\n"; } echo ' </div> ' . "\n" . '</div> ' . "\n"; } echo '</div> <!-- main content -->'; }
function getNamaIndikator($id) { $sql = 'select first 1 nama_indikator_1, nama_indikator_2, nama_indikator_3, nama_indikator_4 ' . 'from kelompok_kegiatan where id = ' . $id; $result = gcms_query($sql); while ($row = gcms_fetch_object($result)) { $nama[1] = $row->nama_indikator_1; $nama[2] = $row->nama_indikator_2; $nama[3] = $row->nama_indikator_3; $nama[4] = $row->nama_indikator_4; } return $nama; }
function end_entri_default($entriid, $table, $idfield, $currentid, $confirmexp = "") { $new = 'form.php?page=' . $_REQUEST['page'] . '&action=edit'; $csql = "select max(" . $idfield . ") as id from " . $table . " where " . $idfield . " < " . $currentid; $nresult = gcms_query($csql); $id = gcms_fetch_object($nresult)->id; if ($id) { $prev = 'form.php?page=' . $_REQUEST['page'] . '&action=edit&id=' . $id; } else { $prev = ""; } $csql = "select min(" . $idfield . ") as id from " . $table . " where " . $idfield . " > " . $currentid; $nresult = gcms_query($csql); $id = gcms_fetch_object($nresult)->id; if ($id) { $next = 'form.php?page=' . $_REQUEST['page'] . '&action=edit&id=' . $id; } else { $next = ""; } end_entri($entriid, $new, $prev, $next, $confirmexp); }
<li class="yuimenuitem"><a class="yuimenuitemlabel" style="padding-Left:0px; padding-bottom:2px;font-size:11px; font-family:Arial; font-weight:bold;" ><img src="<?php echo THEME_DIR; ?> /images/icon/install.png" style="padding-left:5px;padding-right:5px;/*background-color:#B3D4FF*/; vertical-align:bottom;" /><?php echo $omenu->cmenu; ?> </a> <div id="<?php echo "sub_granted_menu_" . str_replace(" ", "_", $omenu->cmenu) . "menu_4"; ?> " class="yuimenu"> <div class="bd"> <ul class="first-of-type"> <?php $csql2 = "select a.* from " . PREFIX . "frontmenus as a where a.NID_GROUPFRONT_SUBMENUS = " . $omenu->nid . " order By a.NID_GROUPFRONT_SUBMENUS,a.nurut"; $nres_submenu_2 = gcms_query($csql2); while ($omenu2 = gcms_fetch_object($nres_submenu_2)) { $nm = str_replace(".", "_", str_replace("-", "_", str_replace(" ", "_", stripslashes($omenu2->cmenu)))); if (!$omenu2->width) { $omenu2->width = 600; } else { if (!$omenu2->height) { $omenu2->height = 500; } else { } } if ($omenu2->is_main == 1) { $load_menu2 = "index.php?page=" . $omenu2->nid; } else { if ($omenu2->is_main == 2) { $load_menu2 = "javascript:gcms_open_form('form_entri.php?page=" . $omenu2->nid . "','" . $nm . "'," . $omenu2->width . "," . $omenu2->height . ")";
/** * SubFunction: m_doselect() * Main module: Delivery Order * Create combobox, tag select * * @param string <b>$cvarname</b> : variable's name, select tag's name * @param variant <b>$cprevval</b> : previous value * @param string <b>$ctblname</b> : table's name * @param string <b>$cfldkeys</b> : field key * @param string <b>$cwhere</b> : where clause * @param string <b>$cfldviews</b>: fields to be viewed, seperated by comma * @param string <b>$ajaxdo</b> : ajax function in string, if there, ajax will execute on onchange event * @return none */ function b_htmlselect() { $narg = func_num_args(); $aarg = func_get_args(); if ($narg > 3) { $cvarname = $aarg[0]; $cprevval = $aarg[1]; $ctblname = $aarg[2]; $cfldkeys = $aarg[3]; $cwhere = $narg > 4 ? $aarg[4] : ''; $cfldview = explode(",", $narg > 5 ? $aarg[5] : $aarg[3]); $cajaxdo = ""; if ($narg > 6) { $cajaxdo = $aarg[6]; } ?> <select name="<?php echo $cvarname; ?> " id="<?php echo $cvarname; ?> " style="width: 155px;"<?php echo trim($cajaxdo) == "" ? "" : " onchange=\"" . $cajaxdo . "\""; ?> ><?php ?> <option style="width:315px" value=""<?php echo trim($cprevval) == "" ? " selected" : ""; ?> ></option><?php $csqlselect = "SELECT * FROM " . PREFIX . $ctblname; if (trim($cwhere) != "") { $csqlselect .= " WHERE " . $cwhere; } // echo $csqlselect.'<br>'; $nsqlselect = gcms_query($csqlselect); while ($osqlselect = gcms_fetch_object($nsqlselect)) { $strfldview = $cfldview; ?> <option value="<?php echo $osqlselect->{$cfldkeys}; ?> " style="width:100%"<?php echo $osqlselect->{$cfldkeys} == $cprevval ? " selected" : ""; ?> ><?php $nfldcount = count($cfldview); $nfldloop = 0; for ($nfldloop = 0; $nfldloop < $nfldcount; $nfldloop++) { $xfldview = $cfldview[$nfldloop]; echo ($nfldloop > 0 ? " - " : "") . $osqlselect->{$xfldview}; } ?> </option><?php } ?> </select><?php } }
<?php include './../../../config.php'; include './../../../lib.php'; if (!b_antisqlinjection($_GET['id_kelompok'])) { die; } if (!empty($_GET['nomor_id'])) { $csql = "select * from kegiatan where id_kelompok=" . $_GET['nid']; if ($nresult = gcms_query($csql)) { $row = gcms_fetch_object($nresult); ?> document.getElementById('nid').value="<?php echo $row->id_kelompok; ?> "; <?php } } else { ?> document.getElementById('nid').value=''; <?php }
$i += 1; } /*menghitung rata-rata */ $average_pegawai = mean($a); $average_barang = mean($b); $average_modal = mean($c); /*menghitung standar deviasi */ $standard_deviation_pegawai = standard_deviation_population($a); $standard_deviation_barang = standard_deviation_population($b); $standard_deviation_modal = standard_deviation_population($c); } //while $dataX = $ind; $dataY = $tot; $M = new matrix($dataX); $X = $M->ArrayData; $M = new matrix($dataY); $Y = $M->ArrayData; $Xt = $M->Transpose($X); $XtX = $M->MultiplyMatrix($Xt, $X); $XtY = $M->MultiplyMatrix($Xt, $Y); $XtXi = $M->InverseMatrix($XtX); $b = $M->MultiplyMatrix($XtXi, $XtY); $usql = "update kelompok_kegiatan set " . "koefisien_1=" . (empty($b[1][0]) ? 'null' : sprintf("%01.3f", $b[1][0])) . ",koefisien_2=" . (empty($b[2][0]) ? 'null' : sprintf("%01.3f", $b[2][0])) . ",koefisien_3=" . (empty($b[3][0]) ? 'null' : sprintf("%01.3f", $b[3][0])) . ",koefisien_4=" . (empty($b[4][0]) ? 'null' : sprintf("%01.3f", $b[4][0])) . ",konstanta=" . (empty($b[0][0]) ? 'null' : sprintf("%01.3f", $b[0][0])) . ",rata_pegawai=" . (empty($average_pegawai) ? 'null' : sprintf("%01.3f", $average_pegawai)) . ",rata_barang=" . (empty($average_barang) ? 'null' : sprintf("%01.3f", $average_barang)) . ",rata_modal=" . (empty($average_modal) ? 'null' : sprintf("%01.3f", $average_modal)) . ",std_deviasi_pegawai=" . (empty($standard_deviation_pegawai) ? 'null' : sprintf("%01.3f", $standard_deviation_pegawai)) . ",std_deviasi_barang=" . (empty($standard_deviation_barang) ? 'null' : sprintf("%01.3f", $standard_deviation_barang)) . ",std_deviasi_modal=" . (empty($standard_deviation_modal) ? 'null' : sprintf("%01.3f", $standard_deviation_modal)) . " where id=" . $_REQUEST[gid]; gcms_query($usql); echo $usql; ?>
/* add any additonal update statements here */ $sql .= ' where ' . $crudFK . ' = ' . $crudColumnValues['id']; if ($DEBUGMODE == 1) { $firephp->info($sql, 'query'); } gcms_query($sql) or die($firephp->error('Couldn t execute query.' . mysql_error())); break; case $crudConfig['delete']: /* ----====|| ACTION = DELETE ||====----*/ if ($DEBUGMODE == 1) { $firephp->info('DELETE', 'action'); } print_r($crudColumnValues); echo '----'; print_r($crudColumnValues); if ($postConfig['q'] != q) { $crudColumnValues[$crudFK] = $postConfig[$crudFK]; } $sql = 'Delete from ' . $crudTableName . ' where ' . $crudFK . ' = ' . $crudColumnValues['id']; //echo $crudColumnValues['id'];die; if ($DEBUGMODE == 1) { $firephp->info($sql, 'query'); } gcms_query($sql) or die($firephp->error('Couldn t execute query.' . mysql_error())); break; } /* ----====|| SEND OUTPUT ||====----*/ if ($DEBUGMODE == 1) { $firephp->info('End Of Script', 'status'); } print json_encode($o);
'; document.getElementById('wp_wr_no_urut').value='<?php echo $wp_wr_no_urut; ?> '; document.getElementById('wp_wr_kd_camat').value='<?php echo $wp_wr_kd_camat; ?> '; document.getElementById('wp_wr_kd_lurah').value='<?php echo $wp_wr_kd_lurah; ?> '; <?php } elseif ($_REQUEST['type'] == 'rekening') { $rs = gcms_fetch_object(gcms_query('select kode_rekening,nama_rekening,persen_tarif,tarif_dasar from rekening_kode where id=' . quote_smart($_REQUEST['val']))); ?> document.getElementById('rekening').value='<?php echo $_REQUEST['val']; ?> '; document.getElementById('kode_rekening').value='<?php echo $rs->kode_rekening; ?> '; document.getElementById('nama_rekening').value='<?php echo $rs->nama_rekening; ?> '; document.getElementById('tarif_dasar').value='<?php echo $rs->tarif_dasar;
echo $row->jumlah_kursi; ?> '); // document.getElementById('jumlah_tamu'+<?php echo $i; ?> ).value=formatCurrency('<?php echo $row->jumlah_tamu_per_hari; ?> '); <?php $i++; } } else { $cari_master = "select * from pendataan_restoran pr\r\n\t\t\t\t\t\t\tleft join pendataan_spt ps on pr.pendataan_id = ps.pendataan_id\r\n\t\t\t\t\t\t\tleft join pendataan_restoran_detail pd on ps.pendataan_id = pd.pendataan_id\r\n\t\t\t\t\t\t\tleft join pendaftaran p on ps.pendaftaran_id = p.pendaftaran_id\r\n\t\t\t\t\t\t\tleft join rekening_kode rk on pr.id_rekening = rk.id\r\n\t\t\t\t\t\t\tleft join pemohon pm on p.id_pemohon = pm.pemohon_id \r\n\t\t\t\t\t\t\tleft join spt s on p.pendaftaran_id = s.pendaftaran_id\r\n\t\t\t\t\t\t\tleft join kelurahan k on pm.id_desa = k.lurah_id\r\n\t\t\t\t\t\t\tleft join kecamatan kc on k.lurah_kecamatan = kc.camat_id\r\n\t\t\t\t\t\t\twhere pr.restoran_id ='" . $_GET['DataForm'] . "'"; $query_master = gcms_query($cari_master); //$total = 0; $row = gcms_fetch_object($query_master); //$total += $row->jumlah_kamar*$row->tarif_kamar; $NoReg = sprintf("%06d", $row->restoran_id); $TglProses = date("d-m-Y", strtotime($row->tgl_proses)); $TglEntri = date("d-m-Y", strtotime($row->tgl_entry)); $IdEdit = $row->restoran_id; $id_desa = $row->restoran_id_desa; $pendaftaran_id = $row->pendaftaran_id; $id_rekening = $row->id_rekening; $pendataan_id_hid = $row->pendataan_id; $Npwp = $row->npwp; $periodeSpt1 = $row->spt_no; if ($row->tgl_kembali == "" || $row->tgl_kembali == NULL) { $Tgl = "";
b.dasar_pengenaan as pengenaan, b.persen_tarif as persen, b.nominal as pajak from pendataan_spt a join pendataan_galianc b on a.pendataan_id=b.pendataan_id join rekening_kode c on c.id=b.id_rekening where a.pendataan_id=' . quote_smart($_REQUEST['id']) . ' order by b.galianc_id '; $o->page = 1; $o->total = 1; $o->records = 1; $i = 0; $jumlah = 0; $pajak = 0; $result = gcms_query($sql); while ($row = gcms_fetch_row($result)) { $o->rows[$i]['id'] = $row[0]; $o->rows[$i]['cell'] = $row; $i++; $jumlah += $row['2']; $pajak += $row['6']; } $o->userdata['rekening'] = 'Total'; $o->userdata['jumlah'] = $jumlah; $o->userdata['pajak'] = $pajak; print json_encode($o); break; case 'update': echo 'update'; break;
?> '; document.getElementById('nominal').value='<?php echo $row->nominal; ?> '; document.getElementById('penetapan_pr_id').value='<?php echo $row->id; ?> '; document.getElementById('badan_id').value='<?php echo $row->id_badan; ?> '; <?php } if (!empty($_GET['Petugas'])) { $sql = "select p.pejabat_id,p.nip,p.nama,g.nama AS golongan,pk.nama AS pangkat,j.nama AS jabatan\r\n\t\t\t\tfrom pejabat p\r\n\t\t\t\tleft join pangkat pk on p.pangkat_id = pk.id\r\n\t\t\t\tleft join golongan g on p.golongan_id = g.id\r\n\t\t\t\tleft join jabatan j on p.jabatan_id = j.id\r\n\t\t\t\twhere p.pejabat_id ='" . $_GET['Petugas'] . "'\r\n\t\t\t\t"; $xx = gcms_query($sql); $row = gcms_fetch_object($xx); ?> document.getElementById('petugas_id').value='<?php echo $row->pejabat_id; ?> '; document.getElementById('nama_petugas').value='<?php echo $row->nama; ?> '; <?php }
function getViaPembayaran() { $qy = 'select * from ref_pembayaran '; $result = gcms_query($qy); $option = ''; while ($rs = gcms_fetch_object($result)) { $option .= "<option value='{$rs->kode}'>{$rs->keterangan}</option>"; } return $option; }
<?php include 'config.php'; $sql = "SELECT * FROM INFO_PEMDA"; $res = gcms_query($sql); $rs = gcms_fetch_object($res); $datapicture = gcms_blob_echo($rs->logo);
alert(response); jQuery("#htmlTable3").trigger("reloadGrid"); formObject.reset(); }else{ alert('error '+response); } } }) // //var transaction = YAHOO.util.Connect.asyncRequest('POST',"request.php",callback,null); } }); function setNomor(){ <?php $cr = gcms_query("select max(teguran_pr_no) AS IdMax from teguran_pr"); $max = gcms_fetch_object($cr); $new_max = $max->IDMAX + 1; $new_no = sprintf("%06d", $new_max); ?> document.getElementById('NoRegForm').value = <?php echo $new_no; ?> ; } $('#cari_npwp').click(function(){ //$("#htmlTable2").setGridParam({url:'request.php?mod=pendataan&func=list&sender=daftarnpwp', datatype:'json'}).setCaption("Daftar NPWPD/RW ").trigger("reloadGrid"); $('#Npwp').dialog('open'); //alert('xxxx'); });
if ($DEBUGMODE == 1) { $firephp->info('DELETE', 'action'); } if ($postConfig['q'] != q) { $crudColumnValues[$crudFK] = $postConfig[$crudFK]; } $val = substr(trim($crudColumnValues['id']), 1, count($crudColumnValues['id']) - 2); $id_del = explode(',', $val); foreach ($id_del as $del) { $cek = b_fetch('select count(*) from penerimaan_pr where penetapan_pr_id=' . quote_smart($del) . ''); if (!$cek) { $qy_del2 = 'delete from penetapan_pr_content where penetapan_pr_id=' . quote_smart($del) . ''; $qy_del1 = 'delete from penetapan_pr where penetapan_pr_id=' . quote_smart($del) . ''; //echo $qy_del2."\n".$qy_del1."\n\n"; gcms_query($qy_del2); gcms_query($qy_del1); } else { echo 'Gak Bisa' . "\n"; } } $sql = 'Delete from ' . $crudTableName . ' where ' . $crudFK . ' = ' . $crudColumnValues['id']; //echo $crudColumnValues['id'];die; if ($DEBUGMODE == 1) { $firephp->info($sql, 'query'); } //gcms_query( $sql ) or die($firephp->error('Couldn t execute query.'.mysql_error())); break; } /* ----====|| SEND OUTPUT ||====----*/ if ($DEBUGMODE == 1) { $firephp->info('End Of Script', 'status');
ps.periode_akhir,ph.dasar_pengenaan, rk.kode_rekening,s.spt_id,pm.id_desa,k.lurah_kecamatan, p.no_pendaftaran,p.jenis_pendaftaran, s.spt_no from pendataan_phiburan ph left join pendataan_spt ps on ph.pendataan_id = ps.pendataan_id left join pendataan_phiburan_detail pd on ps.pendataan_id = pd.pendataan_id left join pendaftaran p on ps.pendaftaran_id = p.pendaftaran_id left join rekening_kode rk on ph.id_rekening = rk.id left join spt s on p.pendaftaran_id = s.pendaftaran_id left join pemohon pm on p.id_pemohon = pm.pemohon_id left join kelurahan k on pm.id_desa = k.lurah_id left join kecamatan kc on k.lurah_kecamatan = kc.camat_id where ph.pendataan_id=' . quote_smart($_REQUEST['val']); $data = gcms_query($sql); $x = 1; $rs = gcms_fetch_object($data); $pendataan_no = sprintf('%06d', $rs->pendataan_no); //$spt_no = ($rs->spt_no!='') ? sprintf('%05d',$rs->spt_no) : ''; if ($row->tanggal_kembali == "" || $rs->tanggal_kembali == NULL) { $Tgl = ""; } else { $Tgl = date("Y", strtotime($rs->periode_akhir)); } $replace = explode(".", $rs->kode_rekening); $KodeRek1 = $replace[0] . $replace[1] . $replace[2]; $KodeRek2 = $replace[3]; $KodeRek3 = $replace[4]; if ($rs->jenis_pendaftaran == "PAJAK") { $kode = "PAJAK";
elseif($data[0] == $tabel."_IBUKOTA") $value = $_REQUEST['ibukotaKab']; elseif($data[0] == $tabel."_TELP") $value = $_REQUEST['telp'] ; elseif($data[0] == $tabel."_PEJABAT") $value = $_REQUEST['pejabat']; elseif($data[0] == $tabel."_BANK") $value = $_REQUEST['namaBank']; elseif($data[0] == $tabel."_BANK_NOREK") $value = $_REQUEST['']; else $value = $_REQUEST[$data[0]]; if ( $value != ''){ $record = $value ; }else{ $record = $data[4] ; } $insert .= quote_smart($record).","; } $insert .= ")"; $insert = str_replace(",)",")",$insert);*/ gcms_query($insert); //echo $new_id."---".$insert."--".$max; echo "Data berhasil disimpan"; } if ($_REQUEST['sender'] == "entri_kecamatan") { $tabel = "kecamatan"; echo $_REQUEST['sender'] . "xxx" . $_REQUEST['KodeKecamatan']; } if ($_REQUEST['sender'] == "entri_kelurahan") { echo $_REQUEST['sender'] . "xxx" . $_REQUEST['kecamatan']; } if ($_REQUEST['sender'] == "entri_anggaran") { echo $_REQUEST['sender'] . "xxx"; } if ($_REQUEST['sender'] == "entri_keterangan_spt") { echo $_REQUEST['sender'] . "xxx";
<li><a href="#tabs-1"><em>Form</em></a></li> <li><a href="#tabs-2"><em>Detail</em></a></li> <li><a href="#tabs-3"><em>Data</em></a></li> </ul> <div id="tabs-1"> <input type="hidden" id="IdEdit" name="IdEdit" /> <input type='hidden' name='NamaPendataan' id='NamaPendataan' value='RESTORAN'> <div style='padding:5px;'> <fieldset> <legend>PENETAPAN PAJAK RESTORAN</legend> <div id='asb_simulasi_form'> <div class="singleSide"> <fieldset class="mainForm"> <label class="leftField"><span>No. Reg Form</span> <?php $cr = gcms_query("select max(pendataan_no) AS IdMax from pendataan_spt"); $max = gcms_fetch_object($cr); $new_max = $max->IDMAX + 1; $new_no = sprintf("%06d", $new_max); ?> <input type="text" name="no_pendaftaran" id='NoRegForm' size='25' value="<?php echo $new_no; ?> " readonly/> <input type="hidden" id="idHid" name="NoHid" value="<?php echo $new_max; ?> " /> </label> <label class="leftField"><span>Tgl Proses <b class="wajib">*</b></span> <input id='date_1' name='TglProses' type='text' title='Tanggal Proses' /><!--<input type="button" id="reset_tgl" size="2" value=".." />-->
/** * Mendapatkan title berdasarkan menu yang dipilih * * @param string $cpage * @return unknown */ function menu_get_title($cpage) { if (b_antisqlinjection($cpage) and $cpage != "") { if (b_admin(b_getuserlogin())) { $csql = "select * from " . PREFIX . "frontmenus where nid='" . $cpage . "'"; } else { $csql = "select a.* from " . PREFIX . "frontmenus as a\r\n\t\t left join " . PREFIX . "grantedfrontmenus as b on a.nid=b.nid_frontmenus\r\n\t\t where a.nid='" . $cpage . "' and \r\n\t\t (b.nid_users='" . b_getuserlogin() . "' or a.bsecure=0)"; } $nresult = gcms_query($csql); $opage = gcms_fetch_object($nresult); $csql = "select cgroup from " . PREFIX . "groupfrontmenus where nid='" . $opage->nid_groupfrontmenus . "'"; $creturn = b_fetch($csql) . " - " . $opage->cmenu; return $creturn; } }
$other_request = array('penetapan_pr_id' => $ID_HEADER, 'no_penetapan' => (int) $no_kohir, 'thn_penetapan' => $year, 'nominal_penetapan' => $_REQUEST['nominal']); updateNoKohir($_REQUEST['tgl_penetapan']); ibase_trans(); $a = $fbird->FBInsert('penetapan_pr', $other_request, $exception); } else { ibase_trans(); $a = 1; } $cdetail = 1; if ($_REQUEST['cinput'] != '') { // range no. data $qy = 'select a.* from v_pendataan a left join penetapan_pr_content b on b.pendataan_id=a.pendataan_id where b.pendataan_id is null and a.jenis_pungutan=\'OFFICE\' and a.pendataan_no between ' . quote_smart($_REQUEST['no_data_awal']) . ' and ' . quote_smart($_REQUEST['no_data_akhir']) . ' order by a.pendataan_no '; $result = gcms_query($qy); while ($rs = gcms_fetch_object($result)) { if ($_REQUEST['cnomor'] == '') { // tdk duplikasi //echo 'Tdk Duplikasi, Range'."\n"; list($day, $month, $year) = explode('/', $_REQUEST['tgl_penetapan']); $ID_HEADER = $fbird->setGenerator('GEN_PENETAPAN_PR'); $no_kohir = getNoKohir(); $exception = array(); $other_request = array('penetapan_pr_id' => $ID_HEADER, 'no_penetapan' => $no_kohir, 'thn_penetapan' => $year, 'nominal_penetapan' => $rs->nominal); updateNoKohir($_REQUEST['tgl_penetapan']); $a = $fbird->FBInsert('penetapan_pr', $other_request, $exception); unset($exception); unset($other_request); } $exception = array('penetapan_pr_content_id');
$firephp->info($sql, 'query'); } $val = substr(trim($crudColumnValues['id']), 1, count($crudColumnValues['id']) - 2); $id_del = explode(',', $val); foreach ($id_del as $del) { if ($tblContent != '') { $del_content = 'delete from ' . $tblContent . ' where ' . $crudFK . ' = ' . quote_smart($del); } if ($tblDetail != '') { $del_detail = 'delete from ' . $tblDetail . ' where ' . $crudFK . ' = ' . quote_smart($del); } if ($tblHeader != '') { $del_header = 'delete from ' . $tblHeader . ' where ' . $crudFK . ' = ' . quote_smart($del); } if (isset($del_content)) { gcms_query($del_content) or die($firephp->error('Couldn t execute query.' . mysql_error())); } if (isset($del_detail)) { gcms_query($del_detail) or die($firephp->error('Couldn t execute query.' . mysql_error())); } if (isset($del_header)) { gcms_query($del_header) or die($firephp->error('Couldn t execute query.' . mysql_error())); } } break; } /* ----====|| SEND OUTPUT ||====----*/ if ($DEBUGMODE == 1) { $firephp->info('End Of Script', 'status'); } print json_encode($o);
function gcms_run_query_block($csql) { $term = ";"; $pos = true; while ($pos !== false) { $pos = strpos($csql, $term); if ($pos !== false) { $sql = trim(substr($csql, 0, $pos)); $csql = substr($csql, $pos + strlen($term)); if (eregi("(set[ ]*term)[ ]*(.*)", $sql, $t)) { $term = trim($t[2]); } else { gcms_query($sql); } } } }
/** * hapus config * * @param string $config */ function b_deleteconfig($config) { $csql = "delete from " . PREFIX . "config where cname='" . $config . "'"; gcms_query($csql); }
} else { } unset($exception); unset($other_request); } } } if ($_REQUEST['sender'] == "entri_pendaftaran_bu") { $cek = b_fetch('select count(*) from pendaftaran where no_pendaftaran=' . quote_smart($_REQUEST['no_pendaftaran'])); if (!$cek) { $nomor = $_REQUEST['no_pendaftaran']; $nmax = (int) substr($_REQUEST['no_pendaftaran'], 1); } else { $nomor = setNomorPendaftaran($_REQUEST['jenis_pendaftaran'], $_REQUEST['objek_pdrd']); $message = $_REQUEST['no_pendaftaran'] . ' sudah terdaftar, ' . "\n" . 'diganti dengan ' . $nomor . "\n"; $nmax = b_fetch('select max(nurut) from pendaftaran where jenis_pendaftaran=' . quote_smart($_REQUEST['jenis_pendaftaran']) . ' and objek_pdrd=' . quote_smart($_REQUEST['objek_pdrd'])); //$nmax = b_fetch('select max(nurut) from pendaftaran where jenis_pendaftaran='.quote_smart($_REQUEST['jenis_pendaftaran']).' '); $nmax++; } $npwp = setNoNPWP($nmax, $_REQUEST['jenis_pendaftaran'], $_REQUEST['objek_pdrd'], $_REQUEST['pemohon']); $nokartu = setNoKartu($nmax, $_REQUEST['jenis_pendaftaran'], $_REQUEST['objek_pdrd'], $_REQUEST['tanggal_kartu']); $arr_field = array('id_pemohon', 'jenis_pendaftaran', 'nurut', 'no_pendaftaran', 'no_kartu', 'npwp', 'objek_pdrd', 'kode_usaha', 'tanggal_kartu', 'tanggal_terima', 'tanggal_kembali', 'tanggal_kirim', 'tanggal_tutup'); $field = implode(',', $arr_field); $qy = 'insert into pendaftaran (' . $field . ') values ('; $qy .= quote_smart($_REQUEST['pemohon']) . ',' . quote_smart($_REQUEST['jenis_pendaftaran']) . ",'{$nmax}'" . ',' . quote_smart($nomor) . ',' . quote_smart($nokartu) . ',' . quote_smart($npwp) . ',' . quote_smart($_REQUEST['objek_pdrd']) . ',' . quote_smart($_REQUEST['kode_usaha']) . ',' . quote_smart($_REQUEST['tanggal_kartu']) . ',' . quote_smart(blkDate($_REQUEST['tanggal_terima'])) . ',' . quote_smart(blkDate($_REQUEST['tanggal_kembali'])) . ',' . quote_smart(blkDate($_REQUEST['tanggal_kirim'])) . ',' . quote_smart(blkDate($_REQUEST['tanggal_tutup'])) . ')'; if (gcms_query($qy)) { echo $message . 'Data telah tersimpan '; } else { echo '!'; } }
//echo 'Insert Detail OK'; //echo $a; if ($a && $_REQUEST['rows'] == $_REQUEST['count']) { ibase_commit(); //echo "xxx"; } } if (!$a) { // echo "no"; ibase_rollback(); } } else { unset($exception); unset($other_request); $ID_HEADER = $fbird->setGenerator('GEN_PENDATAAN_SPT'); $cr_spt_no = gcms_query("select max(" . $tabel_spt_no . ") AS IdMax from " . $tabel_spt . " "); $max_spt = gcms_fetch_object($cr_spt_no); $new_no_spt = $max_spt->IDMAX + 1; if ($_REQUEST['SptIdHid'] == '') { $exception = array('spt_id', 'nama_kegiatan'); $other_request = array('pendataan_id' => $ID_HEADER, 'pendataan_no' => $new_no_spt, 'tgl_proses' => $_REQUEST['TglProses'], 'tgl_entry' => $_REQUEST['TglEntri'], 'jenis_pendataan' => $_REQUEST['NamaPendataan'], 'jenis_pungutan' => $_REQUEST['SystemPemungutan'], 'periode_awal' => $_REQUEST['TglJualMulai'], 'periode_akhir' => $_REQUEST['TglJualSampai'], 'nominal' => str_replace(",", "", $_REQUEST['Pajak'])); } else { $exception = array('nama_kegiatan'); $other_request = array('pendataan_id' => $ID_HEADER, 'pendataan_no' => $new_no_spt, 'tgl_proses' => $_REQUEST['TglProses'], 'tgl_entry' => $_REQUEST['TglEntri'], 'jenis_pendataan' => $_REQUEST['NamaPendataan'], 'jenis_pungutan' => $_REQUEST['SystemPemungutan'], 'periode_awal' => $_REQUEST['TglJualMulai'], 'periode_akhir' => $_REQUEST['TglJualSampai'], 'nominal' => str_replace(",", "", $_REQUEST['Pajak']), 'spt_id' => $_REQUEST['SptIdHid']); } ibase_trans(); $a = $fbird->FBInsert('pendataan_spt', $other_request, $exception); unset($exception); unset($other_request); $exceptionxx = array('hotel_id'); $other_requestxxx = array('pendataan_id' => $ID_HEADER, 'hotel_nama' => $_REQUEST['nama_wp_wr'], 'hotel_alamat' => $_REQUEST['Alamat'], 'hotel_id_desa' => $_REQUEST['id_desa'], 'nominal' => str_replace(",", "", $_REQUEST['Tarif']), 'persen_tarif' => $_REQUEST['persen'], 'id_rekening' => $_REQUEST['IdRekening'], 'dasar_pengenaan' => str_replace(",", "", $_REQUEST['Pajak']));
$wp_wr_kd_lurah = substr($npwp, 9, 2); if ($jenis == 'PRIBADI') { $qy = 'select a.nama, a.alamat, b.lurah_nama, c.camat_nama from pemohon a join kelurahan b on a.id_desa=b.lurah_id join kecamatan c on c.camat_id=b.lurah_kecamatan where a.pemohon_id=' . quote_smart($id_pemohon); $data = gcms_query($qy); $rs = gcms_fetch_object($data); } else { $qy = 'select a.nama, a.alamat, b.lurah_nama, c.camat_nama from badan_usaha a join kelurahan b on a.badan_id_desa=b.lurah_id join kecamatan c on c.camat_id=b.lurah_kecamatan where a.id=' . quote_smart($id_pemohon); $data = gcms_query($qy); $rs = gcms_fetch_object($data); } ?> document.getElementById('pendaftaran_id').value='<?php echo $_REQUEST['val']; ?> '; document.getElementById('nama_pemohon').value='<?php echo $rs->nama; ?> '; document.getElementById('alamat').value='<?php echo showMultiLine($rs->alamat); ?> ';
unset($exception); unset($other_request); if ($a) { echo "Data Berhasil di Ubah"; ibase_commit(); } else { echo '!'; ibase_rollback(); } } } else { $exception = array('teguran_pr_id'); $other_request = array('fk_teguran_id' => $_REQUEST['petugas_id'], 'teguran_pr_no' => $_REQUEST['NoHid'], 'tingkat' => 1); $a = $fbird->FBInsert('teguran_pr', $other_request, $exception); unset($exception); unset($other_request); if ($a) { $update = "update penetapan_pr set nominal_penetapan = 0 where penetapan_pr_id ='" . $_REQUEST['penetapan_pr_id'] . "'"; if (gcms_query($update)) { echo "Data Berhasil Disimpan"; ibase_commit(); } else { echo $update; } } if (!$a) { echo "!"; ibase_rollback(); } } }