Example #1
0
 public function index()
 {
     $offset = $this->general_lib->get_offset();
     $limit = $this->general_lib->get_limit();
     $total = $this->anggaran_rekap_mdl->count_all();
     $xdata['pdf_btn'] = anchor('anggaran_rekap/pdf' . $this->_filter(), '<span class="glyphicon glyphicon-export"></span> Export to Pdf', array('class' => 'btn btn-success btn-sm', 'target' => '_blank'));
     $this->table->set_template(tbl_tmp());
     $this->table->set_heading('No', 'Bulan', 'Saldo Awal', 'Total Pengeluaran', 'Sisa Saldo');
     $result = $this->anggaran_rekap_mdl->get()->result();
     $i = 1;
     foreach ($result as $r) {
         $saldo_awal = $this->anggaran_rekap_mdl->get_anggaran_awal($r->tanggal) - $this->anggaran_rekap_mdl->get_pengeluaran_awal($r->tanggal);
         $this->table->add_row($i++, $r->bulan, array('data' => number_format($saldo_awal), 'align' => 'right'), array('data' => number_format($r->total), 'align' => 'right'), array('data' => number_format($saldo_awal - $r->total), 'align' => 'right'));
     }
     $xdata['table'] = $this->table->generate();
     $xdata['total'] = page_total($offset, $limit, $total);
     $config = pag_tmp();
     $config['base_url'] = site_url("anggaran_rekap" . $this->_filter());
     $config['total_rows'] = $total;
     $config['per_page'] = $limit;
     $this->pagination->initialize($config);
     $xdata['pagination'] = $this->pagination->create_links();
     $data['content'] = $this->load->view('anggaran_rekap', $xdata, true);
     $this->load->view('template', $data);
 }
Example #2
0
 public function index()
 {
     $offset = $this->general->get_offset();
     $limit = $this->general->get_limit();
     $total = $this->telemarketing_model->count_all();
     $xdata['action'] = 'telemarketing/search' . get_query_string();
     $this->table->set_template(tbl_tmp());
     $head_data = array('sn' => 'Serial Number', 'name' => 'Name of Contact', 'title' => 'Job Title', 'company' => 'Company Name', 'tlp' => 'Phone', 'status_name' => 'Status', 'telemarketer' => 'Telemarketer', 'note' => 'Note');
     $heading[] = '#';
     foreach ($head_data as $r => $value) {
         $heading[] = anchor('telemarketing' . get_query_string(array('order_column' => "{$r}", 'order_type' => $this->general->order_type($r))), "{$value} " . $this->general->order_icon("{$r}"));
     }
     $heading[] = 'Action';
     $this->table->set_heading($heading);
     $result = $this->telemarketing_model->get()->result();
     $i = 1 + $offset;
     foreach ($result as $r) {
         $count_call = $this->telemarketing_model->count_call($r->id);
         $this->table->add_row($i++, anchor('telemarketing/phone/' . $r->id . get_query_string(), $r->sn) . ($r->valid == 1 ? ' <span class="label label-success">Valid</span>' : '') . ($r->audit == 1 ? ' <span class="label label-primary">Audit</span>' : ''), $r->name . '&nbsp;' . ($r->email_status != 0 ? '<span class="label label-' . ($r->email_status == 1 ? 'success' : 'danger') . '"><span class="glyphicon glyphicon-envelope"></span></span>' : ''), $r->title, $r->company, $r->tlp, $r->status_name, $r->telemarketer, $this->callhis_model->get_note($r->id), anchor('telemarketing/phone/' . $r->id . get_query_string(), 'Phone' . ($count_call > 0 ? ' <span class="label label-success">' . $count_call . ' <span class="glyphicon glyphicon-earphone"></span></span>' : '')));
     }
     $xdata['table'] = $this->table->generate();
     $xdata['total'] = page_total($offset, $limit, $total);
     $config = pag_tmp();
     $config['base_url'] = "telemarketing" . get_query_string(null, 'offset');
     $config['total_rows'] = $total;
     $config['per_page'] = $limit;
     $this->pagination->initialize($config);
     $xdata['pagination'] = $this->pagination->create_links();
     $data['content'] = $this->load->view('telemarketing_list', $xdata, true);
     $this->load->view('template', $data);
 }
