<?php
	error_reporting(0);
	define('INCLUDE_CHECK',true);
	session_start();
	require ('classes/config.php');
	require_once('classes/session.php');
	
	
?>
<title>OSCOTECH, ESA-OKE :: Admin-Dashboard > VSEC Registered Students List</title>


        <div id="page-wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">VSEC Registered Students List</h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            <div class="row">
                <div class="col-lg-12">
                	<div class="well" style="background:#FFF">
                    	<form method="post" action="" role="form">                        	
                        	<div class="form-group input-group">
                        	<table class="table table-bordered table-hover">
                            	<tr>
                                	<td>
                                        <select name="department" id="department"  class="form-control">
                                          <option value="">-- Select Department -- </option>
                                            <?php 
                                                    $getdept = mysql_query("SELECT department FROM school_setup WHERE programme='BF'");
                                                    while($row = mysql_fetch_array($getdept)){
                                                ?>
                                                    <option value="<?php echo $row['department'] ?>"><?php echo $row['department']?></option>
                                                <?php
                                                    }
                                            ?>
                                        </select>
                                	</td>
                                    <!--<td>
                                    	<select name="programme" class="form-control" id="programme">
                                            <option value="">--Select Programme--</option>
                                            <option value="ND">National Diploma</option>
                                            <option value="HND">Higher National Diploma</option>
                                            <option value="PGD">Post Graduate Diploma</option>
                                            <option value="PreND">Basic and Foundational Studies</option>
                                        </select>
                                    </td>-->
                                    <td>
                                    	<select name="level" class="form-control" id="level">
                                            <option value="">--Select Level--</option>
                                            <option value="ND I">ND I</option>
                                            <option value="ND II">ND II</option>
                                            <option value="HND I">HND I</option>
                                            <option value="HND II">HND II</option>
                                        </select>
                                    </td>
                                    <td>
                                        <select name="courses" id="courses"  class="form-control">
                                          	<option value="">-- Select Vocational -- </option>
                                          	<option value="Certificate in Fashion Designing">Certificate in Fashion Designing</option>
                <option value="Certificate in Catering and Confectionaries">Certificate in Catering and Confectionaries</option>
                <option value="Certificate in Shoe and Leather Works Technology">Certificate in Shoe and Leather Works Technology</option>
                <option value="Certificate in Production of Household Cleaning Agents and Disinfectants">Certificate in Production of Household Cleaning Agents and Disinfectants</option>
                <option value="Certificate in GSM Repairing Technology">Certificate in GSM Repairing Technology</option>
                <option value="Certificate in Music">Certificate in Music</option>
                <option value="Certificate in Certificate in Textile Design Technology (Hand Loom Cotton, Weaving Batik, Tie and Dye)">Certificate in Textile Design Technology (Hand Loom Cotton, Weaving Batik, Tie and Dye)</option>
                <option value="Certificate in Hat Making Technology">Certificate in Hat Making Technology</option>
                <option value="Certificate in Beads and Wire Works">Certificate in Beads and Wire Works</option>
                <option value="Certificate in Barbing Teechnology">Certificate in Barbing Technology</option>
                <option value="Certificate in Hat Women Hair Dressing &amp; Make-up">Certificate in Women Hair Dressing &amp; Make-up</option>
                <option value="Certificate in Poultry Farming Technology">Certificate in Poultry Farming Technology</option>
                <option value="Certificate in Fresh Water Fish Farming Studies">Certificate in Fresh Water Fish Farming Studies</option>
                
                
                <option value="Certificate in Foundary Technology">Certificate in Foundary Technology</option>
                <option value="Certificate in Metal Fabrication Technology">Certificate in Metal Fabrication Technology</option>
                <option value="Certificate in General Welding Practice Technology">Certificate in General Welding Practice Technology</option>
                <option value="Certificate in Pipe Cutting &amp; Plumbing Technology">Certificate in Pipe Cutting &amp; Plumbing Technology</option>
                <option value="Certificate in Electrical Installation Technology">Certificate in Electrical Installation Technology</option>
                <option value="Certificate in Certificate in Radio, Television and Electronics Technology">Certificate in Radio, Television and Electronics Technology</option>
                <option value="Certificate in Ceramic/Pottery Technology">Certificate in Ceramic/Pottery Technology</option>
                <option value="Certificate in Painting and Decoration Technology">Certificate in Painting and Decoration Technology</option>
                <option value="Certificate in Bricklaying and Masonry Technology">Certificate in Bricklaying and Masonry Technology</option>
                <option value="Certificate in Carpentry and Furniture Making Technology">Certificate in Carpentry and Furniture Making Technology</option>
                <option value="Certificate in Auto Mechanics &amp; Mechatronics">Certificate in Auto Mechanics &amp; Mechatronics</option>
                <option value="Certificate in Furniture Design and Construction">Certificate in Furniture Design and Construction</option>
                <option value="Certificate in Computer Assembly &amp; Repairss">Certificate in Computer Assembly &amp; Repairs</option>
                <option value="Certificate in Draughtsmaship (Using AutoCAD)">Certificate in Draughtsmaship (Using AutoCAD)</option>
                <option value="Certificate in Plaster of Paris (P.O.P) Technology">Certificate in Plaster of Paris (P.O.P) Technology</option>
                <option value="Certificate in Landscaping and Horticulture Studies">Certificate in Landscaping and Horticulture Studies</option>
                <option value="Certificate in Agency Management">Certificate in Agency Management</option>
                <option value="Certificate in Cartography">Certificate in Cartography</option>
                <option value="Certificate in Landscaping and Horticulture Studies">Certificate in Refrigeration &amp; Air Condictioning Technology</option>
                                        </select>
                                	</td>
                                    <!-- <td>
                                    	<select name="mode" class="form-control" id="mode">
                                            <option value="">--Select Mode--</option>
                                            <option value="FT">Full Time</option>
                                            <option value="DPT">Daily Part-Time</option>
                                            <option value="PT">Weekend Part-Time</option>
                                        </select>
                                    </td>-->
                                   <td>
                                    	<select name="session" class="form-control" id="session">
                                            <option value="">--Select Session--</option>
                                            <option value="2015/2016">2015/2016</option>
                                            <option value="2016/2017">2016/2017</option>
                                            <option value="2017/2018">2017/2018</option>
                                            <option value="2018/2019">2018/2019</option>
                                            <option value="2019/2020">2019/2020</option>
                                        </select>
                                    </td> 
                                	<td>
                                        <span class="input-group-btn">
                                            <input type="submit" class="btn btn-danger" name="btnsearch" value="Search" id="button-search" title="Search Student">
                                        </span>
                                    </td>
                             	</tr>
                            </table>
                            </div>
                        </form>
                    </div>
                    <form action="" method="post">
                    <div class="panel panel-primary chat-panel">
                        <div class="panel-heading ">
                            Student Details Table
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <div class="dataTable_wrapper">
                                <table class="table table-bordered  table-condensed table-responsive" style="width:750px; 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
					
					
					      //  echo "Courses: ".$_POST['courses']."<br/>";
					       // echo "Programme: ".$_POST['programme']."<br/>";
					        //echo "Department: ".$_POST['department']."<br/>";
					       // echo "Level: ".$_POST['level']."<br/>";
					
							$_SESSION['sek']= $_POST['session'];
							$_SESSION['courses']= ($_POST['courses']);
							$_SESSION['programme']= ($_POST['programme']);
							$_SESSION['department']= ($_POST['department']);
							$_SESSION['level']= strtoupper($_POST['level']);
							$f=$_POST['department'];
							echo $_POST[courses],$_POST[level],$_POST[programme],$_POST[department],$_POST[session];
							
                        	if($_POST[department]=="" AND  $_POST[level]==""){
								$sql = mysql_query("SELECT * FROM vsec_details_new
													WHERE courses=	'$_POST[courses]'
													
													AND session= '$_POST[session]' 
													ORDER BY level,department ASC");
										
							}elseif ($_POST[programme]=="" AND $_POST[level]==""){
								$sql = mysql_query("SELECT * FROM vsec_details_new
													WHERE department='$_POST[department]' 
													AND courses='$_POST[courses]' 
													AND session='$_POST[session]' 
													ORDER BY formno ASC");

							}elseif ($_POST[department]=="" AND $_POST[programme]==""){
								$sql = mysql_query("SELECT * FROM vsec_details_new
													WHERE courses='$_POST[courses]'
                                                                                                        AND level='$_POST[level]'  
													AND session='$_POST[session]'
													ORDER BY department,formno ASC");
							}elseif ($_POST[programme]==""){
								$sql = mysql_query("SELECT * FROM vsec_details_new
													WHERE courses='$_POST[courses]'
                                                                                                        AND level='$_POST[level]' 
                                                                                                        AND department='$_POST[department]' 
													AND session='$_POST[session]'
													ORDER BY formno ASC");
							} 
                        $i=0;
                        while($row=mysql_fetch_array($sql)){
                             //echo $row['formno'];
                             //echo $row['matricno'];
                             //echo $row['surname'];
                        $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 strtoupper($row['surname']);?></td>
                                            <td><?php echo strtoupper($row['othernames']);?></td>
                                            <td><?php echo strtoupper($row['department']);?></td>
                                            <td><?php echo strtoupper($row['level']);?></td>
                                            <td><?php echo strtoupper($row['courses']);?></td>
                                            <td><?php echo $row['session'];?></td>
                                        </tr>
                                    </tbody>
                          <?php	
							}
							if ($_SESSION['programme']=='PreND'){ ($_SESSION['pass'] ="PND") AND ($_SESSION['entry'] ="Foundational and Basic Studies-1year"); }
							if ($_SESSION['programme']=='Cert'){ ($_SESSION['pass'] ="CER") AND ($_SESSION['entry'] ="Certificate"); }
							if ($_SESSION['programme']=='ADV'){ ($_SESSION['pass'] ="ADV") AND ($_SESSION['entry'] ="Advance Certificate");}
							if ($_SESSION['programme']=='ND'){ ($_SESSION['pass'] ="DPT") AND ($_SESSION['entry'] ="National Diploma Daily Part Time-2years");}
							if ($_SESSION['programme']=='HND'){ ($_SESSION['pass'] ="HND") AND ($_SESSION['entry'] ="Higher National Diploma, FULL TIME-2 years");}
							if ($_SESSION['programme']=='PGD'){ ($_SESSION['pass'] ="PGD") AND ($_SESSION['entry'] ="Post Graduate Diploma, FULL TIME-1 year");}
							if ($_SESSION['programme']=='Weekend Part-Time'){ ($_SESSION['pass'] ="WPT") AND ($_SESSION['entry'] ="National Diploma"); }														
														
							?>
                                </table>
                            </div>
                            <!-- /.table-responsive -->
                          
                        </div>
                        <!-- /.panel-body --> 
                    </div> 
                    <!-- /.panel -->
                    	<center>
                       		<!-- <a href="#" target="_new" class="btn btn-success">ADMITTED</a> -->
                            <a href="rpt_vocational_spreedsheet.php" target="_new" class="btn btn-success">Send to Printer</a>
                            <p>&nbsp;</p>
                        </center>
                    </form>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->

        </div>
        <!-- /#page-wrapper -->
       

    </div>
    <!-- /#wrapper -->
    
