Exemple #1
0
 public function registrasi()
 {
     $this->config->load('grocery_crud');
     $this->config->set_item('grocery_crud_file_upload_allow_file_types', 'pdf');
     $this->config->set_item('grocery_crud_file_upload_max_file_size', '200KB');
     $c = new grocery_crud();
     $c->set_table('registrasi');
     // $c->unset_back_to_list();
     $c->unset_edit();
     //$c->unset_delete();
     $c->unset_read();
     $c->unset_list();
     if ($this->uri->segment(2) == 'registrasi' && $this->uri->segment(3) == NULL) {
         redirect($this->router->fetch_class() . '/' . $this->router->fetch_method() . '/add');
     }
     $c->set_rules('email', 'Email', 'required|valid_email');
     // unset field
     //        $c->unset_fields('tanggal_member', 'pengajuan', '');
     $c->unset_fields('tanggal_member', 'pengajuan', 'file_surat_pernyataan');
     $c->field_type('deskripsi_perusahaan', 'text');
     $c->field_type('alamat', 'text');
     $c->callback_add_field('syarat_ketentuan', function () {
         return '<input type="radio" maxlength="50" value="1" name="syarat_ketentuan">&nbsp;&nbsp;Dengan mencetang tanda ini berarti Anda telah menyetujui syarat & ketentuan yang berlaku';
     });
     $c->display_as('surat_ket_domisili', 'Nomor Surat Keterangan Domisili');
     $c->display_as('siup', 'Nomor SIUP/Perizinan Lainnya');
     $c->display_as('npwp', 'Nomor NPWP');
     $c->display_as('file_siup', 'SIUP/Perizinan Lainnya');
     $c->display_as('file_surat_ket_domisili', 'Surat Keterangan Domisili');
     $c->unset_texteditor('deskripsi_perusahaan', 'full_text');
     $c->unset_texteditor('alamat', 'full_text');
     $this->load->config('grocery_crud');
     $this->config->set_item('grocery_crud_file_upload_allow_file_types', 'pdf');
     $c->set_field_upload('file_surat_ket_domisili', 'assets/uploads/file_register');
     $c->set_field_upload('file_siup', 'assets/uploads/file_register');
     $c->required_fields('syarat_ketentuan', 'nama_perusahaan', 'direktur_utama', 'contact_person', 'email', 'alamat', 'provinsi', 'kota', 'npwp', 'akte_perusahaan', 'siup', 'file_akte', 'file_siup');
     $c->set_relation('kota', 'ref_kota', 'kota');
     $c->set_relation('provinsi', 'ref_provinsi', 'provinsi');
     $c->callback_field('email', function ($value, $row) {
         return '<input type="text" value="' . $value . '" name="email" id="field-email"> <span style="color:red; font-size:10px">*) Pastikan alamat email yang Anda masukkan valid</span>';
     });
     //$c->callback_insert(array($this, 'after_registrasi'));
     if ($this->uri->segment(3) == 'success') {
         redirect('umum/after_registrasi');
     }
     $output = $c->render();
     $state = $c->getState();
     $state_info = $c->getStateInfo();
     $this->logs();
     $this->load->view('umum/registrasi', $output);
 }
Exemple #2
0
 public function index()
 {
     $crud = new grocery_crud();
     $crud->set_table('usuario_biblioteca');
     $crud->set_subject('Usuarios');
     $crud->required_fields('nombre', 'apellidos', 'telefono', 'direccion', 'correo', 'tipo_credencial');
     $crud->display_as('nombre', 'Nombre')->display_as('apellidos', 'Apellidos')->display_as('telefono', 'Telefono')->display_as('direccion', 'Direccion')->display_as('correo', 'E-mail')->display_as('tipo_credencial', 'Tipo credencial')->display_as('contrasena', 'Contraseña');
     $output = $crud->render();
     $this->_example_output($output);
 }