Example #3
0
 public function index()
 {
     $offset = $this->general_lib->get_offset();
     $limit = $this->general_lib->get_limit();
     $total = $this->user_mdl->count_all();
     $xdata['action'] = 'user/search' . $this->_filter();
     $xdata['action_delete'] = 'user/delete' . $this->_filter();
     $xdata['add_btn'] = anchor('user/add', '<span class="glyphicon glyphicon-plus"></span> Tambah', array('class' => 'btn btn-success btn-sm'));
     $xdata['delete_btn'] = '<button id="delete-btn" class="btn btn-danger btn-sm"><span class="glyphicon glyphicon-trash"></span> Delete Checked</button>';
     $this->table->set_template(tbl_tmp());
     $head_data = array('fullname' => 'Fullname', 'username' => 'Username', 'level_name' => 'Level', 'ip_login' => 'Last IP Login', 'user_agent' => 'Last User Agent', 'date_login' => 'Last Login', 'status_name' => 'Status');
     $heading[] = form_checkbox(array('id' => 'selectAll', 'value' => 1));
     $heading[] = '#';
     foreach ($head_data as $r => $value) {
         $heading[] = anchor('user' . $this->_filter(array('order_column' => "{$r}", 'order_type' => $this->general_lib->order_type($r))), "{$value} " . $this->general_lib->order_icon("{$r}"));
     }
     $heading[] = 'Action';
     $this->table->set_heading($heading);
     $result = $this->user_mdl->get()->result();
     $i = 1 + $offset;
     foreach ($result as $r) {
         $this->table->add_row(array('data' => form_checkbox(array('name' => 'check[]', 'value' => $r->id)), 'width' => '10px'), $i++, $r->fullname, $r->username, $r->level_nama, $r->ip_login, $r->user_agent, $r->date_login, '<label class="label label-' . ($r->status_kode == 'ON' ? 'success' : 'danger') . '">' . $r->status_nama . '</label>', anchor('user/edit/' . $r->id . $this->_filter(), 'Edit') . "&nbsp;|&nbsp;" . anchor('user/delete/' . $r->id . $this->_filter(), 'Delete', array('onclick' => "return confirm('you sure')")));
     }
     $xdata['table'] = $this->table->generate();
     $xdata['total'] = page_total($offset, $limit, $total);
     $config = pag_tmp();
     $config['base_url'] = site_url("user" . $this->_filter());
     $config['total_rows'] = $total;
     $config['per_page'] = $limit;
     $this->pagination->initialize($config);
     $xdata['pagination'] = $this->pagination->create_links();
     $data['content'] = $this->load->view('user_list', $xdata, true);
     $this->load->view('template', $data);
 }
Example #4
0
 public function index()
 {
     $offset = $this->general_lib->get_offset();
     $limit = $this->general_lib->get_limit();
     $total = $this->model->count_all();
     $xdata['action'] = $this->section_master . '/search' . $this->_filter();
     $xdata['action_delete'] = $this->section_master . '/delete' . $this->_filter();
     $xdata['add_btn'] = anchor($this->section_master . '/add', '<span class="glyphicon glyphicon-plus"></span> Tambah', array('class' => 'btn btn-success btn-sm'));
     $xdata['delete_btn'] = '<button id="delete-btn" class="btn btn-danger btn-sm"><span class="glyphicon glyphicon-trash"></span> Delete Checked</button>';
     $this->table->set_template(tbl_tmp());
     $head_data = array('kode' => 'Kode', 'nama' => 'Nama');
     $heading[] = form_checkbox(array('id' => 'selectAll', 'value' => 1));
     $heading[] = '#';
     foreach ($head_data as $r => $value) {
         $heading[] = anchor($this->section_master . $this->_filter(array('order_column' => "{$r}", 'order_type' => $this->general_lib->order_type($r))), "{$value} " . $this->general_lib->order_icon("{$r}"));
     }
     $heading[] = 'Action';
     $this->table->set_heading($heading);
     $result = $this->model->get()->result();
     $i = 1 + $offset;
     foreach ($result as $r) {
         $this->table->add_row(array('data' => form_checkbox(array('name' => 'check[]', 'value' => $r->id)), 'width' => '10px'), $i++, $r->kode, $r->nama, anchor($this->section_master . '/edit/' . $r->id . $this->_filter(), 'Edit') . "&nbsp;|&nbsp;" . anchor($this->section_master . '/delete/' . $r->id . $this->_filter(), 'Delete', array('onclick' => "return confirm('you sure')")));
     }
     $xdata['table'] = $this->table->generate();
     $xdata['total'] = page_total($offset, $limit, $total);
     $config = pag_tmp();
     $config['base_url'] = site_url($this->section_master . $this->_filter());
     $config['total_rows'] = $total;
     $config['per_page'] = $limit;
     $this->pagination->initialize($config);
     $xdata['pagination'] = $this->pagination->create_links();
     $data['content'] = $this->load->view('master_list', $xdata, true);
     $this->load->view('template', $data);
 }
Example #5
0
 public function index()
 {
     $offset = $this->general_lib->get_offset();
     $limit = $this->general_lib->get_limit();
     $total = $this->servis_rekap_mdl->count_all();
     $xdata['pdf_btn'] = anchor('servis_rekap/pdf' . $this->_filter(), '<span class="glyphicon glyphicon-export"></span> Export to Pdf', array('class' => 'btn btn-success btn-sm', 'target' => '_blank'));
     $this->table->set_template(tbl_tmp());
     $head_data = array('tanggal' => 'Tanggal', 'nopol' => 'Kendaraan', 'tipe' => 'Tipe', 'kilometer' => 'Kilometer', 'komponen_nama' => 'Komponen', 'komponen_aksi_nama' => 'Jenis Perlakuan', 'satuan' => 'Satuan', 'harga' => 'Harga Satuan', 'total' => 'Total Harga');
     $heading[] = 'No';
     foreach ($head_data as $r => $value) {
         $heading[] = anchor('servis_rekap' . $this->_filter(array('order_column' => "{$r}", 'order_type' => $this->general_lib->order_type($r))), "{$value} " . $this->general_lib->order_icon("{$r}"));
     }
     $this->table->set_heading($heading);
     $result = $this->servis_rekap_mdl->get()->result();
     $i = 1;
     foreach ($result as $r) {
         $this->table->add_row($i++, format_dmy($r->tanggal), anchor('kendaraan/detail/' . $r->kendaraan_id, $r->nopol, array('target' => '_blank')), $r->tipe, $r->kilometer, $r->komponen_lain != '' ? $r->komponen_lain : $r->komponen_nama, $r->servis_aksi_nama, array('data' => number_format($r->satuan) . '&nbsp;' . $r->komponen_satuan_nama, 'align' => 'right'), array('data' => number_format($r->harga), 'align' => 'right'), array('data' => number_format($r->total), 'align' => 'right'));
     }
     $xdata['table'] = $this->table->generate();
     $xdata['total'] = page_total($offset, $limit, $total);
     $config = pag_tmp();
     $config['base_url'] = site_url("servis_rekap" . $this->_filter());
     $config['total_rows'] = $total;
     $config['per_page'] = $limit;
     $this->pagination->initialize($config);
     $xdata['pagination'] = $this->pagination->create_links();
     $data['content'] = $this->load->view('servis_rekap', $xdata, true);
     $this->load->view('template', $data);
 }
