prepare('SELECT * FROM aStudents ORDER BY sID'); $qs->execute(); $q = $qs->fetchAll(); //--------------------------------------------------------- //- REMOVING PERSONAL INFO (SECURITY REASON) //--------------------------------------------------------- for($i=0; $i 0) { $L = $q['lab06r']; } else { $L = ($q['lab01r'] + $q['lab02r'] + $q['lab03r'] + $q['lab04r'] + $q['lab05r'])/4; } $W = max($q['lab07r'], $q['lab08r'], $q['lab09r'], $q['lab10r']); if($L < 2.5 || $W < 3.0) $rateVal = 2.0; else $rateVal = 0.4*$L + 0.6*$W; $rateVal = roundRate($rateVal); //--- RETURNING ----------------------------------------------------------- if($rateVal < 3.0) { if($q['lab07r'] == 0 && $q['lab08r'] == 0 && $q['lab09r'] == 0 && $q['lab10r'] == 0) $rateVal = '- - -'; else $rateVal = ''.number_format($rateVal, 1).''; } else { $rateVal = ''.number_format($rateVal, 1).''; } //--- DESCRIPTION --------------------------------------------------------- if($L < 2.0) $L = 2.0; if($W < 2.0) $W = 2.0; $rateValD = ''.$rateVal.''; return $rateValD; } //--------------------------------------------------------- //- ACTIVITY INFO //--------------------------------------------------------- function getActivityInfo($actInfo) { $actTemp = explode(':', $actInfo); $actType = $actTemp[0]; $actNum = $actTemp[1]; switch($actType) { case 'C': $aI = 'Ćwiczenia
'.$actNum; break; case 'L': $aI = 'Laboratorium
'.$actNum; break; case 'P': $aI = 'Projekt
'.$actNum; break; case 'K': $aI = 'Kolokwium
'.$actNum; break; case 'E': $aI = 'Egzamin
'.$actNum; break; case 'F': $aI = 'Egzamin poprawkowy
'.$actNum; break; case 'H': $aI = 'Egzamin dodatkowy
'.$actNum; break; case 'Z': $aI = 'Ocena cząstkowa'; break; default: $aI = ''; break; } return $aI; } $tWidth = 70 + $lNum*50*3 + 100; ?> <? echo $sTitle; ?> '; echo ''; echo ''; echo ''; echo ''; echo '
'; echo $sTitle; echo ''; echo '
'; echo '
'; echo ''; echo ''; echo ''; for($l=0; $l<$lNum; $l++) { if($l != 5) { echo ''; } } echo ''; echo ''; //--------------------------------------------------------- //- CONTENT //--------------------------------------------------------- for($i=0; $i'; echo ''; for($l=1; $l<=$lNum; $l++) { if($l != 6) { if($l<10) $labN = '0'.$l; else $labN = $l; echo ''; echo ''; echo ''; } } if($q[$i]['sRewriteRate'] > 2.5) $sRate = ''.$q[$i]['sRewriteRate'].''; else $sRate = calcFinalRate($q[$i], $_SESSION['lNum']); echo ''; echo ''; } } echo '
Album'; echo ''.getActivityInfo($lTypes[$l]).''; echo '
'; echo $lDescr[$l]; echo '
Ocena
końcowa
'.$q[$i]['sID'].''; if($q[$i]['sRewriteRate'] > 2.5) { echo '-'; } else { if($lDisableControlsR[intval($labN)-1] == 0) echo ''.$q[$i]['lab'.$labN.'r'].''; else echo '-'; } echo ''; if($q[$i]['sRewriteRate'] > 2.5) { echo '-'; } else { if($lDisableControlsD[intval($labN)-1] == 0) echo substr($q[$i]['lab'.$labN.'d'], 0, 5); else echo '-'; } echo ''; if($q[$i]['sRewriteRate'] > 2.5) { echo '-'; } else { if($lDisableControlsT[intval($labN)-1] == 0) echo $q[$i]['lab'.$labN.'t']; else echo '-'; } echo ''; echo $sRate; echo '
'; echo '
'; ?>