<?php

    $rnd_hash =  md5(rand(0,100));

    //collect the passed
    if(isset($_GET['yr']))
    {
     $pt =  $_GET['pt'];
     $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">Hostel System Manager </a> <span class="divider"></span></li>
                  <li class="active"> Hostel Report </li>

           </ul>



              <ul class="tabs">

                <li><a href="#view1">Portal 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>Hostel Report on Programmes</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_ptd&tk=<?php echo $rnd_hash .'&lev=100&ses='.$ses?>" class="btn btn-success btn-lg" target="_blank" >Download (100 Level)</a>

                                <a href="gateway.php?act=view_students_summary_all_ptd&tk=<?php echo $rnd_hash .'&lev=200&ses='.$ses?>" class="btn btn-info btn-lg" target="_blank" >Download (200 Level)</a>

                                <br>
                                <a href="gateway.php?act=view_students_summary_all_ptd&tk=<?php echo $rnd_hash .'&lev=300&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
                                        $ptd_100 = get_total_regular_ptd_sf_payment($pt  ,$ses, $lev = 'I', $yr );

                                        $ptd_200 = get_total_regular_ptd_sf_payment($pt  ,$ses, $lev = 'II', $yr );
                                        $ptd_300 = get_total_regular_ptd_sf_payment($pt  ,$ses, $lev = 'III', $yr );


                                      //All total
                                      //$ptd_sf_total_100 = get_total_nce_sf_payment_by_level($ses, $lev = 'I');

                                     // $ptd_sf_total_200 = get_total_nce_sf_payment_by_level($ses, $lev = 'II');



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

                                        echo "<tr ><th>$ptd_100</th><th>$ptd_200</th><th>$ptd_300</th></tr>
                                        ";

                                      ?>
                                    </table>

                                </label>
                          </div>

                         <?php echo get_programme_list_for_students_report_ptd($pt, $yr); //pass programme type ?>



                          <hr />





                </div>





              </div>





</form>

</div>
