<?php
///////////////////////////////////////////////
///  PilotAwardsSystem v2.0 by php-mods.eu  ///
///            Author php-mods.eu           ///
///            Packed at 8/12/2019          ///
///     Copyright (c) 2019, php-mods.eu     ///
///////////////////////////////////////////////

?>
<h3><?php echo $data->name; ?> Award Category Administration</h3>
<table id="tabledlist" class="tablesorter">
<thead>
<tr>
<th width="15%" align="center"><b>Title</b></td>
<th width="40%" align="center"><b>Description</b></td>
<th width="10%" align="center"><b>Image</b></td>
<th width="10%" align="center">&nbsp;</td>
</tr>
</thead>
<tbody>
<?php
if(!$awards) {echo '<tr><td colspan="4"><center>There are no any awards in this category.</center></td></tr>';}
else { foreach($awards as $award) { ?>
<tr>
<td align="center"><?php echo $award->name; ?></td>
<td align="center"><?php echo $award->descrip; ?></td>
<td align="center"><img src="<?php echo $award->image; ?>" style="max-height: 100px;" alt="<?php echo $award->name; ?>" /></td>
<td align="center"><a href="<?php echo SITE_URL; ?>/admin/index.php/awards/award_edit/<?php echo $award->awardid; ?>" class="button">Edit</a>
<a href="<?php echo SITE_URL; ?>/admin/index.php/awards/awardelete/<?php echo $award->awardid; ?>/<?php echo $award->category; ?>" class="button" onclick="return confirm('Are you sure you want to remove this award?');">Delete</a> </td>
</tr>
<?php } } ?>
<tr>
<td colspan="4"><center><a href="<?php echo SITE_URL?>/admin/index.php/awards/award_add/<?php echo $data->id; ?>" class="button">Add a new Award in this category</a></center></td>
</tr>
</tbody>
</table><br />