<?php
error_reporting(0);
define('INCLUDE_CHECK',true);
session_start();
require ('classes/config.php');
require_once('classes/session.php');

$fno=$_SESSION['fno'];	

	 $sql = mysql_query("SELECT admission_cbt_result.formno,admission_cbt_result.scores,admission_cbt_result.date_accessed,admission_students_details.courses,admission_students_details.sex FROM admission_cbt_result, admission_students_details WHERE admission_cbt_result.formno = '$fno' AND admission_students_details.formno = '$fno'");
			while($srows = mysql_fetch_array($sql)){
				$studentid = $frows['id'];
			
				//$fno = $srows['formno'];
				$sex = $srows['sex']; 
				$scores = $srows['scores'];
				$courses = $srows['courses'];
				$email = $srows['email'];
			}
			 if (substr($fno,0,2)=='PU'){ $formtype ="ND Full Time (Jambite)"; }
			 if (substr($fno,0,2)=='DP'){ $formtype ="Daily-Part-Time";}
			 if (substr($fno,0,2)=='FT'){$formtype ="HND Full-Time";}
			 
            if ($scores < 100){$grade='A';}
            if ($scores < 70){$grade='B';}
            if ($scores < 60){$grade='C';}
            if ($scores < 50){$grade='D';}
            if ($scores < 40){$grade='E';}
          	if ($scores < 1){$grade='No result yet, check later!';}
		   
?>



<!DOCTYPE html>
<html>
<head>
<title>OSCOTECH | CBT sccreening Examination Result</title>
<link href="http://oscotechesaoke.edu.ng/admission_portal/layout/css/bootstrap.login.css" rel="stylesheet" type="text/css" media="all" />
<link href="http://oscotechesaoke.edu.ng/admission_portal/layout/css/login.css" rel="stylesheet" type="text/css" media="all" />	
<link rel="shortcut icon" href="images/favicon.ico">
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700,800' rel='stylesheet' type='text/css'>
</head>
<body>
	<div class="cbtborder">
    	<div class="headert">
    		<img src="images/barnner_bg.jpg" width="750px">
        </div>
    	<h2>2015 SCREENING EXAMINATION RESULT SLIP</h2>
        <div class="DIVimages">
        	<img  src="http://oscotechesaoke.edu.ng/admission_portal<?php echo substr($_SESSION['pix'],1,23);  ?>" width="160" height="160">
        </div>
        <center>
        <h4><strong><?php echo $_SESSION['fno'];?></strong></h4><br>
        <table class="table  table-condensed table-responsive" style="width:600px; border:none; font-size:14px">
        	<tr>
            	<td align="right"><strong>NAME:</strong></td>
                <td width="320px"><?php echo $_SESSION['surname']." ". $_SESSION['othernames']; ?></td>
            </tr>
            <tr>
            	<td align="right"><strong>DEPARTMENT APPLIED FOR:</strong></td>
                <td><?php echo $courses; ?></td>
            </tr>
            <tr>
            	<td align="right"><strong>MODE OF ADMISSION:</strong></td>
                <td><?php echo $formtype; ?></td>
            </tr>
            <tr>
            	<td align="right"><strong>SEX:</strong></td>
                <td><?php echo $sex; echo $_SESSION['$email']; ?></td>
            </tr>
        </table>
        	<p><strong style="color:#093">Screening Examination Score/Grade is:</strong></p>
            <p><strong style="font-size:20px"><?php echo $grade; ?></strong></p>
        	<hr style="border: dashed 1px #ccc; width:70%">
         <p style="font-size:10px; width:500px; padding-bottom:10px;"><i>This result is provisional. You will be informed in due course if you are offered provisional admission into the institution. This result is not transferable. The college reserves the right to withdraw it if further screening that it was obtained through examination malpractice or any form of irregularity.</i></p>
         <p style="color:#F00">Printed: <?php echo date("d/m/Y"); ?></p><br>
        </center>
    </div>
    	<br>
    <center>
   		<INPUT TYPE="button" class="btn btn-success " VALUE="PRINT" ONCLICK="self.print();">
    </center>
    <br>
</body>
</html>

<?php mysql_close();  ?>