<?php 
	require_once('Connections/conn_ama.php');
	
	if(!isset($_SESSION)){
        session_start();
    }
    	

    	//Retrieve Beneficiaries Articles
    	$query_rsBeneficiaries = "SELECT *  FROM scholarshipbeneficiaries  ORDER BY dateAdded DESC";
	    $rsBeneficiaries = mysqli_query($conn_ama, $query_rsBeneficiaries ) or die(mysqli_error($conn_ama));
	    $row_rsBeneficiaries = mysqli_fetch_assoc($rsBeneficiaries);
	    $totalRows_rsBeneficiaries = mysqli_num_rows($rsBeneficiaries);/**/
 ?>
<!-- <div class="col-md-9 data-area"> -->

	<div class="data-area-wrap">
		<div class="form-wrapper">
		<table id="example" class="table table-responsive-sm " cellspacing="0" width="100%">
				<thead>
					<tr>
						<!-- <th>No.</th> -->
						<th>Name</th>
						<th>Programme</th>
						<th nowrap="nowrap">Student ID</th>
						<!-- <th>Country</th> -->
						<th>Email</th>
						<!-- <th>&nbsp;</th> -->
					</tr>
				</thead>
				<!-- <tfoot>
					<tr>
						<th>Player</th>
						<th>Image</th>
						<th>Postion</th>
						<th>Jersey Number</th>
						<th>Country</th>
						<th>Edit</th>
						<th>Delete</th>
					</tr>
				</tfoot> -->
				<tbody>
				<?php do { ?>
					<tr>
						<!-- <td>&nbsp;</td> -->
						<td><?php echo ucwords($row_rsBeneficiaries['lname']).", ". ucwords($row_rsBeneficiaries['fname'])." ".  ucwords($row_rsBeneficiaries['mname']); ?></td>
						<td ><?php echo ucwords($row_rsBeneficiaries['programme']); ?></td>
						<td ><?php echo $row_rsBeneficiaries['indexno']; ?></td>
						<td ><?php echo strtolower($row_rsBeneficiaries['email']); ?></td>
						<!-- <td ><?php //$actual_time = date('D, jS M Y   g:i a', strtotime($row_rsALLReports['feedbackdate'])); echo $actual_time; ?></td> -->
						<!-- <td class="<?php //if($row_rsALLReports['status']=='pending'){ echo 'table-warning';}elseif($row_rsALLReports['status']=='responded'){ echo 'table-success';} ?>" >
							<?php //echo ucwords($row_rsALLReports['status']); ?>
						</td> -->
                               
					</tr>
				<?php } while($row_rsBeneficiaries = mysqli_fetch_assoc($rsBeneficiaries));?>
		            
				</tbody>
			</table> 
		</div><!-- End .form-wrapper-->
	</div><!-- End .data-area-wrap-->	
<!-- </div> -->

<script>

    $(document).ready( function() {
        $('#example').dataTable({
        	"pageLength": 10,
        	"order": []
        });
	});
	
	function DeleteConfirmation()
	{
		if (confirm("Are you sure, you want to delete the Beneficiaries item?")==true)		
		return true;
			else
		return false;
	}

</script>