<?php
include "config.php";

?>

<li class="app-sidebar__heading" style="color:#003e80 !important">Filters</li>
<input type="hidden" value="" id="cond">

<div class="btn-actions-pane-right">
    <div role="group" class="btn-group-sm btn-group text-center">
        <button class="btn-transition btn btn-outline-success btn-sm" onclick="flagConstruct()" style="margin-left:50px">&nbsp;&nbsp;Apply&nbsp;&nbsp;</button>
        <button class="btn-transition btn btn-outline-danger btn-sm" onclick="resetFilters()" style="margin-left:5px">&nbsp;&nbsp;Reset&nbsp;&nbsp;</button>
    </div>
</div>

<fieldset style="width:244px;border:1px solid blue !important" id="monthField">
    <legend style="font-size: 12px"><b style="font-size: 14px">Months</b></legend>
    <select id="month" class="form-control" multiple="multiple" style="height:35px;margin-top:-10px;font-size:0.8rem !important;border: 1px solid grey !important">
        <?php 
            foreach($month as $key => $value){
                echo '<option value="'.$key.'" data-name="'.$value.'">'.$value.'</option>';	
            }
        ?>
    </select>
</fieldset>

<fieldset style="width:244px;border:1px solid blue !important" id="daysField">
    <legend style="font-size: 12px"><b style="font-size: 14px">Days</b></legend>
    <select id="days" class="form-control" multiple="multiple" style="height:35px;margin-top:-10px;font-size:0.8rem !important;border: 1px solid grey !important">
        <?php 
            foreach($days as $key => $value)
            {
                echo '<option value="'.$key.'" data-name="'.$value.'">'.$value.'</option>';	
            }
        ?>
    </select>
</fieldset>

<fieldset style="width:244px;border:1px solid blue !important" id="daytypeField">
    <legend style="font-size: 12px"><b style="font-size: 14px">Day Type</b></legend>
    <select id="days_type" class="form-control" multiple="multiple" style="height:35px;margin-top:-10px;font-size:0.8rem !important;border: 1px solid grey !important">
        <?php 
            foreach($days_type as $key => $value){
                echo '<option value="'.$key.'" data-name="'.$value.'">'.$value.'</option>';	
            }
        ?>
    </select>
</fieldset>

<fieldset style="width:244px;border:1px solid blue !important" id="segmentField">
    <legend style="font-size: 12px"><b style="font-size: 14px">Segment</b></legend>
    <select id="segment" class="form-control" multiple="multiple" style="height:35px;margin-top:-10px;font-size:0.8rem !important;border: 1px solid grey !important">
        <?php 
            foreach($segment as $key => $value){
                echo '<option value="'.$key.'" data-name="'.$value.'">'.$value.'</option>';	
            }
        ?>
    </select>
</fieldset>

<fieldset style="width:244px;border:1px solid blue !important" id="cityField">
    <legend style="font-size: 12px"><b style="font-size: 14px">Airport</b></legend>
    <select id="city" class="form-control" multiple="multiple" style="height:35px;margin-top:-10px;font-size:0.8rem !important;border: 1px solid grey !important">
        <?php 
            foreach($airport as $key => $value){
                echo '<option value="'.$key.'" data-name="'.$value.'">'.$value.'</option>';	
            }
        ?>
    </select>
</fieldset>

<fieldset style="width:244px;border:1px solid blue !important" id="genderField">
    <legend style="font-size: 12px"><b style="font-size: 14px">Gender</b></legend>
    <select id="gender" class="form-control" multiple="multiple" style="height:35px;margin-top:-10px;font-size:0.8rem !important;border: 1px solid grey !important">
    <?php 
            foreach($gender as $key => $value){
                echo '<option value="'.$key.'" data-name="'.$value.'">'.$value.'</option>';	
            }
        ?>
    </select>
</fieldset>

<fieldset style="width:244px;border:1px solid blue !important" id="ageField">
    <legend style="font-size: 12px"><b style="font-size: 14px">Age</b></legend>
    <select id="age" class="form-control" multiple="multiple" style="height:35px;margin-top:-10px;font-size:0.8rem !important;border: 1px solid grey !important">
    <?php 
            foreach($age as $key => $value){
                echo '<option value="'.$key.'" data-name="'.$value.'">'.$value.'</option>';	
            }
        ?>
    </select>
</fieldset>

<fieldset style="width:244px;border:1px solid blue !important" id="terminalField">
    <legend style="font-size: 12px"><b style="font-size: 14px">Terminal</b></legend>
    <select id="terminal" class="form-control" multiple="multiple" style="height:35px;margin-top:-10px;font-size:0.8rem !important;border: 1px solid grey !important">
        <?php 
            foreach($terminal as $key => $value){
                echo '<option value="'.$key.'" data-name="'.$value.'">'.$value.'</option>';	
            }
        ?>
    </select>
