- <?php include(CONST_BasePath.'/lib/template/includes/html-top-navigation.php'); ?>
-
- <form class="form-inline" role="search" accept-charset="UTF-8" action="<?php echo CONST_Website_BaseURL; ?>reverse.php">
- <div class="form-group">
- <input name="format" type="hidden" value="html">
- <input name="lat" type="text" class="form-control input-sm" placeholder="latitude" value="<?php echo htmlspecialchars($_GET['lat']); ?>" >
- <input name="lon" type="text" class="form-control input-sm" placeholder="longitude" value="<?php echo htmlspecialchars($_GET['lon']); ?>" >
- max zoom
-
- <select name="zoom" class="form-control input-sm" value="<?php echo htmlspecialchars($_GET['zoom']); ?>">
- <option value="" <?php echo $_GET['zoom']==''?'selected':'' ?> >--</option>
+ <?php include(CONST_BasePath.'/lib/template/includes/html-top-navigation.php'); ?>
+
+ <form class="form-inline" role="search" accept-charset="UTF-8" action="<?php echo CONST_Website_BaseURL; ?>reverse.php">
+ <div class="form-group">
+ <input name="format" type="hidden" value="html">
+ lat
+ <input name="lat" type="text" class="form-control input-sm" placeholder="latitude" value="<?php echo $fLat; ?>" >
+ <a href="#" class="btn btn-default btn-xs" id="switch-coords" title="switch lat and lon"><></a>
+ lon
+ <input name="lon" type="text" class="form-control input-sm" placeholder="longitude" value="<?php echo $fLon; ?>" >
+ max zoom
+
+ <select name="zoom" class="form-control input-sm">
+ <option value="" <?php if ($iZoom === false) echo 'selected="selected"' ?> >--</option>
+ <?php
+
+ $aZoomLevels = array(
+ 0 => "Continent / Sea",
+ 1 => "",
+ 2 => "",
+ 3 => "Country",
+ 4 => "",
+ 5 => "State",
+ 6 => "Region",
+ 7 => "",
+ 8 => "County",
+ 9 => "",
+ 10 => "City",
+ 11 => "",
+ 12 => "Town / Village",
+ 13 => "",
+ 14 => "Suburb",
+ 15 => "",
+ 16 => "Street",
+ 17 => "",
+ 18 => "Building",
+ 19 => "",
+ 20 => "",
+ 21 => "",
+ );
+
+ foreach($aZoomLevels as $iZoomLevel => $sLabel)
+ {
+ $bSel = $iZoom === $iZoomLevel;
+ echo '<option value="'.$iZoomLevel.'"'.($bSel?' selected="selected"':'').'>'.$iZoomLevel.' '.$sLabel.'</option>'."\n";
+ }
+ ?>
+ </select>
+ </div>
+ <div class="form-group search-button-group">
+ <button type="submit" class="btn btn-primary btn-sm">Search</button>
+ </div>
+ <div class="search-type-link">
+ <a href="<?php echo CONST_Website_BaseURL; ?>search.php">forward search</a>
+ </div>
+ </form>
+
+
+ <div id="content">
+
+<?php if (count($aPlace)>0) { ?>
+
+ <div id="searchresults" class="sidebar">