本文整理汇总了PHP中sipkd_user_id函数的典型用法代码示例。如果您正苦于以下问题:PHP sipkd_user_id函数的具体用法?PHP sipkd_user_id怎么用?PHP sipkd_user_id使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sipkd_user_id函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: changepwd
public function changepwd()
{
if ($this->uri->segment(4) == sipkd_user_id()) {
$this->edit();
} else {
show_404();
}
}
示例2: get_active_only
function get_active_only()
{
$user_id = sipkd_user_id();
$sql = "select distinct a.*\r\n from user_groups ug \r\n inner join groups g on g.id=ug.group_id \r\n inner join group_modules gm on g.id=gm.group_id\r\n inner join modules m on gm.module_id=m.id\r\n inner join apps a on m.app_id=a.id\r\n where ug.user_id={$user_id} and (gm.reads=1 or gm.writes=1 or gm.deletes=1 or gm.inserts=1)\r\n order by a.id";
if (is_super_admin()) {
$sql = "select * from apps where disabled <> 1 order by id";
}
$query = $this->db->query($sql);
if ($query->num_rows() !== 0) {
return $query->result();
} else {
return FALSE;
}
}
示例3: update_stat
function update_stat()
{
$userid = $this->uri->segment(4);
$ppat_id = $this->uri->segment(5);
$val = $this->uri->segment(6);
if ($val == 0) {
if ($uid == sipkd_user_id() && $gid == sipkd_group_id()) {
// ga bisa
} else {
$this->db->where('userid', $userid);
$this->db->where('ppat_id', $ppat_id);
$this->db->delete('bphtb_user');
}
} else {
$data = array('userid' => $userid, 'ppat_id' => $ppat_id);
$this->db->insert('bphtb_user', $data);
}
}
示例4: cetak
function cetak()
{
$type = $this->uri->segment(4);
$qs = urldecode($_SERVER['QUERY_STRING']);
parse_str($qs, $qs_data);
$params = array();
// foreach ($qs_data as $key => $val)
// $params[$key] = $val;
$kondisi = '';
$status = $this->input->get('kondisi');
if ($status != '') {
$kondisi = "AND cd.customer_status_id={$status}";
}
$rpt = $this->input->get('rpt');
switch ($rpt) {
case 'daf_induk_wp':
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'kondisi' => $kondisi);
break;
case 'daf_induk_wp_perjenis':
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'usahaid' => (int) $this->input->get('usahaid'), 'kondisi' => $kondisi);
break;
case 'daf_induk_wp_perkec':
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'kecid' => (int) $this->input->get('kecid'), 'kondisi' => $kondisi);
break;
case 'daf_wp_baru':
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'tglawal' => date('Y-m-d', strtotime($this->input->get('tglawal'))), 'tglakhir' => date('Y-m-d', strtotime($this->input->get('tglakhir'))), 'kondisi' => $kondisi);
break;
case 'daf_wp_baru_jenis':
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'tglawal' => date('Y-m-d', strtotime($this->input->get('tglawal'))), 'tglakhir' => date('Y-m-d', strtotime($this->input->get('tglakhir'))), 'usahaid' => (int) $this->input->get('usahaid'), 'kondisi' => $kondisi);
break;
case 'daf_wp_baru_kec':
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'tglawal' => date('Y-m-d', strtotime($this->input->get('tglawal'))), 'tglakhir' => date('Y-m-d', strtotime($this->input->get('tglakhir'))), 'kecid' => (int) $this->input->get('kecid'), 'kondisi' => $kondisi);
break;
case 'daf_wp_jenis_perkec':
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'usahaid' => (int) $this->input->get('usahaid'), 'kondisi' => $kondisi);
break;
case 'daf_wp_tutup':
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'tglawal' => date('Y-m-d', strtotime($this->input->get('tglawal'))), 'tglakhir' => date('Y-m-d', strtotime($this->input->get('tglakhir'))));
break;
case 'daf_wp_ijin_berakhir':
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'tglawal' => date('Y-m-d', strtotime($this->input->get('tglawal'))), 'tglakhir' => date('Y-m-d', strtotime($this->input->get('tglakhir'))));
break;
case 'daf_rekap_kec':
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))));
break;
}
$tambahan = array("daerah" => pad_pemda_daerah(), "dinas" => pad_pemda_nama());
$params = array_merge($params, $tambahan);
$rpt = 'pendaftaran/' . $rpt;
// var_dump($params);
// die;
$jasper = $this->load->library('Jasper');
//IF PDF
if ($type == 'pdf') {
echo $jasper->cetak($rpt, $params, $type, false);
} else {
if ($type == 'html') {
$assetpath = 'assets/file';
$tmp = $assetpath . '/tmp/report' . sipkd_user_id() . '.html';
if (is_file($tmp)) {
unlink($tmp);
}
ob_start();
echo $jasper->cetak($rpt, $params, $type, false);
echo '1';
file_put_contents($tmp, ob_get_contents());
$objPHPExcel = new PHPExcel();
$inputFileType = 'HTML';
$inputFileName = $tmp;
$outputFileType = 'Excel2007';
$outputFileName = $assetpath . '/Report.xls';
$filename = $rpt . date("d-m-Y") . ".xls";
$objPHPExcelReader = IOFactory::createReader($inputFileType);
$objPHPExcel = $objPHPExcelReader->load($inputFileName);
ini_set('zlib.output_compression', 'Off');
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
//the folowing two lines make sure it is saved as a xls file
header('Content-type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename=' . $filename);
//simpan dalam file sample.xls
$objWriter = IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save('php://output');
}
}
}
示例5: update
public function update()
{
$this->load_auth();
if (!$this->module_auth->update) {
$this->session->set_flashdata('msg_warning', $this->module_auth->msg_update);
redirect(active_module_url($this->controller));
}
$p_usaha_id = $this->uri->segment(4);
$p_type_id = $this->uri->segment(5);
$p_id = $this->uri->segment(6);
//cek usaha -> cm bisa edit yg self aja
if ($p_usaha_id == pad_reklame_id() || $p_usaha_id == pad_air_tanah_id()) {
$this->session->set_flashdata('msg_warning', $this->module_auth->msg_update);
redirect(active_module_url($this->controller));
}
//cek kohir
if ($this->sptpd_model->is_kohir_ok($p_id)) {
$this->session->set_flashdata('msg_warning', $this->module_auth->msg_update);
redirect(active_module_url($this->controller));
}
// cek pmb
if ($this->sptpd_model->is_sspd_ok($p_id) || $this->sptpd_model->is_bayar_ok($p_id)) {
$this->session->set_flashdata('msg_warning', $this->module_auth->msg_update);
redirect(active_module_url($this->controller));
}
$data['current'] = $this->module;
$data['apps'] = $this->apps_model->get_active_only();
$data['faction'] = active_module_url("{$this->controller}/update/{$p_usaha_id}/{$p_type_id}/{$p_id}");
$post_data = $this->fpost($p_usaha_id);
$this->fvalidation();
if ($this->form_validation->run() == TRUE) {
$input_post = $post_data;
$update_data = array('customer_id' => $input_post['customer_id'], 'customer_usaha_id' => $input_post['customer_usaha_id'], 'pajak_id' => $input_post['pajak_id'], 'tahun' => $input_post['tahun'], 'terimatgl' => date('Y-m-d', strtotime($input_post['terimatgl'])), 'type_id' => $input_post['type_id'], 'so' => $input_post['so'], 'jatuhtempotgl' => date('Y-m-d', strtotime($input_post['jatuhtempotgl'])), 'masadari' => date('Y-m-d', strtotime($input_post['masadari'])), 'masasd' => date('Y-m-d', strtotime($input_post['masasd'])), 'minomset' => $input_post['minomset'], 'dasar' => $input_post['dasar'], 'tarif' => $input_post['tarif'], 'denda' => $input_post['denda'], 'bunga' => $input_post['bunga'], 'setoran' => $input_post['setoran'], 'kenaikan' => $input_post['kenaikan'], 'kompensasi' => $input_post['kompensasi'], 'lain2' => $input_post['lain2'], 'pajak_terhutang' => $input_post['pajak'], 'r_bayarid' => $input_post['r_bayarid'], 'r_nsr' => $input_post['r_nsr'], 'rekening_id' => $input_post['rekening_id'], 'write_date' => date('Y-m-d'), 'write_uid' => sipkd_user_id());
$reklame_data = array();
if ($p_usaha_id == pad_reklame_id()) {
//
}
$air_tanah_data = array();
if ($p_usaha_id == pad_air_tanah_id()) {
//
}
// data tambahan
$tambahan_data = array();
if (wp_login()) {
//
}
$update_data = array_merge($update_data, $reklame_data, $air_tanah_data, $tambahan_data);
$this->sptpd_model->update($p_id, $update_data);
// data tambahan / detail
if (wp_login()) {
//
// uplod dokeumen
$this->unggah($p_id);
}
$this->session->set_flashdata('msg_success', 'Data telah disimpan');
redirect(active_module_url($this->controller));
}
$data['dt'] = $post_data;
$get = (object) $post_data;
$options = array();
$js = 'id="customer_usaha_id" class="input-xlarge"';
$data['select_usaha'] = form_dropdown('customer_usaha_id', $options, null, $js);
$select_data = $this->load->model('pajak_model')->get_select($get->pajak_id);
$options = array();
foreach ($select_data as $rows) {
$options[$rows->id] = $rows->pajaknm;
}
$js = 'id="pajak_id" class="input-xxlarge"';
$data['select_pajak'] = form_dropdown('pajak_id', $options, $get->pajak_id, $js);
$select_data = $this->load->model('sptpd_type_model')->get_select();
$options = array();
foreach ($select_data as $rows) {
$options[$rows->id] = $rows->typenm;
}
$js = 'id="type_id" class="input-small" onChange="void(0);"';
$data['select_sptpd_type'] = form_dropdown('type_id', $options, $get->type_id, $js);
$pajak_detail = $this->load->model('pad_model');
if ($row = $pajak_detail->sptpd_get_pajak_detail($get->pajak_id, $get->terimatgl)) {
$data['dt']['rekening_id'] = $row->rekening_id;
$data['dt']['rekeningkd'] = $row->rekeningkd;
$data['dt']['jatuhtempo'] = $row->jatuhtempo;
}
if (wp_login()) {
$this->load->helper('directory');
$dir = directory_map(dirname(__FILE__) . '//..//dokumen//');
$files = array();
foreach ($dir as $file) {
$f = explode('@', $file);
if ($f[0] == $p_id) {
$files[] = anchor(active_module_url("sptpd/unduh/{$file}"), $f[1], array("title" => "Unduh file {$f['1']}", "target" => "_blank"));
}
}
$data['dt']['files'] = $files;
}
if ($p_usaha_id == pad_reklame_id()) {
//
} else {
if ($p_usaha_id == pad_air_tanah_id()) {
//
} else {
//.........这里部分代码省略.........
示例6: batal_validasi
public function batal_validasi()
{
$this->load_auth();
if (!$this->module_auth->delete) {
$this->session->set_flashdata('msg_warning', $this->module_auth->msg_delete);
redirect(active_module_url($this->controller));
}
$spt_id = $this->uri->segment(4);
if ($spt_id && ($sptpd = $this->sptpd_model->get($spt_id))) {
//
$update_data = array('is_validated' => 0, 'updated' => date('Y-m-d'), 'update_uid' => sipkd_user_id());
$this->sspd_model->update_by_spt($spt_id, $update_data);
//UPDATE STATE PEMBAYRAN DI SPT -> 0
$update_data = array('status_pembayaran' => 0);
$this->sptpd_model->update($spt_id, $update_data);
//hapus terima + terimaline
$terima_id = $this->penerimaan_model->get_terima_id_by_spt($spt_id);
$this->penerimaan_model->delete2_by_spt($spt_id);
$this->penerimaan_model->delete_if_no_spt($terima_id);
echo "ok";
} else {
echo "hmm";
}
}
示例7: post
public function post()
{
if (!$this->module_auth->create) {
$this->session->set_flashdata('msg_warning', $this->module_auth->msg_create);
redirect(active_module_url('penerimaan'));
}
$spt_id = $this->uri->segment(4);
$terima_id = $this->uri->segment(5);
$sptpd = $this->sptpd_model->get($spt_id);
if ($terima_id && $spt_id && $sptpd) {
// hitung bunga (telat bayar)
$tgl_proses = new DateTime(Date('Y-m-d'));
$tgl_jtempo = new DateTime(Date('Y-m-d', strtotime($sptpd->jatuhtempotgl)));
$diff = $tgl_proses->diff($tgl_jtempo);
$nbln = $diff->format('%y') * 12 + $diff->format('%m');
$nbln = $tgl_proses <= $tgl_jtempo ? 0 : $nbln;
$nbln = $nbln > 24 ? 24 : $nbln;
$pajak = $sptpd->pajak_terhutang;
$bunga = (double) $pajak * (int) $nbln * (double) pad_bunga() + (double) $sptpd->bunga;
// end hitung bunga
$terimano = $this->penerimaan_model->max_terimano(pad_tahun_anggaran());
$jmlterima = (double) $sptpd->pajak_terhutang + (double) $bunga;
// terima line - rek pajak
$update_data = array('terima_id' => $terima_id, 'spt_id' => $spt_id, 'rekening_id' => $sptpd->rekening_id, 'pajak_id' => $sptpd->pajak_id, 'amount' => $sptpd->pajak_terhutang, 'enabled' => 1, 'created' => date('Y-m-d'), 'create_uid' => sipkd_user_id());
$this->penerimaan_model->save2($update_data);
// terima line - rek denda (bunga)
if ($bunga > 0) {
$update_data = array('terima_id' => $terima_id, 'spt_id' => $spt_id, 'rekening_id' => $this->load->model('pajak_model')->get_rek_denda($sptpd->pajak_id), 'pajak_id' => $sptpd->pajak_id, 'amount' => $bunga, 'enabled' => 1, 'created' => date('Y-m-d'), 'create_uid' => sipkd_user_id());
$this->penerimaan_model->save2($update_data);
}
// update setoran
$terima_id = $this->penerimaan_model->get_terima_id_by_spt($spt_id);
$new_setoran = $this->penerimaan_model->update_setoran($terima_id);
echo $new_setoran;
} else {
echo "hmm";
}
}
示例8: cetak
//.........这里部分代码省略.........
$kondisi .= ' and r.insidentil=' . $insidentil;
}
if ($type_id > 0) {
$kondisi .= ' and s.type_id=' . $type_id;
}
$naskah = trim($this->input->get('naskah'));
$kondisi .= $naskah != "" ? " and s.r_judul ilike '%{$naskah}%' " : "";
$kondisi .= " and date(k.kohirtgl) between '{$tglawal}' and '{$tglakhir}' ";
$kondisi_bayar = " and date(ss.sspdtgl) between '{$tglawalbayar}' and '{$tglakhirbayar}' ";
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'tglawal' => date('Y-m-d', strtotime($this->input->get('tglawal'))), 'tglakhir' => date('Y-m-d', strtotime($this->input->get('tglakhir'))), 'kondisi' => $kondisi, 'kondisi_bayar' => $kondisi_bayar);
// print_r($kondisi_bayar);exit;
break;
case 'tap_kendali_reklame_blm_bayar':
$insidentil = intval($this->input->get('insidentil'));
$type_id = intval($this->input->get('type_id'));
$kondisi = '';
if ($insidentil > -1) {
$kondisi .= ' and r.insidentil=' . $insidentil;
}
if ($type_id > 0) {
$kondisi .= ' and s.type_id=' . $type_id;
}
$naskah = trim($this->input->get('naskah'));
$kondisi .= $naskah != "" ? " and s.r_judul ilike '%{$naskah}%' " : "";
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'tglawal' => date('Y-m-d', strtotime($this->input->get('tglawal'))), 'tglakhir' => date('Y-m-d', strtotime($this->input->get('tglakhir'))), 'kondisi' => $kondisi);
break;
case 'tap_kendali_reklame_jthtempo_tgl':
$naskah = trim($this->input->get('naskah'));
$kondisi = $naskah != "" ? " and s.r_judul ilike '%{$naskah}%' " : "";
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'tglawal' => date('Y-m-d', strtotime($this->input->get('tglawal'))), 'tglakhir' => date('Y-m-d', strtotime($this->input->get('tglakhir'))), 'kondisi' => $kondisi);
break;
case 'tap_kendali_reklame_jthtempo':
$naskah = trim($this->input->get('naskah'));
$kondisi = $naskah != "" ? " and s.r_judul ilike '%{$naskah}%' " : "";
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'tglawal' => date('Y-m-d', strtotime($this->input->get('tglawal'))), 'tglakhir' => date('Y-m-d', strtotime($this->input->get('tglakhir'))), 'kondisi' => $kondisi);
break;
case 'tap_kendali_reklame_jthtempo_rek':
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'tglawal' => date('Y-m-d', strtotime($this->input->get('tglawal'))), 'tglakhir' => date('Y-m-d', strtotime($this->input->get('tglakhir'))), 'rekeningid' => (int) $this->input->get('rekeningid'));
break;
case 'tap_kendali_airtanah':
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'bulan' => (int) $this->input->get('bulan'), 'tahun' => (int) $this->input->get('tahun'));
break;
case 'tap_kendali_airtanah_skpd':
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'tglawal' => date('Y-m-d', strtotime($this->input->get('tglawal'))), 'tglakhir' => date('Y-m-d', strtotime($this->input->get('tglakhir'))));
break;
case 'tap_kendali_airtanah_tgl':
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'tglawal' => date('Y-m-d', strtotime($this->input->get('tglawal'))), 'tglakhir' => date('Y-m-d', strtotime($this->input->get('tglakhir'))));
break;
case 'tap_kendali_airtanah_masa':
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'tglawal' => date('Y-m-d', strtotime($this->input->get('tglawal'))), 'tglakhir' => date('Y-m-d', strtotime($this->input->get('tglakhir'))));
break;
case 'tap_catat_vol_airtanah':
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'tahun' => (int) $this->input->get('tahun'));
break;
}
$tambahan = array("daerah" => pad_pemda_daerah());
$params = array_merge($params, $tambahan);
$ignore_html_pg = false;
//paging aja semua
$rpt = 'penetapan/' . $rpt;
// var_dump($params);
// die;
$jasper = $this->load->library('Jasper');
if ($type == 'pdf') {
echo $jasper->cetak($rpt, $params, $type, $ignore_html_pg);
} else {
if ($type == 'html') {
$assetpath = 'assets/file';
$tmp = $assetpath . '/tmp/report' . sipkd_user_id() . '.html';
if (is_file($tmp)) {
unlink($tmp);
}
ob_start();
echo $jasper->cetak($rpt, $params, $type, $ignore_html_pg);
echo '1';
file_put_contents($tmp, ob_get_contents());
$objPHPExcel = new PHPExcel();
$inputFileType = 'HTML';
$inputFileName = $tmp;
$outputFileType = 'Excel2007';
$outputFileName = $assetpath . '/Report.xls';
$filename = $rpt . date("d-m-Y") . ".xls";
$objPHPExcelReader = IOFactory::createReader($inputFileType);
$objPHPExcel = $objPHPExcelReader->load($inputFileName);
ini_set('zlib.output_compression', 'Off');
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
//the folowing two lines make sure it is saved as a xls file
header('Content-type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename=' . $filename);
//simpan dalam file sample.xls
$objWriter = IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save('php://output');
}
}
// echo $jasper->query_debug($rpt, $params);
}
示例9: update
public function update()
{
$this->load_auth();
if (!$this->module_auth->update) {
$this->session->set_flashdata('msg_warning', $this->module_auth->msg_update);
redirect(active_module_url($this->controller));
}
$p_usaha_id = $this->uri->segment(4);
$p_type_id = $this->uri->segment(5);
$p_id = $this->uri->segment(6);
//cek tipe dokumen -> cm bisa edit yg self aja
if ($p_type_id != pad_dok_self_id()) {
$this->session->set_flashdata('msg_warning', $this->module_auth->msg_update);
redirect(active_module_url($this->controller));
}
//cek usaha
if ($p_usaha_id == pad_reklame_id() || $p_usaha_id == pad_air_tanah_id()) {
$this->session->set_flashdata('msg_warning', $this->module_auth->msg_update);
redirect(active_module_url($this->controller));
}
//cek kohir
//if ($this->sptpd_model->is_kohir_ok($p_id)) {
// $this->session->set_flashdata('msg_warning', $this->module_auth->msg_update);
// redirect(active_module_url($this->controller));
//}
if ($this->sptpd_model->is_bayar($p_id)) {
$this->session->set_flashdata('msg_warning', $this->module_auth->msg_update);
redirect(active_module_url($this->controller));
}
//Validasi Multiple
$data['current'] = $this->module;
$data['apps'] = $this->apps_model->get_active_only();
$data['faction'] = active_module_url("{$this->controller}/update/{$p_usaha_id}/{$p_type_id}/{$p_id}");
$post_data = $this->fpost($p_usaha_id);
$this->fvalidation();
if ($this->form_validation->run() == TRUE) {
$input_post = $post_data;
$update_data = array('customer_id' => $input_post['customer_id'], 'customer_usaha_id' => $input_post['customer_usaha_id'], 'pajak_id' => $input_post['pajak_id'], 'tahun' => date('Y', strtotime($input_post['terimatgl'])), 'bulan' => date('m', strtotime($input_post['terimatgl'])), 'terimatgl' => date('Y-m-d', strtotime($input_post['terimatgl'])), 'type_id' => $input_post['type_id'], 'so' => $input_post['so'], 'jatuhtempotgl' => date('Y-m-d', strtotime($input_post['jatuhtempotgl'])), 'masadari' => date('Y-m-d', strtotime($input_post['masadari'])), 'masasd' => date('Y-m-d', strtotime($input_post['masasd'])), 'minimal_omset' => $input_post['minimal_omset'], 'dasar' => $input_post['dasar'], 'tarif' => $input_post['tarif'], 'denda' => $input_post['denda'], 'bunga' => $input_post['bunga'], 'setoran' => $input_post['setoran'], 'kenaikan' => $input_post['kenaikan'], 'kompensasi' => $input_post['kompensasi'], 'lain2' => $input_post['lain2'], 'cara_bayar' => $input_post['cara_bayar'], 'pajak_terhutang' => $input_post['pajak'], 'r_bayarid' => $input_post['r_bayarid'], 'r_nsr' => $input_post['r_nsr'], 'rekening_id' => $input_post['rekening_id'], 'updated' => date('Y-m-d'), 'update_uid' => sipkd_user_id(), 'omset1' => $input_post['omset1'], 'omset6' => $input_post['omset6'], 'omset2' => $input_post['omset2'], 'omset7' => $input_post['omset7'], 'omset3' => $input_post['omset3'], 'omset8' => $input_post['omset8'], 'omset4' => $input_post['omset4'], 'omset9' => $input_post['omset9'], 'omset5' => $input_post['omset5'], 'omset10' => $input_post['omset10'], 'omset11' => $input_post['omset11'], 'omset16' => $input_post['omset16'], 'omset12' => $input_post['omset12'], 'omset17' => $input_post['omset17'], 'omset13' => $input_post['omset13'], 'omset18' => $input_post['omset18'], 'omset14' => $input_post['omset14'], 'omset19' => $input_post['omset19'], 'omset15' => $input_post['omset15'], 'omset20' => $input_post['omset20'], 'omset21' => $input_post['omset21'], 'omset26' => $input_post['omset26'], 'omset22' => $input_post['omset22'], 'omset27' => $input_post['omset27'], 'omset23' => $input_post['omset23'], 'omset28' => $input_post['omset28'], 'omset24' => $input_post['omset24'], 'omset29' => $input_post['omset29'], 'omset25' => $input_post['omset25'], 'omset30' => $input_post['omset30'], 'omset31' => $input_post['omset31'], 'omset_lain' => $input_post['omset32'], 'keterangan1' => $input_post['keterangan1'], 'keterangan6' => $input_post['keterangan6'], 'keterangan2' => $input_post['keterangan2'], 'keterangan7' => $input_post['keterangan7'], 'keterangan3' => $input_post['keterangan3'], 'keterangan8' => $input_post['keterangan8'], 'keterangan4' => $input_post['keterangan4'], 'keterangan9' => $input_post['keterangan9'], 'keterangan5' => $input_post['keterangan5'], 'keterangan10' => $input_post['keterangan10'], 'keterangan11' => $input_post['keterangan11'], 'keterangan16' => $input_post['keterangan16'], 'keterangan12' => $input_post['keterangan12'], 'keterangan17' => $input_post['keterangan17'], 'keterangan13' => $input_post['keterangan13'], 'keterangan18' => $input_post['keterangan18'], 'keterangan14' => $input_post['keterangan14'], 'keterangan19' => $input_post['keterangan19'], 'keterangan15' => $input_post['keterangan15'], 'keterangan20' => $input_post['keterangan20'], 'keterangan21' => $input_post['keterangan21'], 'keterangan26' => $input_post['keterangan26'], 'keterangan22' => $input_post['keterangan22'], 'keterangan27' => $input_post['keterangan27'], 'keterangan23' => $input_post['keterangan23'], 'keterangan28' => $input_post['keterangan28'], 'keterangan24' => $input_post['keterangan24'], 'keterangan29' => $input_post['keterangan29'], 'keterangan25' => $input_post['keterangan25'], 'keterangan30' => $input_post['keterangan30'], 'keterangan31' => $input_post['keterangan31'], 'keterangan_lain' => $input_post['keterangan32']);
$reklame_data = array();
if ($p_usaha_id == pad_reklame_id()) {
//
}
$air_tanah_data = array();
if ($p_usaha_id == pad_air_tanah_id()) {
//
}
// data tambahan
$tambahan_data = array();
if (wp_login()) {
//
}
// Validasi Duplikasi Masa Pajak
if ($this->session->userdata("mode") == "edit") {
if ($input_post['multiple'] == 0) {
$lastinput = date('Y-m-d', strtotime($input_post['masadari']));
$customer_usaha_id = $input_post['customer_usaha_id'];
$pajak_id = $input_post['pajak_id'];
$rekening_id = $input_post['rekening_id'];
$type_id = $input_post['type_id'];
$cekduplikat = $this->sptpd_model->is_multiple($customer_usaha_id, $pajak_id, $type_id, $rekening_id, $lastinput);
if ($cekduplikat == true) {
$this->session->set_flashdata('msg_warning', 'Pajak dengan Masa Pajak Tersebut Sudah Ada, Harap Cek Data-data Sebelumnya');
redirect(active_module_url($this->controller));
} else {
$update_data = array_merge($update_data, $reklame_data, $air_tanah_data, $tambahan_data);
$this->sptpd_model->update($p_id, $update_data);
}
} else {
$update_data = array_merge($update_data, $reklame_data, $air_tanah_data, $tambahan_data);
$this->sptpd_model->update($p_id, $update_data);
}
}
// data tambahan / detail
if (wp_login()) {
//
// uplod dokeumen
$this->unggah($p_id);
}
$this->session->set_flashdata('msg_success', 'Data telah disimpan');
redirect(active_module_url($this->controller));
}
$data['dt'] = $post_data;
$get = (object) $post_data;
$options = array();
$js = 'id="customer_usaha_id" class="input-xlarge"';
$data['select_usaha'] = form_dropdown('customer_usaha_id', $options, null, $js);
$select_data = $this->load->model('pajak_model')->get_select($get->pajak_id);
$options = array();
foreach ($select_data as $rows) {
$options[$rows->id] = $rows->nama;
}
$js = 'id="pajak_id" class="input-xxlarge"';
$data['select_pajak'] = form_dropdown('pajak_id', $options, $get->pajak_id, $js);
$select_data = $this->load->model('sptpd_type_model')->get_select();
$options = array();
foreach ($select_data as $rows) {
$options[$rows->id] = $rows->typenm;
}
$js = 'id="type_id" class="input-small" onChange="void(0);"';
$data['select_sptpd_type'] = form_dropdown('type_id', $options, $get->type_id, $js);
//.........这里部分代码省略.........
示例10: do_update_status
public function do_update_status()
{
$this->load_auth();
if (!$this->module_auth->update) {
$this->session->set_flashdata('msg_warning', $this->module_auth->msg_update);
redirect(active_module_url('daftar'));
}
$data['current'] = 'pendaftaran';
$data['apps'] = $this->apps_model->get_active_only();
$data['faction'] = active_module_url('daftar/do_update_status');
$this->form_validation->set_rules('status_id', 'Status', 'required');
$this->form_validation->set_rules('keterangan', 'Keterangan', 'max_length[255]');
if ($this->form_validation->run() == TRUE) {
$update_data = array('daftar_id' => $this->input->post('id'), 'status_id' => $this->input->post('status_id'), 'keterangan' => $this->input->post('keterangan'), 'create_date' => date('Y-m-d'), 'create_uid' => sipkd_user_id());
$this->daftar_hist_model->save($update_data);
$this->session->set_flashdata('msg_success', 'Data telah diupdate');
redirect(active_module_url('daftar'));
}
$data['dt']['id'] = $this->input->post('id');
$data['dt']['formno'] = $this->input->post('formno');
$data['dt']['reg_date'] = $this->input->post('reg_date');
$data['dt']['customernm'] = $this->input->post('customernm');
$data['dt']['alamat'] = $this->input->post('alamat');
$select_data = $this->daftar_status_model->get_select();
$options = array();
if ($select_data) {
foreach ($select_data as $row) {
$options[$row->id] = $row->uraian;
}
}
$js = 'id="status_id" class="input-large" required ';
$data['select_status'] = form_dropdown('status_id', $options, $this->input->post('status_id'), $js);
$data['dt']['keterangan'] = $this->input->post('keterangan');
$this->load->view('vdaftar_form_status', $data);
}
示例11: update
public function update()
{
if (!$this->module_auth->update) {
$this->session->set_flashdata('msg_warning', $this->module_auth->msg_update);
redirect(active_module_url('sptpd'));
}
$p_usaha_id = $this->uri->segment(4);
$p_type_id = $this->uri->segment(5);
$p_id = $this->uri->segment(6);
$data['current'] = 'pendataan';
$data['apps'] = $this->apps_model->get_active_only();
$data['faction'] = active_module_url("sptpd/update/{$p_usaha_id}/{$p_type_id}/{$p_id}");
$post_data = $this->fpost($p_usaha_id);
$this->fvalidation();
if ($this->form_validation->run() == TRUE) {
$input_post = $post_data;
$update_data = array('customer_id' => $input_post['customer_id'], 'customer_usaha_id' => $input_post['customer_usaha_id'], 'pajak_id' => $input_post['pajak_id'], 'tahun' => $input_post['tahun'], 'terimatgl' => date('Y-m-d', strtotime($input_post['terimatgl'])), 'type_id' => $input_post['type_id'], 'so' => $input_post['so'], 'jatuhtempotgl' => date('Y-m-d', strtotime($input_post['jatuhtempotgl'])), 'masadari' => date('Y-m-d', strtotime($input_post['masadari'])), 'masasd' => date('Y-m-d', strtotime($input_post['masasd'])), 'minimal_omset' => $input_post['minimal_omset'], 'dasar' => $input_post['dasar'], 'tarif' => $input_post['tarif'], 'denda' => $input_post['denda'], 'bunga' => $input_post['bunga'], 'setoran' => $input_post['setoran'], 'kenaikan' => $input_post['kenaikan'], 'kompensasi' => $input_post['kompensasi'], 'lain2' => $input_post['lain2'], 'r_bayarid' => $input_post['r_bayarid'], 'r_nsr' => $input_post['r_nsr'], 'rekening_id' => $input_post['rekening_id'], 'updated' => date('Y-m-d'), 'update_uid' => sipkd_user_id());
$reklame_data = array();
if ($p_usaha_id == pad_reklame_id()) {
$input_post = $post_data;
$reklame_data = array('r_nsrno' => $input_post['r_nsrno'], 'r_nsrtgl' => empty($input_post['r_nsrtgl']) ? NULL : date('Y-m-d', strtotime($input_post['r_nsrtgl'])), 'r_tarifid' => $input_post['r_tarifid'], 'r_kontrak' => $input_post['r_kontrak'], 'r_lama' => $input_post['r_lama'], 'r_jalanklas_id' => $input_post['r_jalanklas_id'], 'r_jalan_id' => $input_post['r_jalan_id'], 'r_lokasi' => $input_post['r_lokasi'], 'r_judul' => $input_post['r_judul'], 'r_panjang' => $input_post['r_panjang'], 'r_lebar' => $input_post['r_lebar'], 'r_muka' => $input_post['r_muka'], 'r_banyak' => $input_post['r_banyak'], 'r_luas' => $input_post['r_luas'], 'r_lokasi_id' => $input_post['r_lokasi_id'], 'r_calculated' => $input_post['r_calculated']);
}
$air_tanah_data = array();
if ($p_usaha_id == pad_air_tanah_id()) {
$input_post = $post_data;
$air_tanah_data = array('air_manfaat_id' => $input_post['air_manfaat_id'], 'air_zona_id' => $input_post['air_zona_id'], 'meteran_awal' => $input_post['meteran_awal'], 'meteran_akhir' => $input_post['meteran_akhir'], 'volume' => $input_post['volume'], 'satuan' => 'M3');
}
$update_data = array_merge($update_data, $reklame_data, $air_tanah_data);
$this->sptpd_model->update($p_id, $update_data);
$this->session->set_flashdata('msg_success', 'Data telah disimpan');
redirect(active_module_url('sptpd'));
}
$data['dt'] = $post_data;
$get = (object) $post_data;
$options = array();
$js = 'id="usaha_id" class="input-xlarge"';
$data['select_usaha'] = form_dropdown('usaha_id', $options, null, $js);
$select_data = $this->load->model('pajak_model')->get_select($get->pajak_id);
$options = array();
foreach ($select_data as $rows) {
$options[$rows->id] = $rows->nama;
}
$js = 'id="pajak_id" class="input-xxlarge"';
$data['select_pajak'] = form_dropdown('pajak_id', $options, $get->pajak_id, $js);
$select_data = $this->load->model('sptpd_type_model')->get_select();
$options = array();
foreach ($select_data as $rows) {
$options[$rows->id] = $rows->typenm;
}
$js = 'id="type_id" class="input-small" onChange="void(0);"';
$data['select_sptpd_type'] = form_dropdown('type_id', $options, $get->type_id, $js);
$pajak_detail = $this->load->model('pad_model');
if ($row = $pajak_detail->sptpd_get_pajak_detail($get->pajak_id, $get->terimatgl)) {
$data['dt']['rekening_id'] = $row->rekening_id;
$data['dt']['rekeningkd'] = $row->rekeningkd;
$data['dt']['jatuhtempo'] = $row->jatuhtempo;
}
if ($p_usaha_id == pad_reklame_id()) {
$select_data = $this->load->model('jalan_kelas_model')->get_select();
$options = array();
foreach ($select_data as $row) {
$options[$row->id] = $row->kelasnm;
}
$js = 'id="r_jalanklas_id" class="input-xlarge" required ';
$data['select_jalan_kelas'] = form_dropdown('r_jalanklas_id', $options, $get->r_jalanklas_id, $js);
$select_data = $this->load->model('jalan_model')->get_select();
$options = array();
foreach ($select_data as $row) {
$options[$row->id] = $row->nama;
}
$js = 'id="r_jalan_id" class="input-xlarge" required ';
$data['select_jalan'] = form_dropdown('r_jalan_id', $options, $get->r_jalan_id, $js);
$select_data = $this->load->model('kecamatan_model')->get_select();
$options = array();
foreach ($select_data as $row) {
$options[$row->id] = $row->kecamatannm;
}
$js = 'id="r_lokasi_id" class="input-medium" required ';
$data['select_lokasi'] = form_dropdown('r_lokasi_id', $options, $get->r_lokasi_id, $js);
$options = array(1 => 'Tidak ada', 2 => 'Kenaikan 25%', 3 => 'Pengurangan 25%', 4 => 'Kenaikan 25% & Pengurangan 25%');
$js = 'id="r_tarifid" class="input-large" required ';
$data['select_tarif'] = form_dropdown('r_tarifid', $options, $get->r_tarifid, $js);
$this->load->view('vsptpd_form_reklame', $data);
} else {
if ($p_usaha_id == pad_air_tanah_id()) {
$select_data = $this->load->model('air_zona_model')->get_select();
$options = array();
foreach ($select_data as $row) {
$options[$row->id] = $row->nama;
}
$js = 'id="air_zona_id" class="input-medium" required ';
$data['select_zona'] = form_dropdown('air_zona_id', $options, $get->air_zona_id, $js);
$select_data = $this->load->model('air_manfaat_model')->get_select();
$options = array();
foreach ($select_data as $row) {
$options[$row->id] = $row->nama;
}
$js = 'id="air_manfaat_id" class="input-medium" required ';
$data['select_manfaat'] = form_dropdown('air_manfaat_id', $options, $get->air_manfaat_id, $js);
$this->load->view('vsptpd_form_at', $data);
//.........这里部分代码省略.........
示例12: cetak
function cetak()
{
$type = $this->uri->segment(4);
$qs = urldecode($_SERVER['QUERY_STRING']);
parse_str($qs, $qs_data);
$params = array();
// foreach ($qs_data as $key => $val)
// $params[$key] = $val;
$rpt = $this->input->get('rpt');
$ignore_html_pg = TRUE;
switch ($rpt) {
case 'dat_sptpd_masuk':
$usahaid = trim($this->input->get('usahaid'));
$kondisi = intval($usahaid) > 0 ? " and cd.usaha_id={$usahaid}" : "";
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'tglawal' => date('Y-m-d', strtotime($this->input->get('tglawal'))), 'tglakhir' => date('Y-m-d', strtotime($this->input->get('tglakhir'))), 'kondisi' => $kondisi);
break;
case 'dat_sptpd_masuk_masa':
$usahaid = trim($this->input->get('usahaid'));
$kondisi = intval($usahaid) > 0 ? " and cd.usaha_id={$usahaid}" : "";
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'masabulan' => (int) $this->input->get('bulan'), 'masatahun' => (int) $this->input->get('tahun'), 'tahun' => (int) pad_tahun_anggaran(), 'kondisi' => $kondisi);
break;
case 'dat_sptpd_masuk_tgl_all':
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'tglawal' => date('Y-m-d', strtotime($this->input->get('tglawal'))), 'tglakhir' => date('Y-m-d', strtotime($this->input->get('tglakhir'))));
break;
case 'dat_sptpd_masuk_masa_all':
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'bulan' => (int) $this->input->get('bulan'), 'tahun' => (int) $this->input->get('tahun'));
break;
case 'dat_sptpd_blm_masuk_masa':
$usahaid = trim($this->input->get('usahaid'));
$kondisi = intval($usahaid) > 0 ? " and cu.usaha_id={$usahaid}" : "";
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'masabulan' => (int) $this->input->get('bulan'), 'masatahun' => (int) $this->input->get('tahun'), 'tahun' => (int) pad_tahun_anggaran(), 'kondisi' => $kondisi);
break;
case 'dat_sptpd_blm_masuk_masa_all':
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'bulan' => (int) $this->input->get('bulan'), 'tahun' => (int) $this->input->get('tahun'));
break;
case 'dat_srt_pemberitahuan':
$usahaid = trim($this->input->get('usahaid'));
$kondisi = intval($usahaid) > 0 ? " and cu.usaha_id={$usahaid}" : "";
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'masabulan' => (int) $this->input->get('bulan'), 'masatahun' => (int) $this->input->get('tahun'), 'tahun' => (int) pad_tahun_anggaran(), 'kondisi' => $kondisi);
break;
case 'dat_srt_teguran':
$usahaid = trim($this->input->get('usahaid'));
$kondisi = intval($usahaid) > 0 ? " and cu.usaha_id={$usahaid}" : "";
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'masabulan' => (int) $this->input->get('bulan'), 'masatahun' => (int) $this->input->get('tahun'), 'tahun' => (int) pad_tahun_anggaran(), 'kondisi' => $kondisi);
break;
case 'dat_srt_teguran_global':
$ignore_html_pg = FALSE;
$params = array('tglcetak' => date('Y-m-d', strtotime($this->input->get('tglcetak'))), 'usahaid' => (int) $this->input->get('usahaid'));
break;
}
$tambahan = array("daerah" => pad_pemda_daerah(), "dinas" => pad_pemda_nama(), "ttd" => base_url('assets/img/ttd.gif'));
$params = array_merge($params, $tambahan);
$ignore_html_pg = FALSE;
//paging aja semua
$rpt = 'pendataan/' . $rpt;
$jasper = $this->load->library('Jasper');
if ($type == 'pdf') {
echo $jasper->cetak($rpt, $params, $type, $ignore_html_pg);
} else {
if ($type == 'html') {
$assetpath = 'assets/file';
$tmp = $assetpath . '/tmp/report' . sipkd_user_id() . '.html';
if (is_file($tmp)) {
unlink($tmp);
}
ob_start();
echo $jasper->cetak($rpt, $params, $type, $ignore_html_pg);
echo '1';
file_put_contents($tmp, ob_get_contents());
$objPHPExcel = new PHPExcel();
$inputFileType = 'HTML';
$inputFileName = $tmp;
$outputFileType = 'Excel2007';
$outputFileName = $assetpath . '/Report.xls';
$filename = $rpt . date("d-m-Y") . ".xls";
$objPHPExcelReader = IOFactory::createReader($inputFileType);
$objPHPExcel = $objPHPExcelReader->load($inputFileName);
ini_set('zlib.output_compression', 'Off');
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
//the folowing two lines make sure it is saved as a xls file
header('Content-type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename=' . $filename);
//simpan dalam file sample.xls
$objWriter = IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save('php://output');
}
}
}
示例13: update
public function update()
{
if (!$this->module_auth->update) {
$this->session->set_flashdata('msg_warning', $this->module_auth->msg_update);
redirect(active_module_url('objek_pajak'));
}
$data['current'] = 'pendaftaran';
$data['apps'] = $this->apps_model->get_active_only();
$data['faction'] = active_module_url('objek_pajak/update');
$post_data = $this->fpost();
$data['dt'] = $post_data;
$this->fvalidation();
if ($this->form_validation->run() == TRUE) {
$input_post = $post_data;
$usaha_model = $this->load->model('usaha_model');
$so = $usaha_model->get_so($this->input->get_post('op_usaha_id'));
$post_data = array('customer_id' => empty($input_post['customer_id']) ? NULL : $input_post['customer_id'], 'usaha_id' => empty($input_post['usaha_id']) ? NULL : $input_post['usaha_id'], 'so' => $so, 'kecamatan_id' => empty($input_post['kecamatan_id']) ? NULL : $input_post['kecamatan_id'], 'kelurahan_id' => empty($input_post['kelurahan_id']) ? NULL : $input_post['kelurahan_id'], 'notes' => empty($input_post['notes']) ? NULL : $input_post['notes'], 'aktifnotes' => empty($input_post['aktifnotes']) ? NULL : $input_post['aktifnotes'], 'tmt' => empty($input_post['tmt']) ? NULL : date('Y-m-d', strtotime($input_post['tmt'])), 'customer_status_id' => empty($input_post['customer_status_id']) ? NULL : $input_post['customer_status_id'], 'latitude' => $input_post['latitude'], 'longitude' => $input_post['longitude'], 'opnm' => $input_post['opnm'], 'opalamat' => $input_post['opalamat'], 'def_pajak_id' => $input_post['def_pajak_id'], 'kd_restojmlmeja' => pad_to_decimal($input_post['kd_restojmlmeja']), 'kd_restojmlkursi' => pad_to_decimal($input_post['kd_restojmlkursi']), 'kd_restojmltamu' => pad_to_decimal($input_post['kd_restojmltamu']), 'kd_filmkursi' => pad_to_decimal($input_post['kd_filmkursi']), 'kd_filmpertunjukan' => pad_to_decimal($input_post['kd_filmpertunjukan']), 'kd_filmtarif' => pad_to_decimal($input_post['kd_filmtarif']), 'kd_bilyarmeja' => pad_to_decimal($input_post['kd_bilyarmeja']), 'kd_bilyartarif' => pad_to_decimal($input_post['kd_bilyartarif']), 'kd_bilyarkegiatan' => pad_to_decimal($input_post['kd_bilyarkegiatan']), 'kd_diskopengunjung' => pad_to_decimal($input_post['kd_diskopengunjung']), 'kd_diskotarif' => pad_to_decimal($input_post['kd_diskotarif']), 'mall_id' => pad_to_decimal($input_post['op_mall_id']), 'updated' => date('Y-m-d'), 'update_uid' => sipkd_user_id());
$this->objek_pajak_model->update($this->input->post('id'), $post_data);
if (isset($dtKD)) {
$i = 1;
$dtKD = json_decode($dtKD, true);
if (count($dtKD['dtKD']) > 0) {
$cid = $input_post['customer_id'];
$op_u_id = $input_post['usaha_id'];
$rd_row = array();
foreach ($dtKD['dtKD'] as $rows) {
$rd_row = array('customer_id' => $cid, 'konterid' => $konter, 'usaha_id' => $op_u_id, 'nourut' => $i, 'notes' => $rows[0], 'tarif' => pad_to_decimal($rows[1]), 'kamar' => pad_to_decimal($rows[2]), 'volume' => pad_to_decimal($rows[3]));
$i++;
$tambahan_data2 = array_merge($tambahan_data2, array($rd_row));
}
//langsung ajah dah - sementara
$query = "delete from pad_customer_detail where (customer_id={$cid} and konterid={$konter})";
$this->db->query($query);
$this->db->insert_batch('pad_customer_detail', $tambahan_data2);
}
}
$this->session->set_flashdata('msg_success', 'Data telah disimpan');
redirect(active_module_url('objek_pajak'));
}
$get = (object) $post_data;
$data['dt']['nopd'] = $this->objek_pajak_model->get_nopd($get->id);
$select_data = $this->load->model('usaha_model')->get_select();
$options = array();
$usaha_id = '';
foreach ($select_data as $row) {
$options[$row->id] = $row->nama;
}
$js = 'id="usaha_id" class="input-medium" onChange="get_pajak(this.value);" required ';
$data['select_usaha'] = form_dropdown('usaha_id', $options, $get->usaha_id, $js);
$select_data = $this->load->model('pajak_model')->get_select2($get->usaha_id);
$options = array();
foreach ($select_data as $row) {
$options[$row->id] = $row->nama;
}
$js = 'id="def_pajak_id" class="input-medium" required ';
$data['select_pajak'] = form_dropdown('def_pajak_id', $options, '', $js);
$select_data = $this->load->model('kecamatan_model')->get_select();
$options = array();
foreach ($select_data as $row) {
$options[$row->id] = $row->nama;
}
$js = 'id="kecamatan_id" class="input-medium" onChange="get_kelurahan(this.value);" required ';
$data['select_kecamatan'] = form_dropdown('kecamatan_id', $options, $get->kecamatan_id, $js);
$select_data = $this->load->model('kelurahan_model')->get_select($get->kecamatan_id);
$options = array();
foreach ($select_data as $row) {
$options[$row->id] = $row->nama;
}
$js = 'id="kelurahan_id" class="input-large" required ';
$data['select_kelurahan'] = form_dropdown('kelurahan_id', $options, $get->kelurahan_id, $js);
//read again ? tujuan nanti sih kayanya masuk ke op_status_usaha
$options = array('1' => 'AKTIF', '2' => 'TUTUP', '3' => 'TUTUP SEMENTARA', '4' => 'NORMAL', '5' => 'LIBUR');
$js = 'id="customer_status_id" class="input-medium" required ';
$data['select_status'] = form_dropdown('customer_status_id', $options, $get->customer_status_id, $js);
$this->load->view('vobjek_pajak_form', $data);
}
示例14: update
public function update()
{
if (!$this->module_auth->update) {
$this->session->set_flashdata('msg_warning', $this->module_auth->msg_update);
redirect(active_module_url('jalan'));
}
$p_id = $this->uri->segment(4);
$post_data = $this->fpost();
$data['current'] = 'referensi';
$data['apps'] = $this->apps_model->get_active_only();
$data['faction'] = active_module_url("jalan/update/{$p_id}");
$this->fvalidation();
if ($this->form_validation->run() == TRUE) {
$input_post = $post_data;
$update_data = array('kode' => empty($input_post['kode']) ? NULL : $input_post['kode'], 'nama' => empty($input_post['nama']) ? NULL : $input_post['nama'], 'jalan_kelas_id' => empty($input_post['jalan_kelas_id']) ? NULL : $input_post['jalan_kelas_id'], 'tmt' => empty($input_post['tmt']) ? NULL : date('Y-m-d', strtotime($input_post['tmt'])), 'enabled' => empty($input_post['enabled']) ? 0 : 1, 'updated' => date('Y-m-d h:i:s'), 'update_uid' => sipkd_user_id());
$this->jalan_model->update($p_id, $update_data);
$this->session->set_flashdata('msg_success', 'Data telah disimpan');
redirect(active_module_url('jalan'));
}
$get = $post_data;
$select_data = $this->load->model('jalan_kelas_model')->get_select2();
$options = array();
foreach ($select_data as $row) {
$options[$row->id] = $row->nama;
}
$js = 'id="jalan_kelas_id" class="input-xlarge" required ';
$data['select_jalan_kelas'] = form_dropdown('jalan_kelas_id', $options, $get->jalan_kelas_id, $js);
$data['dt'] = $post_data;
$this->load->view('vjalan_form', $data);
}
示例15: update
public function update()
{
if (!$this->module_auth->update) {
$this->session->set_flashdata('msg_warning', $this->module_auth->msg_update);
redirect(active_module_url('usaha'));
}
$p_id = $this->uri->segment(4);
$post_data = $this->fpost();
$data['current'] = 'referensi';
$data['apps'] = $this->apps_model->get_active_only();
$data['faction'] = active_module_url("usaha/update/{$p_id}");
$this->fvalidation();
if ($this->form_validation->run() == TRUE) {
$input_post = $post_data;
$update_data = array('nama' => empty($input_post['nama']) ? NULL : $input_post['nama'], 'tmt' => empty($input_post['tmt']) ? NULL : date('Y-m-d', strtotime($input_post['tmt'])), 'so' => empty($input_post['so']) ? NULL : $input_post['so'], 'enabled' => empty($input_post['enabled']) ? 0 : 1, 'updated' => date('Y-m-d h:i:s'), 'update_uid' => sipkd_user_id());
$this->usaha_model->update($p_id, $update_data);
$this->session->set_flashdata('msg_success', 'Data telah disimpan');
redirect(active_module_url('usaha'));
}
$data['dt'] = $post_data;
$get = $post_data;
$options = array('S' => 'Self', 'O' => 'Office');
$js = 'id="so" class="input-small" required ';
$data['select_so'] = form_dropdown('so', $options, $get->so, $js);
$this->load->view('vusaha_form', $data);
}