コード例 #1
0
ファイル: master.php プロジェクト: adamprasetia/ksk
 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);
 }
コード例 #2
0
ファイル: user.php プロジェクト: adamprasetia/ksk
 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);
 }
コード例 #3
0
ファイル: servis_rekap.php プロジェクト: adamprasetia/ksk
 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);
 }
コード例 #4
0
ファイル: individual.php プロジェクト: adamprasetia/acs
 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);
 }
コード例 #5
0
ファイル: servis.php プロジェクト: adamprasetia/ksk
 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);
 }
コード例 #6
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);
 }
コード例 #7
0
ファイル: campaign.php プロジェクト: adamprasetia/acs
 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);
 }
コード例 #8
0
ファイル: anggaran_rekap.php プロジェクト: adamprasetia/ksk
 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);
 }
コード例 #9
-20
ファイル: user.php プロジェクト: adamprasetia/acs
 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);
 }