本文整理汇总了PHP中prepare_date函数的典型用法代码示例。如果您正苦于以下问题:PHP prepare_date函数的具体用法?PHP prepare_date怎么用?PHP prepare_date使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了prepare_date函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:26,代码来源:penagihan_model.php
示例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};
}
}
}
}
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:35,代码来源:penyetoran_model.php
示例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};
}
}
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:30,代码来源:pajak_reklame_model.php
示例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();
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:25,代码来源:penerimaan_pr.php
示例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;
}
开发者ID:aaronshaf,项目名称:jod,代码行数:29,代码来源:import_controller.php
示例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']);
}
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:8,代码来源:reg_listrik_model.php
示例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'));
}
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:8,代码来源:penetapan_pr_model.php
示例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);
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:10,代码来源:penetapan_model.php
示例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'));
}
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:13,代码来源:pendaftaran_model.php
示例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]);
}
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:14,代码来源:bayarsa_model.php
示例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);
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:15,代码来源:angsuran_model.php
示例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};
}
}
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:15,代码来源:bayarlain_model.php
示例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);
}
}
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:48,代码来源:penetapan_sa_model.php
示例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};
}
}
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:45,代码来源:pendaftaran_model.php
示例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();
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:21,代码来源:tbp_model.php
示例16: fill_data
function fill_data()
{
$this->data = array('nama' => $this->input->post('nama_bu'), 'badan_tipe' => $this->input->post('tipe_bu'), 'alamat' => $this->input->post('alamat_bu'), 'badan_telp' => $this->input->post('telp_bu'), 'badan_fax' => $this->input->post('fax_bu'), 'kodepos' => $this->input->post('kodepos_bu'), 'pemilik_nama' => $this->input->post('pemilik_nama'), 'pemilik_no_ktp' => $this->input->post('pemilik_no_ktp'), 'pemilik_npwp' => $this->input->post('pemilik_npwp'), 'pemilik_telp' => $this->input->post('pemilik_telp'), 'pemilik_hp' => $this->input->post('pemilik_hp'), 'pemilik_tmp_lahir' => $this->input->post('pemilik_tmp_lahir'), 'pemilik_tgl_lahir' => prepare_date($this->input->post('pemilik_tgl_lahir')), 'pemilik_alamat' => $this->input->post('pemilik_alamat'), 'pemilik_rt' => $this->input->post('pemilik_rt'), 'pemilik_rw' => $this->input->post('pemilik_rw'), 'pemilik_kodepos' => $this->input->post('pemilik_kodepos'), 'pemilik_id_desa' => $this->input->post('pemilik_id_desa'));
//implode("-",array_reverse(explode("/",$this->input->post('tanggal_sppd'))))
//prepare_date($this->input->post('pemilik_tgl_lahir'))
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:6,代码来源:data_bu_model.php
示例17: fill_data
function fill_data()
{
$this->data = array('nama' => $this->input->post('nama'), 'no_ktp' => $this->input->post('no_ktp'), 'tempat_lahir' => $this->input->post('tempat_lahir'), 'tanggal_lahir' => prepare_date($this->input->post('tgl_lahir')), 'alamat' => $this->input->post('alamat'), 'rt' => $this->input->post('rt'), 'rw' => $this->input->post('rw'), 'id_desa' => $this->input->post('iddesa'), 'no_telp' => $this->input->post('telp'), 'no_hp' => $this->input->post('no_hp'), 'kodepos' => $this->input->post('kodepos'), 'pekerjaan' => $this->input->post('pekerjaan'));
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:4,代码来源:data_pribadi_model.php
示例18: submit
function submit()
{
$this->db->trans_start();
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'edit') {
} else {
$arr['ID'] = $this->data_model->setID();
$sts_no = getNoPenyetoran();
$this->data_model->data = array('sts_id' => $arr['ID'], 'sts_no' => $sts_no, 'sts_thn' => date('Y', strtotime(prepare_date($this->input->post('tgl_setor')))), 'sts_tgl' => prepare_date($this->input->post('tgl_setor')), 'nominal' => str_replace(',', '', $this->input->post('nominal_pajak')), 'keterangan' => $this->input->post('keterangan'), 'logs' => 'NOW', 'user_id' => $this->session->userdata('SESS_USER_ID'), 'no_bukti' => $this->input->post('no_bukti'));
$this->data_model->insert_data();
$ii = 0;
foreach ($_REQUEST['idrows'] as $idx => $value) {
$this->data_model->data_rincian = array('sts_id' => $arr['ID'], 'id_rekening' => $value, 'nominal' => $_REQUEST['nominal_rek'][$ii]);
$ii++;
$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>';
}
echo $this->result_msg;
}
$this->db->trans_complete();
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:24,代码来源:sts.php
示例19: enregisteEval
/**
* Fonction enregisteEval()
*
* Enregistre les données de l'évaluation dans la base
*
* @return bolean int TRUE si l'enregistrement s'est bien passé, FALSE + un message sinon
*/
function enregisteEval()
{
// On vide les messages
unset($_SESSION[PREFIXE]['tbs_msg']);
// On teste si les champs obligatoires sont bien remplis
if (!empty($_POST['nom']) && !empty($_POST['nomComplet']) && !empty($_POST['emplacement']) && !empty($_POST['coefEval']) && !empty($_POST['display_date']) && !empty($_POST['date_ele_resp'])) {
// On récupère en session les données
$donnees_passees = array();
$donnees_passees['nomComplet'] = traitement_magic_quotes($_POST['nomComplet']);
$donnees_passees['nom'] = traitement_magic_quotes($_POST['nom']);
$donnees_passees['emplacement'] = $_POST['emplacement'];
$donnees_passees['coefEval'] = $_POST['coefEval'];
$donnees_passees['display_date'] = $_POST['display_date'];
$donnees_passees['date_ele_resp'] = $_POST['date_ele_resp'];
// ramener_sur_referentiel - noteSur20 (V ou F)
if (isset($_POST['noteSur20']) && $_POST['noteSur20']) {
$donnees_passees['noteSur20'] = "V";
} else {
$donnees_passees['noteSur20'] = "F";
}
// display_parents - noteSurReleve = 1
if (isset($_POST['noteSurReleve'])) {
$donnees_passees['noteSurReleve'] = $_POST['noteSurReleve'];
} else {
$donnees_passees['noteSurReleve'] = 0;
}
// display_parents_app - appSurReleve
if (isset($_POST['appSurReleve'])) {
$donnees_passees['appSurReleve'] = $_POST['appSurReleve'];
} else {
$donnees_passees['appSurReleve'] = 0;
}
// facultatif moyenne
// - O entre dans le calcul
// - B supérieures à 10 entrent dans le calcul
// - N entre dans le calcul de la moyenne que si elle améliore la moyenne
if (isset($_POST['moyenne'])) {
$donnees_passees['moyenne'] = $_POST['moyenne'];
} else {
charge_message("Vous n'avez pas défini la manière de prendre en compte la note dans la moyenne !");
}
// date - display_date
if (isset($_POST['display_date'])) {
$donnees_passees['display_date'] = prepare_date($_POST['display_date']);
} else {
charge_message("Vous n'avez pas défini la date d'affichage de l'évaluation !");
}
// coef - coefEval
if (isset($_POST['coefEval'])) {
$donnees_passees['coefEval'] = $_POST['coefEval'];
} else {
charge_message("Vous n'avez pas défini le coefficient de l'évaluation !");
}
// note_sur - noteSur
if (isset($_POST['noteSur'])) {
$donnees_passees['noteSur'] = $_POST['noteSur'];
} else {
charge_message("Vous n'avez pas défini la note maximale de l'évaluation !");
}
// date_ele_resp - date_ele_resp
if (isset($_POST['date_ele_resp'])) {
$donnees_passees['date_ele_resp'] = prepare_date($_POST['date_ele_resp']);
} else {
charge_message("Vous n'avez pas défini la date à laquelle les parents peuvent voir l'évaluation !");
}
// description - evalDescription
if (isset($_POST['evalDescription'])) {
$donnees_passees['evalDescription'] = $_POST['evalDescription'];
} else {
$donnees_passees['evalDescription'] = "";
}
// S'il y a des messages, c'est qu'on a des erreurs
if (!empty($_SESSION[PREFIXE]['tbs_msg'])) {
return FALSE;
}
$_SESSION[PREFIXE]['add_change_eval'] = $donnees_passees;
if (isset($_POST['id_eval'])) {
$donnees_passees['id_eval'] = $_POST['id_eval'];
// on a un id, on est en train de modifier une évaluation
$sql = "UPDATE cn_devoirs \n\t SET id_conteneur = '" . $donnees_passees['emplacement'] . "',\n\t id_racine = '" . $_SESSION[PREFIXE]['id_racine'] . "',\n\t\t nom_court = '" . $donnees_passees['nom'] . "',\n\t\t nom_complet = '" . $donnees_passees['nomComplet'] . "',\n\t\t description = '" . $donnees_passees['evalDescription'] . "',\n\t\t facultatif = '" . $donnees_passees['moyenne'] . "',\n\t\t date = '" . $donnees_passees['display_date'] . "',\n\t\t coef = '" . $donnees_passees['coefEval'] . "',\n\t\t note_sur = '" . $donnees_passees['noteSur'] . "',\n\t\t ramener_sur_referentiel = '" . $donnees_passees['noteSur20'] . "',\n\t\t display_parents = '" . $donnees_passees['noteSurReleve'] . "',\n\t\t display_parents_app = '" . $donnees_passees['appSurReleve'] . "',\n\t\t date_ele_resp = '" . $donnees_passees['date_ele_resp'] . "'\n\t WHERE id = '" . $donnees_passees['id_eval'] . "'";
} else {
// on n'a pas d'id, on est en train de créer une évaluation
$sql = "INSERT INTO cn_devoirs (`id_conteneur`,`id_racine`,`nom_court`,`nom_complet`,`description`,`facultatif`,`date`,`coef`,`note_sur`,`ramener_sur_referentiel`,`display_parents`,`display_parents_app`,`date_ele_resp`)\n\tVALUES ('" . $donnees_passees['emplacement'] . "','" . $_SESSION[PREFIXE]['id_racine'] . "','" . $donnees_passees['nom'] . "','" . $donnees_passees['nomComplet'] . "','" . $donnees_passees['evalDescription'] . "','" . $donnees_passees['moyenne'] . "','" . $donnees_passees['display_date'] . "','" . $donnees_passees['coefEval'] . "','" . $donnees_passees['noteSur'] . "','" . $donnees_passees['noteSur20'] . "','" . $donnees_passees['noteSurReleve'] . "','" . $donnees_passees['appSurReleve'] . "','" . $donnees_passees['date_ele_resp'] . "')";
}
if (mysql_query($sql)) {
return TRUE;
} else {
charge_message("Échec lors de l'enregistrement dans la base");
return FALSE;
}
}
charge_message("Des champs obligatoires n'ont pas été renseignés");
return FALSE;
//.........这里部分代码省略.........
开发者ID:Regis85,项目名称:plugin_notes,代码行数:101,代码来源:ajoute.php
示例20: proses
public function proses()
{
$response = (object) NULL;
$this->load->library('form_validation');
$this->form_validation->set_rules('jenis', 'Tipe', 'required|trim');
$this->form_validation->set_rules('gol', 'Golongan', 'required|trim');
$this->form_validation->set_rules('no', 'Nomor', 'required|trim|max_length[10]|callback__cek_nomor');
$this->form_validation->set_rules('noreg', 'No. Registrasi', 'required|trim|max_length[50]');
$this->form_validation->set_rules('npwpd', 'NPWPD', 'required|trim|max_length[22]');
// nana
$this->form_validation->set_rules('tgl', 'Tanggal NPWPD', 'required|trim');
$this->form_validation->set_rules('tglkirim', 'Tanggal Kirim', 'required|trim');
$this->form_validation->set_rules('tglkembali', 'Tanggal Kembali', 'required|trim');
$this->form_validation->set_rules('nama', 'Nama WP/WR', 'required|trim|max_length[50]');
$this->form_validation->set_rules('alamat', 'Alamat WP/WR', 'required|trim|max_length[50]');
$this->form_validation->set_rules('kecamatan', 'Kecamatan WP/WR', 'required|integer');
$this->form_validation->set_rules('kelurahan', 'Kelurahan WP/WR', 'required|integer');
$this->form_validation->set_rules('telp', 'No Telepon WP/WR', 'required|trim|max_length[20]');
$this->form_validation->set_rules('usaha', 'Jenis Usaha WP/WR', 'required|integer');
$this->form_validation->set_rules('namap', 'Nama Pemilik', 'required|trim|max_length[50]');
$this->form_validation->set_rules('alamatp', 'Alamat Pemilik', 'required|trim|max_length[50]');
$this->form_validation->set_rules('kecamatanp', 'Kecamatan Pemilik', 'required|integer');
$this->form_validation->set_rules('kelurahanp', 'Kelurahan Pemilik', 'required|integer');
$this->form_validation->set_rules('telpp', 'No Telepon Pemilik', 'required|trim|max_length[20]');
/* TODO : cek rincian ada isinya atau tidak */
$this->form_validation->set_message('required', '%s tidak boleh kosong.');
$this->form_validation->set_message('max_length', '%s tidak boleh melebihi %s karakter.');
$this->form_validation->set_message('_cek_nomor', '%s sudah ada.');
if ($this->form_validation->run() == TRUE) {
$tgl = strtotime(prepare_date($this->input->post('tgl')));
$tglkirim = strtotime(prepare_date($this->input->post('tglkirim')));
$tglkembali = strtotime(prepare_date($this->input->post('tglkembali')));
if ($tglkirim - $tgl < 0) {
$response->isSuccess = FALSE;
$response->message = 'Tanggal Kirim harus sama atau lebih dari Tanggal NPWPD';
} else {
if ($tglkembali - $tglkirim < 0) {
$response->isSuccess = FALSE;
$response->message = 'Tanggal Kembali harus sama atau lebih dari Tanggal Kirim';
} else {
$this->data_model->fill_data();
$success = $this->data_model->save_data();
if (!$success) {
$response->isSuccess = TRUE;
$response->message = 'Data berhasil disimpan';
$response->id = $this->data_model->id;
$response->sql = $this->db->queries;
} else {
$response->isSuccess = FALSE;
$response->message = 'Data gagal disimpan';
$response->sql = $this->db->queries;
}
}
}
} else {
$response->isSuccess = FALSE;
$response->message = validation_errors();
}
echo json_encode($response);
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:60,代码来源:pendaftaran_.php
注:本文中的prepare_date函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论