Example #6
0
 function index()
 {
     $offset = $this->lib_general->value_get('offset', 0);
     $limit = $this->lib_general->value_get('limit', 10);
     $data['title'] = 'ACS - Vendor';
     $data['action'] = site_url('vendor/search' . $this->_filter());
     $data['add_btn'] = anchor('vendor/add' . $this->_filter(), '<span class="glyphicon glyphicon-plus"></span> New', array('class' => 'btn btn-primary btn-sm'));
     $data['export_btn'] = anchor('vendor/export' . $this->_filter(), '<span class="glyphicon glyphicon-export"></span> Export Excel 2007', array('class' => 'btn btn-primary btn-sm'));
     $this->table->set_template(tbl_tmp());
     $head_data = array('name' => 'Vendor Name', 'address' => 'Address', 'tlp' => 'Telephone');
     $heading[] = 'No';
     foreach ($head_data as $r => $value) {
         $heading[] = anchor('vendor' . $this->_filter(array('order_column' => $r, 'order_type' => $this->lib_general->order_type($r))), $value . " " . $this->lib_general->order_icon($r));
     }
     $heading[] = 'Action';
     $this->table->set_heading($heading);
     $result = $this->mdl_vendor->get()->result();
     $i = 1 + $offset;
     foreach ($result as $r) {
         $this->table->add_row($i++, anchor('vendor/edit/' . $r->id . $this->_filter(), $r->name), $r->address, $r->tlp, anchor('vendor/edit/' . $r->id . $this->_filter(), '<span class="glyphicon glyphicon-edit"></span> Edit') . "&nbsp;|&nbsp;" . anchor('vendor/delete/' . $r->id . $this->_filter(), '<span class="glyphicon glyphicon-trash"></span> Delete', array('onclick' => "return confirm('Are you sure')")));
     }
     $data['table'] = $this->table->generate();
     $total = $this->mdl_vendor->count_all();
     $config = pag_tmp();
     $config['base_url'] = site_url("vendor" . $this->_filter());
     $config['total_rows'] = $total;
     $config['per_page'] = $limit;
     $this->pagination->initialize($config);
     $data['pagination'] = $this->pagination->create_links();
     $data['total'] = 'Showing ' . ($offset + 1) . ' to ' . ($offset + $limit) . ' of ' . number_format($total) . ' entries';
     $this->template->display('vendor', $data);
 }
Example #7
0
 function index()
 {
     $offset = $this->lib_general->value_get('offset', 0);
     $limit = $this->lib_general->value_get('limit', 10);
     $data['title'] = 'ACS - Individual';
     $data['action'] = site_url('individual/search' . $this->_filter());
     $data['add_btn'] = anchor('individual/add' . $this->_filter(), '<span class="glyphicon glyphicon-plus"></span> New', array('class' => 'btn btn-primary btn-sm'));
     $data['export_btn'] = anchor('individual/export' . $this->_filter(), '<span class="glyphicon glyphicon-export"></span> Export Excel 2007', array('class' => 'btn btn-primary btn-sm'));
     $data['export_xls_btn'] = anchor('individual/export_xls' . $this->_filter(), '<span class="glyphicon glyphicon-export"></span> Export Excel 2003', array('class' => 'btn btn-primary btn-sm'));
     $data['breadcrumb'] = 'individual/filter' . $this->_filter();
     $this->table->set_template(tbl_tmp());
     $head_data = array('id' => 'ID', 'firstname' => 'Fullname', 'sex' => 'Sex', 'id_number' => 'ID Number', 'email' => 'Email', 'city' => 'City', 'status_verifikasi' => 'Status');
     $heading[] = 'No';
     foreach ($head_data as $r => $value) {
         $heading[] = anchor('individual' . $this->_filter(array('order_column' => $r, 'order_type' => $this->lib_general->order_type($r))), $value . " " . $this->lib_general->order_icon($r));
     }
     $heading[] = 'Action';
     $this->table->set_heading($heading);
     $result = $this->mdl_individual->get()->result();
     $i = 1 + $offset;
     foreach ($result as $r) {
         $this->table->add_row($i++, anchor('individual/edit/' . $r->id . $this->_filter(), $r->id), $r->firstname . ' ' . $r->lastname, $r->sex, $r->id_number, $r->email, $r->city, $r->status_verifikasi, anchor('individual/delete/' . $r->id . $this->_filter(), '<span class="glyphicon glyphicon-trash"></span> Delete', array('onclick' => "return confirm('Are you sure')")));
     }
     $data['table'] = $this->table->generate();
     $total = $this->mdl_individual->count_all();
     $config = pag_tmp();
     $config['base_url'] = site_url("individual" . $this->_filter());
     $config['total_rows'] = $total;
     $config['per_page'] = $limit;
     $this->pagination->initialize($config);
     $data['pagination'] = $this->pagination->create_links();
     $data['total'] = page_total($offset, $limit, $total);
     $this->template->display('individual', $data);
 }