</fieldset>

<fieldset style="width:244px;border:1px solid blue !important" id="travellerField">
    <legend style="font-size: 12px"><b style="font-size: 14px">Traveller</b></legend>
    <select id="traveller" class="form-control" multiple="multiple" style="height:35px;margin-top:-10px;font-size:0.8rem !important;border: 1px solid grey !important">
        <?php 
            foreach($traveller as $key => $value){
                echo '<option value="'.$key.'" data-name="'.$value.'">'.$value.'</option>';	
            }
        ?>
    </select>
</fieldset>

<fieldset style="width:244px;border:1px solid blue !important" id="incomeField">
    <legend style="font-size: 12px"><b style="font-size: 14px">Income</b></legend>
    <select id="income" class="form-control" multiple="multiple" style="height:35px;margin-top:-10px;font-size:0.8rem !important;border: 1px solid grey !important">
        <?php 
            foreach($income as $key => $value){
                echo '<option value="'.$key.'" data-name="'.$value.'">'.$value.'</option>';	
            }
        ?>
    </select>
</fieldset>

<fieldset style="width:244px;border:1px solid blue !important" id="domestic_tripField">
    <legend style="font-size: 12px"><b style="font-size: 14px">Domestic Frequency of Travel</b></legend>
    <select id="domestic_trip" class="form-control" multiple="multiple" style="height:35px;margin-top:-10px;font-size:0.8rem !important;border: 1px solid grey !important">
        <?php 
            foreach($trip as $key => $value){
                echo '<option value="'.$key.'" data-name="'.$value.'">'.$value.'</option>';	
            }
        ?>
    </select>
</fieldset>

<fieldset style="width:244px;border:1px solid blue !important" id="international_tripField">
    <legend style="font-size: 12px"><b style="font-size: 14px">International Frequency of Travel</b></legend>
    <select id="international_trip" class="form-control" multiple="multiple" style="height:35px;margin-top:-10px;font-size:0.8rem !important;border: 1px solid grey !important">
        <?php 
            foreach($trip as $key => $value){
                echo '<option value="'.$key.'" data-name="'.$value.'">'.$value.'</option>';	
            }
        ?>
    </select>
</fieldset>

<fieldset style="width:244px;border:1px solid blue !important" id="rotField">
    <legend style="font-size: 12px"><b style="font-size: 14px">Reason of Travel</b></legend>
    <select id="rot" class="form-control" multiple="multiple" style="height:35px;margin-top:-10px;font-size:0.8rem !important;border: 1px solid grey !important">
        <?php 
            foreach($rotF as $key => $value){
                echo '<option value="'.$key.'" data-name="'.$value.'">'.$value.'</option>';	
            }
        ?>
    </select>
</fieldset>

<fieldset style="width:244px;border:1px solid blue !important" id="typesField">
    <legend style="font-size: 12px"><b style="font-size: 14px">Types</b></legend>
    <select id="types" class="form-control" multiple="multiple" style="height:35px;margin-top:-10px;font-size:0.8rem !important;border: 1px solid grey !important">
        <?php 
            foreach($types as $key => $value){
                echo '<option value="'.$key.'" data-name="'.$value.'">'.$value.'</option>';	
            }
        ?>
    </select>
</fieldset>

<fieldset style="width:244px;border:1px solid blue !important" id="dwellDField">
    <legend style="font-size: 12px"><b style="font-size: 14px">Dwell D</b></legend>
    <select id="dwellD" class="form-control" multiple="multiple" style="height:35px;margin-top:-10px;font-size:0.8rem !important;border: 1px solid grey !important">
        <?php 
            foreach($dwell_time as $key => $value){
                echo '<option value="'.$key.'" data-name="'.$value.'">'.$value.'</option>';	
            }
        ?>
    </select>
</fieldset>

<fieldset style="width:244px;border:1px solid blue !important" id="dwellAField">
    <legend style="font-size: 12px"><b style="font-size: 14px">Dwell A</b></legend>
    <select id="dwellA" class="form-control" multiple="multiple" style="height:35px;margin-top:-10px;font-size:0.8rem !important;border: 1px solid grey !important">
        <?php 
            foreach($dwell_time as $key => $value){
                echo '<option value="'.$key.'" data-name="'.$value.'">'.$value.'</option>';	
            }
        ?>
    </select>
</fieldset>

<fieldset style="width:244px;border:1px solid blue !important" id="travellingField">
    <legend style="font-size: 12px"><b style="font-size: 14px">Travelling</b></legend>
    <select id="travelling" class="form-control" multiple="multiple" style="height:35px;margin-top:-10px;font-size:0.8rem !important;border: 1px solid grey !important">
        <?php 
            foreach($travelling as $key => $value){
                echo '<option value="'.$key.'" data-name="'.$value.'">'.$value.'</option>';	
            }
        ?>
    </select>
</fieldset>
