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



<!DOCTYPE html>
<html>
<head>
<title>OSCOTECH | Vocational Report List</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'>
<style type="text/css">
	body{margin-top:-40px; padding:0; top:0;}
</style>
</head>
<body>
	<div style="width:97%; margin:0 auto"> 
        <center>
        <h1 style="font-weight:bold; font-size:25px">OSUN STATE COLLEGE OF TECHNOLOGY, ESA-OKE</h1>
    	<h2 style="font-weight:bold; font-size:16px; text-decoration:underline">DIRECTORATE OF ENTERPRENEURSHIP</h2>
        <h2 style="font-weight:bold; font-size:16px;text-decoration:underline"><?php echo $_SESSION['sek']?>  VOCATIONAL REGISTRATION REPORT </h2>
        <br>
        <table class="table table-bordered  table-condensed table-responsive" style="width:850px; font-size:12px">
        	<thead>
                                        <tr height="20">
                                            <th>S/N</th>
                                            <th>FORM NO</th>
                                            <th>MATRIC NO</th>
                                            <th>SURNAME</th>
                                            <th>OTHER NAMES</th>
                                            <th>DEPARTMENT</th>
                                            <th>PROGRAMME</th>
                                            <th>VOCATION</th>
                                            <th>SESSION</th>
                                        </tr>
                                    </thead>

        						<?php

								if($_SESSION[department]=="" AND $_SESSION[programme]=="" AND $_SESSION[level]==""){
								$sql = mysql_query("SELECT * FROM vsec_details_new
													WHERE courses='$_SESSION[courses]' 
													
													AND session='$_SESSION[sek]' 
													ORDER BY level,department ASC");
										
							}elseif ($_SESSION[programme]=="" AND $_SESSION[level]==""){
								$sql = mysql_query("SELECT * FROM vsec_details_new
													WHERE department='$_SESSION[department]' 
													AND courses='$_SESSION[courses]' 
													AND session='$_SESSION[sek]' 
													ORDER BY level,formno ASC");

							}elseif ($_SESSION[department]=="" AND $_SESSION[programme]==""){
								$sql = mysql_query("SELECT * FROM vsec_details_new
													WHERE courses='$_SESSION[courses]'
                                                                                                        AND level='$_SESSION[level]'  
													AND session='$_SESSION[sek]'
													ORDER BY department,formno ASC");
							}elseif ($_SESSION[programme]==""){
								$sql = mysql_query("SELECT * FROM vsec_details_new
													WHERE courses='$_SESSION[courses]'
                                                                                                        AND level='$_SESSION[level]' 
                                                                                                        AND department='$_SESSION[department]' 
													AND session='$_SESSION[sek]'
													ORDER BY formno ASC");
							}
                           
                        $i=0;
                        while($row=mysql_fetch_array($sql)){
                        $i++;
                        $color=($i%2==0)?"lightblue":"white";
												
                    ?>
                                   <tbody>
                                        <tr >
                                            <td><?php echo $i;?></td>
                                            <td><?php echo $row['formno'];?></td>
                                            <td><?php echo $row['matricno'];?></td>
                                            <td><?php echo $row['surname'];?></td>
                                            <td><?php echo $row['othernames'];?></td>
                                            <td><?php echo $row['department'];?></td>
                                            <td><?php echo $row['level'];?></td>
                                            <td><?php echo $row['courses'];?></td>
                                            <td><?php echo $row['session'];?></td>
                                        </tr>
                                    </tbody>
                          <?php	
							}														
							?>
                                </table>
        
                           
        </center>
    </div>
    	<br>
    <center>
   		<INPUT TYPE="button" class="btn btn-success " VALUE="PRINT" ONCLICK="self.print();">
    </center>
    <br>
</body>
</html>

<?php mysql_close();  ?>