Example #8
0
 function index()
 {
     $offset = $this->lib_general->value_get('offset', 0);
     $limit = $this->lib_general->value_get('limit', 10);
     $data['title'] = 'ACS - Campaign';
     $data['action'] = site_url('campaign/search' . $this->_filter());
     $data['add_btn'] = anchor('campaign/add' . $this->_filter(), '<span class="glyphicon glyphicon-plus"></span> New', array('class' => 'btn btn-primary btn-sm'));
     $this->table->set_template(tbl_tmp());
     $head_data = array('name' => 'Campaign', 'brand' => 'Brand', 'start' => 'Start', 'end' => 'End', 'status' => 'Status');
     $heading[] = 'No';
     foreach ($head_data as $r => $value) {
         $heading[] = anchor('campaign' . $this->_filter(array('order_column' => $r, 'order_type' => $this->lib_general->order_type($r))), $value . " " . $this->lib_general->order_icon($r));
     }
     $heading[] = 'Action';
     $this->table->set_heading($heading);
     $result = $this->mdl_campaign->get()->result();
     $i = 1 + $offset;
     foreach ($result as $r) {
         $this->table->add_row($i++, anchor('campaign/edit/' . $r->id . $this->_filter(), $r->name), $r->brand, format_tanggal($r->start), format_tanggal($r->end), get_campaign_status($r->status), anchor('campaign/edit/' . $r->id . $this->_filter(), '<span class="glyphicon glyphicon-edit"></span> Edit') . "&nbsp;|&nbsp;" . anchor('campaign/delete/' . $r->id . $this->_filter(), '<span class="glyphicon glyphicon-trash"></span> Delete', array('onclick' => "return confirm('Are you sure')")));
     }
     $data['table'] = $this->table->generate();
     $total = $this->mdl_campaign->count_all();
     $config = pag_tmp();
     $config['base_url'] = site_url("campaign" . $this->_filter());
     $config['total_rows'] = $total;
     $config['per_page'] = $limit;
     $this->pagination->initialize($config);
     $data['pagination'] = $this->pagination->create_links();
     $data['total'] = page_total($offset, $limit, $total);
     $this->template->display('campaign', $data);
 }
Example #9
0
 public function index()
 {
     $offset = $this->general_lib->get_offset();
     $limit = $this->general_lib->get_limit();
     $total = $this->servis_mdl->count_all();
     $xdata['action'] = 'servis/search' . $this->_filter();
     $xdata['action_delete'] = 'servis/delete' . $this->_filter();
     $xdata['add_btn'] = anchor('servis/add', '<span class="glyphicon glyphicon-plus"></span> Tambah', array('class' => 'btn btn-success btn-sm'));
     $xdata['delete_btn'] = '<button id="delete-btn" class="btn btn-danger btn-sm"><span class="glyphicon glyphicon-trash"></span> Delete Checked</button>';
     $this->table->set_template(tbl_tmp());
     $head_data = array('nomor' => 'Nomor', 'nopol' => 'Kendaraan', 'tanggal' => 'Tanggal', 'tipe_nama' => 'Tipe', 'kilometer' => 'Kilometer', 'jumlah_satuan' => 'Jumlah Satuan', 'total_harga' => 'Total Harga');
     $heading[] = form_checkbox(array('id' => 'selectAll', 'value' => 1));
     $heading[] = '#';
     foreach ($head_data as $r => $value) {
         $heading[] = anchor('servis' . $this->_filter(array('order_column' => "{$r}", 'order_type' => $this->general_lib->order_type($r))), "{$value} " . $this->general_lib->order_icon("{$r}"));
     }
     $heading[] = 'Action';
     $this->table->set_heading($heading);
     $result = $this->servis_mdl->get()->result();
     $i = 1 + $offset;
     foreach ($result as $r) {
         $this->table->add_row(array('data' => form_checkbox(array('name' => 'check[]', 'value' => $r->id)), 'width' => '10px'), $i++, $r->nomor, $r->nopol, format_dmy($r->tanggal), $r->tipe_nama, $r->kilometer, array('data' => number_format($r->jumlah_satuan), 'align' => 'right'), array('data' => number_format($r->total_harga), 'align' => 'right'), anchor('servis/edit/' . $r->id . $this->_filter(), 'Edit') . "&nbsp;|&nbsp;" . anchor('servis/delete/' . $r->id . $this->_filter(), 'Delete', array('onclick' => "return confirm('you sure')")) . "&nbsp;|&nbsp;" . anchor('servis/print_detail/' . $r->id, 'Print', array('target' => '_blank')));
     }
     $xdata['table'] = $this->table->generate();
     $xdata['total'] = page_total($offset, $limit, $total);
     $config = pag_tmp();
     $config['base_url'] = site_url("servis" . $this->_filter());
     $config['total_rows'] = $total;
     $config['per_page'] = $limit;
     $this->pagination->initialize($config);
     $xdata['pagination'] = $this->pagination->create_links();
     $data['content'] = $this->load->view('servis_list', $xdata, true);
     $this->load->view('template', $data);
 }