Exemple #3
0
 function admi()
 {
     $crud = new grocery_crud();
     $crud->set_table('libro');
     $crud->set_subject('Libros');
     $crud->required_fields('clasificacion', 'titulo', 'autor', 'editorial', 'cantidad');
     $crud->columns('clasificacion', 'titulo', 'autor', 'editorial', 'ISBN', 'cantidad', 'cantidadDisponible', 'estado');
     $crud->display_as('cantidadDisponible', 'Libros Disponibles')->display_as('cantidad', 'Libros en Biblioteca');
     $crud->add_fields('clasificacion', 'titulo', 'autor', 'editorial', 'cantidad', 'ISBN', 'estado');
     $crud->edit_fields('clasificacion', 'titulo', 'autor', 'editorial', 'cantidad', 'ISBN', 'estado');
     $crud->add_action('Prestamos', 'http://www.fancyicons.com/free-icons/155/quartz/png/16/books_16.png', '', '', array($this, 'just_a_test'));
     $output = $crud->render();
     $this->_example_outputADM($output);
 }
 public function laporan_berkala()
 {
     $c = new grocery_crud();
     $c->set_table('dokumen_skt');
     // if($this->glo_jenis_permo != ''){
     $c->unset_operations();
     $c->columns('id_permohonan', 'no_dokumen', 'mulai_masa_berlaku', 'akhir_masa_berlaku', 'file_dokumen');
     $c->where('dokumen_skt.id_perusahaan', $this->session->userdata('id_perusahaan'));
     $c->field_type('id_perusahaan', 'hidden', $this->session->userdata('id_perusahaan'));
     $c->set_field_upload('file_dokumen', 'assets/uploads/file_skt');
     $c->display_as('id_permohonan', 'Bidang Jasa');
     $c->add_action('Proses Laporan | ', 'sd', 'perusahaan/proses_laporan/proses', 'ui-icon-plus');
     $c->add_action('Update Data | ', 'sd', 'perusahaan/proses_laporan/update', 'ui-icon-plus');
     $c->add_action('View Data', 'sd', 'perusahaan/proses_laporan/view', 'ui-icon-plus');
     $c->callback_column('id_permohonan', function ($value, $row) {
         $ada = NULL;
         $data_permohonan = select('*', 'permohonan', array('id_permohonan' => $value));
         $bidang_usaha = select('*', 'ref_bidang_usaha', array('id_bidang_usaha' => $data_permohonan->bidang_usaha));
         $sub_bidang = select('*', 'ref_sub_bidang', array('id_sub_bidang' => $data_permohonan->sub_bidang));
         return $bidang_usaha->bidang_usaha . '/' . $sub_bidang->sub_bidang;
     });
     //$c->set_relation('id_permohonan', 'ref_bidang_usaha', 'bidang_usaha');
     // $c->set_relation('lokasi', 'ref_kota', 'kota', null, 'id_kota');
     $output = $c->render();
     $this->logs();
     $level = $this->session->userdata('level');
     if ($level != NULL) {
         if ($level == 1) {
             $this->load->view('level1/view_list', $output);
         } else {
             redirect('all_users/dashboard');
         }
     } elseif ($level == NULL) {
         redirect('umum/logout');
     }
 }
Exemple #5
0
 function tabla()
 {
     $fecha = date("Y/m/d");
     $crud = new grocery_crud();
     $crud->set_table('prestamo');
     $crud->set_subject('Prestamos');
     $crud->required_fields('Fecha_salida', 'Fecha_entrega');
     $crud->display_as('idUsuario', 'Nombre de Usuario')->display_as('idLibro', 'Nombre del libro');
     $crud->columns('idLibro', 'idUsuario', 'fecha_salida', 'fecha_entrega');
     $crud->add_action('Entrega', 'https://cdn3.iconfinder.com/data/icons/musthave/16/Check.png', '', '', array($this, 'redirigir'));
     $crud->unset_add();
     $crud->unset_edit();
     $crud->unset_delete();
     $crud->unset_print();
     $crud->unset_export();
     $crud->set_relation('idLibro', 'libro', 'titulo');
     $crud->set_relation('idUsuario', 'usuario_biblioteca', '{nombre} {apellidos}');
     $crud->field_type('fecha_salida', 'hidden', $fecha);
     $output = $crud->render();
     $this->_example_output($output);
 }
