<?php
include($_SERVER['DOCUMENT_ROOT'] . HOME_DIR . TEMPLATE_DIR . '/header.php');
include($_SERVER['DOCUMENT_ROOT'] . HOME_DIR . '/Auth/nav.php');
?>

<div class="container">
  <div class="card bg-light mb-3">
    <div class="card-header">
      <?php
      include($_SERVER['DOCUMENT_ROOT'] . HOME_DIR . TEMPLATE_DIR . '/headline.php');
      ?>
    </div>
    <div class="card-body">
      <form name="search-country" action="search-result.php" method="GET">
        <div class="row">
          <div class="col-md-2">
            <label for="country">Land auswählen:</label>
          </div>
          <div class="col-md-4">
            <select name="country" id="country" class="form-control" required>
              <optgroup label="Meist benutzte Länder">
                <?php
                foreach ($dropdownMostUsedCountries as $keyMost => $valueMost) {
                  echo '<option value="' . $valueMost . '">' . $keyMost . '</option>';
                }
                ?>
              </optgroup>
              <optgroup label="Restliche Länder">
                <?php
                foreach ($dropdownRestCountries as $keyRest => $valueRest) {
                  echo '<option value="' . $valueRest . '">' . $keyRest . '</option>';
                }
                ?>
              </optgroup>
            </select>
          </div>
          <div class="col-md-4">
            <input type="submit" name="show" value="anzeigen" class="btn btn-info">
            <input type="hidden" name="client_uuid" value="<?php echo $_GET['client_uuid']; ?>">
          </div>
        </div>
      </form>
    </div>
  </div>
</div>

<p>&nbsp;</p>
<p>&nbsp;</p>
<?php
include($_SERVER['DOCUMENT_ROOT'] . HOME_DIR . TEMPLATE_DIR . '/footer.php');
?>

</body>
</html>
