Linux puskom-ProLiant-DL385-Gen10 5.4.0-150-generic #167~18.04.1-Ubuntu SMP Wed May 24 00:51:42 UTC 2023 x86_64
/
var
/
www
/
html
/
bkd
/
formproses
/
/var/www/html/bkd/formproses/sql_proses.php
<? $kode_fak='';$kode_prodi=''; $kode_fungsional ='';$kode_golongan='';$kode_jnsdosen='';$nira_ass1='';$nira_ass2='';$nip_kajur =''; if ($frm=='Profil'){ if ( isset($_POST['txt_nosertifikat']) ) {$txt_nosertifikat=$_POST['txt_nosertifikat'];} //if ( isset($_POST['txt_nip']) ) {$txt_nip = str_replace("'", "\'", $_POST['txt_nip']);} if ( isset($_POST['txt_nidn']) ) {$txt_nidn = str_replace("'", "\'", $_POST['txt_nidn']);} if ( isset($_POST['txt_nama']) ) {$txt_nama = str_replace("'", " ", $_POST['txt_nama']);} if ( isset($_POST['cbokode_fak']) ) {$kode_fak = str_replace("'", "\'", $_POST['cbokode_fak']);} if ( isset($_POST['cbokode_prodi']) ) {$kode_prodi = str_replace("'", "\'", $_POST['cbokode_prodi']);} if ( isset($_POST['cbokode_fungsional']) ) {$kode_fungsional = str_replace("'", "\'", $_POST['cbokode_fungsional']);} if ( isset($_POST['cbokode_golongan']) ) {$kode_golongan = str_replace("'", "\'", $_POST['cbokode_golongan']);} if ( isset($_POST['txt_pend_s1']) ) {$pend_s1 = str_replace("'", "\'", $_POST['txt_pend_s1']);} if ( isset($_POST['txt_pend_s2']) ) {$pend_s2 = str_replace("'", "\'", $_POST['txt_pend_s2']);} if ( isset($_POST['txt_pend_s3']) ) {$pend_s3 = str_replace("'", "\'", $_POST['txt_pend_s3']);} if ( isset($_POST['cbokode_jnsdosen']) ) {$kode_jnsdosen = str_replace("'", "\'", $_POST['cbokode_jnsdosen']);} if ( isset($_POST['txt_bidang_ilmu']) ) {$bidang_ilmu = str_replace("'", "\'", $_POST['txt_bidang_ilmu']);} if ( isset($_POST['txt_nohp']) ) {$nohp = str_replace("'", "\'", $_POST['txt_nohp']);} if ( isset($_POST['txt_email']) ) {$email = str_replace("'", "\'", $_POST['txt_email']);} //if ( isset($_POST['nira_ass1']) ) {$nira_ass1 = str_replace("'", "\'", $_POST['nira_ass1']);} //if ( isset($_POST['nira_ass2']) ) {$nira_ass2 = str_replace("'", "\'", $_POST['nira_ass2']);} if ( isset($_POST['nip_kajur']) ) {$nip_kajur = str_replace("'", "\'", $_POST['nip_kajur']);} $err = 0; $nipx= $_SESSION['ses_nip']; if ($txt_nip != $_SESSION['ses_nip']){ $query = "select * from $app[tdb]m_dosen where (nip = '$txt_nip') and (nip <> '$nipx')"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ //$err = 1; echo '<font color="red">OOOP...!!! NIP SUDAH ADA</font>'; } } if ($err == 0){ $query = "update $app[tdb]m_dosen set nosertifikat = '$txt_nosertifikat', nidn= '$txt_nidn', nama = '$txt_nama', kode_fak='$kode_fak', kode_prodi = '$kode_prodi', kode_fungsional = '$kode_fungsional', kode_golongan = '$kode_golongan', pends1 ='$pend_s1', pends2='$pend_s2', pends3='$pend_s3', jnsdosen = '$kode_jnsdosen', bidangilmu='$bidang_ilmu', nohp='$nohp', email='$email', thaka='$_SESSION[ses_thaka]', nip_kajur ='$nip_kajur' where nip='$_SESSION[ses_nip]'"; $result= iresult($query, $app['sys_db']); if ($_FILES["uploadbukti"]["name"] != ''){ $namafileasli = $_FILES["uploadbukti"]["name"]; $namafile = $_SESSION['ses_nip'].$_FILES["uploadbukti"]["name"]; $query = "update $app[tdb]m_dosen set file_serti = '$namafile' where nip='$_SESSION[ses_nip]'"; $result= iresult($query, $app['sys_db']); copy($_FILES["uploadbukti"]['tmp_name'], 'berkas/'.$namafile); } /* if ($txt_nip != $_SESSION['ses_nip']){ $query = "update $app[tdb]t_pengajaran set nip='$txt_nip' where nip='$_SESSION[ses_nip]'"; $result= iresult($query, $app['sys_db']); $query = "update $app[tdb]t_penelitian set nip='$txt_nip' where nip='$_SESSION[ses_nip]'"; $result= iresult($query, $app['sys_db']); $query = "update $app[tdb]t_pengabdian set nip='$txt_nip' where nip='$_SESSION[ses_nip]'"; $result= iresult($query, $app['sys_db']); $query = "update $app[tdb]t_penelitian set nip='$txt_nip' where nip='$_SESSION[ses_nip]'"; $result= iresult($query, $app['sys_db']); $query = "update $app[tdb]t_penunjang set nip='$txt_nip' where nip='$_SESSION[ses_nip]'"; $result= iresult($query, $app['sys_db']); $query = "update $app[tdb]t_nilai set nip='$txt_nip' where nip='$_SESSION[ses_nip]'"; $result= iresult($query, $app['sys_db']); $query = "update $app[tdb]t_berkas set nip='$txt_nip' where nip='$_SESSION[ses_nip]'"; $result= iresult($query, $app['sys_db']); $query = "update $app[tdb]t_gubes set nip='$txt_nip' where nip='$_SESSION[ses_nip]'"; $result= iresult($query, $app['sys_db']); $query = "update $app[tdb]userid set nip='$txt_nip' where nip='$_SESSION[ses_nip]'"; $result= iresult($query, $app['sys_db']); } $_SESSION['ses_nip']= $txt_nip; $_SESSION['ses_nama'] = $txt_nama; */ #============================================= $query = "select sum(sks2) as tot_sks2 from $app[tdb]t_pengajaran where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]' and (rekomendasi ='A' or rekomendasi ='B')"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $tot_pd2=$row['tot_sks2']; } $query = "select sum(sks2) as tot_sks2 from $app[tdb]t_penelitian where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]' and (rekomendasi ='A' or rekomendasi ='B')"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $tot_pl2=$row['tot_sks2']; } $query = "select sum(sks2) as tot_sks2 from $app[tdb]t_pengabdian where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]' and (rekomendasi ='A' or rekomendasi ='B')"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $tot_pg2=$row['tot_sks2']; } $query = "select sum(sks2) as tot_sks2 from $app[tdb]t_penunjang where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]' and (rekomendasi ='A' or rekomendasi ='B')"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $tot_pk2=$row['tot_sks2']; } if ($tot_pd2 ==''){$tot_pd2=0;} if ($tot_pl2 ==''){$tot_pl2=0;} if ($tot_pg2 ==''){$tot_pg2=0;} if ($tot_pk2 ==''){$tot_pk2=0;} $totsks = $tot_pd2+$tot_pl2+$tot_pg2+$tot_pk2; $totpdpl = $tot_pd2 + $tot_pl2; $jnsdosen='DS'; $query = "select jnsdosen from $app[tdb]m_dosen where nip='$_SESSION[ses_nip]' order by nip"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $jnsdosen=$row['jnsdosen']; } if ( $jnsdosen ==''){$jnsdosen='DS';} $ks0='M'; if ($jnsdosen =='DS' || $jnsdosen =='PR'){ if ($totsks > 16){$ks0='T';} if ($totsks < 12){$ks0='T';} if ($totpdpl < 9){$ks0='T';} if ($tot_pd2 <= 0){$ks0='T';} if ($tot_pl2 <= 0){$ks0='T';} if ($tot_pg2 <= 0){$ks0='T';} if ($tot_pk2 <= 0){$ks0='T';} } if ($jnsdosen =='DT' || $jnsdosen =='PT'){ if ($totsks > 16){$ks0='T';} if ($totsks < 3){$ks0='T';} if ($totpdpl < 3){$ks0='T';} if ($tot_pd2 < 0){$ks0='T';} } $query = "delete from $app[tdb]t_nilai where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]'"; $result= iresult($query, $app['sys_db']); $query = "insert into $app[tdb]t_nilai (nip, thaka, pd0, pl0, pg0, pk0, ks0) values ('$_SESSION[ses_nip]', '$_SESSION[ses_thaka]', '$tot_pd2', '$tot_pl2','$tot_pg2','$tot_pk2','$ks0')"; $result= iresult($query, $app['sys_db']); } $act='show'; include "formshow/profil.php"; } $kode_fungsional ='';$kode_golongan='';$kode_jk='';$kode_agama='';$kode_sts_kawin=''; if ($frm=='CV'){ if ( isset($_POST['txt_nip']) ) {$txt_nip = str_replace("'", "\'", $_POST['txt_nip']);} if ( isset($_POST['txt_nidn']) ) {$txt_nidn = str_replace("'", "\'", $_POST['txt_nidn']);} if ( isset($_POST['txt_nama']) ) {$txt_nama = str_replace("'", " ", $_POST['txt_nama']);} if ( isset($_POST['cbokode_fungsional']) ) {$kode_fungsional = str_replace("'", "\'", $_POST['cbokode_fungsional']);} if ( isset($_POST['cbokode_golongan']) ) {$kode_golongan = str_replace("'", "\'", $_POST['cbokode_golongan']);} if ( isset($_POST['cbokode_jnsdosen']) ) {$kode_jnsdosen = str_replace("'", "\'", $_POST['cbokode_jnsdosen']);} if ( isset($_POST['cbokode_jk']) ) {$kode_jk = str_replace("'", "\'", $_POST['cbokode_jk']);} if ( isset($_POST['cbokode_agama']) ) {$kode_agama = str_replace("'", "\'", $_POST['cbokode_agama']);} if ( isset($_POST['cbokode_sts_kawin']) ) {$kode_sts_kawin = str_replace("'", "\'", $_POST['cbokode_sts_kawin']);} if ( isset($_POST['txt_tempat_lahir']) ) {$txt_tempat_lahir = str_replace("'", " ", $_POST['txt_tempat_lahir']);} if ( isset($_POST['txt_tgl_lahir']) ) {$txt_tgl_lahir = str_replace("'", " ", $_POST['txt_tgl_lahir']);} if ( isset($_POST['txt_alamat_rumah']) ) {$txt_alamat_rumah = str_replace("'", " ", $_POST['txt_alamat_rumah']);} if ( isset($_POST['txt_nohp']) ) {$nohp = str_replace("'", "\'", $_POST['txt_nohp']);} if ( isset($_POST['txt_email']) ) {$email = str_replace("'", "\'", $_POST['txt_email']);} $err = 0; $nipx= $_SESSION['ses_nip']; if ($txt_nip != $_SESSION['ses_nip']){ $query = "select * from $app[tdb]m_dosen where (nip = '$txt_nip') and (nip <> '$nipx')"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $err = 1; echo '<font color="red">OOOP...!!! NIP SUDAH ADA</font>'; } } if ($err == 0){ $query = "update $app[tdb]m_dosen set nip='$txt_nip', nidn= '$txt_nidn', nama = '$txt_nama', kode_jk = '$kode_jk', kode_agama = '$kode_agama', kode_sts_kawin = '$kode_sts_kawin', kode_fungsional = '$kode_fungsional', kode_golongan = '$kode_golongan', nohp='$nohp', email='$email', alamat_rumah = '$txt_alamat_rumah', tempat_lahir ='$txt_tempat_lahir', tgl_lahir ='$txt_tgl_lahir' where nip='$_SESSION[ses_nip]'"; $result= iresult($query, $app['sys_db']); } $act='show'; include "cv/cv.php"; } if ($frm=='Setting'){ if ( isset($_POST['cbokode_thaka']) ) {$txt_thaka=$_POST['cbokode_thaka'];} $_SESSION['ses_thaka'] = $txt_thaka; $query = "select * from $app[tdb]m_setting where thaka='$_SESSION[ses_thaka]'"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $_SESSION['ses_nmthaka'] = $row['nmthaka']; } $act='show'; include "formshow/menu.php"; } if ($frm=='Pendidikan' || $frm=='Penelitian' || $frm=='Pengabdian' || $frm=='Penunjang' || $frm=='Gubes' || $frm=='Lekkep'){ if ($act=='simpan'){ $txt_urut='0'; if ( isset($_GET['id']) ) {$id=$_GET['id'];} if ($id==''){ $id=0; }else{ $id = app::unserialize64($id); } $cbokode_rekom=''; $cbokode_dt=''; $cbokode_rekomperbaikan=''; $cbokode_jns=''; if ( isset($_POST['txt_kegiatan']) ) {$txt_kegiatan=$_POST['txt_kegiatan'];} if ( isset($_POST['txt_urut']) ) {$txt_urut=$_POST['txt_urut'];} if ( isset($_POST['txt_bukti1']) ) {$txt_bukti1=$_POST['txt_bukti1'];} if ( isset($_POST['txt_sks1']) ) {$txt_sks1=$_POST['txt_sks1'];} if ( isset($_POST['txt_masa']) ) {$txt_masa=$_POST['txt_masa'];} if ( isset($_POST['txt_bukti2']) ) {$txt_bukti2=$_POST['txt_bukti2'];} if ( isset($_POST['txt_sks2']) ) {$txt_sks2=$_POST['txt_sks2'];} if ( isset($_POST['cbokode_rekom']) ) {$cbokode_rekom=$_POST['cbokode_rekom'];} if ( isset($_POST['cbokode_dt']) ) {$cbokode_dt=$_POST['cbokode_dt'];} if ( isset($_POST['cbokode_rekomperbaikan']) ) {$cbokode_rekomperbaikan=$_POST['cbokode_rekomperbaikan'];} if ( isset($_POST['cbokode_jns']) ) {$cbokode_jns=$_POST['cbokode_jns'];} if (! is_numeric ($txt_urut)){$txt_urut='0';} if (! is_numeric ($txt_sks1)){$txt_sks1='0';} if (! is_numeric ($txt_sks2)){$txt_sks2='0';} $kilobite = 50000000000; if ($frm=='Pendidikan'){$kilobite = 50000000000;} if ($id !=0){ $query = "select * from $namatabel where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]' and id ='$id' order by urut"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $idfile = $row['idfile']; } if ($_FILES["uploadbukti"]["name"] != ''){ $namafileasli = $_FILES["uploadbukti"]["name"]; $namafile = $txt_urut.$_SESSION['ses_thaka'].$_SESSION['ses_nip'].$pmenu.$_FILES["uploadbukti"]["name"]; $query = "insert into $app[tdb]t_berkas (jenis, urut, thaka, nip, namafile,st_temp, idfile, jns) values ('$pmenu','$txt_urut', '$_SESSION[ses_thaka]','$_SESSION[ses_nip]','$namafile','1', '$idfile', '1')"; $result= iresult($query, $app['sys_db']); copy($_FILES["uploadbukti"]['tmp_name'], 'berkas/'.$namafile); } if ($_FILES["uploadbukti2"]["name"] != ''){ $namafileasli = $_FILES["uploadbukti2"]["name"]; $namafile = $txt_urut.$_SESSION['ses_thaka'].$_SESSION['ses_nip'].$pmenu.$_FILES["uploadbukti2"]["name"]; $query = "insert into $app[tdb]t_berkas (jenis, urut, thaka, nip, namafile,st_temp, idfile, jns) values ('$pmenu','$txt_urut', '$_SESSION[ses_thaka]','$_SESSION[ses_nip]','$namafile','1', '$idfile', '2')"; $result= iresult($query, $app['sys_db']); copy($_FILES["uploadbukti2"]['tmp_name'], 'berkas/'.$namafile); } #================================= $query = "update $namatabel set kegiatan = '$txt_kegiatan', urut = '$txt_urut', bukti = '$txt_bukti1', sks = '$txt_sks1', masa = '$txt_masa', bukti2 = '$txt_bukti2', sks2 = '$txt_sks2', rekomendasi = '$cbokode_rekom', perbaikan='$cbokode_rekomperbaikan', jenis_sks = '$cbokode_dt', jenis = '$cbokode_jns' where nip='$_SESSION[ses_nip]' and id='$id'"; $result= iresult($query, $app['sys_db']); #============================================= $query = "select sum(sks2) as tot_sks2 from $app[tdb]t_pengajaran where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]' and (rekomendasi ='A' or rekomendasi ='B')"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $tot_pd2=$row['tot_sks2']; } $query = "select sum(sks2) as tot_sks2 from $app[tdb]t_penelitian where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]' and (rekomendasi ='A' or rekomendasi ='B')"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $tot_pl2=$row['tot_sks2']; } $query = "select sum(sks2) as tot_sks2 from $app[tdb]t_pengabdian where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]' and (rekomendasi ='A' or rekomendasi ='B')"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $tot_pg2=$row['tot_sks2']; } $query = "select sum(sks2) as tot_sks2 from $app[tdb]t_penunjang where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]' and (rekomendasi ='A' or rekomendasi ='B')"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $tot_pk2=$row['tot_sks2']; } if ($tot_pd2 ==''){$tot_pd2=0;} if ($tot_pl2 ==''){$tot_pl2=0;} if ($tot_pg2 ==''){$tot_pg2=0;} if ($tot_pk2 ==''){$tot_pk2=0;} $totsks = $tot_pd2+$tot_pl2+$tot_pg2+$tot_pk2; $totpdpl = $tot_pd2 + $tot_pl2; $jnsdosen='DS'; $query = "select jnsdosen from $app[tdb]m_dosen where nip='$_SESSION[ses_nip]' order by nip"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $jnsdosen=$row['jnsdosen']; } if ( $jnsdosen ==''){$jnsdosen='DS';} $ks0='M'; if ($jnsdosen =='DS' || $jnsdosen =='PR'){ if ($totsks > 16){$ks0='T';} if ($totsks < 12){$ks0='T';} if ($totpdpl < 9){$ks0='T';} if ($tot_pd2 <= 0){$ks0='T';} if ($tot_pl2 <= 0){$ks0='T';} if ($tot_pg2 <= 0){$ks0='T';} if ($tot_pk2 <= 0){$ks0='T';} } if ($jnsdosen =='DT' || $jnsdosen =='PT'){ if ($totsks > 16){$ks0='T';} if ($totsks < 3){$ks0='T';} if ($totpdpl < 3){$ks0='T';} if ($tot_pd2 <= 0){$ks0='T';} } $query = "delete from $app[tdb]t_nilai where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]'"; $result= iresult($query, $app['sys_db']); $query = "insert into $app[tdb]t_nilai (nip, thaka, pd0, pl0, pg0, pk0, ks0) values ('$_SESSION[ses_nip]', '$_SESSION[ses_thaka]', '$tot_pd2', '$tot_pl2','$tot_pg2','$tot_pk2','$ks0')"; $result= iresult($query, $app['sys_db']); }else if ($id==0){ $random_digit=rand(000000000,999999999); if ($_FILES["uploadbukti"]["name"] != ''){ $namafileasli = $_FILES["uploadbukti"]["name"]; $namafile = $txt_urut.$_SESSION['ses_thaka'].$_SESSION['ses_nip'].$pmenu.$_FILES["uploadbukti"]["name"]; $query = "insert into $app[tdb]t_berkas (jenis, urut, thaka, nip, namafile,st_temp, idfile, jns) values ('$pmenu','$txt_urut', '$_SESSION[ses_thaka]','$_SESSION[ses_nip]','$namafile','1', '$random_digit','1')"; $result= iresult($query, $app['sys_db']); copy($_FILES["uploadbukti"]['tmp_name'], 'berkas/'.$namafile); } if ($_FILES["uploadbukti2"]["name"] != ''){ $namafileasli = $_FILES["uploadbukti2"]["name"]; $namafile = $txt_urut.$_SESSION['ses_thaka'].$_SESSION['ses_nip'].$pmenu.$_FILES["uploadbukti2"]["name"]; $query = "insert into $app[tdb]t_berkas (jenis, urut, thaka, nip, namafile,st_temp, idfile, jns) values ('$pmenu','$txt_urut', '$_SESSION[ses_thaka]','$_SESSION[ses_nip]','$namafile','1', '$random_digit','2')"; $result= iresult($query, $app['sys_db']); copy($_FILES["uploadbukti2"]['tmp_name'], 'berkas/'.$namafile); } $query = "insert into $namatabel (nip, thaka, urut, kegiatan, bukti, sks, masa, bukti2, sks2, rekomendasi, jenis_sks, idfile, jenis) values ('$_SESSION[ses_nip]', '$_SESSION[ses_thaka]', '$txt_urut', '$txt_kegiatan', '$txt_bukti1', '$txt_sks1', '$txt_masa', '$txt_bukti2', '$txt_sks2', '$cbokode_rekom', '$cbokode_dt', '$random_digit', '$cbokode_jns')"; $result= iresult($query, $app['sys_db']); $tot_sks=0; #============================================= $query = "select sum(sks2) as tot_sks2 from $app[tdb]t_pengajaran where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]' and (rekomendasi ='A' or rekomendasi ='B')"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $tot_pd2=$row['tot_sks2']; } $query = "select sum(sks2) as tot_sks2 from $app[tdb]t_penelitian where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]' and (rekomendasi ='A' or rekomendasi ='B')"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $tot_pl2=$row['tot_sks2']; } $query = "select sum(sks2) as tot_sks2 from $app[tdb]t_pengabdian where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]' and (rekomendasi ='A' or rekomendasi ='B')"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $tot_pg2=$row['tot_sks2']; } $query = "select sum(sks2) as tot_sks2 from $app[tdb]t_penunjang where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]' and (rekomendasi ='A' or rekomendasi ='B')"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $tot_pk2=$row['tot_sks2']; } if ($tot_pd2 ==''){$tot_pd2=0;} if ($tot_pl2 ==''){$tot_pl2=0;} if ($tot_pg2 ==''){$tot_pg2=0;} if ($tot_pk2 ==''){$tot_pk2=0;} $totsks = $tot_pd2+$tot_pl2+$tot_pg2+$tot_pk2; $totpdpl = $tot_pd2 + $tot_pl2; $jnsdosen='DS'; $query = "select jnsdosen from $app[tdb]m_dosen where nip='$_SESSION[ses_nip]' order by nip"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $jnsdosen=$row['jnsdosen']; } if ( $jnsdosen ==''){$jnsdosen='DS';} $ks0='M'; if ($jnsdosen =='DS' || $jnsdosen =='PR'){ if ($totsks > 16){$ks0='T';} if ($totsks < 12){$ks0='T';} if ($totpdpl < 9){$ks0='T';} if ($tot_pd2 <= 0){$ks0='T';} if ($tot_pl2 <= 0){$ks0='T';} if ($tot_pg2 <= 0){$ks0='T';} if ($tot_pk2 <= 0){$ks0='T';} } if ($jnsdosen =='DT' || $jnsdosen =='PT'){ if ($totsks > 16){$ks0='T';} if ($totsks < 3){$ks0='T';} if ($totpdpl < 3){$ks0='T';} if ($tot_pd2 <= 0){$ks0='T';} } $query = "delete from $app[tdb]t_nilai where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]'"; $result= iresult($query, $app['sys_db']); $query = "insert into $app[tdb]t_nilai (nip, thaka, pd0, pl0, pg0, pk0, ks0) values ('$_SESSION[ses_nip]', '$_SESSION[ses_thaka]', '$tot_pd2', '$tot_pl2','$tot_pg2','$tot_pk2','$ks0')"; $result= iresult($query, $app['sys_db']); } $act='show'; include "formshow/pendidikan.php"; }else if ($act=='delberkas'){ if ( isset($_GET['id']) ) {$xid=$_GET['id'];} $xid = app::unserialize64($xid); $query = "delete from $app[tdb]t_berkas where id = '$xid'"; $result= iresult($query, $app['sys_db']); $act='show'; include "formshow/pendidikan.php"; } } if ($frm=='R_Pendidikan' || $frm=='R_Penelitian' || $frm=='R_Pengabdian' || $frm=='R_Penunjang' || $frm=='Gubes'){ if ($act=='simpan'){ $txt_urut='0'; if ( isset($_GET['id']) ) {$id=$_GET['id'];} if ($id==''){ $id=0; }else{ $id = app::unserialize64($id); } $cbokode_rekom=''; if ( isset($_POST['txt_kegiatan']) ) {$txt_kegiatan=$_POST['txt_kegiatan'];} if ( isset($_POST['txt_urut']) ) {$txt_urut=$_POST['txt_urut'];} if ( isset($_POST['txt_bukti1']) ) {$txt_bukti1=$_POST['txt_bukti1'];} if ( isset($_POST['txt_sks1']) ) {$txt_sks1=$_POST['txt_sks1'];} if ( isset($_POST['txt_masa']) ) {$txt_masa=$_POST['txt_masa'];} if ( isset($_POST['txt_bukti2']) ) {$txt_bukti2=$_POST['txt_bukti2'];} if ( isset($_POST['txt_sks2']) ) {$txt_sks2=$_POST['txt_sks2'];} if ( isset($_POST['cbokode_rekom']) ) {$cbokode_rekom=$_POST['cbokode_rekom'];} if ( isset($_POST['cbokode_dt']) ) {$cbokode_dt=$_POST['cbokode_dt'];} if (! is_numeric ($txt_urut)){$txt_urut='0';} if (! is_numeric ($txt_sks1)){$txt_sks1='0';} if (! is_numeric ($txt_sks2)){$txt_sks2='0';} $kilobite = 50000000000; if ($frm=='R_Pendidikan'){$kilobite = 50000000000;} if ($id !=0){ $query = "select * from $namatabel where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]' and id ='$id' order by urut"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $idfile = $row['idfile']; } if ($_FILES["uploadbukti"]["name"] != ''){ $namafileasli = $_FILES["uploadbukti"]["name"]; $namafile = $txt_urut.$_SESSION['ses_thaka'].$_SESSION['ses_nip'].$pmenu.$_FILES["uploadbukti"]["name"]; $query = "insert into $app[tdb]t_berkas (jenis, urut, thaka, nip, namafile,st_temp, idfile, jns) values ('$pmenu','$txt_urut', '$_SESSION[ses_thaka]','$_SESSION[ses_nip]','$namafile','1', '$idfile', '1')"; $result= iresult($query, $app['sys_db']); copy($_FILES["uploadbukti"]['tmp_name'], 'berkas/'.$namafile); } if ($_FILES["uploadbukti2"]["name"] != ''){ $namafileasli = $_FILES["uploadbukti2"]["name"]; $namafile = $txt_urut.$_SESSION['ses_thaka'].$_SESSION['ses_nip'].$pmenu.$_FILES["uploadbukti2"]["name"]; $query = "insert into $app[tdb]t_berkas (jenis, urut, thaka, nip, namafile,st_temp, idfile, jns) values ('$pmenu','$txt_urut', '$_SESSION[ses_thaka]','$_SESSION[ses_nip]','$namafile','1', '$idfile', '2')"; $result= iresult($query, $app['sys_db']); copy($_FILES["uploadbukti2"]['tmp_name'], 'berkas/'.$namafile); } #================================= $query = "update $namatabel set kegiatan = '$txt_kegiatan', urut = '$txt_urut', bukti = '$txt_bukti1', sks = '$txt_sks1', masa = '$txt_masa', bukti2 = '$txt_bukti2', sks2 = '$txt_sks2', rekomendasi = '$cbokode_rekom', jenis_sks = '$cbokode_dt' where nip='$_SESSION[ses_nip]' and id='$id'"; $result= iresult($query, $app['sys_db']); #============================================= $query = "select sum(sks2) as tot_sks2 from $app[tdb]t_pengajaran where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]' and (rekomendasi ='A' or rekomendasi ='B')"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $tot_pd2=$row['tot_sks2']; } $query = "select sum(sks2) as tot_sks2 from $app[tdb]t_penelitian where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]' and (rekomendasi ='A' or rekomendasi ='B')"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $tot_pl2=$row['tot_sks2']; } $query = "select sum(sks2) as tot_sks2 from $app[tdb]t_pengabdian where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]' and (rekomendasi ='A' or rekomendasi ='B')"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $tot_pg2=$row['tot_sks2']; } $query = "select sum(sks2) as tot_sks2 from $app[tdb]t_penunjang where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]' and (rekomendasi ='A' or rekomendasi ='B')"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $tot_pk2=$row['tot_sks2']; } if ($tot_pd2 ==''){$tot_pd2=0;} if ($tot_pl2 ==''){$tot_pl2=0;} if ($tot_pg2 ==''){$tot_pg2=0;} if ($tot_pk2 ==''){$tot_pk2=0;} $totsks = $tot_pd2+$tot_pl2+$tot_pg2+$tot_pk2; $totpdpl = $tot_pd2 + $tot_pl2; $jnsdosen='DS'; $query = "select jnsdosen from $app[tdb]m_dosen where nip='$_SESSION[ses_nip]' order by nip"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $jnsdosen=$row['jnsdosen']; } if ( $jnsdosen ==''){$jnsdosen='DS';} $ks0='M'; if ($jnsdosen =='DS' || $jnsdosen =='PR'){ if ($totsks > 16){$ks0='T';} if ($totsks < 12){$ks0='T';} if ($totpdpl < 9){$ks0='T';} if ($tot_pd2 <= 0){$ks0='T';} if ($tot_pl2 <= 0){$ks0='T';} if ($tot_pg2 <= 0){$ks0='T';} } if ($jnsdosen =='DT' || $jnsdosen =='PT'){ if ($totsks > 16){$ks0='T';} if ($totsks < 3){$ks0='T';} if ($totpdpl < 3){$ks0='T';} if ($tot_pd2 <= 0){$ks0='T';} } $query = "delete from $app[tdb]t_nilai where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]'"; $result= iresult($query, $app['sys_db']); $query = "insert into $app[tdb]t_nilai (nip, thaka, pd0, pl0, pg0, pk0, ks0) values ('$_SESSION[ses_nip]', '$_SESSION[ses_thaka]', '$tot_pd2', '$tot_pl2','$tot_pg2','$tot_pk2','$ks0')"; $result= iresult($query, $app['sys_db']); }else if ($id==0){ $random_digit=rand(000000000,999999999); if ($_FILES["uploadbukti"]["name"] != ''){ $namafileasli = $_FILES["uploadbukti"]["name"]; $namafile = $txt_urut.$_SESSION['ses_thaka'].$_SESSION['ses_nip'].$pmenu.$_FILES["uploadbukti"]["name"]; $query = "insert into $app[tdb]t_berkas (jenis, urut, thaka, nip, namafile,st_temp, idfile, jns) values ('$pmenu','$txt_urut', '$_SESSION[ses_thaka]','$_SESSION[ses_nip]','$namafile','1', '$random_digit','1')"; $result= iresult($query, $app['sys_db']); copy($_FILES["uploadbukti"]['tmp_name'], 'berkas/'.$namafile); } if ($_FILES["uploadbukti2"]["name"] != ''){ $namafileasli = $_FILES["uploadbukti2"]["name"]; $namafile = $txt_urut.$_SESSION['ses_thaka'].$_SESSION['ses_nip'].$pmenu.$_FILES["uploadbukti2"]["name"]; $query = "insert into $app[tdb]t_berkas (jenis, urut, thaka, nip, namafile,st_temp, idfile, jns) values ('$pmenu','$txt_urut', '$_SESSION[ses_thaka]','$_SESSION[ses_nip]','$namafile','1', '$random_digit','2')"; $result= iresult($query, $app['sys_db']); copy($_FILES["uploadbukti2"]['tmp_name'], 'berkas/'.$namafile); } $query = "insert into $namatabel (nip, thaka, urut, kegiatan, bukti, sks, masa, bukti2, sks2, rekomendasi, jenis_sks, idfile) values ('$_SESSION[ses_nip]', '$_SESSION[ses_thaka]', '$txt_urut', '$txt_kegiatan', '$txt_bukti1', '$txt_sks1', '$txt_masa', '$txt_bukti2', '$txt_sks2', '$cbokode_rekom', '$cbokode_dt', '$random_digit')"; $result= iresult($query, $app['sys_db']); $tot_sks=0; #============================================= $query = "select sum(sks2) as tot_sks2 from $app[tdb]t_pengajaran where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]' and (rekomendasi ='A' or rekomendasi ='B')"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $tot_pd2=$row['tot_sks2']; } $query = "select sum(sks2) as tot_sks2 from $app[tdb]t_penelitian where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]' and (rekomendasi ='A' or rekomendasi ='B')"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $tot_pl2=$row['tot_sks2']; } $query = "select sum(sks2) as tot_sks2 from $app[tdb]t_pengabdian where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]' and (rekomendasi ='A' or rekomendasi ='B')"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $tot_pg2=$row['tot_sks2']; } $query = "select sum(sks2) as tot_sks2 from $app[tdb]t_penunjang where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]' and (rekomendasi ='A' or rekomendasi ='B')"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $tot_pk2=$row['tot_sks2']; } if ($tot_pd2 ==''){$tot_pd2=0;} if ($tot_pl2 ==''){$tot_pl2=0;} if ($tot_pg2 ==''){$tot_pg2=0;} if ($tot_pk2 ==''){$tot_pk2=0;} $totsks = $tot_pd2+$tot_pl2+$tot_pg2+$tot_pk2; $totpdpl = $tot_pd2 + $tot_pl2; $jnsdosen='DS'; $query = "select jnsdosen from $app[tdb]m_dosen where nip='$_SESSION[ses_nip]' order by nip"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $jnsdosen=$row['jnsdosen']; } if ( $jnsdosen ==''){$jnsdosen='DS';} $ks0='M'; if ($jnsdosen =='DS' || $jnsdosen =='PR'){ if ($totsks > 16){$ks0='T';} if ($totsks < 12){$ks0='T';} if ($totpdpl < 9){$ks0='T';} if ($tot_pd2 <= 0){$ks0='T';} if ($tot_pl2 <= 0){$ks0='T';} if ($tot_pg2 <= 0){$ks0='T';} } if ($jnsdosen =='DT' || $jnsdosen =='PT'){ if ($totsks > 16){$ks0='T';} if ($totsks < 3){$ks0='T';} if ($totpdpl < 3){$ks0='T';} if ($tot_pd2 <= 0){$ks0='T';} } $query = "delete from $app[tdb]t_nilai where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]'"; $result= iresult($query, $app['sys_db']); $query = "insert into $app[tdb]t_nilai (nip, thaka, pd0, pl0, pg0, pk0, ks0) values ('$_SESSION[ses_nip]', '$_SESSION[ses_thaka]', '$tot_pd2', '$tot_pl2','$tot_pg2','$tot_pk2','$ks0')"; $result= iresult($query, $app['sys_db']); } $act='show'; include "formshow/rencana.php"; }else if ($act=='delberkas'){ if ( isset($_GET['id']) ) {$xid=$_GET['id'];} $xid = app::unserialize64($xid); $query = "delete from $app[tdb]t_berkas where id = '$xid'"; $result= iresult($query, $app['sys_db']); $act='show'; include "formshow/rencana.php"; } } if ($frm=='J_Penelitian' || $frm=='J_Pengabdian'){ if ($act=='simpan'){ $txt_urut='0'; if ( isset($_GET['id']) ) {$id=$_GET['id'];} if ($id==''){ $id=0; }else{ $id = app::unserialize64($id); } if ( isset($_POST['txt_urut']) ) {$txt_urut=$_POST['txt_urut'];} if ( isset($_POST['txt_tgl_mulai']) ) {$txt_tgl_mulai=$_POST['txt_tgl_mulai'];} if ( isset($_POST['txt_tgl_selesai']) ) {$txt_tgl_selesai=$_POST['txt_tgl_selesai'];} if ( isset($_POST['txt_nama_kegiatan']) ) {$txt_nama_kegiatan=$_POST['txt_nama_kegiatan'];} if ( isset($_POST['txt_deskripsi_kegiatan']) ) {$txt_deskripsi_kegiatan=$_POST['txt_deskripsi_kegiatan'];} if ( isset($_POST['txt_produk_kegiatan']) ) {$txt_produk_kegiatan=$_POST['txt_produk_kegiatan'];} if (! is_numeric ($txt_urut)){$txt_urut='0';} $kilobite = 50000000000; if ($frm=='J_Penelitian'){$kilobite = 50000000000;} if ($id !=0){ $query = "select * from $namatabel where nip='$_SESSION[ses_nip]' and thaka='$_SESSION[ses_thaka]' and id ='$id' order by urut"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $idfile = $row['idfile']; } if ($_FILES["uploadbukti"]["name"] != ''){ $namafileasli = $_FILES["uploadbukti"]["name"]; $namafile = $txt_urut.$_SESSION['ses_thaka'].$_SESSION['ses_nip'].$pmenu.$_FILES["uploadbukti"]["name"]; $query = "insert into $app[tdb]t_berkas (jenis, urut, thaka, nip, namafile,st_temp, idfile, jns) values ('$pmenu','$txt_urut', '$_SESSION[ses_thaka]','$_SESSION[ses_nip]','$namafile','1', '$idfile', '1')"; $result= iresult($query, $app['sys_db']); copy($_FILES["uploadbukti"]['tmp_name'], 'berkas/'.$namafile); } #================================= $query = "update $namatabel set urut = '$txt_urut', tanggal_mulai = '$txt_tgl_mulai', tanggal_selesai = '$txt_tgl_selesai', nama_kegiatan = '$txt_nama_kegiatan', deskripsi_kegiatan = '$txt_deskripsi_kegiatan', produk_kegiatan = '$txt_produk_kegiatan' where nip='$_SESSION[ses_nip]' and id='$id'"; $result= iresult($query, $app['sys_db']); }else if ($id==0){ $random_digit=rand(000000000,999999999); if ($_FILES["uploadbukti"]["name"] != ''){ $namafileasli = $_FILES["uploadbukti"]["name"]; $namafile = $txt_urut.$_SESSION['ses_thaka'].$_SESSION['ses_nip'].$pmenu.$_FILES["uploadbukti"]["name"]; $query = "insert into $app[tdb]t_berkas (jenis, urut, thaka, nip, namafile,st_temp, idfile, jns) values ('$pmenu','$txt_urut', '$_SESSION[ses_thaka]','$_SESSION[ses_nip]','$namafile','1', '$random_digit','1')"; $result= iresult($query, $app['sys_db']); copy($_FILES["uploadbukti"]['tmp_name'], 'berkas/'.$namafile); } $query = "insert into $namatabel (nip, thaka, urut, tanggal_mulai, tanggal_selesai, nama_kegiatan, deskripsi_kegiatan, produk_kegiatan, idfile) values ('$_SESSION[ses_nip]', '$_SESSION[ses_thaka]', '$txt_urut', '$txt_tgl_mulai', '$txt_tgl_selesai', '$txt_nama_kegiatan', '$txt_deskripsi_kegiatan', '$txt_produk_kegiatan', '$random_digit')"; $result= iresult($query, $app['sys_db']); } $act='show'; include "formshow/jurnal.php"; }else if ($act=='delberkas'){ if ( isset($_GET['id']) ) {$xid=$_GET['id'];} $xid = app::unserialize64($xid); $query = "delete from $app[tdb]t_berkas where id = '$xid'"; $result= iresult($query, $app['sys_db']); $act='show'; include "formshow/jurnal.php"; } } ?>