<section class="page-contents">
<div class="container">
<br />
<?php
foreach($allcategories as $category)
{
?>
<h3><i class="fa fa-download" fa-lg" style="color:#04327F"></i> <?php echo $category->name?></h3>
<?php
}
if(!$downloads)
{
	echo '<br />';
echo '<div align="center">';
echo '<div class="alert alert-danger"><strong>There are no downloads avaliable!</strong></div>';
echo '<div>';
	return;
}
?>
<table id="mytable"width="100%" border="0" cellspacing="0" cellpadding="0" class="blueIce_table">
<thead>
  <tr>
  <th>Image</th>
  <th>Description</th>
  <th>Link</th>
  </tr>
</thead>
<tbody>
<?php
	foreach($downloads as $download)
	{
?>
  <tr>
    <td width="200"><img src='<?php echo $download->image ?>' alt='<?php echo $download->name?>' width="200" title="<?php echo $download->name?>" /></td>
    <td><h4><?php echo $download->name?></h4><?php echo $download->description?><br><em><i class="fa fa-download" aria-hidden="true" style="color:#04327F"></i> Downloaded: <?php echo $download->hits?> times</em></td>
    <td width="90"><a href="<?php echo SITE_URL;?>/index.php/downloads/<?php echo $download->id?>"><button type="button" class="blueIce-button" data-dismiss="modal"><i class="fa fa-download fa-lg"></i> Download</button></a></td>
  </tr>
<?php
}
?>
</tbody>
</table>
<script type="text/javascript">
$(document).ready(function() {
    oTable = $('#mytable').dataTable({
        "bJQueryUI": true,
        "sPaginationType": "full_numbers"
    });
} );

</script>
</div>
</section>