1 | $set{topterms,1}
|
---|
2 | $httpheader{Content-Type,text/html; charset=utf-8}<!DOCTYPE html><html lang="en">
|
---|
3 | $set{flag_spelling,$ne{$cgi{SPELL},0}}
|
---|
4 | $set{thousand,$.}$set{decimal,.}
|
---|
5 | $setmap{prefix,,$split{ S B F},title,S,author,A,topic,B}
|
---|
6 | ${
|
---|
7 | $def{PREV,
|
---|
8 | $if{$ne{$topdoc,0},<input type=image name="<" alt="<"
|
---|
9 | src="/icons/omega/prev.png" height=30 width=30>,
|
---|
10 | <img alt="" src="/icons/omega/prevoff.png" height=30 width=30>}
|
---|
11 | }
|
---|
12 |
|
---|
13 | $def{NEXT,
|
---|
14 | $if{$ne{$last,$msize},<input type=image name=">" alt=">"
|
---|
15 | src="/icons/omega/next.png" height=30 width=30>,
|
---|
16 | <img alt="" src="/icons/omega/nextoff.png" height=30 width=30>}
|
---|
17 | }
|
---|
18 |
|
---|
19 | $def{P,<input type=image name="$1" value="$1" src="/icons/omega/page-$2.png" $opt{a} alt="$1">}
|
---|
20 | $def{PAGE,$if{$gt{$1,9},$if{$gt{$1,99},$P{$1,$div{$1,100}}}$P{$1,$mod{$div{$1,10},10}}}$P{$1,$mod{$1,10}}}
|
---|
21 |
|
---|
22 | $def{S,<img src="/icons/omega/page-$2s.png" $opt{a} alt=$1>}
|
---|
23 | $def{SPAGE,$if{$gt{$1,9},$if{$gt{$1,99},$S{$1,$div{$1,100}}}$S{$1,$mod{$div{$1,10},10}}}$S{$1,$mod{$1,10}}}
|
---|
24 | }
|
---|
25 |
|
---|
26 | $def{PREV,$if{$ne{$topdoc,0},<input type=submit name="<" value="Previous">}}
|
---|
27 |
|
---|
28 | $def{PAGE,<input type=submit name="[" value="$1">}
|
---|
29 |
|
---|
30 | $def{SPAGE,<input type=submit name="[" value="$1" disabled=disabled>}
|
---|
31 |
|
---|
32 | $def{NEXT,$if{$ne{$last,$msize},<input type=submit name=">" value="Next">}}
|
---|
33 |
|
---|
34 | <head>
|
---|
35 | <title>$if{$query,Omega Search: $html{$query},Omega Search}</title>
|
---|
36 | $if{$opt{topterms},$include{inc/toptermsjs}}
|
---|
37 | <style>
|
---|
38 | input[type=image] {
|
---|
39 | border: 0px;
|
---|
40 | }
|
---|
41 | </style>
|
---|
42 | <script type="text/javascript"><!--
|
---|
43 | function f2(n) {return (n>9?"":"0")+n;}
|
---|
44 | function write_date(time_t) {
|
---|
45 | var d=new Date();d.setTime(time_t*1000);
|
---|
46 | var D=d.getFullYear()+"-"+f2(d.getMonth()+1)+"-"+f2(d.getDate());
|
---|
47 | var T=f2(d.getHours())+":"+f2(d.getMinutes())+":"+f2(d.getSeconds());
|
---|
48 | document.write("<span title=\""+D+" "+T+"\">Modified:<br><b>"+D+"</b></span>");
|
---|
49 | }
|
---|
50 | // -->
|
---|
51 | </script>
|
---|
52 | </head>
|
---|
53 | <body bgcolor="#ffffff">
|
---|
54 | <form name=P method=get
|
---|
55 | action="omega" target="_top">
|
---|
56 | <center>
|
---|
57 | <input id="omega-autofocus" type=search name=P value="$html{$query}" size=65 autofocus>
|
---|
58 | <script>
|
---|
59 | if (!("autofocus" in document.createElement("input")))
|
---|
60 | document.getElementById("omega-autofocus").focus();
|
---|
61 | </script>
|
---|
62 | <input type=submit value="Search">
|
---|
63 | <select name=DB>
|
---|
64 | <option value="admin/projects" $if{$eq{$dbname,Admin/work},selected="selected"}>Everything</option>
|
---|
65 | <option value="admin" $if{$eq{$dbname,admin},selected="selected"}>admin</option>
|
---|
66 | <option value="projects" $if{$eq{$dbname,projects},selected="selected"}>projects</option>
|
---|
67 | </select>
|
---|
68 | From: <input type="text" name="START" value="$html{$cgi{START}}" />
|
---|
69 | To: <input type="text" name="END" value="$html{$cgi{END}}" />
|
---|
70 | Span: <input type="text" name="SPAN" value="$html{$cgi{SPAN}}" />
|
---|
71 | <br>
|
---|
72 | Hits per page:
|
---|
73 | <input type=radio name=HITSPERPAGE value="15" $if{$eq{$hitsperpage,15},checked}>15</input>
|
---|
74 | <input type=radio name=HITSPERPAGE value="30" $if{$eq{$hitsperpage,30},checked}>30</input>
|
---|
75 | <input type=radio name=HITSPERPAGE value="100" $if{$eq{$hitsperpage,100},checked}>100</input>.
|
---|
76 | To/From are of the format YYYYMMDD. Span is in days.
|
---|
77 | <hr>
|
---|
78 | $if{,$include{inc/anyalldropbox},$include{inc/anyallradio}}
|
---|
79 | $if{$opt{topterms},
|
---|
80 | <div title="Suggested terms to add to your query"
|
---|
81 | style="text-align:left;background:#cfc;border:1px solid green;padding:2px;font:11px verdana$. arial$. helvetica$. sans-serif;">
|
---|
82 | $map{$topterms,<span style="white-space:nowrap"><input type=checkbox name=X value="$html{$prettyterm{$_}}" onClick="C(this)">$html{$prettyterm{$_}}</span> }
|
---|
83 | <br><noscript><input type=hidden name=ADD value=1></noscript>
|
---|
84 | </div>
|
---|
85 | }
|
---|
86 | <br>
|
---|
87 | $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>}
|
---|
88 | $or{$html{$error},
|
---|
89 | $if{$eq{$msize,0},
|
---|
90 | $if{$query,No documents match your query,
|
---|
91 | <hr>Searching $nice{$dbsize} documents
|
---|
92 | },
|
---|
93 | $if{$not{$msizeexact},
|
---|
94 | $nice{$add{$topdoc,1}}-$nice{$last} of about $nice{$msize} matches,
|
---|
95 | $if{$and{$eq{$last,$msize},$eq{$topdoc,0}},
|
---|
96 | All $nice{$msize} matches,
|
---|
97 | $nice{$add{$topdoc,1}}$if{$ne{$add{$topdoc,1},$last},-$nice{$last}} of exactly $nice{$msize} matches}
|
---|
98 | }
|
---|
99 | <hr>
|
---|
100 | </center>
|
---|
101 | $list{$map{$queryterms,$list{$html{$uniq{$unstem{$_}}},<b>,</b>/<b>,</b>}: $nice{$freq{$_}}},Term frequencies: ,$. ,}
|
---|
102 | <br><small>Search took $time seconds</small>
|
---|
103 | <table>
|
---|
104 | $hitlist{<tr><td valign=top>
|
---|
105 | ${<img src="/icons/omega/score-$div{$percentage,10}.png" alt="$percentage%" height=16 width=32>}
|
---|
106 | <div title="$percentage%" style='float:left;width:60px;height:10px;border:1px solid black;margin-top:4px;'>
|
---|
107 | <div style='width:$div{$mul{$percentage,6},10}px; height:10px; background-color: red;'>
|
---|
108 | </div></div>
|
---|
109 | <div style='float:left;margin-top:2px;font-size:x-small;'>
|
---|
110 | $if{$and{$field{modtime},$ne{$field{modtime},-1}},
|
---|
111 | <script type="text/javascript">write_date($add{$field{modtime}});</script>
|
---|
112 | <noscript>
|
---|
113 | <span title="$html{$date{$field{modtime},%Y-%m-%d %H:%M:%S}}">
|
---|
114 | Modified:<br><b>$html{$date{$field{modtime},%Y-%m-%d}}</b></span>
|
---|
115 | </noscript><br>
|
---|
116 | }
|
---|
117 | $if{$field{language},Language: <b>$html{$field{language}}</b><br>}
|
---|
118 | $if{$field{size},<span title="$html{$field{size}} bytes">Size: <b>$html{$filesize{$field{size}}}</b></span><br>}
|
---|
119 | <div title="Mark this document as relevant" style="float:left;background-color:#cfc;border:1px solid green;margin-top:2px;">
|
---|
120 | <input type=checkbox name=R value=$id$if{$relevant, checked}>
|
---|
121 | </div>
|
---|
122 | </div>
|
---|
123 | </td>
|
---|
124 | <td><b><a href="$html{$field{url}}">$html{$or{$field{caption},$field{title},$prettyurl{$field{url}},Untitled}}</a></b>
|
---|
125 | <br>
|
---|
126 | <small>$snippet{$field{sample}}</small><br>
|
---|
127 | <a href="omegalink://$html{$subdb}$html{$field{url}}">Visit Locally</a>
|
---|
128 | <a href="$html{$field{url}}">Download</a><br>
|
---|
129 | <small>
|
---|
130 | matching:
|
---|
131 | <i>$list{$map{$terms,$html{$prettyterm{$_}}},</i>$. <i>,</i> and <i>}</i></small>${for lynx:}<p></td></tr>}
|
---|
132 | </table>
|
---|
133 |
|
---|
134 | <br><center>
|
---|
135 |
|
---|
136 | ${suppress next, prev, and page links if there's only one page}
|
---|
137 | $if{$ne{$lastpage,1},
|
---|
138 | $set{a,$if{$opt{pagelink_height}, HEIGHT=$opt{pagelink_height}}$if{$opt{pagelink_width}, WIDTH=$opt{pagelink_width}}}
|
---|
139 |
|
---|
140 | ${1-W ... X-(this)-Y ...}
|
---|
141 | $set{w,$min{3,$add{$thispage,-1}}}
|
---|
142 | $set{x,$max{$add{$opt{w},1},$add{$thispage,-3}}}
|
---|
143 | $set{y,$min{$lastpage,$add{$thispage,8}}}
|
---|
144 | $PREV
|
---|
145 | $map{$range{1,$opt{w}},$PAGE{$_}}
|
---|
146 | $if{$ne{$add{$opt{w},1},$opt{x}},...}
|
---|
147 | $map{$range{$opt{x},$add{$thispage,-1}},$PAGE{$_}}
|
---|
148 | $SPAGE{$thispage}
|
---|
149 | $map{$range{$add{$thispage,1},$opt{y}},$PAGE{$_}}
|
---|
150 | $if{$ne{$opt{y},$lastpage},...}
|
---|
151 | $NEXT
|
---|
152 | }
|
---|
153 | }}
|
---|
154 | </center><br>
|
---|
155 | $if{$ne{$topdoc,0},<input type=hidden name=TOPDOC value=$topdoc>}
|
---|
156 | $if{$ne{$hitsperpage,10},<input type=hidden name=HITSPERPAGE value=$hitsperpage>}
|
---|
157 | $if{$fmt,<input type=hidden name=FMT value="$html{$fmt}">}
|
---|
158 | $if{$cgi{COLLAPSE},<input type=hidden name=COLLAPSE value="$html{$cgi{COLLAPSE}}">}
|
---|
159 | $if{$queryterms,<input type=hidden name=xP value="$html{$queryterms}">}
|
---|
160 | <input type=hidden name=xDB value="$html{$dbname}">
|
---|
161 | <input type=hidden name=xFILTERS value="$html{$filters}">
|
---|
162 | $list{$relevants,<input type=hidden name=R value=",.,">}
|
---|
163 | $if{$cgi{THRESHOLD},<input type=hidden name=THRESHOLD value="$html{$cgi{THRESHOLD}}">}
|
---|
164 | ${Preserve any B filters used - this needs modifying if you modify this template
|
---|
165 | to have B on radio buttons, SELECT, etc}
|
---|
166 | $map{$cgilist{B},<input type=hidden name=B value="$html{$_}">}
|
---|
167 | </form>
|
---|
168 | <hr><div align=right><i><small><a href="https://xapian.org/">$html{$version}</a></small></i></div>
|
---|
169 | </body>
|
---|
170 | </html>
|
---|
171 | $log{query.log}
|
---|