- <div id="seachheader">
- <form accept-charset="UTF-8" action="<?php echo CONST_Website_BaseURL; ?>search.php" method="get">
- <table border="0" width="100%" summary="header">
- <tr>
- <td valign="middle" style="width:30px;"><img alt="logo" src="images/logo.gif" /></td>
- <td valign="middle" style="width:400px;"><input id="q" name="q" value="<?php echo htmlspecialchars($sQuery);
-?>" style="width:270px;" /><input type="text" id="viewbox" style="width:120px;" name="viewbox" /></td>
- <td style="width:80px;"><input type="submit" value="Search"/></td>
-<?php if (CONST_Search_AreaPolygons) { ?> <td style="width:100px;"><input type="checkbox" value="1" name="polygon" <?php if ($bAsText) echo "checked='checked'"; ?>/> Highlight</td>
-<td style="text-align:right;">Data: <?php echo $sDataDate; ?></td>
-<td style="text-align:right;">
-<a href="http://wiki.openstreetmap.org/wiki/Nominatim" target="_blank">Documentation</a> | <a href="http://wiki.openstreetmap.org/wiki/Nominatim/FAQ"
-target="_blank">FAQ</a></td>
-
-<?php } ?> <td style="text-align:right;"><?php if ($sQuery) { ?><input type="button" value="Report Problem With Results" onclick="$('report').style.visibility=($('report').style.visibility=='hidden'?'visible':'hidden')"/><?php } ?></td>
- </tr>
- </table>
- </form>
- </div>
-
-<?php
- if ($sQuery || sizeof($aSearchResults))
- {
-?>
- <div id="searchresultsfade1"></div><div id="searchresultsfade2"></div><div id="searchresultsfade3"></div><div id="searchresultsfade4"></div>
- <div id="searchresults">
-<?php
- if ($sSuggestionURL)
- {
- echo '<div class="more"><b>Suggest: </b><a href="'.$sSuggestionURL.'"><b>'.$sSuggestion.'</b></a></div>';
- }
- foreach($aSearchResults as $iResNum => $aResult)
- {
- if ($aResult['aBoundingBox'])
- {
- echo '<div class="result" onClick=\'panToLatLonBoundingBox('.$aResult['lat'].', '.$aResult['lon'];
- echo ', '.$aResult['aBoundingBox'][0];
- echo ', '.$aResult['aBoundingBox'][1];
- echo ', '.$aResult['aBoundingBox'][2];
- echo ', '.$aResult['aBoundingBox'][3];
- if (isset($aResult['astext'])) echo ', "'.$aResult['astext'].'"';
- echo ");'>\n";
- }
- elseif (isset($aResult['zoom']))
- {
- echo '<div class="result" onClick="panToLatLonZoom('.$aResult['lat'].', '.$aResult['lon'].', '.$aResult['zoom'].');">';
- }
- else
- {
- echo '<div class="result" onClick="panToLatLon('.$aResult['lat'].', '.$aResult['lon'].');">';
- }
-
- echo (isset($aResult['icon'])?'<img alt="icon" src="'.$aResult['icon'].'"/>':'');
- echo ' <span class="name">'.$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
- echo ' <span class="type">('.ucwords(str_replace('_',' ',$aResult['type'])).')</span>';
- echo ' <span class="details">(<a href="details.php?place_id='.$aResult['place_id'].'">details</a>)</span>';
- echo '</div>';
- }
- if (sizeof($aSearchResults))
- {
- if ($sMoreURL)
- {
- echo '<div class="more"><a href="'.htmlentities($sMoreURL).'">Search for more results</a></div>';
- }
- }
- else
- {
- echo '<div class="noresults">No search results found</div>';
- }
-
-?>
- <div class="disclaimer">Addresses and postcodes are approximate
- <input type="button" value="Report Problem" onclick="$('report').style.visibility=($('report').style.visibility=='hidden'?'visible':'hidden')"/>
- </div>
- </div>
-<?php
-}
-?>
-
- <div id="map"></div>
- <div id="report" style="visibility:hidden;"><div style="width:600px;margin:auto;margin-top:60px;">
- <h2>Report a problem</h2>
- <p>Before reporting problems please read the <a href="http://wiki.openstreetmap.org/wiki/Nominatim">user documentation</a> and <a
-href="http://wiki.openstreetmap.org/wiki/Nominatim/FAQ">FAQ</a>. If your problem relates to the address of a particular search result please use the 'details' link
-to check how the address was generated before reporting a problem.</p>
- <p>Please use <a href="http://trac.openstreetmap.org/newticket?component=nominatim">trac.openstreetmap.org</a> to report problems
-making sure to set
-the component to 'nominatim'. You can search for existing bug reports <a href="http://trac.openstreetmap.org/query?status=new&status=assigned&status=reopened&component=nominatim&order=priority">here</a>.</p>
- <p>Please ensure that you include a full description of the problem, including the search query that you used, the problem with the result and, if
-the problem relates to missing data, the osm id of the item that is missing. Problems that contain enough detail are likely to get looked at before ones that
-require significant research!</p>
- </div>
-
-<!--
- <p>Please use this form to report problems with the search results. Of particular interest are items missing, but please also use this form to
-report any other problems.</p>
- <p>If your problem relates to the address of a particular search result please use the 'details' link to check how the address was generated before
-reporting a problem.</p>
- <p>If you are reporting a missing result please (if possible) include the OSM ID of the item you where expecting (i.e. node 422162)</p>
- <form method="post">
- <table>
- <tr><th>Your Query:</th><td><input type="hidden" name="report:query" value="<?php echo htmlspecialchars($sQuery); ?>" style="width:500px;"><?php echo htmlspecialchars($sQuery); ?></td></tr>
- <tr><th>Your Email Address(opt):</th><td><input type="text" name="report:email" value="" style="width:500px;"></td></tr>
- <tr><th>Description of Problem:</th><td><textarea name="report:description" style="width:500px;height:200px;"></textarea></td></tr>
- <tr><td colspan="2" class="button"><input type="button" value="Cancel" onclick="$('report').style.visibility='hidden'"><input type="submit" value="Report"></td></tr>
- </table>
- </form>
- <h2>Known Problems</h2>
- <ul>
- <li>Countries where missed out of the index</li>
- <li>Area Polygons relate to the search area - not the address area which would make more sense</li>
- </ul>
--->
- </div>
-
- <script type="text/javascript">
-init();
-<?php
- foreach($aSearchResults as $iResNum => $aResult)
- {
- if ($aResult['aBoundingBox'])
- {
- echo 'panToLatLonBoundingBox('.$aResult['lat'].', '.$aResult['lon'];
- echo ', '.$aResult['aBoundingBox'][0];
- echo ', '.$aResult['aBoundingBox'][1];
- echo ', '.$aResult['aBoundingBox'][2];
- echo ', '.$aResult['aBoundingBox'][3];
- if (isset($aResult['astext'])) echo ", '".$aResult['astext']."'";
- echo ');'."\n";
- }
- else
- {
- echo 'panToLatLonZoom('.$fLat.', '.$fLon.', '.$iZoom.');'."\n";
- }
- break;
- }
- if (!sizeof($aSearchResults))
- {
- echo 'panToLatLonZoom('.$fLat.', '.$fLon.', '.$iZoom.');'."\n";
- }
-?>
-</script>