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 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 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 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); }
/** * 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 } }
//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'])); $ab = $fbird->FBInsert('pendataan_hotel', $other_requestxxx, $exceptionxx);
</tr> <?php if (USERLEVEL >= bc_supervisor and !b_admin($_POST['nid']) and b_getuserlogin() != $_POST['nid']) { ?> <tr> <td colspan="2"><h2>Grant Modul</h2></td> </tr> <tr> <td colspan="2"> <table> <?php $csql = "select * from " . PREFIX . "moduls order by nid"; $nresult = gcms_query($csql); $i = 0; while ($omoduls = gcms_fetch_object($nresult)) { b_fetch("select count(nid) from " . PREFIX . "granted where nid_users='" . $_POST['nid'] . "' and nid_moduls='{$omoduls->nid}'") > 0 ? $ccheck = "checked" : ($ccheck = ""); $ainfo = b_readinit(str_replace(".php", ".init.php", $omoduls->cpath)); if (($ainfo['level'] <= USERLEVEL or b_admin(b_getuserlogin())) and $ainfo['type'] != "lib") { //(strtolower($ainfo['type'])=="admin")?$ctype="(Admin)":$ctype="(Frontend)"; if (strtolower($ainfo['type']) == "admin") { ?> <tr> <td><input type="checkbox" name="modul[<?php echo $i; ?> ]" value="<?php echo $omoduls->nid; ?> " <?php echo $ccheck;
} /* ubah id data yang dihapus ke dalam bentuk array */ ${$daftar . '_deleted'} = array(); $ds = explode(",", $_REQUEST[$daftar . '_deleted']); foreach ($ds as $d) { if ($d) { ${$daftar . '_deleted'}[] = $d; } } } } /* pada awalnya, untuk konek ke ekstensi disini, yaitu melalui 'page' yang akan menuju ke fungsi terkait di ekstensi * ke depan perlu mekanisme baru yang memungkinkan suatu ekstensi diakses tanpa lewat menu seperti terjadi di request data, * buka pilihan dari modul lain, dll * * --------------- PERLU DIPIKIRKAN DAN DIBENAHI LAGI ------------------ */ /* perlu reverse untuk pemanggilan menggunakan nama modul dan fungsi - backward compatibility */ if (!$_REQUEST['page'] && $_REQUEST['mod'] && $_REQUEST['func']) { if (b_antisqlinjection($_REQUEST['mod']) && b_antisqlinjection($_REQUEST['func'])) { $func = $_REQUEST['func']; $csql = "select * from g_frontmenus where cfunction = '" . $func . "'"; $page = gcms_fetch_object(gcms_query($csql))->nid; if (!$page) { $func = "m_" . $_REQUEST['mod'] . "_" . $_REQUEST['func']; $csql = "select * from g_frontmenus where cfunction = '" . $func . "'"; $page = gcms_fetch_object(gcms_query($csql))->nid; } $_REQUEST['page'] = $page; } }
<?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 }
function gcms_insert_id($table) { $res = gcms_query("select gen_id(g_" . $table . "_nid, 0) as NID from rdb\$database"); $obj = gcms_fetch_object($res); return $obj->NID; }
<?php $expath = "." . str_replace("\\", "/", str_replace(realpath("."), "", dirname(__FILE__))) . "/"; $qy = 'select lurah_id, lurah_nama from kelurahan '; $data = gcms_query($qy); $value = ''; while ($rs = gcms_fetch_object($data)) { $value .= "'{$rs->lurah_id}':'{$rs->lurah_nama}',"; } if (isset($_REQUEST['page'])) { $param = 'page=' . $_REQUEST['page']; } else { $param = 'mod=pendaftaran&func=pemohon'; } ?> <script type="text/javascript"> function mycheck(val){ if(parseFloat(value) >= 200 && parseFloat(value)<=300) { return [true,"",""]; } else { return [false,"The value should be between 200 and 300!",""]; } } var lastsel; jQuery(document).ready(function(){ jQuery("#htmlTable").jqGrid({ url:'request.php?<?php echo $param; ?> &sender=pendaftaran_pemohon', editurl:'request.php?<?php echo $param;
<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=".." />-->
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 . ")"; } else {
?> '; 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 }
<tr> <td colspan="10"><br><hr><br></td> </tr> <tr><th colspan="7">New Menu</th></tr> <tr> <td><select name="cgroup[<?php echo $nindex; ?> ]" style="width:105px"> <option style="width:200px"></option> <?php $csql = "select nid, cgroup, bhide from " . PREFIX . "groupfrontmenus order by nurut"; $nresult = gcms_query($csql); while ($ogroup = gcms_fetch_object($nresult)) { $ogroup->bhide ? $copt = $ogroup->cgroup . " (hide)" : ($copt = $ogroup->cgroup); ?> <option value="<?php echo $ogroup->nid; ?> "><?php echo $copt; ?> </option> <?php } ?> </select></td> <td><input type="text" name="cmenu[<?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);
'); // 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 = ""; } else { $Tgl = date("Y", strtotime($row->tgl_kembali));
"records":0, "rows":[ {"id":0,"cell":[0,"","","","","","","","","",""]}, ] }'; */ include $expath . 'handler_rekening_kode.php'; } elseif ($_REQUEST['sender'] == 'set_list') { $qy = 'select * from rekening_kategori '; $data = gcms_query($qy); $val = ''; while ($rs = gcms_fetch_object($data)) { $val .= "'{$rs->id}':'{$rs->nama_kategori}',"; } echo $val; } elseif ($_REQUEST['sender'] == 'pilih-rekening') { $crudColumns = array('id' => 'id', 'kode' => 'kode_rekening', 'nama' => 'nama_rekening'); $crudTableName = 'rekening_kode'; include 'jqGridCrud.php'; } elseif ($_REQUEST['sender'] == 'set_form') { $id = getIdRekening($_REQUEST['id']); $qry = 'select persen_tarif, tarif_dasar from rekening_kode where id=' . quote_smart($id); $result = gcms_query($qry); $rs = gcms_fetch_object($result); $arr = array('persen' => $rs->persen_tarif, 'tarif' => $rs->tarif_dasar); echo json_encode($arr); } else { $crudColumns = array('id' => 'id', 'kode' => 'kode_skpd', 'nama' => 'nama_skpd'); $crudTableName = 'skpd'; include 'jqGridCrud.php'; }
'; 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;
<?php /* Bagian Ini untuk memproses data */ if ($_REQUEST['sender'] == "entri_SatuanKerja") { echo $_REQUEST['sender'] . "---" . $_REQUEST['KodeUnitKerja']; } if ($_REQUEST['sender'] == "entri_Pemda") { //echo $_REQUEST['sender']."xxx".$_REQUEST['kabKota']; $tabel = "PEMDA"; $tabel_id = $tabel . "_ID"; $max = "select max(PEMDA_ID) AS NMAX\r\n\t\t\t\t from PEMDA"; $Nmax = gcms_query($max); $new = gcms_fetch_object($Nmax); //echo $new->Nmax; $new_id = number_format($new->NMAX) + 1; $insert = "insert into " . $tabel . " values('" . $new_id . "','" . $_REQUEST['namaKab'] . "',\r\n\t\t\t\t\t\t\t\t\t\t\t'" . $_REQUEST['alamat'] . "','" . $_REQUEST['logo'] . "',\r\n\t\t\t\t\t\t\t\t\t\t\t'" . $_REQUEST['kodeLokasi'] . "','" . $_REQUEST['kabKota'] . "',\r\n\t\t\t\t\t\t\t\t\t\t\t'" . $_REQUEST['ibukotaKab'] . "','" . $_REQUEST['telp'] . "',\r\n\t\t\t\t\t\t\t\t\t\t\t'" . $_REQUEST['pejabat'] . "','" . $_REQUEST['namaBank'] . "',\r\n\t\t\t\t\t\t\t\t\t\t\t'" . $_REQUEST['noRek'] . "')"; /*$insert = "INSERT INTO ".$tabel." VALUES ("; $sql = "DESCRIBE ".$tabel.""; $qry = gcms_query($sql); $max="select max(".$tabel_id.") AS Nmax from ".$tabel.""; $Nmax=gcms_query($max); $new_id = gcms_fetch_object($Nmax)->Nmax+1; while($data = gcms_fetch_array($qryDesc)) { if($data[0] == $tabel_id) $value = $new_id ; elseif($data[0] == $tabel."_NAMA") $value = $_REQUEST['namaKab'] ; elseif($data[0] == $tabel."_LOKASI") $value = $_REQUEST['alamat']; elseif($data[0] == $tabel."_LOGO_PATH") $value = $_REQUEST['logo']; elseif($data[0] == $tabel."_KODE") $value = $_REQUEST['kodeLokasi'];
/** * 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; } }
$creff = "<a href=\"?cact=" . $_REQUEST['cact'] . "&csub={$omoduls->nid}\">" . trim($ainfo_menu['name']) . "</a>"; } } $csubmenu .= "<li " . $ccurrent . ">" . $creff . "</li>\r\n"; } } $cgroups = "('Manage'"; foreach ($agroup as $cgroups_temp) { if ($cgroups_temp != "") { $cgroups .= ",'" . $cgroups_temp . "'"; } } $cgroups .= ")"; $csql = "select * from " . PREFIX . "groupmenus where cgroup in " . $cgroups . " order by nurut"; $nresult = gcms_query($csql); while ($omenu = gcms_fetch_object($nresult)) { if ($_REQUEST['cact'] == $omenu->nid) { $creff = "<a href=\"?cact={$omenu->nid}\" class=\"current\">" . $omenu->cgroup . "</a>"; } else { $creff = "<a href=\"?cact={$omenu->nid}\">" . $omenu->cgroup . "</a>"; } ?> <li <?php echo $ccurrent; ?> ><?php echo $creff; ?> </li> <?php }
$nresult = gcms_query($csql); while ($rox = gcms_fetch_object($nresult)) { $nama = array($rox->nama_indikator_1, $rox->nama_indikator_2, $rox->nama_indikator_3, $rox->nama_indikator_4); /*mereset data*/ reset_arr($a); reset_arr($b); reset_arr($c); reset_arr($y); $sql = 'SELECT id id, (a.BELANJA_PEGAWAI) pegawai, (a.BELANJA_BARANG_JASA) barang, (a.BELANJA_MODAL) modal, (a.belanja_pegawai+a.belanja_barang_jasa+a.belanja_modal) total, a.indikator_1, a.indikator_2, a.indikator_3, a.indikator_4 from kegiatan a where a.id_kelompok = ' . $rox->id; $result = gcms_query($sql); $i = 0; while ($row = gcms_fetch_object($result)) { $a[] = $row->pegawai; $b[] = $row->barang; $c[] = $row->modal; $tot[] = $row->total; $ind[$i][] = 1; foreach ($nama as $key => $value) { if ($value != '') { switch ($key) { case 0: $ind[$i][] = $row->indikator_1; break; case 1: $ind[$i][] = $row->indikator_2; break; case 2:
/** * Mengambil konfigurasi * * @return unknown * @param variant $config */ function b_getconfig($config) { $csql = "select * from " . PREFIX . "config where cname='" . $config . "'"; $nreturn = gcms_query($csql); $oconfig = gcms_fetch_object($nreturn); if (strtolower(substr($config, 0, 1)) == 'c') { $return = $oconfig->cconfig; } if (strtolower(substr($config, 0, 1)) == 'n') { $return = $oconfig->nconfig; } if (strtolower(substr($config, 0, 1)) == 'd') { $return = $oconfig->dconfig; } return $return; }
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); ?> '; document.getElementById('kecamatan').value='<?php
<?php if (isset($_POST['submit']) and b_admin(b_getuserlogin())) { if ($_POST['submit'] == "Disable") { if (b_checkdisabledependency($_POST['path'])) { $csql = "select nid from " . PREFIX . "moduls where cpath='" . $_POST['path'] . "'"; $nid_moduls = b_fetch($csql); $csql = "delete from " . PREFIX . "granted where nid_moduls='{$nid_moduls}'"; gcms_query($csql); if ($_POST['premove'] == "remove") { $csql = "select * from " . PREFIX . "tableinstalled where nid_moduls='{$nid_moduls}'"; $nresult = gcms_query($csql); while ($otable = gcms_fetch_object($nresult)) { $csql2 = "drop table " . $otable->ctable; gcms_query($csql2); } } $csql = "delete from " . PREFIX . "tableinstalled where nid_moduls='{$nid_moduls}'"; gcms_query($csql); $csql = "delete from " . PREFIX . "moduls where cpath='" . $_POST['path'] . "'"; } else { $ainfoerror = b_readinit(str_replace(".php", ".init.php", strtolower($_POST['path']))); $cerror = "Extension <b>" . $ainfoerror['name'] . " " . $ainfoerror['version'] . "</b> can't be disabled, \r\n please check extension's dependency from the others<br/>"; } } if ($_POST['submit'] == "Enable") { include "./../config.php"; if (b_checkenabledependency($_POST['path'])) { // create list of current tables before process $nresult = gcms_list_tables(DATABASE); while ($atables = gcms_fetch_row($nresult)) {