<div class="cc_hubadm_content">
    <div class="cc_hubadm_box cc_hubadm_full">
    <div class="cc_hubadm_boxtitle">Flight Schedules</div>
    <?php echo $message; ?>
   <?php if(!$schedules) { echo "Ne Schedules found!"; } else { ?>
        <table class="cc_hubadm_tablea">
    <tr>
		<th>Code</th>
        <th>FlightNum</th>
        <th>Departure</th>
		<th>Arrival</th>
		<th>Aircraft</th>
		<th>Registration</th>
		<th>Days</th>
		<th>Distance</th>
		<th>Flown</th>
		<th>Active</th>
		<th>Edit</th>
		<th>Delete</th>
        </tr>
    <?php
foreach($schedules as $s)
{ ?>
             <tr>
             <td><?php echo $s->code; ?></td>
             <td><?php echo $s->flightnum; ?></td>
             <td><?php echo $s->depicao; ?></td>
             <td><?php echo $s->arricao; ?></td>
             <td><?php echo $s->acname; ?></td>
             <td><?php echo $s->registration; ?></td>
             <td><?php echo Util::GetDaysCompact($s->daysofweek); ?></td>
             <td><?php echo round($s->distance); ?></td>
             <td><?php echo $s->timesflown; ?></td>
             <td><?php echo $s->enabled; ?></td>
             <td><a href="<?php echo SITE_URL ?>/<?php echo $mloc ?>.php/HubOps/editschedule/<?php echo $s->id ?>" class="cc_hubadm_greenbutt">Edit</a></td>
             <td><a href="<?php echo SITE_URL ?>/<?php echo $mloc ?>.php/HubOps/deleteschedule/<?php echo $s->id ?>" class="cc_hubadm_redbutt">Delete</a></td>
             </tr>
             <?php } ?>
         </table>
   <?php } ?>
</div>
</div>