Exemple #6
0
 public function laporan_berkala()
 {
     $c = new grocery_crud();
     $c->set_table('dokumen_skt');
     // if($this->glo_jenis_permo != ''){
     $c->unset_operations();
     $c->columns('bidang_jasa', 'no_dokumen', 'mulai_masa_berlaku', 'akhir_masa_berlaku', 'file_dokumen', 'pilihan');
     $c->set_relation('id_permohonan', 'permohonan', 'id_permohonan');
     $c->where('selesai', 2);
     $c->where('dokumen_skt.id_perusahaan', $this->session->userdata('id_perusahaan'));
     $c->field_type('id_perusahaan', 'hidden', $this->session->userdata('id_perusahaan'));
     $c->field_type('id_permohonan', 'hidden', $this->session->userdata('id_perusahaan'));
     $c->set_field_upload('file_dokumen', 'assets/uploads/file_skt');
     $c->display_as('bidang_jasa', 'Bidang Jasa');
     //$c->add_action('Proses', 'sd', 'perusahaan/proses_laporan/update','ui-icon-plus');
     /* $c->add_action('(2) Buat Laporan', 'sd', 'perusahaan/proses_laporan/view','ui-icon-plus');
     		$c->add_action('(3) Upload Laporan  ', 'sd', 'perusahaan/proses_laporan/proses','ui-icon-plus'); */
     $c->callback_column('pilihan', function ($value, $row) {
         $pelaporan = $this->model->select('*', 'pelaporan_periodik', array('id_permohonan' => $row->id_permohonan, 'status_laporan' => 2), array('id_pelaporan_periodik', 'desc'));
         if ($pelaporan != NULL) {
             return '<a href="' . base_url() . 'perusahaan/proses_laporan/update/' . $row->id_permohonan . '">Proses</a> | Revisi <a class="link-pilih" title="Edit data" href="' . base_url() . 'perusahaan/edit_laporan_berkala/' . $row->id_permohonan . '"><img class="mybtn-edit"></a>';
         } else {
             return '<a href="' . base_url() . 'perusahaan/proses_laporan/update/' . $row->id_permohonan . '">Proses</a>';
         }
     });
     $c->callback_column('bidang_jasa', function ($value, $row) {
         $ada = NULL;
         $data_permohonan = select('*', 'permohonan', array('id_permohonan' => $row->id_permohonan));
         $bidang_usaha = select('*', 'ref_bidang_usaha', array('id_bidang_usaha' => $data_permohonan->bidang_usaha));
         $sub_bidang = select('*', 'ref_sub_bidang', array('id_sub_bidang' => $data_permohonan->sub_bidang));
         return $bidang_usaha->bidang_usaha . '/' . $sub_bidang->sub_bidang;
     });
     $output = $c->render();
     $this->logs();
     $level = $this->session->userdata('level');
     $status = $this->session->userdata('status_lap_periodik');
     if ($level != NULL) {
         if ($level == 1 && $status == 1) {
             $this->load->view('level1/view_list', $output);
         } else {
             redirect('all_users/dashboard');
         }
     } elseif ($level == NULL) {
         redirect('umum/logout');
     }
 }
