示例#1
0
 public function get_jurusan($limit = null, $batas = null)
 {
     $sql = "SELECT a.KD_JUR as KD_JUR,\r\n                b.NM_FAKUL as KD_FAKUL,\r\n                c.SINGKAT_UNIV as NM_UNIV,\r\n                a.KD_STRATA as KD_STRATA,\r\n                a.NM_JUR as NM_JUR,\r\n                a.ALMT_JUR as ALMT_JUR,\r\n                a.TELP_JUR as TELP_JUR,\r\n                a.PIC_JUR as PIC_JUR,\r\n                a.TELP_PIC_JUR as TELP_PIC_JUR,\r\n                a.STS_JUR as STS_JUR\r\n                FROM " . $this->_table . " a\r\n                LEFT JOIN " . $this->_tb_fakul . " b ON a.KD_FAKUL=b.KD_FAKUL\r\n                LEFT JOIN r_univ c ON b.KD_UNIV=c.KD_UNIV ";
     if (!is_null($limit) and !is_null($batas)) {
         $sql .= " LIMIT " . $limit . "," . $batas;
     }
     $result = $this->db->select($sql);
     $data = array();
     foreach ($result as $val) {
         $jur = new $this($this->registry);
         $jur->set_kode_jur($val['KD_JUR']);
         $jur->set_kode_fakul($val['KD_FAKUL'] . ',' . $val['NM_UNIV']);
         $strata = new Strata();
         $str_jur = $strata->get_by_id($val['KD_STRATA']);
         $jur->set_kode_strata($str_jur->nama_strata);
         $jur->set_nama($val['NM_JUR']);
         $jur->set_alamat($val['ALMT_JUR']);
         $jur->set_telepon($val['TELP_JUR']);
         $jur->set_pic($val['PIC_JUR']);
         $jur->set_telp_pic($val['TELP_PIC_JUR']);
         $jur->set_status($val['STS_JUR']);
         $data[] = $jur;
         unset($strata);
     }
     return $data;
 }
 public function editStrata($id = null)
 {
     $strata = new Strata();
     if ($id != "") {
         $data = $strata->get_by_id($id);
         $this->view->strata = $data;
         $this->view->data = $strata->get_All();
         $this->view->render('admin/edit_strata');
     } else {
         header('location:' . URL . 'admin/addStrata/');
     }
 }
 public function cetak_uskripsi($id = null)
 {
     if ($id != "") {
         $elem = new ElemenBeasiswa($this->registry);
         $elem->set_kd_d($id);
         $data_elemen = $elem->get_elem_by_id($elem);
         $this->view->elemen = $data_elemen;
         $penerima_elemen = new PenerimaElemenBeasiswa();
         $data_penerima_elemen = $penerima_elemen->get_by_elemen($id);
         $this->view->penerima_elemen = $data_penerima_elemen;
         $this->view->pb = new Penerima($this->registry);
         $bank = new Bank($this->registry);
         $universitas = new Universitas($this->registry);
         $data_univ = $universitas->get_univ_by_jur($data_elemen->get_kd_jur());
         $jurusan = new Jurusan($this->registry);
         $jurusan->set_kode_jur($data_elemen->get_kd_jur());
         $data_jurusan = $jurusan->get_jur_by_id($jurusan);
         $pejabat = new Pejabat();
         $ppk = $pejabat->get_by_jabatan("1");
         $pj = $pejabat->get_by_jabatan("2");
         $bdr = $pejabat->get_by_jabatan("3");
         $strata = new Strata();
         $data_strata = $strata->get_by_id($data_jurusan->get_kode_strata());
         $this->view->univ = $data_univ;
         $this->view->jur = $data_jurusan;
         $this->view->strata = $data_strata;
         $this->view->ppk = $ppk;
         $this->view->pj = $pj;
         $this->view->bdr = $bdr;
         $this->view->bank = $bank;
         $this->view->load('bantuan/cetak_uskripsi');
     }
 }