[% IF search_terms %]
[% node_name = "Search results for $search_terms" %]
[% ELSE %]
[% node_name = "Search" %]
[% END %]
[% INCLUDE header.tt %]
[% INCLUDE banner.tt %]
<div id="content">
<table border="0" cellpadding="0" cellspacing="0" width="100%"
summary="Results of search queries are displayed here, and new searches can also be entered.">
<tr>
<td valign="top">
[% IF search_terms %]
<h2>Search Results for <em>[% search_terms %]</em></h2>
[% IF results.size %]
<h3>[% total_num %] matches found, showing [% first_num %] - [% last_num %]</h3>
[% END %]
[% ELSE %]
<h2>Search [% site_name %]</h2>
[% END %]
<p><small>
Version [% ss_version %]. See the
<a href="[% ss_info_url %]">information page</a> for help and more details.
</small></p>
<form method="get" action="supersearch.cgi">
<table border="1">
<tr>
<th>
<label for="search_upper">Pages containing text:</label>
</th>
<td>
<input type="text" name="search" value="[% IF search_terms %][% search_terms %][% END %]" size="50" maxlength="80" id="search_upper" />
</td>
</tr>
<tr>
<th>Location:</th>
<td>
<ul>
[% IF coord_field_1 == 'os_x' OR coord_field_1 == 'osie_x' %]
<li>
within <input type="text" name="[% dist_field %]" value="[% dist %]" size="5" maxlength="5" /> metres
of [% coord_field_1_name %]
<input type="text" name="[% coord_field_1 %]" value="[% coord_field_1_value %]" size="10" maxlength="10" />,
[% coord_field_2_name %]
<input type="text" name="[% coord_field_2 %]" value="[% coord_field_2_value %]" size="10" maxlength="10" />
</li>
[% END %]
<li>
within <input type="text" name="latlong_dist" value="[% dist %]" size="5" maxlength="5" /> metres
of latitude <input type="text" name="latitude" value="[% latitude %]" size="10" maxlength="10" />
longitude <input type="text" name="longitude" value="[% longitude %]" size="10" maxlength="10" />
</li>
</ul>
</td>
</tr>
<tr>
<td colspan="2" align="right">
<input type="submit" name="go" class="form_button" value="Go" />
</td>
</tr>
</table>
</form>
[% IF search_terms OR dist %]
<hr />
[% IF results.size %]
<ol start="[% first_num %]">
[% FOREACH result = results %]
<li>
<a href="[% result.url %]"><b>[% result.name %]</b></a> (score: [% result.score %])
[% IF result.distance %]
([% result.distance %] metres away)
[% END %]
<br />
[% result.summary %]
</li>
[% END %]
</ol>
<p>
Matches [% first_num %] - [% last_num %] of [% total_num %].
[% IF (first_num > 20) %]
<a href="supersearch.cgi?search=[% search_terms %]&next=[% first_num - 21 %]">Previous 20 results</a>
[% END %]
[% IF ((first_num > 20) and next_page_startpos) %]
/
[% END %]
[% IF next_page_startpos %]
<a href="supersearch.cgi?search=[% search_terms %];[% dist_field %]=[% dist %];[% coord_field_1 %]=[% coord_field_1_value %];[% coord_field_2 %]=[% coord_field_2_value %];next=[% next_page_startpos %]">Next
[% IF ((total_num - last_num >= 20)) %]
20
[% ELSE %]
[% total_num - last_num %]
[% END %]
results</a>
[% END %]
</p>
[% ELSE %]
<h2>No Items Matched</h2>
[% END %]
<form method="get" action="supersearch.cgi">
<label for="search_lower">Search:</label>
<input type="text" name="search" id="search_lower" value="[% search_terms %]" size="50" maxlength="80" value="Search text" onclick="this.value=''" />
<input type="submit" name="go" class="form_button" value="Go" />
</form>
[% END %]
</td>
<td valign="top">[% INCLUDE navbar.tt %]</td>
</tr>
</table>
[% INCLUDE footer.tt %]