<?php 
	require_once('Connections/conn_ama.php');
	
	if(!isset($_SESSION)){
        session_start();
    }
    	
    	//Retrieve News Articles
    	$query_rsCategory = "SELECT categoryID, category, categorydate  FROM doccategories  ORDER BY categorydate DESC";
	    $rsCategory = mysqli_query($conn_ama, $query_rsCategory ) or die(mysqli_error($conn_ama));
	    $row_rsCategory = mysqli_fetch_assoc($rsCategory);
	    $totalRows_rsCategory = mysqli_num_rows($rsCategory);/**/
 ?>
<!-- <div class="col-md-9 data-area"> -->
	<div class="mreport-steps">
		<?php //include("mreport-steps.inc.php"); ?>
	</div><!-- End .mreport-step-->
	<div class="data-area-wrap">
		<div class="form-wrapper">
			<table id="example" class="table" cellspacing="0" width="100%">
		        <thead>
		            <tr>
		                <th>Category</th>
		                <!-- <th>Category</th> -->
		                <!-- <th>Author</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="categoryid" data-categoryid="<?php echo $row_rsCategory['categoryID']; ?>"><?php echo $row_rsCategory['category']; ?></a>	</td>
	                  	<td align="center"><?php echo $row_rsCategory['categorydate']; ?></td>
	                    <td align="center"><a href="#">Edit</a></td>
		                <td align="center"><a href="#">Delete</a></td>
		            </tr>
		        <?php } while($row_rsCategory = mysqli_fetch_assoc($rsCategory));?>
		            
		    	</tbody>
		    </table>
		</div><!-- End .form-wrapper-->
	</div><!-- End .data-area-wrap-->	
<!-- </div> -->

<script>

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