- <div id="searchresults" class="sidebar">
- <?php
- $i = 0;
- foreach($aSearchResults as $iResNum => $aResult)
- {
-
- echo '<div class="result" data-position=' . $i . '>';
-
- echo (isset($aResult['icon'])?'<img alt="icon" src="'.$aResult['icon'].'"/>':'');
- echo ' <span class="name">'.htmlspecialchars($aResult['name']).'</span>';
- // echo ' <span class="latlon">'.round($aResult['lat'],3).','.round($aResult['lon'],3).'</span>';
- // echo ' <span class="place_id">'.$aResult['place_id'].'</span>';
- if (isset($aResult['label']))
- echo ' <span class="type">('.$aResult['label'].')</span>';
- else if ($aResult['type'] == 'yes')
- echo ' <span class="type">('.ucwords(str_replace('_',' ',$aResult['class'])).')</span>';
- else
- echo ' <span class="type">('.ucwords(str_replace('_',' ',$aResult['type'])).')</span>';
- echo ' <a class="btn btn-default btn-xs details" href="details.php?place_id='.$aResult['place_id'].'">details</a>';
- echo '</div>';
- $i = $i+1;
- }
- if (sizeof($aSearchResults) && $sMoreURL)
- {
- echo '<div class="more"><a class="btn btn-primary" href="'.htmlentities($sMoreURL).'">Search for more results</a></div>';
- }
- else
- {
- echo '<div class="noresults">No search results found</div>';
- }
-
- ?>
- </div>
+ <div id="searchresults" class="sidebar">
+ <?php
+ $i = 0;
+ foreach($aSearchResults as $iResNum => $aResult)
+ {
+
+ echo '<div class="result" data-position=' . $i . '>';
+
+ echo (isset($aResult['icon'])?'<img alt="icon" src="'.$aResult['icon'].'"/>':'');
+ echo ' <span class="name">'.htmlspecialchars($aResult['name']).'</span>';
+ // echo ' <span class="latlon">'.round($aResult['lat'],3).','.round($aResult['lon'],3).'</span>';
+ // echo ' <span class="place_id">'.$aResult['place_id'].'</span>';
+ if (isset($aResult['label']))
+ echo ' <span class="type">('.$aResult['label'].')</span>';
+ else if ($aResult['type'] == 'yes')
+ echo ' <span class="type">('.ucwords(str_replace('_',' ',$aResult['class'])).')</span>';
+ else
+ echo ' <span class="type">('.ucwords(str_replace('_',' ',$aResult['type'])).')</span>';
+ echo ' <a class="btn btn-default btn-xs details" href="details.php?osmtype='.$aResult['osm_type'].'&osmid='.$aResult['osm_id'].'&class='.$aResult['class'].'">details</a>';
+ echo '</div>';
+ $i = $i+1;
+ }
+ if (!empty($aSearchResults) && $sMoreURL)
+ {
+ echo '<div class="more"><a class="btn btn-primary" href="'.htmlentities($sMoreURL).'">Search for more results</a></div>';
+ }
+ else
+ {
+ echo '<div class="noresults">No search results found</div>';
+ }
+
+ ?>
+ </div>