D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
diafrica
/
result.dominicaninstitute.org
/
Filename :
trends1a.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($_POST['findstudent'])) { $mat=$_POST['mat']; $programmesn=$_POST['programmesn']; ?> <?php $query_dio1 = "SELECT *,r.sn as dsn FROM coursesregistered as r inner join coursestobetaken as t on r.coursesn=t.sn where t.programmesn=$programmesn and r.matric='$mat'"; $dio1 = mysql_query($query_dio1, $csn) or die(mysql_error()); $row_dio1 = mysql_fetch_assoc($dio1); $totalRows_dio1 = mysql_num_rows($dio1); ?> <?php if ($totalRows_dio1==0) { $jkjk="Student with Matric No: <b>".$mat."</b> was not found. It is either there is no student with this matric number or that student has not yet been registered for any session!"; include("trends.php"); exit(); } ?> <!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"); ?> <script src="bar/dhtmlxchart.js" type="text/javascript"></script> <link rel="STYLESHEET" type="text/css" href="bar/dhtmlxchart.css"> </head> <body> <?php include("top.php"); ?> <?php include("dtable0.php"); ?> <?php include("nav.php"); ?> <?php include("dtable1.php"); ?> <?php include("topcontainer.php"); ?> <!--Content Goes Here--> <?php $sql = "SELECT *,d.namer as dnamer,p.namer as dnamer2 FROM programmes as p inner join departments as d on p.departmentsn=d.sn where p.sn=$programmesn"; $result = mysql_query($sql, $csn) or die(mysql_error()); $row = mysql_fetch_assoc($result); $department=$row['dnamer']; $faculty=$row['facultysn']; $prog=$row['dnamer2'] . " " . $row['dnamer']; $sql = "SELECT *,f.namer as dnamer FROM departments as d inner join faculties as f on d.facultysn=f.sn where d.facultysn=$faculty"; $result = mysql_query($sql, $csn) or die(mysql_error()); $row = mysql_fetch_assoc($result); $faculty=$row['dnamer']; ?> <?php $sql = "SELECT *,date_format(dob,'%b %e, %Y') as dater FROM students where matric='$mat'"; $result = mysql_query($sql, $csn) or die(mysql_error()); $row = mysql_fetch_assoc($result); $yearofentry=$row['yearofentry']; $yearofentry=$yearofentry+1; $yearofentry=$row['yearofentry'] . "/" . $yearofentry; ?> <table width="100%" border="0" cellpadding="3" cellspacing="2"> <tr valign="top"> <td width="30%"> <b>Name: </b><span><?php echo($row['surname']); ?></span>, <?php echo($row['firstname']); ?> <?php echo($row['othernames']); ?><br /> <b>Matriculation No.: </b><?php echo($row['matric']); ?><br /> </td> <td width="40%" align="center"> <h2>Personal Trend</h2> </td> <td width="30%" align="right"> <b>Year of Entry: </b><?php echo $yearofentry; ?><br /> <b>Degree in View: </b><?php echo($prog); ?><br /> </td> </tr> </table> <p> </p> <?php $query_dio1 = "SELECT distinct(session) FROM coursesregistered as r inner join coursestobetaken as t on r.coursesn=t.sn where t.programmesn=$programmesn and r.matric='$mat' order by session asc"; $dio1 = mysql_query($query_dio1, $csn) or die(mysql_error()); $felinum99 = mysql_num_rows($dio1); $z=0; while($row_dio1 = mysql_fetch_assoc($dio1)){ $z++; $feli99[$z]=$row_dio1['session']; } ?> <?php $query_dio1 = "SELECT distinct(session) FROM coursesregistered as r inner join coursestobetaken as t on r.coursesn=t.sn where t.programmesn=$programmesn and r.matric='$mat' order by session asc"; $dio1 = mysql_query($query_dio1, $csn) or die(mysql_error()); $felinum = mysql_num_rows($dio1); $i=0; while($row_dio1 = mysql_fetch_assoc($dio1)){ $i++; $feli[$i]=$row_dio1['session']; } ?> <?php $z=0; for($i=1;$i<=$felinum;$i++){ for($n=1;$n<=2; $n++){ $z++; ?> <table width="455px" border="1" cellpadding="0" cellspacing="0" style="float:left; padding-bottom:15px;<?php if($n==1){ echo(' clear:left;'); } ?>"> <tr valign="top"> <td colspan="6" align="center" class="cellhead"> <b>YEAR <?php echo($i); ?>, SEMESTER <?php echo($n); ?> - <?php echo($feli[$i]); ?> SESSION</b> </td></tr> <tr valign="top"> <td colspan="6" align="left" class="cellbody"> <?php $query_dio1 = "SELECT sum(unit) as eli FROM coursesregistered as r inner join coursestobetaken as t on r.coursesn=t.sn where t.programmesn=$programmesn and r.matric='$mat' and t.session='".$feli[$i]."' and t.semester=".$n." and r.score>0"; $dio1 = mysql_query($query_dio1, $csn) or die(mysql_error()); $row_dio1 = mysql_fetch_assoc($dio1); ?> <b> Units Taken: </b><?php echo($row_dio1['eli']); $ut=$row_dio1['eli']; ?> </td></tr> <tr valign="top"> <td colspan="6" align="left" class="cellbody"> <?php $query_dio1 = "SELECT sum(unit) as eli FROM coursesregistered as r inner join coursestobetaken as t on r.coursesn=t.sn where t.programmesn=$programmesn and r.matric='$mat' and t.session='".$feli[$i]."' and t.semester=".$n." and r.score>=40"; $dio1 = mysql_query($query_dio1, $csn) or die(mysql_error()); $row_dio1 = mysql_fetch_assoc($dio1); ?> <b> Units Passed: </b><?php echo($row_dio1['eli']); ?> </td></tr> <tr valign="top"> <td colspan="6" align="left" class="cellbody"> <?php $query_dio1 = "SELECT sum(unit*gp) as eli FROM coursesregistered as r inner join coursestobetaken as t on r.coursesn=t.sn where t.programmesn=$programmesn and r.matric='$mat' and t.session='".$feli[$i]."' and t.semester=".$n." and r.score>0"; $dio1 = mysql_query($query_dio1, $csn) or die(mysql_error()); $row_dio1 = mysql_fetch_assoc($dio1); ?> <b> Weighted Grade Point: </b><?php echo($row_dio1['eli']); $wgp=$row_dio1['eli']; ?> </td></tr> <tr valign="top"> <td colspan="6" align="left" class="cellbody"> <?php $cgpa[$z]=round(($wgp/$ut),2); ?> <b> Cumulative Grade Point Average: </b><?php echo($cgpa[$z]); ?> </td></tr> </table> <?php } ?> <!--For Yearly Begins--> <table width="455px" border="1" cellpadding="0" cellspacing="0" align="center"> <tr valign="top"> <td align="center" class="cellhead"> <b>YEAR <?php echo($i); ?> COURSES - <?php echo($feli99[$i]); ?></b> </td></tr> <tr valign="top"> <td align="left"> <?php $query_dio1 = "SELECT sum(unit) as eli FROM coursesregistered as r inner join coursestobetaken as t on r.coursesn=t.sn where t.programmesn=$programmesn and r.matric='$mat' and t.session='".$feli99[$i]."' and r.score>0"; $dio1 = mysql_query($query_dio1, $csn) or die(mysql_error()); $row_dio1 = mysql_fetch_assoc($dio1); ?> <b> Units Taken: </b><?php echo($row_dio1['eli']); $ut=$row_dio1['eli']; ?> </td></tr> <tr valign="top"> <td colspan="6" align="left"> <?php $query_dio1 = "SELECT sum(unit) as eli FROM coursesregistered as r inner join coursestobetaken as t on r.coursesn=t.sn where t.programmesn=$programmesn and r.matric='$mat' and t.session='".$feli99[$i]."' and r.score>=40"; $dio1 = mysql_query($query_dio1, $csn) or die(mysql_error()); $row_dio1 = mysql_fetch_assoc($dio1); ?> <b> Units Passed: </b><?php echo($row_dio1['eli']); ?> </td></tr> <tr valign="top"> <td colspan="6" align="left"> <?php $query_dio1 = "SELECT sum(unit*gp) as eli FROM coursesregistered as r inner join coursestobetaken as t on r.coursesn=t.sn where t.programmesn=$programmesn and r.matric='$mat' and t.session='".$feli99[$i]."' and r.score>0"; $dio1 = mysql_query($query_dio1, $csn) or die(mysql_error()); $row_dio1 = mysql_fetch_assoc($dio1); ?> <b> Weighted Grade Point: </b><?php echo($row_dio1['eli']); $wgp=$row_dio1['eli']; ?> </td></tr> <tr valign="top"> <td colspan="6" align="left"> <?php $cgpa99[$i]=round(($wgp/$ut),2); ?> <b> Cumulative Grade Point Average: </b><?php echo($cgpa99[$i]); ?> </td></tr> </table> <div style="line-height:35px; height:35px;"> </div> <!--For Yearly Ends--> <?php } ?> <br style="clear:both;" /> <div id="chart" style="width:600px;height:450px;border:1px solid #A4BED4; float:right;"></div> <div style="padding:20px 0px 10px 0px;"> <?php $query_dio1 = "SELECT sum(unit) as eli 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); ?> <b> Total Units Taken: </b><?php echo($row_dio1['eli']); $ut=$row_dio1['eli']; ?><br /> <?php $query_dio1 = "SELECT sum(unit) as eli 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); ?> <b> Total Units Passed: </b><?php echo($row_dio1['eli']); ?><br /> <?php $query_dio1 = "SELECT sum(unit*gp) as eli 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); ?> <b> Weighted Grade Point: </b><?php echo($row_dio1['eli']); $wgp=$row_dio1['eli']; ?><br /> <?php $dcgpa=round(($wgp/$ut),2); ?> <b> Cumulative Grade Point Average: </b><?php echo($dcgpa); ?><br /> <?php //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['class1']; $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="First Class"; } if($dcgpa<6.0 && $dcgpa>=4.6){ $dclass="Second Class Upper"; } if($dcgpa<4.6 && $dcgpa>=2.9){ $dclass="Second Class Lower"; } if($dcgpa<2.9 && $dcgpa>=1.6){ $dclass="Third Class"; } if($dcgpa<1.6 && $dcgpa>=1.5){ $dclass="Pass"; } if($dcgpa<1.5){ $dclass="Fail"; } */ ?> <b> Class of Degree: </b><?php echo($dclass); ?> </div> <script> var data = [ <?php $y=0; for($i=1;$i<=$felinum;$i++){ ?> { <?php for($n=1;$n<=2; $n++){ $y++; ?>CGPA<?php if($n==2){echo("1");}; ?>:"<?php echo($cgpa[$y]); ?>",<?php } ?>CGPA2:"<?php echo($cgpa99[$i]); ?>", Year:"<?php echo($i); ?>" }, <?php } ?> { CGPA:"0",CGPA1:"0",CGPA2:"<?php echo($dcgpa); ?>", Year:"All" } ]; var barChart = new dhtmlXChart({ view:"barH", container:"chart", value:"#CGPA#", width:20, label: "#CGPA#", tooltip:{ template:"#CGPA#" }, xAxis:{ start:0, end:7, step:1, title:"CGPA", lines: true }, yAxis:{ title:"Year(s)", template:"#Year#" }, gradient:true, border:false, color: "#66cc33", legend:{ values:[{text:"Semester 1",color:"#66cc33"},{text:"Semester 2",color:"#ff9933"},{text:"Yearly",color:"#6767fc"}], width:120, align:"right", valign:"middle", marker:{ width:15, type:"round" } }, padding:{ left:75, right:30 } }); barChart.addSeries({ value:"#CGPA1#", color:"#ff9933", label:"#CGPA1#" }); barChart.addSeries({ value:"#CGPA2#", color:"#6767fc", label:"#CGPA2#" }); barChart.parse(data,"json"); </script> <!--Content Ends Here--> <?php include("bottomcontainer.php"); ?> <?php //include("dtable2.php"); ?> <?php //include("side.php"); ?> <?php include("dtable3.php"); ?> <?php include("foot.php"); ?> </body> </html> <?php } else { include("personaldyearly.php"); }?> <?php } else { include("ddadmin.php"); }?>