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

    	//Retrieve Faqs
    	$query_rsFaqs = "CALL faqsections_list()";//"SELECT deptID, `deptname`, subdeptdetailsID, dateadded  FROM v_depts ORDER BY dateadded DESC";
	    $rsFaqs = mysqli_query($conn_ama, $query_rsFaqs ) or die(mysqli_error($conn_ama));
	    $row_rsFaqs = mysqli_fetch_assoc($rsFaqs);
	    $totalRows_rsFaqs = mysqli_num_rows($rsFaqs);/**/
 ?>
<!-- <div class="col-md-9 data-area"> -->
	<div class="data-area-wrap">
		<div class="form-wrapper">
			<table id="example" class="table" cellspacing="0" width="100%">
		        <thead>
		            <tr>
		                <th>Section Name</th>
		                <!-- <th>Category</th> -->
		                <!-- <th>Postion</th> -->
		                <th nowrap="nowrap">Date Added</th>
		                <!-- <th>Country</th> -->
		                <th>Edit</th>
		                <th>Delete</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><a href="#" class="sectionid" data-sectionid="<?php echo $row_rsFaqs['sectionID']; ?>"><?php echo $row_rsFaqs['sectionname']; ?></a></td>
		                <!-- <td align="center"><?php// echo ucwords($row_rsFaqs['category']); ?></td> -->
	                  	<td align="center"><!-- <?php// echo $row_rsFaqs['dateadded']; ?> --></td>
	                    <td align="center"><a href="#">Edit</a></td>
		                <td align="center"><a href="#">Delete</a></td>
		            </tr>
		        <?php } while($row_rsFaqs = mysqli_fetch_assoc($rsFaqs));?>
		            
		    	</tbody>
		    </table>
		</div><!-- End .form-wrapper-->
	</div><!-- End .data-area-wrap-->	
<!-- </div> -->

<script>

    $(document).ready( function() {
        $('#example').dataTable({
        	"pageLength": 10,
        	"order": []
        });
    });
</script>