public function addpb($id) { $st = new SuratTugas($this->registry); $pb = new Penerima($this->registry); $univ = new Universitas($this->registry); $bank = new Bank($this->registry); $st->set_kd_st($id); $pb->set_st($id); $this->view->kd_st = $id; $this->view->d_bank = $bank->get_bank(); $this->view->d_univ = $univ->get_univ(); if (Session::get('role') == 2) { $this->view->d_st = $st->get_surat_tugas_by_id($st, $this->kd_user); $this->view->d_pb = $pb->get_penerima_by_st($pb, $this->kd_user); } else { $this->view->d_st = $st->get_surat_tugas_by_id($st); $this->view->d_pb = $pb->get_penerima_by_st($pb); } $this->view->d_th_masuk = $st->get_list_th_masuk(); // var_dump($this->view->d_st); $this->view->render('riwayat_tb/pb_to_st'); }
public function get_nip_data() { $tmp = $_POST['param']; $tmp = explode(",", $tmp); $nip = $tmp[0]; $is_child = $tmp[1] != 0; echo "<ul>"; if ($is_child) { $pb = new Penerima($this->registry); $pb->set_st($tmp[1]); $d_pb = $pb->get_penerima_by_st($pb, $this->kd_user); foreach ($d_pb as $v) { echo "<li onClick=\"fill('" . $v->get_nip() . "')\">" . $v->get_nip() . "</br>" . $v->get_nama() . "</li>"; } } else { $pb = new Pegawai($this->registry); $pb->set_kd_peg($nip); $d_pb = $pb->get_penerima_by_nip($pb, true); foreach ($d_pb as $v) { echo "<li onClick=\"fill('" . $v->get_kd_peg() . "')\">" . $v->get_kd_peg() . "</br>" . $v->get_nama() . "</li>"; } } echo "</ul>"; }