D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
diafrica
/
result.dominicaninstitute.org
/
Filename :
graduatingdsummary.php
back
Copy
<?php if (!$_SESSION){ session_start(); } $acc=$_SESSION['acc']; $yto=$_SESSION['yto']; //if(isset($acc) && ($acc=="administratoroftheduresult2018byto")){?> <?php include("Connecter/dataconn.php"); ?> <?php if(isset($_GET['checksession'])) { $programmesn=$_GET['programmesn']; $session=$_GET['session']; $se=$session+1; $session=$session."/".$se; $dp=$_GET['decimalplace']; $sql = "SELECT *,programmes.sn as feli1,programmes.namer as feli2,departments.namer as feli3 FROM programmes inner join departments on programmes.departmentsn = departments.sn where programmes.sn=$programmesn"; $result = mysql_query($sql); $row=mysql_fetch_array($result); $feli=$row['feli2']. " [" . $row['feli3']. "]"; $dom=$row['numberofyears']; ?> <?php $sql3 = "SELECT *,d.namer as dnamer FROM programmes as p inner join departments as d on p.departmentsn=d.sn where p.sn=$programmesn"; $result3 = mysql_query($sql3, $csn) or die(mysql_error()); $row3 = mysql_fetch_assoc($result3); $department=$row3['dnamer']; $faculty=$row3['facultysn']; $sql3 = "SELECT *,f.namer as dnamer FROM departments as d inner join faculties as f on d.facultysn=f.sn where d.facultysn=$faculty"; $result3 = mysql_query($sql3, $csn) or die(mysql_error()); $row3 = mysql_fetch_assoc($result3); $faculty=$row3['dnamer']; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <?php include("head.php"); ?> </head> <body> <?php include("top1.php"); ?> <?php include("dtable0no.php"); ?> <?php include("nav.php"); ?> <?php include("dtable1no.php"); ?> <?php include("topcontainer.php"); ?> <!--Content Goes Here--> <div align="center" style="text-transform:uppercase; font-weight:bold;"> DOMINICAN UNIVERSITY, IBADAN<BR /> GRADUATING STUDENTS FOR <?php echo $session; ?> ACADEMIC SESSION<BR /> SUMMARY OF RESULT<BR /> FACULTY OF <?php echo $faculty; ?>, DEPARTMENT OF <?php echo $department; ?><BR /> </div> <hr /> <div align="left" style="text-transform:uppercase; font-weight:bold;"><?php echo $feli; ?></div> <?php $sql1="delete from tempgraduating"; if (!mysql_query($sql1)){ echo("Unable to delete from tempgraduating: " . mysql_error()); exit(); } $query_dio2 = "SELECT * FROM studentsexisting where programmesn=$programmesn and session='$session' and level=$dom and status='good'"; $dio2 = mysql_query($query_dio2, $csn) or die(mysql_error()); $row_dio2 = mysql_fetch_assoc($dio2); $totalRows_dio2 = mysql_num_rows($dio2); $domnum=$totalRows_dio2; if($totalRows_dio2>0){ do { $mat=$row_dio2['matric']; $de=$row_dio2['de']; ?> <?php $query_dio1 = "SELECT sum(unit) as dunit, sum(unit*gp) as dwgp FROM coursesregistered as r inner join coursestobetaken as t on r.coursesn=t.sn where t.programmesn=$programmesn and r.matric='$mat' and r.score>=0"; $dio1 = mysql_query($query_dio1, $csn) or die(mysql_error()); $row_dio1 = mysql_fetch_assoc($dio1); $totalRows_dio1 = mysql_num_rows($dio1); $dunit=$row_dio1['dunit']; $dwgp=$row_dio1['dwgp']; $dcgpa=round(($dwgp/$dunit),$dp); //adjustments of class of degree $nsql="select * from classofdegree where status='active' order by sn desc"; $nresult=mysql_query($nsql); $ndn=mysql_num_rows($nresult); if($ndn>0){ while($nrow=mysql_fetch_array($nresult)){ $ddclass=$nrow['class2']; $ddfrom=$nrow['dfrom']; $ddto=$nrow['dto']; if($dcgpa<$ddto && $dcgpa>=$ddfrom){ $dclass=$ddclass; } } } //end of adjustments of class of degree /* if($dcgpa>=6.0){ $dclass="1"; } if($dcgpa<6.0 && $dcgpa>=4.6){ $dclass="2<sup>1</sup>"; } if($dcgpa<4.6 && $dcgpa>=2.9){ $dclass="2<sup>2</sup>"; } if($dcgpa<2.9 && $dcgpa>=1.6){ $dclass="3"; } if($dcgpa<1.6 && $dcgpa>=1.5){ $dclass="P"; } if($dcgpa<1.5){ $dclass="F"; } */ $query_dio1 = "SELECT sum(unit) as dunitp FROM coursesregistered as r inner join coursestobetaken as t on r.coursesn=t.sn where t.programmesn=$programmesn and r.matric='$mat' and r.score>=40"; $dio1 = mysql_query($query_dio1, $csn) or die(mysql_error()); $row_dio1 = mysql_fetch_assoc($dio1); $dunitp=$row_dio1['dunitp']; $sql1="select * from students where matric='$mat'"; $result1=mysql_query($sql1); $row1=mysql_fetch_array($result1); $dnamer=strtoupper($row1['surname']) . ", " . $row1['firstname'] . " " . $row1['othernames']; $yearofentry=$row1['yearofentry']; $yearofentry=$yearofentry+1; $yearofentry=$row1['yearofentry'] ."/". $yearofentry; //Results Not In $query_dio1 = "SELECT * FROM coursesregistered as r inner join coursestobetaken as t on r.coursesn=t.sn where t.programmesn=$programmesn and r.matric='$mat' and r.score IS NULL order by t.code asc"; $dio1 = mysql_query($query_dio1, $csn) or die(mysql_error()); $row_dio1 = mysql_fetch_assoc($dio1); $totalRows_dio1 = mysql_num_rows($dio1); $rnid=""; if($totalRows_dio1==0){ $rni="Nil"; } else { $rni=$totalRows_dio1; do { $rnid=$rnid . "[".$row_dio1['code']."] "; } while($row_dio1 = mysql_fetch_assoc($dio1)); } $sql1="select * from studentsexisting where matric='$mat' and status='good' and programmesn=$programmesn"; $result1=mysql_query($sql1); $row1=mysql_fetch_array($result1); $added=''; do { $added=$added . "(session='".$row1['session']."' and level=".$row1['level'].") or "; } while($row1=mysql_fetch_array($result1)); $added=substr($added,0,-4); //Faculty Required $sql="select * from coursestobetaken where stand='Faculty Required' and de='$de' and programmesn=$programmesn and ($added)"; $result=mysql_query($sql); $row=mysql_fetch_array($result); $num=mysql_num_rows($result); if($num>0){ $fr="Yes"; $frd=""; do { $code=$row['code']; $query_dio1 = "SELECT * FROM coursesregistered as r inner join coursestobetaken as t on r.coursesn=t.sn where t.programmesn=$programmesn and r.matric='$mat' and r.score>=0 and t.code='$code' order by t.code asc"; $dio1 = mysql_query($query_dio1, $csn) or die(mysql_error()); $row_dio1 = mysql_fetch_assoc($dio1); $totalRows_dio1 = mysql_num_rows($dio1); if($totalRows_dio1==0){ $fr="No"; $frd=$frd . "[".$code."] "; } } while($row=mysql_fetch_array($result)); } else { $fr="Yes"; $frd=""; } //Department Required $sql="select * from coursestobetaken where stand='Department Required' and de='$de' and programmesn=$programmesn and ($added)"; $result=mysql_query($sql); $row=mysql_fetch_array($result); $num=mysql_num_rows($result); if($num>0){ $dr="Yes"; $drd=""; do { $code=$row['code']; $query_dio1 = "SELECT * FROM coursesregistered as r inner join coursestobetaken as t on r.coursesn=t.sn where t.programmesn=$programmesn and r.matric='$mat' and r.score>=0 and t.code='$code' order by t.code asc"; $dio1 = mysql_query($query_dio1, $csn) or die(mysql_error()); $row_dio1 = mysql_fetch_assoc($dio1); $totalRows_dio1 = mysql_num_rows($dio1); if($totalRows_dio1==0){ $dr="No"; $drd=$drd . "[".$code."] "; } } while($row=mysql_fetch_array($result)); } else { $dr="Yes"; $drd=""; } //Carryovers and Pendings $sql="select * from coursestobetaken where (status='C' or status='R') and de='$de' and programmesn=$programmesn and ($added)"; $result=mysql_query($sql); $row=mysql_fetch_array($result); $num=mysql_num_rows($result); if($num>0){ $cop=0; $copd=""; do { $code=$row['code']; $status=$row['status']; if($status=="C"){ $query_dio1 = "SELECT * FROM coursesregistered as r inner join coursestobetaken as t on r.coursesn=t.sn where t.programmesn=$programmesn and r.matric='$mat' and r.score>=40 and t.code='$code' order by t.code asc"; } else { $query_dio1 = "SELECT * FROM coursesregistered as r inner join coursestobetaken as t on r.coursesn=t.sn where t.programmesn=$programmesn and r.matric='$mat' and r.score>=0 and t.code='$code' order by t.code asc"; } $dio1 = mysql_query($query_dio1, $csn) or die(mysql_error()); $row_dio1 = mysql_fetch_assoc($dio1); $totalRows_dio1 = mysql_num_rows($dio1); if($totalRows_dio1==0){ $cop++; $copd=$copd . "[".$code."] "; } } while($row=mysql_fetch_array($result)); } else { $cop=0; $copd=""; } if($cop==0){$cop="Nil";} if($dr=="No" || $fr=="No" || $cop=="No"){ $remarks="Not Pass"; } else { $remarks="Pass"; } $sql="insert into tempgraduating (namer,matric,entry,classofdegree2,yearofentry,TUT,WGP,CGPA,TUP,RNI,RNID,FR,FRD,DR,DRD,COP,COPD,remarks) values ('$dnamer','$mat','$de','$dclass','$yearofentry','$dunit','$dwgp','$dcgpa','$dunitp','$rni','$rnid','$fr','$frd','$dr','$drd','$cop','$copd','$remarks')"; $result=mysql_query($sql); ?> <?php } while($row_dio2 = mysql_fetch_assoc($dio2)); ?> <table width="100%" border="1" cellpadding="0" cellspacing="0"> <tr valign="top"> <td class="cellhead" width="30px">S/N</td> <td class="cellhead">MATRIC</td> <td class="cellhead">YEAR OF ENTRY</td> <td class="cellhead">RESULTS NOT IN</td> <td class="cellhead">PENDINGS / CARRYOVERS</td> <td class="cellhead">MODE OF ENTRY</td> <td class="cellhead">TOTAL UNITS TAKEN</td> <td class="cellhead">TOTAL UNITS PASSED</td> <td class="cellhead">FACULTY REQ.</td> <td class="cellhead">DEPT. REQ.</td> <td class="cellhead">WGP</td> <td class="cellhead">CGPA</td> <td class="cellhead">CLASS OF DEGREE</td> <td class="cellhead">REMARKS</td> </tr> <?php $query_dio1 = "SELECT * FROM tempgraduating order by matric asc"; $dio1 = mysql_query($query_dio1, $csn) or die(mysql_error()); $row_dio1 = mysql_fetch_assoc($dio1); $totalRows_dio1 = mysql_num_rows($dio1); $i=0; ?> <?php if($totalRows_dio1>0){ ?> <?php do { $i++; ?> <tr valign="top"> <td class="cellbody2"><?php echo($i); ?></td> <td class="cellbody3"> <?php echo($row_dio1['matric']); ?></td> <td class="cellbody3"> <?php echo($row_dio1['yearofentry']); ?></td> <td class="cellbody3"> <?php if($row_dio1['RNI']=='Nil'){ echo($row_dio1['RNI']); } else { echo("<a class='inline' href='#rni".$row_dio1['sn']."'>".$row_dio1['RNI']."</a>"); } ?> <div style='display:none'> <div id='rni<?php echo($row_dio1['sn']); ?>' style='padding:10px; background:#fff;'> <p><?php echo($row_dio1['RNID']); ?></p> </div> </div> </td> <td class="cellbody3"> <?php if($row_dio1['COP']=='Nil'){ echo($row_dio1['COP']); } else { echo("<a class='inline' href='#cop".$row_dio1['sn']."'>".$row_dio1['COP']."</a>"); } ?> <div style='display:none'> <div id='cop<?php echo($row_dio1['sn']); ?>' style='padding:10px; background:#fff;'> <p><?php echo($row_dio1['COPD']); ?></p> </div> </div> </td> <td class="cellbody3"> <?php echo($row_dio1['entry']); ?></td> <td class="cellbody3"> <?php echo($row_dio1['TUT']); ?></td> <td class="cellbody3"> <?php echo($row_dio1['TUP']); ?></td> <td class="cellbody3"> <?php if($row_dio1['FR']=='Yes'){ echo($row_dio1['FR']); } else { echo("<a class='inline' href='#fr".$row_dio1['sn']."'>".$row_dio1['FR']."</a>"); } ?> <div style='display:none'> <div id='fr<?php echo($row_dio1['sn']); ?>' style='padding:10px; background:#fff;'> <p><?php echo($row_dio1['FRD']); ?></p> </div> </div> </td> <td class="cellbody3"> <?php if($row_dio1['DR']=='Yes'){ echo($row_dio1['DR']); } else { echo("<a class='inline' href='#dr".$row_dio1['sn']."'>".$row_dio1['DR']."</a>"); } ?> <div style='display:none'> <div id='dr<?php echo($row_dio1['sn']); ?>' style='padding:10px; background:#fff;'> <p><?php echo($row_dio1['DRD']); ?></p> </div> </div> </td> <td class="cellbody3"> <?php echo($row_dio1['WGP']); ?></td> <td class="cellbody3"> <?php $dlil=$row_dio1['CGPA']; $dli=substr($dlil,-1); if($dli=='0'){ echo(substr($dlil,0,-1)); } else { echo($dlil); } ?></td> <td class="cellbody3"> <?php echo($row_dio1['classofdegree2']); ?></td> <td class="cellbody3"> <?php echo($row_dio1['remarks']); ?></td> </tr> <?php } while($row_dio1 = mysql_fetch_assoc($dio1)); } ?> </table> <table width="100%" border="0" cellpadding="3" cellspacing="2" style="padding-top:40px;"> <tr valign="top"> <td width="50%"> ______________________________<br /> <b>DEAN</b><br /> <b>DOMINICAN UNIVERSITY</b> </td> <td width="50%" align="right"> ______________________________<br /> <b>HEAD OF DEPARTMENT</b><br /> <b>DOMINICAN UNIVERSITY</b> </td> </tr> </table> <?php } else { echo("<div> </div>No Graduating Students!"); } ?> <!--Content Ends Here--> <?php include("bottomcontainer.php"); ?> <?php //include("dtable2.php"); ?> <?php //include("side.php"); ?> <?php include("dtable3no.php"); ?> <?php include("foot.php"); ?> </body> </html> <?php } else { include("dadmin.php"); }?> <?php /*} else { include("ddadmin.php"); }*/?>