Пример #1
0
 public function updJurusan()
 {
     $jur = new Jurusan($this->registry);
     $kd_jur = $_POST['kd_jur'];
     $fak = $_POST['fakultas'];
     $strata = $_POST['strata'];
     $nama = $_POST['nama'];
     $alamat = $_POST['alamat'];
     $telepon = $_POST['telepon'];
     $pic_jur = $_POST['pic_jur'];
     $telp_pic_jur = $_POST['telp_pic_jur'];
     $status = $_POST['status'];
     $jur->set_kode_fakul($fak);
     $jur->set_kode_strata($strata);
     $jur->set_nama($nama);
     $jur->set_alamat($alamat);
     $jur->set_telepon($telepon);
     $jur->set_pic($pic_jur);
     $jur->set_telp_pic($telp_pic_jur);
     $jur->set_status($status);
     $jur->set_kode_jur($kd_jur);
     if (!$jur->update_jurusan()) {
         $fakul = new Fakultas($this->registry);
         $strata = new Strata();
         $this->view->d_ubah = $jur;
         $this->view->error = $jur->get_error();
         $this->view->fakul = $fakul->get_fakul();
         $this->view->strata = $strata->get_All();
         $this->view->data = $jur->get_jurusan();
         $this->view->render('admin/jurusan');
     } else {
         ClassLog::write_log('jurusan', 'ubah', $nama);
         header('location:' . URL . 'admin/addJurusan');
     }
 }