{%!HTML-FRAGMENT%}
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
{%?CSS-URL%}<link rel="stylesheet" type="text/css" href="{%@% encode=attr}" />{%ENDIF%}
<title> {%?QUERY-STRING%}Search results for &quot;{%@%}&quot;{%ELSE%}Awasu search{%ENDIF%} </title>
</head>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

<body onLoad="document.form.query.focus()">

<img src="{%LOGO-URL% encode=attr}" id="logo" />
{%ENDIF%}

<form name="form" action="/search/query" method="get" class="awasu-searchForm">
<table>
    <tr>
        <td> Search for: </td>
        <td colspan="2">
            <input type="text" name="query" size="40" value="{%QUERY-STRING% encode=sgml}" />
            <input type="submit" value="  Go  " />
        </td>
        <td></td>
    </tr>
    <tr>
        <td></td>
        <td class="options">
            <input type="checkbox" {%?SLD-CHECKED%}checked{%ENDIF%} name="slD" value="1">Descriptions</input>
            <input type="checkbox" {%?SLT-CHECKED%}checked{%ENDIF%} name="slT" value="1">Titles</input>
            <p style="margin-top:0">
                <input type="checkbox" {%?ADVANCED-SYNTAX%}checked{%ENDIF%} name="advsyn" value="1"><span style="font-size:80%">Enable advanced syntax</span></input>
            </p>
        </td>
        <td align="right">
            <select name="fidf">
                <option {%?FIDF-FULLCONTENT-SELECTED%}selected{%ENDIF%} value="full">Full content</option>
                <option {%?FIDF-EXCERPT-SELECTED%}selected{%ENDIF%} value="excerpt">Excerpt</option>
                <option {%?FIDF-PLAINTEXT-SELECTED%}selected{%ENDIF%} value="plaintext">Plain text</option>
                <option {%?FIDF-NONE-SELECTED%}selected{%ENDIF%} value="none">None</option>
            </select>
        </td>
    </tr>
</table>
{%?API-TOKEN%}<input type="hidden" name="token" value="{%@% encode=attr}" />{%ENDIF%}
<input type="hidden" name="format" value="html" />
<input type="hidden" name="pageSize" value="10" />
{%??IS-LOCAL-CLIENT%}<input type="hidden" name="local" value="1" />{%ENDIF%}
{%?HTML-FRAGMENT%}<input type="hidden" name="htmlFragment" value="1" />{%ENDIF%}
</form>

{%?QUERY-STRING%}
<div class="awasu-searchResults">

<div class="header">
{%?RESULT-COUNT-MSG%}
    {%@%} 
    {%?PAGE-COUNT-MSG%} <br/> {%PAGE-COUNT-MSG%} {%ENDIF%}
{%ENDIF%}
</div>

<br clear="all" />

<div class="results">

{%?NO-SEARCH-RESULTS%}
    No results were found.
{%ELSE%}
    {%REPEAT% SearchResults}
    <div class="result">
    <div class="title">
        <a href="{%OPEN-ITEM-URL% encode=attr}" onFocus="javascript:this.blur()"><img src="{%ITEM-IMAGE-URL% encode=attr}" border="0" /></a>
        <b>{%ITEM-SCORE%}</b>
        <a href="{%ITEM-METADATA% url encode=attr}">{%ITEM-METADATA% name!}</a>
    </div>
    <div class="content"> {%ITEM-METADATA% description} </div>
    <div class="details"> {%ITEM-METADATA% timestamp} - <a href="{%OPEN-CHANNEL-URL% encode=attr}">{%CHANNEL-METADATA% name} </a> </div>
    </div>
    {%/REPEAT%}
{%ENDIF%}

</div>

<center>
<table class="footer"><tr>
<td width="40"> {%?PREV-PAGE-URL%} <a href="{%@% encode=attr}" onFocus="javascript:this.blur()"><img src="{%PREV-PAGE-IMAGE-URL% encode=attr}" border="0" /></a> {%ENDIF%} </td>
<td> {%?RESULT-COUNT-MSG%}{%@%}{%ENDIF%} {%?PAGE-COUNT-MSG%}<br/>{%@%}{%ENDIF%} </td>
<td width="40"> {%?NEXT-PAGE-URL%} <a href="{%@% encode=attr}" onFocus="javascript:this.blur()"><img src="{%NEXT-PAGE-IMAGE-URL% encode=attr}" border="0" /></a> {%ENDIF%} </td>
</tr></table>
</center>

</div> <!-- awasu-searchResults -->
{%ENDIF%} 

{%!HTML-FRAGMENT%}
</body>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

</html> {%SET-CONTENT-TYPE% text/html}
{%ENDIF%}
