} 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 '!'; } }
<?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)) {
$rows->nama_rekening = substr($rows->nama_rekening, 0, 24); } $nama_rek = strtolower($rows->nama_rekening); $str .= '<option value="' . $rows->persen_tarif . '">' . $rows->kode_rekening . " - " . $nama_rek . '</option>'; } $str .= '</select>'; ?> var kodeRek='<?php echo $str; ?> '; <?php } if (!empty($_GET['DataForm'])) { $idPendataan = b_fetch("select pendataan_id from pendataan_restoran where restoran_id ='" . $_GET['DataForm'] . "'"); $count = b_fetch("select count(*) from pendataan_restoran_detail where pendataan_id ='" . $idPendataan . "'"); if ($count) { ?> /* $("tr.isi_detail").remove(); for(id=1; id <= <?php echo $count; ?> ; id++){ //alert(id); var str = " <tr id='" + id + "' " +" class='isi_detail'> "; //var data = kodeRek; str += "<td><input type='hidden' id=\"DetailHid"+id+"\" name=\"DetailHid"+id+"\" ><input id=\"jumlah_meja"+id+"\" type='text' name=\"jumlah_meja"+id+"\" value='' size='30'></td><td><input class='field_angka' id=\"jumlah_kursi"+id+"\" type='text' name=\"jumlah_kursi"+id+"\" size='10'></td><td><input class='field_angka' id=\"jumlah_tamu"+id+"\" type='text' name=\"jumlah_tamu"+id+"\" size='20' /></td>"; str += "<td><input type='button' onclick=\"hapus_data('"+id+"');\" name='hapus' value='hapus' />";
unset($other_request); if ($b) { ibase_commit(); echo 'Data Telah Diupdate..'; } else { ibase_rollback(); echo 'Gagal Di Content'; } } else { ibase_rollback(); echo 'Gagal d Header '; } } else { $cek = b_fetch('select count(*) from pendataan_spt where pendataan_no=' . quote_smart((int) $_REQUEST['nomor'])); if (!$cek) { $next_no = b_fetch('select max(pendataan_no) from pendataan_spt '); $next_no++; $no_spt = $next_no; } else { $message = 'Nomor ' . $_REQUEST['nomor'] . 'Sudah Ada !' . "\n" . 'Diganti dengan ' . sprintf('%05d', $next_no); $no_spt = (int) $_REQUEST['nomor']; } $ID_HEADER = $fbird->setGenerator('GEN_PENDATAAN_SPT'); if ($_REQUEST['spt'] == '') { $exception = array('spt_id', 'nama_kegiatan'); $other_request = array('pendataan_id' => $ID_HEADER, 'pendataan_no' => $no_spt, 'jenis_pendataan' => 'LISTRIK'); } else { $exception = array('nama_kegiatan'); $other_request = array('pendataan_id' => $ID_HEADER, 'pendataan_no' => $no_spt, 'jenis_pendataan' => 'LISTRIK', 'spt_id' => $_REQUEST['spt']); } ibase_trans();
<ul id="adminmenu"> <?php if (!$_REQUEST['cact']) { $cact = 0; } else { $cact = $_REQUEST['cact']; } $csql = "select cgroup from " . PREFIX . "groupmenus where nid='" . $cact . "'"; $cgroup = b_fetch($csql); if ($_REQUEST['cact'] > 0) { $creff = "<a href=\"?cact=0\">Dashboard</a>"; } else { $creff = "<a href=\"?cact=0\" class=\"current\">Dashboard</a>"; } ?> <li <?php echo $ccurrent; ?> ><?php echo $creff; ?> </li> <?php if ($bv_level > bc_inactive or true) { $csubmenu = "<ul id=\"submenu\">"; $ccurrent = ""; $creff = ""; if ($_REQUEST['cact'] == 1) { if ($_REQUEST['csub'] > 0) { $creff = "<a href=\"?cact=" . $_REQUEST['cact'] . "&csub=0\">Extensions</a>\n"; } else {
/** * Fungsi untuk memanggil fungsi-fungsi start-up * */ function b_startup() { $afunction = get_defined_functions(); foreach ($afunction['user'] as $cfunction) { if (strtolower(substr($cfunction, 0, 2)) == "s_") { if (function_exists($cfunction)) { $ctempath = PATHEXTENSION; } $ctemp = substr($cfunction, 2, strlen($cfunction) - 2); $csql = "select cpath from " . PREFIX . "moduls where cpath like '%" . substr($ctemp, 0, strpos($ctemp, "_")) . ".php'"; $initfile = str_replace(".php", ".init.php", strtolower(b_fetch($csql))); $initfile = translate_modul_path($initfile); $GLOBALS['bv_pathextension'] = dirname($initfile) . "/"; define('PATHEXTENSION_STARTUP', dirname($initfile) . "/"); call_user_func($cfunction, ""); } } }
<?php if (basename(__FILE__) == basename($_SERVER['PHP_SELF'])) { die; } if ($_REQUEST['proses'] == 'Simpan') { $n = b_fetch("select count(*) from info_pemda"); /* Cek Nilai n, Jika kosong berarti Buat Baru, else Update */ if (!$n) { $id = 1; // inisialisasi, bahwa hanya ada satu data yang tersimpan $img_path = './images/pemda'; //target penyimpanan file logo $csql = 'insert into info_pemda(id,pemda_nama,kode_lokasi,opt_kab,pejabat,pemda_alamat,pemda_kabupaten, ibu_kota,pemda_telp,pemda_fax,nama_bank,no_rekening,logo,tipe_gambar) values(' . quote_smart($id) . ',' . "''," . quote_smart($_REQUEST['kodeLokasi']) . ',' . quote_smart($_REQUEST['kabKota']) . ',' . quote_smart($_REQUEST['pejabat']) . ',' . quote_smart($_REQUEST['alamat']) . ',' . quote_smart($_REQUEST['namaKab']) . ',' . quote_smart($_REQUEST['ibukotaKab']) . ',' . quote_smart($_REQUEST['telp']) . ',' . quote_smart($_REQUEST['fax']) . ',' . quote_smart($_REQUEST['namaBank']) . ',' . quote_smart($_REQUEST['noRek']); if (!empty($_FILES['logo']['tmp_name'])) { $tmpName = $_FILES['logo']['tmp_name']; $fileType = $_FILES['logo']['type']; global $fbdb; $blh = ibase_blob_create($fbdb); if ($_FILES['logo']['tmp_name'] != '') { ibase_blob_add($blh, file_get_contents($_FILES['logo']['tmp_name'])); } $blobid = ibase_blob_close($blh); $csql .= ',?,' . sqlvalue($fileType, true) . ')'; $target_file = $img_path . basename($_FILES['logo']['name']);
} //echo print_r($_REQUEST); unset($exception); unset($other_request); $exception = array('penetapan_pr_content_id'); $other_request = array('penetapan_pr_id' => $ID_HEADER, 'pendataan_id' => $_REQUEST['id']); $a = $fbird->FBInsert('penetapan_pr_content', $other_request, $exception); if ($a && $_REQUEST['rows'] == $_REQUEST['count']) { ibase_commit(); } if (!$a) { ibase_rollback(); } unset($exception); unset($other_request); $jenis_pendataan = b_fetch('select jenis_pendataan from pendataan_spt where pendataan_id=' . quote_smart($_REQUEST['id'])); //echo $jenis_pendataan; /*switch $jenis_pendataan { case 'LISTRIK': $table_name='pendataan_listrik'; break; case 'GALIAN C': $table_name='pendataan_galianc'; break; case 'AIR': $table_name='pendataan_air'; break; }*/ /*$qy = 'select * from '.$table_name; $result = gcms_query($qy); while($rs = gcms_fetch_object($result)){
function setNomor() { $no = b_fetch('select max(spt_no) from spt'); $no++; return sprintf('%05d', $no); }
echo $rows->kode_rekening . " - " . $nama_rek; ?> ", "persen" : "<?php echo $rows->persen_tarif; ?> " }, <?php } ?> ] <?php } if ($_GET['persentarif']) { $sql = "SELECT a.PERSEN_TARIF from rekening_kode a where a.ID = " . $_GET['persentarif']; $persentarif = b_fetch($sql); echo "[{ 'tarif' : '" . $persentarif . "' }]"; } if ($_GET['setnomor']) { $query = "select max(pendataan_no) from pendataan_spt where jenis_pendataan = 'PARKIR';"; $result = gcms_query($query); $str = "["; while ($rows = gcms_fetch_object($result)) { $nomor = $rows->max; $nomor += 1; $str .= "{ \"nomor\" : \"" . sprintf("%06d", $nomor) . "\"},"; } $str .= "]"; echo $str; } //if( $_GET['edit'] && $_GET['edit'] == 'umum' ) {
$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'); } 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'); }
?> " <?php echo $ccheck; ?> > <?php echo $omenus->cgroup . " - " . $omenus->cmenu; ?> </td> <td> Menu Level <select name="clevel[<?php echo $i; ?> ]"> <?php for ($ii = 0; $ii < USERLEVEL; $ii++) { if ($check = "checked") { $nstatus = b_fetch("select nstatus from " . PREFIX . "grantedfrontmenus where nid_users='" . $_POST['nid'] . "' and nid_frontmenus='{$omenus->nid}'"); $nstatus == $ii ? $cselected = "selected" : ($cselected = ""); } ?> <option value="<?php echo $ii; ?> " <?php echo $cselected; ?> ><?php echo ucfirst($GLOBALS['bva_levelname'][$ii]); ?> </option> <?php }
<fieldset> <legend>FORM PENETAPAN</legend> <div> <div class="form_master"> <fieldset class="form_frame"> <!--<div><label>Duplikasi Nomor</label><input type='checkbox' name='cnomor' id='cnomor' checked /></div>--> <div><label>No. Penetapan</label><input type="text" name="nomor_reg" id='nomor_reg' size='10' value="<?php echo sprintf('%05d', getNoKohir()); ?> " readonly/></div> <div><label>Tgl. Penetapan<b class="wajib">*</b></label><input type="text" name="tgl_penetapan" title='Tgl. Penetapan' id="tgl_penetapan" value='<?php echo date('d/m/Y'); ?> ' onchange="" size="10"/></div> <div><label>Tgl. Batas Setor<b class="wajib">*</b></label><input type="text" name="tgl_setor" title='Tgl. Batas Setor' id="tgl_setor" value='<?php echo getExpired(date('d/m/Y'), b_fetch('select jatem_bayar from ref_jatuh_tempo')); ?> ' onchange="" size="10"/></div> <!--<div><label>Jenis Penetapan</label><select name='jenis_penetapan' id='jenis_penetapan'><?php echo getKeteranganSPT(); ?> </select></div>--> <div><label>No. Pendataan<input type='checkbox' name='cinput' id='cinput' ></label><input type='text' name='no_data_awal' id='no_data_awal' size='5' readonly /> S/D <input type='text' name='no_data_akhir' id='no_data_akhir' size='5' readonly /></div> <div><label>Keterangan</label><textarea name='memo' id='memo'></textarea></div> <div><label> </b></label><input type='button' id='proses' class='btn' value='Simpan'></input></div> </fieldset> <fieldset class="form_frame"> <div><label>Jenis Pendaftaran </label><select name="jenis_pendaftaran" id='jenis_pendaftaran'><option value=''></option><option value="PAJAK">Pajak</option><option value="RETRIBUSI">Retribusi</option></select></div> <div><label>Sistem Pemungutan </label><select name="pungutan" id='pungutan'><option value=''></option><option value="SELF">Selft Assesment</option><option value="OFFICE">Office Assesment</option></select></div> <div><label>Tanggal Pendataan </label><input type="text" name="tgl_kirim" id="tgl_kirim" onchange="" size="10"/> S/D <input type="text" name="tgl_kembali" id="tgl_kembali" onchange="" size="10"/></div> <div><label> </label><input type='button' class='btn' id='cari' name='cari' value='Cari'></input></input></div>
<?php include 'config.php'; include 'global.php'; $expath = "." . str_replace("\\", "/", str_replace(realpath("."), "", dirname(__FILE__))) . "/"; if ($_REQUEST['sender'] == 'kategori') { $crudColumns = array('id' => 'id', 'kode' => 'tipe_kategori', 'nama' => 'nama_kategori', 'saldo' => 'saldo_normal'); $crudTableName = 'rekening_kategori'; include 'jqGridCrud.php'; } elseif ($_REQUEST['sender'] == 'getiperekening') { if ($_REQUEST['val'] != '') { $kode = b_fetch('select id from rekening_kategori where tipe_kategori=' . quote_smart($_REQUEST['val'])); } else { $kode = b_fetch('select tipe_kategori from rekening_kategori where id=' . quote_smart($_REQUEST['id'])); } echo $kode; } elseif ($_REQUEST['sender'] == 'getkoderekening') { /*if($_REQUEST['val']!=''){ $kode = b_fetch('select id from rekening_kategori where tipe_kategori='.quote_smart($_REQUEST['val'])); }else{ $kode = b_fetch('select tipe_kategori from rekening_kategori where id='.quote_smart($_REQUEST['id'])); }*/ echo $_REQUEST['id']; } elseif ($_REQUEST['sender'] == 'rekening') { $crudColumns = array('id' => 'id', 'tipe' => 'tipe', 'kelompok' => 'kelompok', 'jenis' => 'jenis', 'objek' => 'objek', 'rincian' => 'rincian', 'sub1' => 'sub1', 'sub2' => 'sub2', 'sub3' => 'sub3', 'kode' => 'kode_rekening', 'nama' => 'nama_rekening', 'kategori' => 'id_kategori'); $crudFK = 'id'; $crudTableName = 'rekening_kode'; $table1 = 'rekening_kode'; $pk_table1 = 'id'; $table2 = 'rekening_kategori'; $pk_table2 = 'id';
function setNomor() { $no = b_fetch('select max(pendataan_no) from pendataan_spt'); $no++; return sprintf('%05d', $no); }
/** * 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; } }
} include 'header-admin.php'; if (!b_logged()) { include 'login.php'; } else { include 'menu.php'; if ($_REQUEST['cact'] == 0) { include 'dashboard.php'; } else { if ($bdash) { include 'extension.php'; } else { if (isset($cpath)) { ?> <div class="judul"><?php echo $ainfo['name']; ?> </div> <?php $ainfo = b_readinit(str_replace(".php", ".init.php", $cpath)); $csql = "select nstatus from " . PREFIX . "granted where nid_users='" . $_SESSION['nid_login'] . "' and nid_moduls='" . $_REQUEST['csub'] . "'"; if (b_fetch($csql) >= $ainfo['level'] or b_admin(b_getuserlogin())) { if (file_exists($cpath)) { include $cpath; } } } } } } include 'footer-admin.php';
?> > <div class="layar"> <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="left"><img src="../images/bandung.jpg"></td> <td align="right" valign="top"> </tr> </table> </div> <?php if (b_logged()) { $csql = "select cname from " . PREFIX . "users where nid=" . $_SESSION['nid_login']; $info_left = ' Logged as ' . b_fetch($csql); $info_right = ' <a href="?cact=logout">[ Logout ]</a> <a href="../">[ Main Menu ]</a> '; } ?> <table align="center" cellpadding="0" cellspacing="0" border="0" width="61%" style="padding-bottom:10px;padding-top:10px; background-color:#CCCCCC; border-bottom:1px solid #999999; border-top:1px solid #999999"> <tr> <td align="left"> <div class="top_menu_admin"> <?php echo $info_left; ?> </div> </td> <td align="right" valign="top"> <div class="top_menu_admin"> <?php
$other_request = array('id_desa' => $_REQUEST['desa']); $str_where = ' where ' . $crudFK . '=' . quote_smart($_REQUEST['id']); $a = $fbird->FBUpdate($crudTableName, $other_request, $exception, $str_where); break; case $crudConfig['delete']: /* ----====|| ACTION = DELETE ||====----*/ 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 pendaftaran where id_pemohon=' . quote_smart($del) . ' and objek_pdrd=\'PRIBADI\''); if (!$cek) { $sql = 'Delete from ' . $crudTableName . ' where ' . $crudFK . ' = ' . quote_smart($del); 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);
" <?php echo $ccheck; ?> > <?php echo $ainfo['name']; ?> </td> <td> Modul Level <select name="clevel[<?php echo $i; ?> ]"><?php for ($ii = $ainfo['level']; $ii < USERLEVEL; $ii++) { if ($check = "checked") { $nstatus = b_fetch("select nstatus from " . PREFIX . "granted where nid_users='" . $_POST['nid'] . "' and nid_moduls='{$omoduls->nid}'"); $nstatus == $ii ? $cselected = "selected" : ($cselected = ""); } ?> <option value="<?php echo $ii; ?> " <?php echo $cselected; ?> ><?php echo ucfirst($GLOBALS['bva_levelname'][$ii]); ?> </option> <?php }
<?php include 'config.php'; include 'global.php'; $expath = "." . str_replace("\\", "/", str_replace(realpath("."), "", dirname(__FILE__))) . "/"; if ($_REQUEST['sender'] == 'get_tgl_setor') { $tempo = b_fetch('select jatem_bayar from ref_jatuh_tempo'); $tgl_setor = getExpired($_REQUEST['tgl'], $tempo); echo $tgl_setor; } elseif ($_REQUEST['sender'] == 'set_nomor') { $no_kohir = getNoKohir($_REQUEST['tgl']); echo sprintf('%05d', $no_kohir); } elseif ($_REQUEST['sender'] == 'pilih_kohir') { $ID = 'penetapan_pr_'; $crudColumns = array('id' => 'penetapan_pr_id', 'nomor' => 'no_penetapan', 'tgl' => 'tgl_penetapan', 'setor' => 'tgl_setor', 'nominal' => 'nama'); $crudTableName = 'penetapan_pr'; include $expath . 'handler_pilih_kohir.php'; } elseif ($_REQUEST['sender'] == 'pilih_spt') { $ID = 'penetapan_pr_'; $crudColumns = array('id' => 'penetapan_pr_id', 'nomor' => 'no_penetapan', 'tgl' => 'tgl_penetapan', 'setor' => 'tgl_setor', 'nominal' => 'nama'); $crudTableName = 'penetapan_pr'; include $expath . 'handler_pilih_no_pendataan.php'; } elseif ($_REQUEST['sender'] == 'daftar') { $crudColumns = array('id' => 'penetapan_pr_id', 'no_kohir' => 'no_penetapan', 'tgl_kohir' => 'tgl_penetapan', 'tgl_setor' => 'tgl_setor', 'nominal' => 'nominal', 'pendataan_no' => 'pendataan_no', 'periode_awal' => 'periode_awal', 'periode_akhir' => 'periode_akhir', 'jenis' => 'jenis'); include $expath . 'handler_daftar_kohir.php'; } elseif ($_REQUEST['sender'] == 'default') { $crudColumns = array('pendataan_id' => 'pendataan_id', 'pendataan_no' => 'pendataan_no', 'tgl_entry' => 'tgl_entry', 'npwp' => 'npwp', 'nama' => 'nama', 'jenis_pendataan' => 'jenis_pendataan', 'jenis_pungutan' => 'jenis_pungutan', 'jenis_pendaftaran' => 'jenis_pendaftaran', 'spt_no' => 'spt_no', 'spt_tgl' => 'spt_tgl', 'nominal' => 'nominal'); $ID = 'pendataan_'; $crudTableName = 'v_pendataan'; include $expath . 'handler_penetapan_pr.php'; }
<?php include "./../../../config.php"; include "./../../../lib.php"; $nomax = b_fetch('select max(pendataan_no) from pendataan_spt '); $nomax++; ?> document.getElementById('nomor').value='<?php echo sprintf('%05d', $nomax); ?> ';
<IMG SRC="<?php echo THEME_DIR; ?> /images/form2_05.png" WIDTH=21 HEIGHT=73 ALT=""></TD> </TR> <TR> <TD WIDTH=20 HEIGHT=149 style="background-image:url(<?php echo THEME_DIR; ?> /images/form2_06.png)"> </TD> <TD colspan="3" bgcolor="#F2F1E6"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center"> <?php $logo = b_fetch('select logo from info_pemda'); if (!empty($logo)) { echo "<img src=\"showimage.php?id=1\" height='157'>"; } else { echo '<img src="images/garuda.gif" width="139" height="133" style="margin-left:10%; margin-top:5%">'; } ?> </td> <td><div style="border:1px solid #CCCCCC; padding:10; background-color:#E9ECEF"> <form action="login.php" method="POST"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td> Username<br> <input class="login_input" type="text" name="cuser" style="width:100%"><br><br> Password<br>
<?php $expath = "." . str_replace("\\", "/", str_replace(realpath("."), "", dirname(__FILE__))) . "/"; include "entri.php"; yuiBeginEntry("entri_penerimaan_pr"); $include = '<script type="text/javascript" src="lib.js"></script>' . "\n"; $kabupaten = b_fetch('select pemda_kabupaten from info_pemda'); gcms_add_to_head($include); ?> <script> var lastsel,lastsel2,lastsel3; var timeoutHnd; var flAuto = false; $().ready(function(){ jQuery("#htmlTable").jqGrid( { url:'request.php?mod=penetapan_pr&func=list&sender=pilih_kohir', datatype: 'json', mtype: 'POST', colNames:['id','No. Kohir','Tgl. Penetapan','Tgl. Jatuh Tempo','Nominal Penetapan'], colModel :[ { name:'id' ,index:'id',search:false}, { name:'kohir',index:'kohir',width:80}, { name:'tgl' ,index:'tgl',width:120,align:'center',formatter:'date', sorttype:"date"}, { name:'setor' ,index:'setor',width:120,align:'center',formatter:'date', sorttype:"date"}, { name:'nominal' ,index:'nominal',width:150,align:'right',formatter:'currency',formatoptions:{decimalSeparator:".",thousandsSeparator:",",decimalPlaces:2}}, ], pager: jQuery('#htmlPager'), height:150,
function getExpired($val, $max, $format = 'd/m/Y') { list($hari, $bulan, $tahun) = explode('/', $val); $tahun = (int) $tahun; $bulan = (int) $bulan; $hari = (int) $hari; $sabtu_minggu = ''; $hari_kerja = ''; $nlibur = ''; $close = 0; while ($hari_kerja <= $max) { if ($close) { break; } if ($bulan > 12) { $bulan = 1; $tahun++; } $tgl_merah = b_fetch("select tgl_merah from ref_tanggal_merah where id=" . $bulan); $nmerah = explode(".", $tgl_merah); $nhari = cal_days_in_month(CAL_GREGORIAN, $bulan, $tahun); $start = !empty($hari) ? $hari + 1 : 1; while ($start <= $nhari) { $nday = date("w", $f_day = mktime(0, 0, 0, $bulan, $start, $tahun)); if ($nday == 0 || $nday == 6) { $sabtu_minggu++; } else { if (in_array($start, $nmerah)) { $nlibur++; } else { $hari_kerja++; } } if ($hari_kerja == $max) { return date($format, mktime(0, 0, 0, $bulan, $tgl, $tahun)); $close = 1; } $start++; $tgl = $start; if ($close) { break; } } $bulan++; $hari = 0; } }
<?php include "./../../../config.php"; include "./../../../lib.php"; if ($_REQUEST['type'] == 'npwp') { $id_pemohon = b_fetch('select id_pemohon from pendaftaran where pendaftaran_id=' . quote_smart($_REQUEST['val'])); $npwp = b_fetch('select npwp from pendaftaran where pendaftaran_id=' . quote_smart($_REQUEST['val'])); $jenis = b_fetch('select objek_pdrd from pendaftaran where pendaftaran_id=' . quote_smart($_REQUEST['val'])); $spt_no = b_fetch('select b.spt_no from pendaftaran a join spt b on b.pendaftaran_id=a.pendaftaran_id where a.pendaftaran_id=' . quote_smart($_REQUEST['val'])); $spt_id = b_fetch('select b.spt_id from pendaftaran a join spt b on b.pendaftaran_id=a.pendaftaran_id where a.pendaftaran_id=' . quote_smart($_REQUEST['val'])); $spt_no = $spt_no != '' ? sprintf('%05d', $spt_no) : ''; $wp_wr_gol = substr($npwp, 1, 1); $wp_wr_no_urut = substr($npwp, 2, 5); $wp_wr_kd_camat = substr($npwp, 7, 2); $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);
$count_users = b_fetch('select count(*) from ' . PREFIX . 'users where nstatus=4'); /* ambil theme */ require_once THEME_DIR . "/theme.php"; if (b_logged()) { $ainfouser = b_userinfo(); $user_name = $ainfouser['name']; $spbu_no = $_SESSION['spbu_no']; $branch = $_SESSION['branch_name']; if ($user_name == "Administrator") { $header = " Management " . $user_name; } elseif (!$spbu_no) { $header = " Divisi Head Office - " . $user_name; } else { $header = " Unit SPBU : " . $spbu_no . " - " . $user_name; } $memo = b_fetch('select memo from memorandum WHERE status = 1'); } ?> <html> <head> <title><?php echo WEB_TITLE; ?> </title> <link rel="shortcut icon" href="./images/controlpanel.png" type="image/ico"> <link rel="stylesheet" type="text/css" href="gcms.css"> <script type="text/javascript" src="gcms.js"></script> <script type="text/javascript" src="<?php echo THEME_DIR; ?> /theme.js"></script>
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') { $kode_rekening = b_fetch('select kode_rekening from rekening_kode where id=' . quote_smart($_REQUEST['val'])); $nama_rekening = b_fetch('select nama_rekening from rekening_kode where id=' . quote_smart($_REQUEST['val'])); ?> document.getElementById('rekening_id').value='<?php echo $_REQUEST['val']; ?> '; document.getElementById('kode_rekening').value='<?php echo $kode_rekening; ?> '; document.getElementById('nama_rekening').value='<?php echo $nama_rekening; ?> '; <?php }
if ($_REQUEST['sender'] == 'entri_spt') { if ($_REQUEST['action'] == 'edit') { $exception = array('spt_id', 'penerima_nama', 'penerima_alamat', 'spt_no'); //$other_request = array('spt_no'=>$no_spt); $other_request = array(); $str_where = ' where spt_id=' . quote_smart($_REQUEST['idmasters']); $a = $fbird->FBUpdate('spt', $other_request, $exception, $str_where); if ($a) { echo 'Data Telah diupdate'; } else { echo 'Error'; } } else { $cek = b_fetch('select count(*) from spt where spt_no=' . quote_smart((int) $_REQUEST['nomor'])); if (!$cek) { $next_no = b_fetch('select max(spt_no) from spt '); $next_no++; $no_spt = $next_no; } else { $message = 'Nomor ' . $_REQUEST['nomor'] . 'Sudah Ada !' . "\n" . 'Diganti dengan ' . sprintf('%05d', $next_no); $no_spt = (int) $_REQUEST['nomor']; } $exception = array('spt_id', 'penerima_nama', 'penerima_alamat'); $other_request = array('spt_no' => $no_spt); $a = $fbird->FBInsert('spt', $other_request, $exception); if ($a) { echo 'Data telah tersimpan'; } else { echo 'Error'; } }