<div class="cc_hubadm_content">
<?php if($msg) { ?>
<div class="cc_hubadm_success"><?php echo $msg; ?></div>
<?php } ?>


    <div class="cc_hubadm_box cc_hubadm_full">
    <div class="cc_hubadm_boxtitle">Pilots with FULL_ADMIN ACCESS</div>
       <?php if(!$fulladmins)
{
    echo "No Full Admins found!";
} else { ?>
    <table class="cc_hubadm_tablea">
    <tr>
        <th>Pilot ID</th>
        <th>Name</th>
        <th>Permissions</th>
        </tr>
        <?php foreach($fulladmins as $admin) { ?>
        <tr>
        <td><?php echo PilotData::GetPilotCode($admin->code, $admin->pilotid); ?></td>
        <td><?php echo $admin->firstname.' '.$admin->lastname; ?></td>
        <td>FULL_ADMIN - Has access to all areas</td>
        </tr>
        <?php } ?>
    </table>
    <?php } ?>
    </div>
    
    <div class="cc_hubadm_box cc_hubadm_full">
    <div class="cc_hubadm_boxtitle">Hub Staff</div>
       <?php if(!$team)
{
    echo "No Hub Staff found!";
} else { ?>
    <table class="cc_hubadm_tablea">
    <tr>
        <th>Pilot ID</th>
        <th>Name</th>
        <th>Hub(s)</th>
        <th>Edit</th>
        <th>Revoke Acces</th>
        </tr>
        <?php foreach($team as $admin) { ?>
        <tr>
        <td><?php echo PilotData::GetPilotCode($admin->code, $admin->pilotid); ?></td>
        <td><?php echo $admin->firstname.' '.$admin->lastname; ?></td>
        <td><?php $hubperm = unserialize($admin->hubarray); if($hubperm) foreach($hubperm as $hp) { echo $hp->icao.' - '.$hp->name.'<br />'; } ?></td>
        <td><a href="<?php echo SITE_URL ?>/<?php echo $mloc ?>.php/HubOps/editpermissions/<?php echo $admin->pilotid; ?>" class="cc_hubadm_greenbutt">Edit</a></td>
        <td><a href="<?php echo SITE_URL ?>/<?php echo $mloc ?>.php/HubOps/revokepermissions/<?php echo $admin->id; ?>" class="cc_hubadm_redbutt">Delete</a></td>
        </tr>
        <?php } ?>
        </table>
    <?php } ?>
    </div>
</div>