Exemple #7
0
 public function pengajuan_skt_diterima_naik()
 {
     // merubah status_user menjadi dokumen lengkap
     $c = new grocery_crud();
     $c->set_table('disposisi');
     //$c->unset_delete();
     $c->unset_edit();
     $last_disposisi = $this->model->select('*', 'disposisi', array('id_disposisi' => $this->uri->segment(4)));
     $level = $this->session->userdata('level');
     $c->field_type('user_asal', 'hidden', $this->session->userdata('id_user'));
     $c->field_type('id_parent', 'hidden', $last_disposisi->id_disposisi);
     // /$c->field_type('catatan', 'text');
     $c->display_as('id_perusahaan', 'nama perusahaan');
     //lagi di level 2 didisposisi ke level 4
     if ($level == 6) {
         $c->field_type('status_progress', 'hidden', '9');
     } elseif ($level == 5) {
         # code...
         $c->field_type('status_progress', 'hidden', '11');
     } elseif ($level == 4) {
         $c->field_type('status_progress', 'hidden', '12');
     } elseif ($level == 3) {
         $c->field_type('status_progress', 'hidden', '13');
     }
     //untuk polih user tujuan
     if ($level == 6) {
         $level = 5;
     } elseif ($level == 5) {
         $level = 4;
     } elseif ($level == 4) {
         $level = 3;
     } elseif ($level == 3) {
         $level = 2;
     }
     $l4 = $this->model->selects('*', 'users', array('level' => $level));
     foreach ($l4 as $key => $l4o) {
         # code...
         $ListUser = array($l4o->id_user => $l4o->nama_lengkap);
     }
     $c->field_type('user_tujuan', 'dropdown', $ListUser);
     $c->set_relation('id_perusahaan', 'biodata_perusahaan', 'nama_perusahaan', array('id_perusahaan' => $last_disposisi->id_perusahaan));
     $c->unset_fields('tanggal_masuk', 'tanggal_selesai', 'nilai', 'catatan', 'id_permohonan');
     $c->callback_after_insert(array($this, 'update_pengajuan_skt_diterima_naik'));
     $output = $c->render();
     $state = $c->getState();
     $state_info = $c->getStateInfo();
     if ($state == 'success') {
         $level = $this->session->userdata('level');
         if ($level == 6) {
             redirect('all_admin/konsep_dokumen_skt/add/' . $this->uri->segment(4));
         } elseif ($level == 5) {
             redirect('all_admin/no_dokumen_skt/add/' . $this->uri->segment(4));
         } else {
             redirect(base_url('all_admin/daftar_pengajuan_skt_admin_naik'));
         }
     }
     $level = $this->session->userdata('level');
     if ($level != NULL) {
         $this->load->view('level' . $level . '/view_list', $output);
     } elseif ($level == NULL) {
         redirect('umum/logout');
     }
 }
Exemple #8
0
 public function ref_sub_bagian_sub_bidang()
 {
     $c = new grocery_crud();
     $c->set_table('ref_sub_bagian_sub_bidang');
     $c->required_fields('sub_bagian_sub_bidang');
     $c->set_crud_url_path(base_url(strtolower(__CLASS__ . "/" . __FUNCTION__)), base_url(strtolower(__CLASS__ . "/menej_ref")));
     $c->display_as('id_bagian_sub_bidang', 'Bagian Sub Bidang');
     $c->set_relation('id_bagian_sub_bidang', 'ref_bagian_sub_bidang', 'bagian_sub_bidang');
     $output = $c->render();
     $this->logs();
     if ($c->getState() != 'list') {
         $this->menej_ref($output);
     } else {
         return $output;
     }
 }
