function delete() { $date_from = format_tanggal_barat($this->input->get("date_from")); $date_to = format_tanggal_barat($this->input->get("date_to")); $this->db->where('absen_date >= ', $date_from); $this->db->where('absen_date <= ', $date_to); $this->db->delete($this->tbl_name); }
function where_date($id, $field) { $from = $this->input->get($id . '_from'); $to = $this->input->get($id . '_to'); $data = ''; if ($from != '' && $to != '') { $data[] = $this->db->where($field . ' >=', format_tanggal_barat($from)); $data[] = $this->db->where($field . ' <=', format_tanggal_barat($to)); } return $data; }
function _field() { $data = array('campaign_id' => strtoupper($this->input->post('campaign_id')), 'mop_id' => strtoupper($this->input->post('mop_id')), 'firstname' => strtoupper($this->input->post('firstname')), 'lastname' => strtoupper($this->input->post('lastname')), 'nickname' => strtoupper($this->input->post('nickname')), 'sex' => strtoupper($this->input->post('sex')), 'dob' => format_tanggal_barat($this->input->post('dob')), 'id_type' => strtoupper($this->input->post('id_type')), 'id_number' => strtoupper($this->input->post('id_number')), 'tlp' => strtoupper($this->input->post('tlp')), 'address' => strtoupper($this->input->post('address')), 'email' => strtoupper($this->input->post('email')), 'fb' => strtoupper($this->input->post('fb')), 'tw' => strtoupper($this->input->post('tw')), 'city' => strtoupper($this->input->post('city')), 'pos_code' => strtoupper($this->input->post('pos_code')), 'brand' => strtoupper($this->input->post('brand')), 'brand_' => strtoupper($this->input->post('brand_')), 'source_type' => strtoupper($this->input->post('source_type')), 'source_user' => strtoupper($this->input->post('source_user')), 'survey_date' => format_tanggal_barat($this->input->post('survey_date')), 'upload_date' => format_tanggal_barat($this->input->post('upload_date')), 'entry_date' => format_tanggal_barat($this->input->post('entry_date')), 'verifikasi_date' => format_tanggal_barat($this->input->post('verifikasi_date')), 'referred' => strtoupper($this->input->post('referred')), 'drn_number' => strtoupper($this->input->post('drn_number')), 'status_verifikasi' => strtoupper($this->input->post('status_verifikasi'))); return $data; }
function _field() { $data = array('barang_id' => $this->input->post('barang_id'), 'tanggal' => format_tanggal_barat($this->input->post('tanggal')), 'banyak' => $this->input->post('banyak'), 'retur' => $this->input->post('retur'), 'vendor_id' => $this->input->post('vendor_id'), 'operator' => strtoupper($this->input->post('operator')), 'keterangan' => strtoupper($this->input->post('keterangan'))); return $data; }
function _field() { $data = array('name' => $this->input->post('name'), 'brand' => $this->input->post('brand'), 'start' => format_tanggal_barat($this->input->post('start')), 'end' => format_tanggal_barat($this->input->post('end')), 'status' => $this->input->post('status')); return $data; }
function update_auto() { $date_from = $this->input->get("date_from"); $date_to = $this->input->get("date_to"); if ($date_from != '' && $date_to != '') { $from = date_create(format_tanggal_barat($date_from)); $to = date_create(format_tanggal_barat($date_to)); while ($from <= $to) { $user_code = get_moderator(siang(date_format($from, 'Y-m-d'))); if ($user_code != '') { $data[] = array('user_code' => $user_code[0], 'absen_date' => date_format($from, 'Y-m-d'), 'absen_type' => 'SIANG'); } $user_code = get_moderator(siang2(date_format($from, 'Y-m-d'))); if ($user_code != '') { $data[] = array('user_code' => $user_code[0], 'absen_date' => date_format($from, 'Y-m-d'), 'absen_type' => 'SIANG'); } $user_code = get_moderator(siang_beat(date_format($from, 'Y-m-d'))); if ($user_code != '') { $data[] = array('user_code' => $user_code[0], 'absen_date' => date_format($from, 'Y-m-d'), 'absen_type' => 'SIANG'); } $user_code = get_moderator(siang_move(date_format($from, 'Y-m-d'))); if ($user_code != '') { $data[] = array('user_code' => $user_code[0], 'absen_date' => date_format($from, 'Y-m-d'), 'absen_type' => 'SIANG'); } $user_code = get_moderator(malam(date_format($from, 'Y-m-d'))); if ($user_code != '') { $data[] = array('user_code' => $user_code[0], 'absen_date' => date_format($from, 'Y-m-d'), 'absen_type' => 'MALAM'); } $user_code = get_moderator(malam2(date_format($from, 'Y-m-d'))); if ($user_code != '') { $data[] = array('user_code' => $user_code[0], 'absen_date' => date_format($from, 'Y-m-d'), 'absen_type' => 'MALAM'); } $user_code = get_moderator(malam_beat(date_format($from, 'Y-m-d'))); if ($user_code != '') { $data[] = array('user_code' => $user_code[0], 'absen_date' => date_format($from, 'Y-m-d'), 'absen_type' => 'MALAM'); } $user_code = get_moderator(malam_move(date_format($from, 'Y-m-d'))); if ($user_code != '') { $data[] = array('user_code' => $user_code[0], 'absen_date' => date_format($from, 'Y-m-d'), 'absen_type' => 'MALAM'); } date_add($from, date_interval_create_from_date_string('1 days')); } $this->mdl_mod_absent->set($data); $this->session->set_flashdata('alert', '<div class="alert alert-success">Complete!!!</div>'); } else { $this->session->set_flashdata('alert', '<div class="alert alert-danger">Date Empty!!!</div>'); } redirect('mod_absent' . $this->_filter()); }
function _header_training($pdf) { $date_from = $this->input->get("date_from"); $date_to = $this->input->get("date_to"); $pdf->SetFont('Arial', '', 10); $pdf->Cell(0, 5, 'Periode Tanggal : ' . $this->input->get('date_from') . ' s/d ' . $this->input->get('date_to'), 0, 0, 'C'); $pdf->Ln(10); $pdf->SetFont('Arial', 'B', 10); $pdf->SetDrawColor(0, 0, 0); $pdf->SetTextColor(0, 0, 0); $pdf->Cell(10, 14, 'No', 1, 0, 'C'); $pdf->Cell(40, 14, 'Moderator', 1, 0, 'C'); $from = date_create(format_tanggal_barat($date_from)); $to = date_create(format_tanggal_barat($date_to)); $j = 0; while ($from <= $to) { $pdf->SetXY(60 + $j, 30); $pdf->Cell(18, 7, get_nama_hari(date_format($from, "N")), 1, 0, 'C'); $pdf->SetXY(60 + $j, 37); $pdf->Cell(18, 7, date_format($from, "d/m/y"), 1, 0, 'C'); date_add($from, date_interval_create_from_date_string('1 days')); $j += 18; } $pdf->SetXY($j + 60, 30); $pdf->Cell(30, 14, 'Jumlah', 1, 0, 'C'); $pdf->Cell(0, 14, 'Total', 1, 0, 'C'); $pdf->Ln(14); }