Example #10
0
 function index()
 {
     $data['title'] = 'ACS - Absent';
     $data['heading'] = 'Absent';
     $data['action'] = 'mod_absent/search' . $this->_filter();
     $data['action_update'] = 'mod_absent/update' . $this->_filter();
     $data['clear_btn'] = anchor('mod_absent/delete' . $this->_filter(), '<span class="glyphicon glyphicon-trash"></span> Clear', array('class' => 'btn btn-sm btn-danger', 'onclick' => "return confirm('are you sure')"));
     $data['auto_btn'] = anchor('mod_absent/update_auto' . $this->_filter(), '<span class="glyphicon glyphicon-edit"></span> Auto Absent', array('class' => 'btn btn-sm btn-warning', 'onclick' => "return confirm('are you sure')"));
     $data['fee_btn'] = anchor('mod_fee' . $this->_filter(), '<span class="glyphicon glyphicon-print"></span> Fee Weekly', array('class' => 'btn btn-sm btn-default'));
     $data['fee_senior_btn'] = anchor('mod_fee/fee_senior' . $this->_filter(), '<span class="glyphicon glyphicon-print"></span> Fee Monthly', array('class' => 'btn btn-sm btn-default'));
     $date_from = $this->input->get("date_from");
     $date_to = $this->input->get("date_to");
     if ($date_from != '' && $date_to != '') {
         $this->table->set_template(tbl_tmp());
         $from = date_create(format_tanggal_barat($date_from));
         $to = date_create(format_tanggal_barat($date_to));
         $head[] = 'No';
         $head[] = 'Moderator';
         while ($from <= $to) {
             $head[] = get_nama_hari(date_format($from, 'N')) . '<br/>' . date_format($from, 'd/m/Y');
             date_add($from, date_interval_create_from_date_string('1 days'));
         }
         $this->table->set_heading($head);
         $result = moderator();
         $i = 1;
         foreach ($result as $r) {
             $from = date_create(format_tanggal_barat($date_from));
             $to = date_create(format_tanggal_barat($date_to));
             $row[] = $i++;
             $row[] = $r[1];
             $j = 1;
             while ($from <= $to) {
                 $value = $this->mdl_mod_absent->get(date_format($from, 'Y-m-d'), $r[0]);
                 $row[] = form_dropdown($r[0] . '_' . date_format($from, 'dmy'), array('' => '', 'SIANG' => 'SIANG', 'MALAM' => 'MALAM', 'TRAINING' => 'TRAINING'), $value);
                 date_add($from, date_interval_create_from_date_string('1 days'));
                 $j++;
             }
             $this->table->add_row($row);
             unset($row);
             if ($i == 7) {
                 $this->table->add_row(array('data' => 'BEAT Moderator', 'colspan' => $j + 1, 'class' => 'text-center'));
             }
             if ($i == 10) {
                 $this->table->add_row(array('data' => 'MOVE Moderator', 'colspan' => $j + 1, 'class' => 'text-center'));
             }
         }
     }
     $data['table'] = $this->table->generate();
     $this->template->display('mod_absent', $data);
 }
Example #11
0
 public function index()
 {
     $xdata['action'] = 'absent/search' . get_query_string();
     $xdata['action_update'] = 'absent/update' . get_query_string();
     $xdata['clear_btn'] = anchor('absent/delete' . get_query_string(), '<span class="glyphicon glyphicon-trash"></span> Clear', array('class' => 'btn btn-sm btn-danger', 'onclick' => "return confirm('Are you sure')"));
     $xdata['auto_btn'] = anchor('absent/update_auto' . get_query_string(), '<span class="glyphicon glyphicon-edit"></span> Auto Absent', array('class' => 'btn btn-sm btn-warning', 'onclick' => "return confirm('Are you sure')"));
     $xdata['fee_week_btn'] = anchor('absent/fee_week' . get_query_string(), '<span class="glyphicon glyphicon-print"></span> Fee Weekly', array('class' => 'btn btn-sm btn-default', 'target' => '_blank'));
     $xdata['fee_month_btn'] = anchor('absent/fee_month' . get_query_string(), '<span class="glyphicon glyphicon-print"></span> Fee Monthly', array('class' => 'btn btn-sm btn-default', 'target' => '_blank'));
     $date_from = $this->input->get("date_from");
     $date_to = $this->input->get("date_to");
     $event = $this->input->get("event");
     if ($date_from != '' && $date_to != '' && $event != '') {
         $this->table->set_template(tbl_tmp());
         $from = date_create(format_ymd($date_from));
         $to = date_create(format_ymd($date_to));
         $head[] = 'No';
         $head[] = 'Moderator';
         while ($from <= $to) {
             $head[] = get_day(date_format($from, 'N')) . '<br/>' . date_format($from, 'd/m/Y');
             date_add($from, date_interval_create_from_date_string('1 days'));
         }
         $this->table->set_heading($head);
         $result = $this->user_event_model->get_user_all()->result();
         $i = 1;
         foreach ($result as $r) {
             $from = date_create(format_ymd($date_from));
             $to = date_create(format_ymd($date_to));
             $row[] = $i++;
             $row[] = $r->user;
             $j = 1;
             while ($from <= $to) {
                 $value = $this->absent_model->get_shift($r->user_kode, $event, date_format($from, 'Y-m-d'));
                 $row[] = form_dropdown($r->user_kode . '_' . date_format($from, 'dmy'), $this->master_model->dropdown('shift', ''), $value);
                 date_add($from, date_interval_create_from_date_string('1 days'));
                 $j++;
             }
             $this->table->add_row($row);
             unset($row);
         }
     }
     $xdata['table'] = $this->table->generate();
     $data['content'] = $this->load->view('absent', $xdata, true);
     $this->load->view('template', $data);
 }
