[ci] Fix clang-santisers job for GHA change
[xapian.git] / xapian-applications / omega / templates / query
blobca9cf6239d26e04f6ec92128ecae58f20e3cddd2
1 $httpheader{Content-Type,text/html; charset=utf-8}<!DOCTYPE html><html lang="en">
2 $set{flag_spelling,$ne{$cgi{SPELL},0}}
3 $set{thousand,$.}$set{decimal,.}
4 $setmap{prefix,,$split{ S B F},title,S,author,A,topic,B}
6 $def{PREV,$if{$ne{$topdoc,0},<input type=submit name="&lt;" value="Previous">}}
8 $def{PAGE,<input type=submit name="[" value="$1">}
10 $def{SPAGE,<input type=submit name="[" value="$1" disabled=disabled>}
12 $def{NEXT,$if{$ne{$last,$msize},<input type=submit name="&gt;" value="Next">}}
14 <head>
15 <title>$if{$query,Omega Search: $html{$query},Omega Search}</title>
16 $if{$opt{topterms},$include{inc/toptermsjs}}
17 <style>
18 input[type=image] {
19   border: 0px;
20   }
21 </style>
22 <script type="text/javascript"><!--
23 function f2(n) {return (n>9?"":"0")+n;}
24 function write_date(time_t) {
25 var d=new Date();d.setTime(time_t*1000);
26 var D=d.getFullYear()+"-"+f2(d.getMonth()+1)+"-"+f2(d.getDate());
27 var T=f2(d.getHours())+":"+f2(d.getMinutes())+":"+f2(d.getSeconds());
28 document.write("<time datetime=\"$html{$date{$field{modtime},%Y-%m-%d %H:%M:%S}}Z\" title=\""+D+" "+T+"\">Modified:<br><b>"+D+"</b></time>");
30 // -->
31 </script>
32 </head>
33 <body bgcolor="#ffffff">
34 <form name=P method=get
35 action="$html{$or{$env{SCRIPT_NAME},omega}}" target="_top">
36 <center>
37 <input id="omega-autofocus" type=search name=P value="$html{$query}" size=65 autofocus>
38 <script>
39 if (!("autofocus" in document.createElement("input")))
40  document.getElementById("omega-autofocus").focus();
41 </script>
42 <input type=submit value="Search">
43 <hr>
44 $if{,$include{inc/anyalldropbox},$include{inc/anyallradio}}
45 $if{$opt{topterms},$if{$or{$query,$ne{$msize,0}},
46  <div title="Suggested terms to add to your query"
47  style="text-align:left;background:#cfc;border:1px solid green;padding:2px;font:11px verdana$. arial$. helvetica$. sans-serif;">
48  $map{$topterms,<span style="white-space:nowrap"><input type=checkbox name=X value="$html{$prettyterm{$_}}" onClick="C(this)">$html{$prettyterm{$_}}</span> }
49  <br><noscript><input type=hidden name=ADD value=1></noscript>
50  </div>
52 <br>
53 $if{$suggestion,Did you mean: <a href="$html{$or{$env{SCRIPT_NAME},omega}?DB=$url{$dbname}&P=$url{$suggestion}$if{$ne{$hitsperpage,10},&HITSPERPAGE=$hitsperpage}$if{$fmt,&FMT=$url{$fmt}}$if{$cgi{COLLAPSE},&COLLAPSE=$url{$cgi{COLLAPSE}}}$map{$relevants,&R=$_}$if{$cgi{THRESHOLD},&THRESHOLD=$url{$cgi{THRESHOLD}}}$map{$cgilist{B},&B=$url{$_}}&SPELL=0}">$html{$suggestion}</a><br>}
54 $or{$html{$error},
55 $if{$eq{$msize,0},
56 $if{$query,No documents match your query,
57 <hr>Searching $nice{$dbsize} documents
59 $if{$not{$msizeexact},
60  $nice{$add{$topdoc,1}}-$nice{$last} of about $nice{$msize} matches,
61  $if{$and{$eq{$last,$msize},$eq{$topdoc,0}},
62   All $nice{$msize} matches,
63   $nice{$add{$topdoc,1}}$if{$ne{$add{$topdoc,1},$last},-$nice{$last}} of exactly $nice{$msize} matches}
65 <hr>
66 </center>
67 $if{$map{$queryterms,$set{U,$unstem{$_}}$set{F_$opt{U},$add{$opt{F_$opt{U}},$freq{$_}}}},$list{$unique{$map{$queryterms,$set{U,$unstem{$_}}$list{$html{$unique{$opt{U}}},<b>,</b>/<b>,</b>}:&nbsp;$nice{$opt{F_$opt{U}}}}},Term frequencies: ,$. ,}}
68 <br><small>Search took $time seconds</small>
69 <table>
70 $if{$opt{clicklog},$set{queryid,$hash{md5,$transform{s/^\s+|\s+$$//g,\1,$query}}}}
71 $if{$opt{clicklog},$if{$log{search.log,$opt{queryid}$.$csv{$query,1}$.$csv{$hitlist{$id$if{$ne{$hit,$sub{$last,1}},$.}},1}$.$topdoc}}}
72 $hitlist{<tr><td valign=top>
73 $set{clickurl,$if{$opt{clicklog},$or{$env{SCRIPT_NAME},omega.cgi}?FMT=clicklog&DB=$url{$dbname}&QUERYID=$opt{queryid}&DOCID=$url{$id}&URL=$url{$field{url}},$field{url}}}
74 <div title="$percentage%" style='float:left;width:60px;height:10px;border:1px solid black;margin-top:4px;'>
75 <div style='width:$div{$mul{$percentage,6},10}px; height:10px; background-color: red;'>
76 </div></div>
77 <div style='float:left;margin-top:2px;font-size:x-small;'>
78 $if{$and{$field{modtime},$ne{$field{modtime},-1}},
79 <script type="text/javascript">write_date($add{$field{modtime}});</script>
80 <noscript>
81 <time datetime="$html{$date{$field{modtime},%Y-%m-%d %H:%M:%S}}Z" title="$html{$date{$field{modtime},%Y-%m-%d %H:%M:%S}}">
82 Modified:<br><b>$html{$date{$field{modtime},%Y-%m-%d}}</b></time>
83 </noscript><br>
85 $if{$field{language},Language: <b>$html{$field{language}}</b><br>}
86 $if{$field{size},<span title="$html{$field{size}} bytes">Size: <b>$html{$filesize{$field{size}}}</b></span><br>}
87 <div title="Mark this document as relevant" style="float:left;background-color:#cfc;border:1px solid green;margin-top:2px;">
88 <input type=checkbox name=R value=$id$if{$relevant, checked}>
89 </div>
90 </div>
91 </td>
92 <td><b><a href="$html{$opt{clickurl}}">$html{$or{$field{caption},$field{title},$prettyurl{$field{url}},Untitled}}</a></b><br>
93 <small>$snippet{$field{sample}}</small><br>
94 <a href="$html{$opt{clickurl}}">$html{$prettyurl{$field{url}}}</a><br>
95 <small>
96 matching:
97 <i>$list{$map{$terms,$html{$prettyterm{$_}}},</i>$. <i>,</i> and <i>}</i></small>${for lynx:}<p></td></tr>}
98 </table>
100 <br><center>
102 ${suppress next, prev, and page links if there's only one page}
103 $if{$ne{$lastpage,1},
104 $set{a,$if{$opt{pagelink_height}, HEIGHT=$opt{pagelink_height}}$if{$opt{pagelink_width}, WIDTH=$opt{pagelink_width}}}
106 ${1-W ... X-(this)-Y ...}
107 $set{w,$min{3,$add{$thispage,-1}}}
108 $set{x,$max{$add{$opt{w},1},$add{$thispage,-3}}}
109 $set{y,$min{$lastpage,$add{$thispage,8}}}
110 $PREV
111 $map{$range{1,$opt{w}},$PAGE{$_}}
112 $if{$ne{$add{$opt{w},1},$opt{x}},...}
113 $map{$range{$opt{x},$add{$thispage,-1}},$PAGE{$_}}
114 $SPAGE{$thispage}
115 $map{$range{$add{$thispage,1},$opt{y}},$PAGE{$_}}
116 $if{$ne{$opt{y},$lastpage},...}
117 $NEXT
120 </center><br>
121 $if{$dbname,<input type=hidden name=DB value="$html{$dbname}">}
122 $if{$ne{$topdoc,0},<input type=hidden name=TOPDOC value=$topdoc>}
123 $if{$ne{$hitsperpage,10},<input type=hidden name=HITSPERPAGE value=$hitsperpage>}
124 $if{$fmt,<input type=hidden name=FMT value="$html{$fmt}">}
125 $if{$cgi{COLLAPSE},<input type=hidden name=COLLAPSE value="$html{$cgi{COLLAPSE}}">}
126 $if{$queryterms,<input type=hidden name=xP value="$html{$queryterms}">}
127 <input type=hidden name=xDB value="$html{$dbname}">
128 <input type=hidden name=xFILTERS value="$html{$filters}">
129 $list{$relevants,<input type=hidden name=R value=",.,">}
130 $if{$cgi{THRESHOLD},<input type=hidden name=THRESHOLD value="$html{$cgi{THRESHOLD}}">}
131 ${Preserve any B filters used - this needs modifying if you modify this template
132   to have B on radio buttons, SELECT, etc}
133 $map{$cgilist{B},<input type=hidden name=B value="$html{$_}">}
134 </form>
135 <hr><div align=right><i><small><a href="https://xapian.org/">$html{$version}</a></small></i></div>
136 </body>
137 </html>
138 $if{$log{query.log}}