Пример #1
1
 public function updST()
 {
     $st = new JenisSuratTugas($this->registry);
     if (isset($_POST['upd_st'])) {
         $kd_jenis_st = $_POST['kd_jenis_st'];
         $nama = $_POST['nama'];
         $keterangan = $_POST['keterangan'];
         $st->set_kode($kd_jenis_st);
         $st->set_nama($nama);
         $st->set_keterangan($keterangan);
         if (!$st->update_jst()) {
             $this->view->d_ubah = $st;
             $this->view->error = $st->get_error();
             $this->view->data = $st->get_jst();
             $this->view->render('admin/surat_tugas');
         }
     }
     header('location:' . URL . 'admin/addST');
 }
 private function for_edit_pb($kode_pb)
 {
     if (Session::get('role') != 2) {
         $this->profil($kode_pb);
     }
     $pb = new Penerima($this->registry);
     //mendapatkan informasi pb
     $st = new SuratTugas($this->registry);
     //mendapatkan informasi surat tugas
     $bank = new Bank($this->registry);
     //mendapatkan nama bank
     $jst = new JenisSuratTugas($this->registry);
     //mendapatkan jenis surat tugas
     $jur = new Jurusan($this->registry);
     $univ = new Universitas($this->registry);
     $nilai = new Nilai($this->registry);
     $cuti = new Cuti($this->registry);
     $mas = new MasalahPenerima($this->registry);
     $pemb = new PemberiBeasiswa();
     $pb->set_kd_pb($kode_pb);
     $this->view->d_pb = $pb->get_penerima_by_id($pb, $this->kd_user);
     $st->set_kd_st($this->view->d_pb->get_st());
     $this->view->d_st = $st->get_surat_tugas_by_id($st, $this->kd_user);
     $pemb = $pemb->get_by_id($this->view->d_st->get_pemberi());
     $this->view->d_pemb = $pemb->nama_pemberi;
     $this->view->d_bank = $bank->get_bank_id($this->view->d_pb->get_bank());
     $this->view->t_bank = $bank->get_bank();
     $jur->set_kode_jur($this->view->d_pb->get_jur());
     $this->view->d_jur = $jur->get_jur_by_id($jur);
     $jst->set_kode($this->view->d_st->get_jenis_st());
     $this->view->t_jst = $jst->get_jst();
     $this->view->d_jst = $jst->get_jst_by_id($jst);
     $this->view->d_univ = $univ->get_univ_by_jur($this->view->d_jur->get_kode_jur());
     $this->view->d_nil = $nilai->get_nilai($pb);
     $this->view->d_cur_ipk = $nilai->get_current_ipk($pb);
     $this->view->d_cuti = $cuti->get_cuti($this->kd_user, $pb);
     $this->view->d_rwt_beas = $pb->get_penerima_by_column($pb, $this->kd_user, 'nip', true);
     $this->view->d_mas = $mas->get_masalah($pb);
     $this->view->render('profil/ubah_profil_v2');
 }