Example #12
0
 function index()
 {
     $offset = $this->lib_general->value_get('offset', 0);
     $limit = $this->lib_general->value_get('limit', 10);
     $data['title'] = 'ACS - Barang';
     $data['action'] = site_url('barang/search' . $this->_filter());
     $data['add_btn'] = anchor('barang/add' . $this->_filter(), '<span class="glyphicon glyphicon-plus"></span> New', array('class' => 'btn btn-primary btn-sm'));
     $data['export_btn'] = anchor('barang/export' . $this->_filter(), '<span class="glyphicon glyphicon-export"></span> Export Excel 2007', array('class' => 'btn btn-primary btn-sm'));
     $this->table->set_template(tbl_tmp());
     $head_data = array('name' => 'Nama Barang', 'campaign_name' => 'Campaign', 'campaign_brand' => 'Brand');
     $heading[] = 'No';
     foreach ($head_data as $r => $value) {
         $heading[] = anchor('barang' . $this->_filter(array('order_column' => $r, 'order_type' => $this->lib_general->order_type($r))), $value . " " . $this->lib_general->order_icon($r));
     }
     $heading[] = 'Masuk';
     $heading[] = 'Keluar';
     $heading[] = 'Retur';
     $heading[] = 'Stok';
     $heading[] = 'Action';
     $this->table->set_heading($heading);
     $result = $this->mdl_barang->get()->result();
     $i = 1 + $offset;
     foreach ($result as $r) {
         $masuk = $this->mdl_barang_masuk->banyak($r->id)->row()->banyak;
         $keluar = $this->mdl_barang_keluar->banyak($r->id)->row()->banyak;
         $retur = $this->mdl_barang_keluar->retur($r->id)->row()->retur;
         $this->table->add_row($i++, anchor('barang/edit/' . $r->id . $this->_filter(), $r->name), $r->campaign_name, $r->campaign_brand, number_format($masuk), number_format($keluar), number_format($retur), number_format($masuk - $keluar + $retur), anchor('barang/edit/' . $r->id . $this->_filter(), '<span class="glyphicon glyphicon-edit"></span> Edit') . "&nbsp;|&nbsp;" . anchor('barang/delete/' . $r->id . $this->_filter(), '<span class="glyphicon glyphicon-trash"></span> Delete', array('onclick' => "return confirm('Are you sure')")));
     }
     $data['table'] = $this->table->generate();
     $total = $this->mdl_barang->count_all();
     $config = pag_tmp();
     $config['base_url'] = site_url("barang" . $this->_filter());
     $config['total_rows'] = $total;
     $config['per_page'] = $limit;
     $this->pagination->initialize($config);
     $data['pagination'] = $this->pagination->create_links();
     $data['total'] = 'Showing ' . ($offset + 1) . ' to ' . ($offset + $limit) . ' of ' . number_format($total) . ' entries';
     $this->template->display('barang', $data);
 }
Example #13
0
 public function index()
 {
     $this->table->set_template(tbl_tmp());
     $this->table->set_heading('No', 'Kendaraan', 'Tipe', 'Terakhir Ganti Oli Mesin', 'Status');
     $result = $this->kendaraan_mdl->get_all()->result();
     $i = 1;
     foreach ($result as $r) {
         $terakhir_ganti_oli = $this->reminder_mdl->terakhir_ganti_oli($r->kode);
         $this->table->add_row($i++, anchor('kendaraan/detail/' . $r->id, $r->nopol, array('target' => '_blank')), $r->tipe_nama, $terakhir_ganti_oli, olie_mesin_status($terakhir_ganti_oli));
     }
     $xdata['reminder_oli_mesin'] = $this->table->generate();
     $this->table->set_heading('No', 'Kendaraan', 'Tipe', 'Terakhir Servis Tunup', 'Status');
     $result = $this->kendaraan_mdl->get_all()->result();
     $i = 1;
     foreach ($result as $r) {
         $terakhir_tunup = $this->reminder_mdl->terakhir_tunup($r->kode);
         $this->table->add_row($i++, anchor('kendaraan/detail/' . $r->id, $r->nopol, array('target' => '_blank')), $r->tipe_nama, $terakhir_tunup, tunup_status($terakhir_tunup));
     }
     $xdata['reminder_tunup'] = $this->table->generate();
     $data['content'] = $this->load->view('home', $xdata, true);
     $this->load->view('template', $data);
 }
