public function cetak_daftar_penerima()
 {
     $kd_univ = $_POST['univ'];
     $thn = $_POST['thn'];
     $status = $_POST['status'];
     $this->view->univ = '';
     $this->view->thn = '';
     $this->view->status = '';
     $pb = new Penerima($this->registry);
     $role = Session::get('role');
     if ($kd_univ == 0 && $thn == 0 && $status == 0) {
         if ($role == 2) {
             $this->view->d_pb = $pb->get_penerima($this->kd_user);
         } else {
             $this->view->d_pb = $pb->get_penerima();
         }
     } else {
         if ($role == 2) {
             $this->view->d_pb = $pb->get_penerima_filter($kd_univ, $thn, $status, $this->kd_user);
         } else {
             $this->view->d_pb = $pb->get_penerima_filter($kd_univ, $thn, $status, $this->kd_user);
         }
     }
     if ($kd_univ != 0) {
         $univ = new Universitas($this->registry);
         $univ->set_kode_in($kd_univ);
         $univ = $univ->get_univ_by_id($univ);
         $this->view->univ = $univ->get_nama();
     }
     if ($thn != 0) {
         $this->view->thn = $thn;
     }
     if ($status != 0) {
         $sts = new Status();
         $status = $sts->get_by_id($status);
         $this->view->status = $status->nm_status;
     }
     $this->view->load('riwayat_tb/cetak_daftar_penerima');
 }
Exemplo n.º 2
0
 public function dialog_add_pb()
 {
     $pb = new Penerima($this->registry);
     $this->view->d_pb = $pb->get_penerima();
     $this->view->load('riwayat_tb/dialog_add_pb_sc');
 }