public function saveUangSkripsi()
 {
     if (isset($_POST['rekam_uskripsi'])) {
         if (isset($_POST['js']) && $_POST['js'] == 1) {
             header('location:' . URL . 'elemenBeasiswa/viewSkripsi');
         }
         if ($_POST['setuju'] != "" && $_POST['r_elem'] != "" && $_POST['kode_jur'] != "" && $_POST['tahun_masuk'] != "" && $_POST['biaya_skripsi'] != "" && $_POST['total_bayar'] != "") {
             $elem = new ElemenBeasiswa();
             $pb = $_POST['setuju'];
             $jml_peg = count($pb);
             $elem->set_jml_peg($jml_peg);
             $elem->set_kd_r($_POST['r_elem']);
             $elem->set_kd_jur($_POST['kode_jur']);
             $elem->set_thn_masuk($_POST['tahun_masuk']);
             $elem->set_biaya_per_peg(str_replace(',', '', $_POST['biaya_skripsi']));
             $elem->set_total_bayar(str_replace(',', '', $_POST['total_bayar']));
             //        $elem->set_no_sp2d($_POST['no_sp2d']);
             //        $elem->set_tgl_sp2d(date('Y-m-d', strtotime($_POST['tgl_sp2d'])));
             //        $elem->set_file_sp2d($_POST['fupload']);
             //var_dump($elem);
             //echo $kd_elemen_beasiswa;
             //exit();
             //var_dump($elem);
             $kd_elemen_beasiswa = $elem->add_elem($elem);
             if ($kd_elemen_beasiswa != "") {
                 foreach ($pb as $val) {
                     $penerima_elemen = new PenerimaElemenBeasiswa();
                     $penerima_elemen->kd_elemen_beasiswa = $kd_elemen_beasiswa;
                     $penerima_elemen->kd_pb = $val;
                     $penerima_elemen->add($penerima_elemen);
                 }
             }
             ClassLog::write_log("elemen beasiswa", "ubah uang penelitian", "kd_el." . $kd_elemen_beasiswa);
             //header('location:' . URL . 'elemenBeasiswa/viewUangBuku');
             $url = URL . 'elemenBeasiswa/viewSkripsi';
             echo '<script> alert("Data berhasil disimpan") </script>';
             echo '<script language="JavaScript"> window.location.href ="' . $url . '" </script>';
         } else {
             header('location:' . URL . 'elemenBeasiswa/addSkripsi');
         }
     } else {
         header('location:' . URL . 'elemenBeasiswa/addSkripsi');
     }
 }