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

?>
<h3>My Awards</h3>
<?php if(!$category) {echo 'Currently, there are not any award categories';}
else {?>
<table width="50%">
<?php
foreach($category as $cat) { ?>
<tr><td colspan="2" align="center"><h2><?php echo $cat->name; ?></h2></td></tr>
<?php $awards = AwardData::grantedawards($cat->id, $userinfo->pilotid); 
if(!$awards)
			{?> <tr><td colspan="2" align="center">You do not have any <?php echo $cat->name; ?> Awards.</td></tr> <?php }
else {
foreach($awards as $award) { ?>
<tr>
<td width="50%" align="center"><?php echo $award->name; ?></td>
<td width="50%" align="center"><img src="<?php echo $award->image; ?>" alt="<?php echo $award->name; ?>" /> <a href="<?php echo SITE_URL; ?>/index.php/awards/myawardinfo/<?php echo $award->awardid; ?>">+</a>
</td>
</tr>
<?php } } ?>
<?php } ?>
</table>
<?php } ?>