本文整理汇总了PHP中prepare_date函数的典型用法代码示例。如果您正苦于以下问题:PHP prepare_date函数的具体用法?PHP prepare_date怎么用?PHP prepare_date使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了prepare_date函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getNPWPD
function getNPWPD()
{
$idrek = $this->input->post('idrek') ? $this->input->post('idrek') : 0;
$tgl1 = $this->input->post('tgl1') ? prepare_date($this->input->post('tgl1')) : date('Y-m-d');
$tgl2 = $this->input->post('tgl2') ? prepare_date($this->input->post('tgl2')) : date('Y-m-d');
$this->db->select('
r.id_spt,
r.nama_wp,
r.alamat_wp,
r.periode_awal,
r.periode_akhir,
r.jumlah_pajak,
p.tanggal,
p.batas_bayar
');
$this->db->distinct();
$this->db->from('spt r');
$this->db->join('rekening s', 'r.id_rekening = s.id_rekening');
$this->db->join('penetapan p', 'r.id_spt = p.id_spt');
$this->db->where('r.id_rekening', $idrek);
$this->db->where('r.tanggal_lunas', null);
$this->db->where("p.batas_bayar >= '" . $tgl1 . "'");
$this->db->where("p.batas_bayar <= '" . $tgl2 . "'");
$result = $this->db->get()->result_array();
return $result;
}
示例2: fill_data
function fill_data()
{
foreach ($this->fieldmap_sts as $key => $value) {
switch ($key) {
case 'tgl':
${$key} = $this->input->post($key) ? prepare_date($this->input->post($key)) : NULL;
break;
case 'tahun':
${$key} = $this->tahun ? $this->tahun : NULL;
break;
default:
${$key} = $this->input->post($key) ? $this->input->post($key) : NULL;
}
if (isset(${$key})) {
$this->data_sts[$value] = ${$key};
}
}
$this->purge_rincian = $this->input->post('purge');
$this->purge_rincian = $this->purge_rincian ? $this->purge_rincian : NULL;
$rinci = $this->input->post('rincian') ? $this->input->post('rincian') : NULL;
if ($rinci) {
$rinci = json_decode($rinci);
for ($i = 0; $i <= count($rinci) - 1; $i++) {
foreach ($this->fieldmap_rincian as $key => $value) {
switch ($key) {
default:
${$key} = isset($rinci[$i]->{$key}) && $rinci[$i]->{$key} ? $rinci[$i]->{$key} : NULL;
}
if (isset(${$key})) {
$this->data_rincian[$i][$value] = ${$key};
}
}
}
}
}
示例3: fill_data
function fill_data()
{
foreach ($this->fieldmap as $key => $value) {
switch ($key) {
case 'tgl':
${$key} = $this->input->post($key) ? prepare_date($this->input->post($key)) : NULL;
break;
case 'awal':
${$key} = $this->input->post($key) ? prepare_date($this->input->post($key)) : NULL;
break;
case 'akhir':
${$key} = $this->input->post($key) ? prepare_date($this->input->post($key)) : NULL;
break;
default:
${$key} = $this->input->post($key) ? $this->input->post($key) : NULL;
}
if (isset(${$key})) {
$this->data[$value] = ${$key};
}
}
foreach ($this->fieldmap_detil as $key => $value) {
switch ($key) {
default:
${$key} = $this->input->post($key) ? $this->input->post($key) : 0;
}
if (isset(${$key})) {
$this->data_detil[$value] = ${$key};
}
}
}
示例4: form_office
function form_office()
{
$this->db->trans_start();
list($day, $month, $year) = explode('/', $_REQUEST['tgl_penerimaan']);
$arr['ID'] = $this->data_model->setID();
$no_bayar = getNoPenerimaan($_REQUEST['jenis_pungutan'], $_REQUEST['tgl_penerimaan']);
$this->data_model->data = array('penerimaan_pr_id' => $arr['ID'], 'penetapan_pr_id' => $this->input->post('id_kohir'), 'pendataan_id' => $this->input->post('id_spt'), 'pendaftaran_id' => $this->input->post('id_npwp'), 'pemohon_id' => $this->input->post('id_pemohon'), 'skpd_id' => $this->input->post('id_dinas'), 'penerimaan_pr_no' => $no_bayar, 'tgl_penerimaan' => prepare_date($_REQUEST['tgl_penerimaan']), 'thn_penerimaan' => date('Y', strtotime(prepare_date($_REQUEST['tgl_penerimaan']))), 'bank_no' => $this->input->post('bank_no'), 'jenis_pungutan' => $this->input->post('jenis_pungutan'), 'nominal_pajak' => str_replace(',', '', $this->input->post('nominal_pajak')), 'id_ref_pembayaran' => $this->input->post('cpenyetoran'), 'keterangan' => $this->input->post('keterangan'), 'logs' => 'NOW', 'user_id' => $this->session->userdata('SESS_USER_ID'));
$hsl = $this->data_model->insert_data();
$qy = 'select id_rekening, nominal from v_pendataan_content where pendataan_id=' . $this->db->escape($_REQUEST['id_spt']);
$result = $this->db->query($qy);
if ($result->num_rows() > 0) {
foreach ($result->result() as $row) {
$this->data_model->data_rincian = array('penerimaan_pr_id' => $arr['ID'], 'id_rekening' => $row->ID_REKENING, 'nominal' => $row->NOMINAL);
$hsl = $this->data_model->insert_rincian_data();
}
}
if ($hsl) {
$this->result_msg = '<li>:: Data telah tersimpan ::</li>';
} else {
$this->result_msg = '<li>:: Error tersimpan data ::</li>';
}
updateNoPenerimaan($_REQUEST['jenis_pungutan'], $_REQUEST['tgl_penerimaan']);
echo $this->result_msg;
$this->db->trans_complete();
}
示例5: discourse
private function discourse($volume, $discourse)
{
$this->Discourse =& ClassRegistry::init('Discourse');
$volume = str_pad((int) $volume, 2, "0", STR_PAD_LEFT);
$discourse = str_pad($discourse, 2, "0", STR_PAD_LEFT);
App::import('Core', array('Xml', 'HttpSocket'));
$this->Http =& new HttpSocket();
$url = "http://scriptures.byu.edu/gettalk.php?vol={$volume}&disc={$discourse}";
$html = $this->Http->get($url);
if (strpos($html, 'file_get_contents') !== false) {
return false;
}
$dom = new DOMDocument();
@$dom->loadHTML($html);
$xpath = new DOMXPath($dom);
$start_page = (int) $xpath->evaluate('//a[@name][1]')->item(0)->getAttribute('name');
$column_anchors = $xpath->evaluate('//a[@name]');
$end_page = (int) $column_anchors->item($column_anchors->length - 1)->getAttribute('name');
$title = clean_string(find_content($xpath, '//div[@class="title"]'));
$subtitle = find_content($xpath, '//div[@class="subtitle"]');
$reported_by = clean_string(find_content($xpath, '//div[@class="reportedBy"]'));
$page_header = clean_string(find_content($xpath, '//div[@class="pageHeader"]'));
$speaker = clean_string(find_content($xpath, '//div[@class="speaker"]'));
$date = prepare_date(find_content($xpath, '//div[@class="date"]'));
$content = find_content($xpath, '//div[@class="discourseBody"]');
$this->Discourse->create();
$this->Discourse->save(array('volume' => $volume, 'start_page' => $start_page, 'end_page' => $end_page, 'title' => $title, 'subtitle' => $subtitle, 'reported_by' => $reported_by, 'page_header' => $page_header, 'speaker' => $speaker, 'date' => $date, 'subtitle' => $subtitle, 'content' => $content));
return true;
}
示例6: fill_data
function fill_data($arr = array())
{
if ($arr['ID'] == '') {
$this->data = array('pendaftaran_id' => $this->input->post('pendaftaran_id'), 'tgl_proses' => prepare_date($this->input->post('tgl_proses')), 'tgl_entry' => prepare_date($this->input->post('tgl_entry')), 'memo' => $this->input->post('memo'), 'jenis_pendataan' => 'LISTRIK', 'spt_id' => $this->input->post('spt_id'), 'jenis_pungutan' => $this->input->post('jenis_pungutan'), 'periode_awal' => prepare_date($this->input->post('periode_awal')), 'periode_akhir' => prepare_date($this->input->post('periode_akhir')), 'logs' => 'NOW', 'user_id' => $this->session->userdata('SESS_USER_ID'), 'nominal' => $arr['total']);
} else {
$this->data = array('pendataan_id' => $arr['ID'], 'pendaftaran_id' => $this->input->post('pendaftaran_id'), 'pendataan_no' => $arr['nomor'], 'tgl_proses' => prepare_date($this->input->post('tgl_proses')), 'tgl_entry' => prepare_date($this->input->post('tgl_entry')), 'memo' => $this->input->post('memo'), 'jenis_pendataan' => 'LISTRIK', 'spt_id' => $this->input->post('spt_id'), 'jenis_pungutan' => $this->input->post('jenis_pungutan'), 'periode_awal' => prepare_date($this->input->post('periode_awal')), 'periode_akhir' => prepare_date($this->input->post('periode_akhir')), 'logs' => 'NOW', 'user_id' => $this->session->userdata('SESS_USER_ID'), 'nominal' => $arr['total']);
}
}
示例7: fill_data
function fill_data($arr = array())
{
if ($arr['ID'] == '') {
$this->data = array('tgl_penetapan' => prepare_date($this->input->post('tgl_penetapan')), 'thn_penetapan' => date('Y', strtotime($this->input->post('tgl_penetapan'))), 'tgl_setor' => prepare_date($this->input->post('tgl_setor')), 'memo' => $this->input->post('memo'), 'nominal_penetapan' => 0, 'LOGS' => 'NOW', 'user_id' => $this->session->userdata('SESS_USER_ID'));
} else {
$this->data = array('penetapan_pr_id' => $arr['ID'], 'no_penetapan' => $arr['nomor'], 'tgl_penetapan' => prepare_date($this->input->post('tgl_penetapan')), 'thn_penetapan' => date('Y', strtotime(prepare_date($this->input->post('tgl_penetapan')))), 'tgl_setor' => prepare_date($this->input->post('tgl_setor')), 'memo' => $this->input->post('memo'), 'nominal_penetapan' => 0, 'LOGS' => 'NOW', 'user_id' => $this->session->userdata('SESS_USER_ID'));
}
}
示例8: __construct
function __construct()
{
// Call the Model constructor
parent::__construct();
$this->fieldmap = array('idspt' => 'a.ID_SPT', 'kohir' => 'a.NOMOR_KOHIR', 'npwpd' => 'a.NPWPD', 'nama_wp' => 'a.NAMA_WP', 'rek' => 'r.NAMA_REKENING', 'jumlah' => 'a.JUMLAH', 'tgl' => 'p.TANGGAL', 'batas' => 'p.BATAS_BAYAR');
$this->spt = $this->input->post('idspt') ? $this->input->post('idspt') : NULL;
$this->tgl = $this->input->post('tgl') ? prepare_date($this->input->post('tgl')) : NULL;
$this->batas = $this->input->post('batas') ? prepare_date($this->input->post('batas')) : NULL;
$this->jmlspt = count($this->spt);
}
示例9: fill_data
function fill_data($arr, $action = '')
{
$tgl_kartu = prepare_date($this->input->post('tgl_kartu'));
$tgl_kirim = $this->input->post('tgl_kirim') != '' ? prepare_date($this->input->post('tgl_kirim')) : $tgl_kartu;
$tgl_terima = $this->input->post('tgl_terima') != '' ? prepare_date($this->input->post('tgl_terima')) : $tgl_kartu;
$tgl_kembali = $this->input->post('tgl_kembali') != '' ? prepare_date($this->input->post('tgl_kembali')) : $tgl_kartu;
$tgl_tutup = $this->input->post('tgl_tutup') != '' ? prepare_date($this->input->post('tgl_tutup')) : $tgl_kartu;
if (isset($action) && $action == 'edit') {
$this->data = array('id_pemohon' => $arr['pemohon'], 'jenis_pendaftaran' => $this->input->post('jenis_daftar'), 'memo' => $this->input->post('memo'), 'objek_pdrd' => $this->input->post('objek_pdrd'), 'kode_usaha' => $this->input->post('kode_usaha'), 'tanggal_kartu' => $tgl_kartu, 'tanggal_terima' => $tgl_terima, 'tanggal_kembali' => $tgl_kembali, 'tanggal_kirim' => $tgl_kirim, 'tanggal_tutup' => $tgl_tutup, 'logs' => 'NOW', 'user_id' => $this->session->userdata('SESS_USER_ID'));
} else {
$this->data = array('id_pemohon' => $arr['pemohon'], 'jenis_pendaftaran' => $this->input->post('jenis_daftar'), 'nurut' => $arr['nurut'], 'no_pendaftaran' => $arr['no_daftar'], 'no_kartu' => $arr['no_kartu'], 'npwp' => $arr['npwp'], 'memo' => $this->input->post('memo'), 'objek_pdrd' => $this->input->post('objek_pdrd'), 'kode_usaha' => $this->input->post('kode_usaha'), 'tanggal_kartu' => $tgl_kartu, 'tanggal_terima' => $tgl_terima, 'tanggal_kembali' => $tgl_kembali, 'tanggal_kirim' => $tgl_kirim, 'tanggal_tutup' => $tgl_tutup, 'logs' => 'NOW', 'user_id' => $this->session->userdata('SESS_USER_ID'));
}
}
示例10: insert_data
function insert_data()
{
$jml = count($this->data);
for ($i = 0; $i <= $jml - 1; $i++) {
$sisa = $this->data[$i]['JUMLAH_BAYAR'] + $this->data[$i]['DENDA'] - $this->data[$i]['TELAH_DIBAYAR'];
if ($sisa == 0) {
$tgl_lunas = prepare_date($this->input->post('tgl'));
$this->data_spt = array('TANGGAL_LUNAS' => $tgl_lunas);
$this->db->where('ID_SPT', $this->data[$i]['ID_SPT']);
$this->db->update('SPT', $this->data_spt);
}
$this->db->insert('PEMBAYARAN', $this->data[$i]);
}
}
示例11: insert_data
function insert_data()
{
$this->db->select_sum('TELAH_DIBAYAR');
$this->db->from('PEMBAYARAN');
$this->db->where('ID_SPT', $this->data['ID_SPT']);
$res = $this->db->get()->row_array();
$sisa = $this->data['JUMLAH_BAYAR'] - ($this->data['TELAH_DIBAYAR'] + $res['TELAH_DIBAYAR']);
if ($sisa == 0) {
$tgl_lunas = prepare_date($this->input->post('tgl'));
$this->data_spt = array('TANGGAL_LUNAS' => $tgl_lunas);
$this->db->where('ID_SPT', $this->data['ID_SPT']);
$this->db->update('SPT', $this->data_spt);
}
$this->db->insert('PEMBAYARAN', $this->data);
}
示例12: fill_data
function fill_data()
{
foreach ($this->fieldmap_bayar as $key => $value) {
switch ($key) {
case 'tgl':
${$key} = $this->input->post('tgl') ? prepare_date($this->input->post('tgl')) : NULL;
break;
default:
${$key} = $this->input->post($key) ? $this->input->post($key) : NULL;
}
if (isset(${$key})) {
$this->data[$value] = ${$key};
}
}
}
示例13: fill_data
function fill_data()
{
$rinci = $this->input->post('rincian') ? $this->input->post('rincian') : NULL;
if ($rinci) {
$rinci_json = "[";
for ($i = 0; $i < count($rinci); $i++) {
//foreach element in $arr
if ($i == count($rinci) - 1) {
$rinci_json .= $rinci[$i];
} else {
$rinci_json .= $rinci[$i] . ',';
//etc
}
}
$rinci_json .= "]";
$arr = json_decode($rinci_json, true);
$data = array('SET URAIAN' => 'PT');
/*
$this->db->set('URAIAN','Perseroan Terbatas');
$this->db->set('KODE','001');
$this->db->where('ID_JENIS_USAHA', '1');
$this->db->update('JENIS_USAHA');
echo $arr[0]['nama']; */
for ($i = 0; $i < count($arr); $i++) {
$this->db->set('ID_SPT', $arr[$i]['idspt']);
$this->db->set('TANGGAL', prepare_date($this->input->post('tgl')));
$this->db->set('BATAS_BAYAR', prepare_date($this->input->post('batas')));
$this->db->insert('PENETAPAN');
//echo ."<br/>";
//$this->db->set('TANGGAL_SPT',prepare_date($this->input->post('tgl')));
//$this->db->set('PERIODE_AWAL',prepare_date($this->input->post('tgl')));
//$this->db->set('PERIODE_AKHIR',prepare_date($this->input->post('batas')));
$this->db->set('NOMOR_KOHIR', $this->get_kohir());
//$this->db->set('JUMLAH_PAJAK',$arr[$i]['jml']);
//$this->db->set('JUMLAH',$arr[$i]['jml']);
$this->db->where('ID_SPT', $arr[$i]['idspt']);
$this->db->update('SPT');
//echo ""
}
//echo "Berhasil";
//exit;
}
if ($this->spt) {
foreach ($this->spt as $key) {
$this->data[] = array('ID_SPT' => $key, 'TANGGAL' => $this->tgl, 'BATAS_BAYAR' => $this->batas);
}
}
}
示例14: fill_data
function fill_data()
{
$kode_kec = $this->input->post('kecamatan');
$id_kec = $this->db->query("select id_kecamatan from kecamatan where kode_kecamatan = '{$kode_kec}'")->row_array();
$kec = $id_kec['ID_KECAMATAN'];
$kode_kecp = $this->input->post('kecamatanp');
$id_kecp = $this->db->query("select id_kecamatan from kecamatan where kode_kecamatan = '{$kode_kecp}'")->row_array();
$kecp = $id_kecp['ID_KECAMATAN'];
$kode_kel = $this->input->post('kelurahan');
$id_kel = $this->db->query("select id_kelurahan from kelurahan where kode_kelurahan = '{$kode_kel}'")->row_array();
$kel = $id_kel['ID_KELURAHAN'];
$kode_kelp = $this->input->post('kelurahanp');
$id_kelp = $this->db->query("select id_kelurahan from kelurahan where kode_kelurahan = '{$kode_kelp}'")->row_array();
$kelp = $id_kelp['ID_KELURAHAN'];
foreach ($this->fieldmap_wp as $key => $value) {
switch ($key) {
case 'tgl':
${$key} = $this->input->post($key) ? prepare_date($this->input->post($key)) : NULL;
break;
case 'tglkirim':
${$key} = $this->input->post($key) ? prepare_date($this->input->post($key)) : NULL;
break;
case 'tglkembali':
${$key} = $this->input->post($key) ? prepare_date($this->input->post($key)) : NULL;
break;
case 'kecamatan':
${$key} = isset($kec) ? $kec : NULL;
break;
case 'kelurahan':
${$key} = isset($kel) ? $kel : NULL;
break;
case 'kecamatanp':
${$key} = isset($kecp) ? $kecp : NULL;
break;
case 'kelurahanp':
${$key} = isset($kelp) ? $kelp : NULL;
break;
default:
${$key} = $this->input->post($key) ? $this->input->post($key) : NULL;
}
if (isset(${$key})) {
$this->data[$value] = ${$key};
}
}
}
示例15: save_data
function save_data()
{
$data_oa = json_decode($this->input->post('rincian'), true);
$data_sa = json_decode($this->input->post('rincian2'), true);
$idskpd = $this->input->post('idskpd');
$nomor_tbp = $this->input->post('nomor_tbp');
$tgl_bayar = $this->input->post('tgl_bayar');
$id_bendahara = $this->input->post('id_bendahara');
$id_jurnal = $this->input->post('id_jurnal');
$id_wp = $this->input->post('id_wp');
$keterangan = $this->input->post('keterangan');
$total_setor = $this->input->post('total_setor');
$this->db->trans_start();
for ($i = 0; $i < count($data_sa); $i++) {
$result = $this->db->query(" INSERT INTO TBP (ID_SKPD,NOMOR_TBP,TGL_BAYAR,ID_BENDAHARA,ID_JURNAL,ID_NPWPD,TOTAL_BAYAR,ID_SPT,KETERANGAN,NOMINAL_BAYAR,KURANG_BAYAR,DENDA) VALUES (" . $idskpd . ",'" . $nomor_tbp . "','" . prepare_date($tgl_bayar) . "'," . $id_bendahara . "," . $id_jurnal . "," . $id_wp . ",'" . $total_setor . "'," . $data_sa[$i]["idspt"] . ",'" . $keterangan . "'," . $data_sa[$i]["nominal_bayar"] . "," . $data_sa[$i]["kurang_bayar"] . "," . $data_sa[$i]["denda"] . ") ");
}
for ($y = 0; $y < count($data_oa); $y++) {
$result = $this->db->query(" INSERT INTO TBP (ID_SKPD,NOMOR_TBP,TGL_BAYAR,ID_BENDAHARA,ID_JURNAL,ID_NPWPD,TOTAL_BAYAR,ID_REKENING,KETERANGAN) VALUES (" . $idskpd . ",'" . $nomor_tbp . "','" . prepare_date($tgl_bayar) . "'," . $id_bendahara . "," . $id_jurnal . "," . $id_wp . ",'" . $total_setor . "'," . $data_oa[$y]["id_rekening"] . ",'" . $keterangan . "') ");
}
$this->db->trans_complete();
}