Example #14
0
 function age_umild()
 {
     $this->ci->table->set_template(tbl_tmp());
     $this->ci->table->add_row(array('data' => 'Week', 'rowspan' => 2, 'class' => 'table-header'), array('data' => 'Verified', 'colspan' => 5, 'class' => 'table-header'), array('data' => 'Total', 'rowspan' => 2, 'class' => 'table-header'), array('data' => 'All Status', 'colspan' => 5, 'class' => 'table-header'), array('data' => 'Total', 'rowspan' => 2, 'class' => 'table-header'));
     $this->ci->table->add_row(array('data' => '18 - 24', 'class' => 'table-header'), array('data' => '25 - 29', 'class' => 'table-header'), array('data' => '30 - 34', 'class' => 'table-header'), array('data' => '35 - 40', 'class' => 'table-header'), array('data' => '40+', 'class' => 'table-header'), array('data' => '18 - 24', 'class' => 'table-header'), array('data' => '25 - 29', 'class' => 'table-header'), array('data' => '30 - 34', 'class' => 'table-header'), array('data' => '35 - 40', 'class' => 'table-header'), array('data' => '40+', 'class' => 'table-header'));
     $result = $this->ci->mdl_report_online->age_umild()->result();
     $i = 1;
     $total = array(1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 0, 10 => 0, 11 => 0, 12 => 0, 13 => 0, 14 => 0, 15 => 0, 16 => 0, 17 => 0, 18 => 0, 19 => 0, 20 => 0, 21 => 0, 22 => 0, 23 => 0, 24 => 0, 25 => 0, 26 => 0);
     foreach ($result as $r) {
         $this->ci->table->add_row('Week&nbsp;' . $i++, number_format($r->vrem), number_format($r->vdew1), number_format($r->vdew2), number_format($r->vdew3), number_format($r->vtua), number_format($r->vtot), number_format($r->arem), number_format($r->adew1), number_format($r->adew2), number_format($r->adew3), number_format($r->atua), number_format($r->atot));
         $j = 1;
         $total[$j++] += $r->vrem;
         $total[$j++] += $r->vdew1;
         $total[$j++] += $r->vdew2;
         $total[$j++] += $r->vdew3;
         $total[$j++] += $r->vtua;
         $total[$j++] += $r->vtot;
         $total[$j++] += $r->arem;
         $total[$j++] += $r->adew1;
         $total[$j++] += $r->adew2;
         $total[$j++] += $r->adew3;
         $total[$j++] += $r->atua;
         $total[$j++] += $r->atot;
     }
     $tot[] = array('data' => 'Total', 'class' => 'table-footer');
     for ($i = 1; $i < $j; $i++) {
         $tot[$i] = array('data' => number_format($total[$i]), 'class' => 'table-footer');
     }
     $this->ci->table->add_row($tot);
     return $this->ci->table->generate();
 }
Example #15
0
 function index()
 {
     $data['title'] = 'ACS - Moderation Schedule BEAT';
     //--HARI INI--//
     $this->table->set_template(tbl_tmp());
     $this->table->set_heading(array('data' => 'SHIFT', 'width' => 20), 'MODERATOR');
     $shift_siang = get_moderator(siang_beat(date('Y-m-d')));
     $shift_malam = get_moderator(malam_beat(date('Y-m-d')));
     $this->table->add_row(array('data' => "<b>SIANG</b>"), array('data' => $shift_siang[1]));
     $this->table->add_row(array('data' => "<b>MALAM</b>"), array('data' => $shift_malam[1]));
     $data['table_sekarang'] = $this->table->generate();
     //--BULAN LALU--//
     unset($heading);
     $total_hari = date('d', strtotime('last day of last month'));
     $heading[] = array('data' => 'SHIFT', 'rowspan=2');
     for ($i = 1; $i <= $total_hari; $i++) {
         $heading[] = (date_format(date_create(date('Y-m-', strtotime('last day of last month')) . $i), "N") == 6 || date_format(date_create(date('Y-m-', strtotime('last day of last month')) . $i), "N") == 7 ? "<span style='color:red'>" . get_hari(date_format(date_create(date('Y-m-', strtotime('last day of last month')) . $i), "N")) . "</span>" : get_hari(date_format(date_create(date('Y-m-', strtotime('last day of last month')) . $i), "N"))) . "<br/>" . $i;
     }
     $this->table->set_heading($heading);
     unset($row);
     $row[] = array('data' => "<b>SIANG</b>");
     for ($i = 1; $i <= $total_hari; $i++) {
         $date = date_format(date_create(date('Y-m-', strtotime('last day of last month')) . $i), "Y-m-d");
         $shift = get_moderator(siang_beat($date));
         $row[] = array('data' => $shift[0], 'class' => 'mod_' . siang_beat($date));
     }
     $this->table->add_row($row);
     unset($row);
     $row[] = array('data' => "<b>MALAM</b>");
     for ($i = 1; $i <= $total_hari; $i++) {
         $date = date_format(date_create(date('Y-m-', strtotime('last day of last month')) . $i), "Y-m-d");
         $shift = get_moderator(malam_beat($date));
         $row[] = array('data' => $shift[0], 'class' => 'mod_' . malam_beat($date));
     }
     $this->table->add_row($row);
     unset($row);
     $data['table_bulan_lalu'] = $this->table->generate();
     //--BULAN INI--//
     unset($heading);
     $total_hari = date('d', strtotime('last day of this month'));
     $heading[] = array('data' => 'SHIFT', 'rowspan=2');
     for ($i = 1; $i <= $total_hari; $i++) {
         $heading[] = (date_format(date_create(date('Y-m-') . $i), "N") == 6 || date_format(date_create(date('Y-m-') . $i), "N") == 7 ? "<span style='color:red'>" . get_hari(date_format(date_create(date('Y-m-') . $i), "N")) . "</span>" : get_hari(date_format(date_create(date('Y-m-') . $i), "N"))) . "<br/>" . $i;
     }
     $this->table->set_heading($heading);
     $row[] = array('data' => "<b>SIANG</b>");
     for ($i = 1; $i <= $total_hari; $i++) {
         $date = date_format(date_create(date('Y-m-') . $i), "Y-m-d");
         $shift = get_moderator(siang_beat($date));
         $row[] = array('data' => $shift[0], 'class' => 'mod_' . siang_beat($date));
     }
     $this->table->add_row($row);
     unset($row);
     $row[] = array('data' => "<b>MALAM</b>");
     for ($i = 1; $i <= $total_hari; $i++) {
         $date = date_format(date_create(date('Y-m-') . $i), "Y-m-d");
         $shift = get_moderator(malam_beat($date));
         $row[] = array('data' => $shift[0], 'class' => 'mod_' . malam_beat($date));
     }
     $this->table->add_row($row);
     unset($row);
     $data['table_bulan_ini'] = $this->table->generate();
     //--BULAN DEPAN--//
     unset($heading);
     $total_hari = date('d', strtotime('last day of next month'));
     $heading[] = array('data' => 'SHIFT', 'rowspan=2');
     for ($i = 1; $i <= $total_hari; $i++) {
         $heading[] = (date_format(date_create(date('Y-m-', strtotime('last day of next month')) . $i), "N") == 6 || date_format(date_create(date('Y-m-', strtotime('last day of next month')) . $i), "N") == 7 ? "<span style='color:red'>" . get_hari(date_format(date_create(date('Y-m-', strtotime('last day of next month')) . $i), "N")) . "</span>" : get_hari(date_format(date_create(date('Y-m-', strtotime('last day of next month')) . $i), "N"))) . "<br/>" . $i;
     }
     $this->table->set_heading($heading);
     $row[] = array('data' => "<b>SIANG</b>");
     for ($i = 1; $i <= $total_hari; $i++) {
         $date = date_format(date_create(date('Y-m-', strtotime('last day of next month')) . $i), "Y-m-d");
         $shift = get_moderator(siang_beat($date));
         $row[] = array('data' => $shift[0], 'class' => 'mod_' . siang_beat($date));
     }
     $this->table->add_row($row);
     unset($row);
     $row[] = array('data' => "<b>MALAM</b>");
     for ($i = 1; $i <= $total_hari; $i++) {
         $date = date_format(date_create(date('Y-m-', strtotime('last day of next month')) . $i), "Y-m-d");
         $shift = get_moderator(malam_beat($date));
         $row[] = array('data' => $shift[0], 'class' => 'mod_' . malam_beat($date));
     }
     $this->table->add_row($row);
     unset($row);
     $data['table_bulan_depan'] = $this->table->generate();
     $this->template->display('mod_sche', $data);
 }