Exemple #9
0
   public function lihat_catatan_evaluator()
   {
       $this->config->load('grocery_crud');
       $this->config->set_item('grocery_crud_dialog_forms', true);
       $this->config->set_item('grocery_crud_default_per_page', 10);
       $this->load->config('grocery_crud');
       $c = new grocery_crud();
       $c->set_table('pelaporan_periodik');
       $c->columns('catatan_evaluator', 'id_evaluator');
       $c->set_relation('id_evaluator', 'users', 'nama_lengkap');
       $c->fields('id_evaluator', 'catatan_evaluator');
       $c->display_as('id_evaluator', 'Nama Evaluator');
       //$c->field_type('id_evaluator', 'hidden');
       $c->callback_field('catatan_evaluator', function ($value, $row) {
           $isi = '<script>
   $("#catatan_evaluator_display_as_box").remove();
   $("div.crud-form div.mDiv div.ftitle").remove();
   $("#cancel-button").remove();
   $(".pDiv").css("border", "none");
   $(".form-div").css("border", "none");
   $("#id_evaluator_display_as_box").css({"width":"auto","margin-right":"7px"});
   $(".ui-dialog-content").dialog( "option", "height", 430 );
   $(".ui-dialog-content").dialog( "option", "width", 650 );';
           if ($value != NULL) {
               $isi .= 'CKEDITOR.replace( "content_template",
       {
        removePlugins: "toolbar",
        height : 200,
        width : 550,
        tabSpaces : 4,
        readOnly : true
    });</script><hr style="margin-top:0px!important"/>
 <textarea id="content_template" class="ckeditor">' . $value . '</textarea>';
           } else {
               $isi .= '</script><hr style="margin-top:0px!important"/><span><b>Tidak ada catatan</b></span>';
           }
           return $isi;
       });
       $c->set_crud_url_path(base_url(strtolower(__CLASS__ . "/" . __FUNCTION__)), base_url(strtolower(__CLASS__ . "/laporan_berkala_evaluator")));
       $output = $c->render();
       if ($c->getState() != 'read') {
           redirect('all_admin/laporan_berkala_kasie');
       } else {
           $this->laporan_berkala_kasie($output);
       }
   }
Exemple #10
0
 public function csr()
 {
     $c = new grocery_crud();
     $c->set_table('csr');
     $c->where('id_perusahaan', $this->session->userdata('id_perusahaan'));
     $c->required_fields('kegiatan', 'waktu', 'lokasi');
     $c->set_relation('lokasi', 'ref_kota', 'kota', null, 'id_kota');
     $c->field_type('id_perusahaan', 'hidden', $this->session->userdata('id_perusahaan'));
     $c->set_field_upload('file_csr', 'assets/uploads/file_csr');
     $c->unset_fields('catatan_petugas', 'status_pemakaian');
     $c->unset_columns('id_perusahaan', 'catatan_petugas', 'status_pemakaian');
     $c->display_as('file_csr', 'File CSR');
     //$c->unset_delete();
     $output = $c->render();
     $this->logs();
     $level = $this->session->userdata('level');
     if ($level != NULL) {
         if ($level == 1) {
             $this->load->view('level1/skt_tabel', $output);
         } else {
             redirect('all_users/dashboard');
         }
     } elseif ($level == NULL) {
         redirect('umum/logout');
     }
 }
Exemple #11
0
 public function pengajuan_skt_diterima_dtlm($id_perusahaan = NULL)
 {
     // merubah status_user menjadi dokumen lengkap
     $c = new grocery_crud();
     $c->set_table('disposisi');
     //$c->unset_delete();
     $c->unset_edit();
     // $c->field_type('id_perusahaan', 'hidden', $id_perusahaan);
     $last_disposisi = $this->model->select('*', 'disposisi', array('id_perusahaan' => $this->uri->segment(4)));
     $c->field_type('user_asal', 'hidden', $this->session->userdata('id_user'));
     $c->field_type('id_parent', 'hidden', $last_disposisi->id_disposisi);
     $c->field_type('catatan', 'text');
     $c->display_as('id_perusahaan', 'nama_perusahaan');
     $query = $this->db->query('SELECT * FROM users WHERE level=4 AND status=1')->result_array();
     foreach ($query as $key => $row) {
         $listDtlm = array($row['id_user'] => $row['nama_lengkap']);
     }
     $c->field_type('user_tujuan', 'dropdown', $listDtlm);
     $c->set_relation('id_perusahaan', 'biodata_perusahaan', 'nama_perusahaan', array('id_perusahaan' => $this->uri->segment(4)));
     $c->unset_fields('tanggal_masuk', 'tanggal_selesai');
     $c->callback_after_insert(array($this, 'update_pengajuan_skt_diterima'));
     $output = $c->render();
     $state = $c->getState();
     $state_info = $c->getStateInfo();
     if ($state == 'success') {
         redirect(base_url('hal/daftar_pengajuan_skt_baru_admin'));
     }
     $this->load->view('level2/view_list', $output);
 }