<div class="cc_hubadm_content">
    <div class="cc_hubadm_box cc_hubadm_full">
    <div class="cc_hubadm_boxtitle">Edit Hub Details</div>
        The settings on this page do only affect the hub admin area and have no effect on any public pilot pages! <br /><br />
    <form method="post" class="cc_hubopsform" action="<?php echo SITE_URL ?>/<?php echo $mloc ?>.php/HubOps/savedetails">
           <table class="cc_hubadm_formtable">
               <tr>
                   <td>Limit Flight Codes:</td>
                   <td>
                       <input type="checkbox" name="limitcodes" id="limitcodes" value="1" <?php if($info->limitcodes == '1') { echo "checked"; } ?>>
                       <br />This option allows you to select certain Airline Codes from below which may be used by the staff of this hub when creating schedules. 
                   </td></tr>
               <tr>
                   <td>Select Airlines:</td>
                   <td>
                       <select name="codes[]" multiple>
                            <?php 
                         $alwcodes = unserialize($info->codes);
                    
                         foreach($airlines as $al) { 
                      
                        if(!empty($alwcodes)) {
                         if (in_array($al->code, $alwcodes)) { $sel = 'selected'; }
                        }
                        ?>
                           <option value="<?php echo $al->code ?>" <?php echo $sel ?>><?php echo $al->code ?> - <?php echo $al->name ?></option>
                           <?php $sel = "";  } ?>
                       </select>
                   </td></tr>
               <tr>
                   <td>Limit Flight Numbers:</td>
                   <td>
                       <input type="checkbox" name="limitfnum" id="limitfnum" value="1" <?php if($info->limitfnum == '1') { echo "checked"; } ?>>
                       <br />This option allows you to enter a certain Flight Number Range below which may be used by the staff of this hub when creating schedules. 
                   </td></tr>
               <tr>
                   <td>Flight Number Range:</td>
                   <td>
                       From <input type="number" size="6" name="minflnum" id="minflnum" value="<?php echo $info->minflnum ?>" /> to <input type="number" size="6" name="maxflnum" id="maxflnum" value="<?php echo $info->maxflnum ?>" />
                   </td></tr>
                <tr>
                   <td>Limit Aircraft Types:</td>
                   <td>
                       <input type="checkbox" name="limitactypes" id="limitactypes" value="1" <?php if($info->limitactypes == '1') { echo "checked"; } ?>>
                       <br />This option allows you to select certain aircraft types from below which may be used by the staff of this hub when creating schedules. 
                   </td></tr>
               <tr>
                   <td>Select Types:</td>
                   <td>
                       <select name="actypes[]" multiple>
                            <?php 
                         $alwactypes = unserialize($info->actypes);

                         foreach($aircraft as $ac) { 
                      if(!empty($alwcodes)) {
                         if (in_array($ac->icao, $alwactypes)) { $sel2 = 'selected'; }
                      }
                        ?>
                           <option value="<?php echo $ac->icao ?>" <?php echo $sel2 ?>><?php echo $ac->icao ?> - <?php echo $ac->name ?></option>
                           <?php $sel2 = ""; } ?>
                       </select>
                   </td></tr>
               <tr>
                   <td>Show only hub Pilots:</td>
                   <td>
                       <input type="checkbox" name="hubpilots" id="hubpilots" value="1" <?php if(!isset($info->hubpilots) || $info->hubpilots == '1') { echo "checked"; } ?>>
                   </td></tr>
                <tr>
                   <td>Show only hub PIREPs:</td>
                   <td>
                       <input type="checkbox" name="hubpireps" id="hubpireps" value="1" <?php if(!isset($info->hubpireps) || $info->hubpireps == '1') { echo "checked"; } ?>>
                   </td></tr>
                <tr>
                   <td>Show only hub Schedules:</td>
                   <td>
                       <input type="checkbox" name="hubschedules" id="hubschedules" value="1" <?php if(!isset($info->hubschedules) || $info->hubschedules == '1') { echo "checked"; } ?>>
                   </td></tr>
               <tr>
                   <td>PIREP Requirement (days):</td>
                   <td>
                       <input type="number" name="pirepdays" id="pirepdays" value="<?php echo $info->pirepdays; ?>">
                       Number of days a pilot has to file a PIREP after his last report was received. (Set to 0 to disable the feature)
                   </td></tr>
               <tr><td></td><td>
                   <input type="hidden" name="hubcode" value="<?php echo $hub->icao; ?>" />
                   <input type="submit" value="Save Details" /></td></tr>
           </table>
        
    </form>
    </div>
</div>