Example #16
0
 function week()
 {
     $this->ci->table->set_template(tbl_tmp());
     $this->ci->table->set_heading('No', 'Week', 'Count');
     $result = $this->ci->mdl_report_calculate->week()->result();
     $i = 1;
     $total = 0;
     foreach ($result as $r) {
         $this->ci->table->add_row($i++, "Week " . ($i - 1), number_format($r->count));
         $total += $r->count;
     }
     $this->ci->table->add_row(array('data' => 'Total', 'colspan' => '2'), array('data' => '<b>' . number_format($total) . '</b>'));
     return $this->ci->table->generate();
 }
Example #17
-20
 function index()
 {
     $offset = $this->lib_general->value_get('offset', 0);
     $limit = $this->lib_general->value_get('limit', 10);
     $data['title'] = 'ACS - Security';
     $data['action'] = site_url('user/search' . $this->_filter());
     $data['add_btn'] = anchor('user/add' . $this->_filter(), '<span class="glyphicon glyphicon-plus"></span> New', array('class' => 'btn btn-primary btn-sm'));
     $this->table->set_template(tbl_tmp());
     $head_data = array('fullname' => 'Fullname', 'username' => 'Username', 'level' => 'Level', 'ip_login' => 'Last IP Login', 'user_agent' => 'Last User Agent', 'date_login' => 'Last Login', 'status' => 'Status');
     $heading[] = 'No';
     foreach ($head_data as $r => $value) {
         $heading[] = anchor('user' . $this->_filter(array('order_column' => $r, 'order_type' => $this->lib_general->order_type($r))), $value . " " . $this->lib_general->order_icon($r));
     }
     $heading[] = 'Action';
     $this->table->set_heading($heading);
     $result = $this->mdl_user->get()->result();
     $i = 1 + $offset;
     foreach ($result as $r) {
         $this->table->add_row($i++, anchor('user/edit/' . $r->id . $this->_filter(), $this->template->get_user_image($r->photo, 'user-image-table img-circle') . ' ' . $r->fullname), $r->username, get_level($r->level), $r->ip_login, $r->user_agent, $r->date_login, get_status($r->status), anchor('user/edit/' . $r->id . $this->_filter(), '<span class="glyphicon glyphicon-edit"></span> Edit') . "&nbsp;|&nbsp;" . anchor('user/delete/' . $r->id . $this->_filter(), '<span class="glyphicon glyphicon-trash"></span> Delete', array('onclick' => "return confirm('Are you sure')")));
     }
     $data['table'] = $this->table->generate();
     $total = $this->mdl_user->count_all();
     $config = pag_tmp();
     $config['base_url'] = site_url("user" . $this->_filter());
     $config['total_rows'] = $total;
     $config['per_page'] = $limit;
     $this->pagination->initialize($config);
     $data['pagination'] = $this->pagination->create_links();
     $data['total'] = page_total($offset, $limit, $total);
     $this->template->display('user', $data);
 }