<?php 
error_reporting();
set_time_limit(105000000);

require_once("./includes/initialize.php");


//$ptype = $_GET['ptype'];

$output='';

echo $level = $_POST['lev'];
echo $view = $_POST['view'];
echo $table = $_POST['ptype'];


if((isset($_POST['fac'])) or (isset($_POST['dpt'])))
{
$fac =$_POST['fac'];
$dept = $_POST['dpt'];
$session = $_POST['ses'];
$level = $_POST['lev'];
$view = $_POST['view'];
$table = $_POST['ptype'];

//echo $ptype;
// echo $dept;
// echo $session;
// echo $level;

// <!--fac:fac,dpt:dpt,lev:lev,ses:ses,view:view-->
$count = 0;
//echo $ptype."".$dep."".$session;
// $dept="Accountancy";
// $level ="ND";
// $session ="2018/2019";
// $allsession= ONLINEPAY::search_session($dept, $level, $session);



//$allsession= ONLINEPAY::showsessiondetails($table,$dept, $level, $session);
$output= ' <table id="bursar" class="table table-striped table-bordered">
            <thead>
                                    <tr>
                                        <th>S/N</th>  
                                        <th>MATRIC NO</th>  
                                        <th>TRAN. REF</th>
                                        <th>SURNAME</th>     
                                        <th>OTHER NAME</th>  
                                        <th>DEPARTMENT</th>
                                        <th>LEVEL</th> 
                                        <th>DESCR</th>  
                                        <th>AMOUNT</th>
                                        <th>DATE/TIME</th>                         
                                    </tr>
                                </thead>
        ';

foreach ($allsession as $student){
    
  
                    $output .='<tr>'
							.'<td>'.++$count.'</td>'
							.'<td>'.$student->formno.'</td>'
							.'<td>'.$student->txt_ref.'</td>'
							.'<td>'.$student->surname.'</td>'
							.'<td>'.$student->othername.'</td>'
							.'<td>'.$student->department.'</td>'
							.'<td>'.$student->level.'</td>'
							.'<td>'.$student->status.'</td>'
							.'<td>'.$student->amount.'</td>'
							.'<td>'.$student->datetime.'</td>'
						.'</tr>'; 
                    } 
                $output.='</table>';
                
                echo $output;
} else {
   $output= "No record to display";
   echo $output;
}
//echo "</table>";


?>