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_yudisium.php
<? //echo $_POST['jass']; $txtpd=''; $txtpl=''; $txtpg=''; $txtpk=''; $txtcat=''; $cbokode_rekom=''; if ( isset($_POST['txtpd']) ) {$txtpd=$_POST['txtpd'];} if ( isset($_POST['txtpl']) ) {$txtpl=$_POST['txtpl'];} if ( isset($_POST['txtpg']) ) {$txtpg=$_POST['txtpg'];} if ( isset($_POST['txtpk']) ) {$txtpk=$_POST['txtpk'];} if ( isset($_POST['txtcat']) ) {$txtcat=$_POST['txtcat'];} if ( isset($_POST['cbokode_rekom']) ) {$cbokode_rekom=$_POST['cbokode_rekom'];} //$query = "select * from $tbl where id = '$id'"; if ($_POST['jass']==1) { if ($txtpd ==''){$txtpd=0;} if ($txtpl ==''){$txtpl=0;} if ($txtpg ==''){$txtpg=0;} if ($txtpk ==''){$txtpk=0;} $totsks = $txtpd+$txtpl+$txtpg+$txtpk; $totpdpl = $txtpd + $txtpl; $jnsdosen='DS'; $query = "select jnsdosen from $app[tdb]m_dosen where nip='$nippst' order by nip"; $result= iresult($query, $app['sys_db']); while($row=iExec($result)){ $jnsdosen=$row['jnsdosen']; } if ( $jnsdosen ==''){$jnsdosen='DS';} $ks='M'; if ($jnsdosen =='DS' || $jnsdosen =='PR'){ if ($totsks > 16){$ks='T';} if ($totsks < 12){$ks='T';} if ($totpdpl < 9){$ks='T';} if ($txtpd < 1){$ks='T';} if ($txtpl < 1){$ks='T';} if ($txtpg < 1){$ks='T';} } if ($jnsdosen =='DT' || $jnsdosen =='PT'){ if ($totsks > 16){$ks='T';} if ($totsks < 3){$ks='T';} if ($totpdpl < 3){$ks='T';} if ($txtpd < 0.5){$ks='T';} if ($txtpl < 0.5){$ks='T';} if ($txtpg < 0.5){$ks='T';} } $query = "update $app[tdb]t_nilai set pd = '$txtpd', pl = '$txtpl', pg = '$txtpg', pk = '$txtpk', ks = '$ks', catatan = '$txtcat', status ='$cbokode_rekom' where nip = '$nippst' and thaka = '$_SESSION[ses_thaka]'"; $result= iresult($query, $app['sys_db']); $query = "update $app[tdb]t_nilai set pd = '$txtpd', pl= '$txtpl', pg='$txtpg', pk='$txtpk' ks = '$ks', catatan = '$txtcat' , status ='$cbokode_rekom' where nip = '$nippst' and thaka='$_SESSION[ses_thaka]'"; } elseif ($_POST['jass']==2) { $query = "update $app[tdb]t_nilai set pd = '$txtpd', pl= '$txtpl', pg='$txtpg', pk='$txtpk' ks = '$ks', catatan = '$txtcat' , status ='$cbokode_rekom' where nip = '$nippst' and thaka='$_SESSION[ses_thaka]'"; } $result= iresult($query, $app['sys_db']); ?>