<?php

  
        
    //collect the passed
    if(isset($_GET['yr']))
    {
     $yr =  $_GET['yr'];
     $ses =  $_GET['ses'];
     
    }else{
      header('location: gateway.php?act=view_student_info_sys');
    }
  ?>

<div class="well"><!-- well start -->

        
          <ul class="breadcrumb">
                  <li><a href="gateway.php?act=view_student_info_sys">Student Information System Manager </a> <span class="divider"></span></li>
                  <li class="active"> Students Report NCE  </li>
                  
           </ul>
                   
                   



                               


              <ul class="tabs"> 
                
                <li><a href="#view1">NCE Students Listings</a></li>
<!--                <li><a href="gateway.php?act=view_admitted_applicants_prence">Admitted Applicants</a></li> 
-->               
               </ul> 
              <div class="tabcontents"> 
              
                
                <div id="view1">

            <br/>
            
                    
                      
                      
                           <hr />
                           
                       
                       
                       
                      
                       
                       <div class="well alert" >
                       
                            <h4>Students Report on NCE  Programmes  (NCE)</h4>
                           
                           <p>Click on each tab to view list of  students</p>
                       
                       </div>




                         <div class="row pull-right">
                               
                               <br> 
                             
                                <a href="gateway.php?act=view_students_summary_all_nce&tk=<?php echo md5(rand(0,100)) .'&lev=I&ses='.$ses?>" class="btn btn-info btn-lg" target="_blank" >Download (100 Level)</a>

                                <a href="gateway.php?act=view_students_summary_all_nce&tk=<?php echo md5(rand(0,100)) .'&lev=II&ses='.$ses?>" class="btn btn-primary btn-lg" target="_blank" >Download (200 Level)</a>
                               
                               
                                <a href="gateway.php?act=view_students_summary_all_nce&tk=<?php echo md5(rand(0,100)) .'&lev=III&ses='.$ses?>" class="btn btn-primary btn-lg" target="_blank" >Download (300 Level)</a>

                                <br> 
                               <br> 

                               <label class="btn btn-warning btn-lg"> 
                                    <?php
                                      //for regular students level
                                      $reg_100 = get_total_regular_nce_sf_payment($ses, $lev = 'I', $yr = '2018');

                                      $reg_200 = get_total_regular_nce_sf_payment_2($ses, $lev = 'II');
                                      
                                      
                                      $reg_300 = get_total_regular_nce_sf_payment_2($ses, $lev = 'III');
                                      
                                      //UNICEF AND SPORT 
                                      $UN_100 = get_total_others_nce_sf_payment($ses, $lev = 'I', $spt = 4);

                                      $UN_200 = get_total_others_nce_sf_payment($ses, $lev = 'II', $spt = 4);
                                      
                                      $UN_300 = get_total_others_nce_sf_payment($ses, $lev = 'III', $spt = 4);
                                      
                                      

                                      $SP_100 = get_total_others_nce_sf_payment($ses, $lev = 'I', $spt = 5);
                                      
                                      $SP_200 = get_total_others_nce_sf_payment($ses, $lev = 'II', $spt = 5);
                                      
                                      $SP_300 = get_total_others_nce_sf_payment($ses, $lev = 'III', $spt = 5);


                                      //All total
                                      $SF_Total_100 = get_total_nce_sf_payment_by_level($ses, $lev = 'I');
                                      
                                      $SF_Total_200 = get_total_nce_sf_payment_by_level($ses, $lev = 'II');
                                      
                                      $SF_Total_300 = get_total_nce_sf_payment_by_level($ses, $lev = 'III');
                                     

                                    ?>
                                    <table class="table table-center">
                                      <tr  colspan="4" ><th ><b>Payment Summary</b></th><th></th><th></th><th></th></tr>
                                      <tr ><th>NCE</th><th>100 LEVEL</th><th>200 LEVEL</th><th>300 LEVEL</th></tr>
                                      <?php

                                        echo "<tr ><th>Regular </th><th>$reg_100</th><th>$reg_200</th><th>$reg_300</th></tr>
                                        <tr><th>UNICEF </th><th>$UN_100</th><th>$UN_200</th><th>$UN_300</th></tr>
                                        <tr><th>SPORT </th><th>$SP_100</th><th>$SP_200</th><th>$SP_300</th></tr>
                                        <tr><b><th>TOTAL </th><th> $SF_Total_100</th><th> $SF_Total_200</th><th> $SF_Total_300</th></b></tr>";

                                      ?>
                                    </table>

                                </label>
                          </div>



        
                         <?php echo get_programme_list_for_students_report_nce($pt = 2, $yr); //pass programme type ?> 
                         
                        
                        
                          <hr />
                       
                        
        
                
        
                </div> 
        
                
        
         
        
              </div>
        




</form>

</div>