1 | # this file must be UTF-8 encoded
|
---|
2 | package query
|
---|
3 |
|
---|
4 |
|
---|
5 | #######################################################################
|
---|
6 | # Macros whose values are set from within the server at runtime. These
|
---|
7 | # are here only for reference and to set default values if required.
|
---|
8 | #######################################################################
|
---|
9 |
|
---|
10 | _quotedquery_ {}
|
---|
11 | _freqmsg_ {}
|
---|
12 | _stopwordsmsg_ {}
|
---|
13 | _resultline_ {}
|
---|
14 | _thisfirst_ {}
|
---|
15 | _thislast_ {}
|
---|
16 | _nextfirst_ {}
|
---|
17 | _nextlast_ {}
|
---|
18 | _prevfirst_ {}
|
---|
19 | _prevlast_ {}
|
---|
20 | _searchhistorylist_ {}
|
---|
21 | #_histvalue0_ to _histvalue19_
|
---|
22 | _advformlist_ {}
|
---|
23 | _regformlist_ {}
|
---|
24 | #_fqfselection_ {}
|
---|
25 |
|
---|
26 |
|
---|
27 | #######################################################################
|
---|
28 | # icons
|
---|
29 | #######################################################################
|
---|
30 |
|
---|
31 | _queryresultsbar_ {
|
---|
32 | <div class="divbar">
|
---|
33 | <p class="navbar">_texthresults_</p>
|
---|
34 | </div>
|
---|
35 | }
|
---|
36 |
|
---|
37 | _searchhistorybar_ {
|
---|
38 | <div class="divbar">
|
---|
39 | <p class="navbar">_texticonsearchhistorybar_</p>
|
---|
40 | </div>
|
---|
41 | }
|
---|
42 |
|
---|
43 |
|
---|
44 | # _iconnext_ and _iconprev_ are overridden in this package as we
|
---|
45 | # don't want alt text here
|
---|
46 | _iconnext_{<img src="_httpiconmore_" width="_widthmore_" height="_heightmore_" border="0" align="top">}
|
---|
47 | _iconnext_ [v=1] {}
|
---|
48 | _iconprev_{<img src="_httpiconless_" width="_widthless_" height="_heightless_" border="0" align="top">}
|
---|
49 | _iconprev_ [v=1] {}
|
---|
50 |
|
---|
51 | # the small squares for search history
|
---|
52 | ## " " ## handmade ## mstds ##
|
---|
53 | _httpiconmstdsqrof_ {_httpimg_/mstdsof.gif}
|
---|
54 | _httpiconmstdsqron_ {_httpimg_/mstdson.gif}
|
---|
55 | _widthmstdsqrx_ {13}
|
---|
56 | _heightmstdsqrx_ {13}
|
---|
57 |
|
---|
58 | #######################################################################
|
---|
59 | # images
|
---|
60 | #######################################################################
|
---|
61 |
|
---|
62 | # _imagethispage_ set in nav_css/nav_ns4 macro files
|
---|
63 |
|
---|
64 | #the buttons for the search history entries
|
---|
65 | # takes one arg - the entry number (0-num entries)
|
---|
66 | _imagehistbutton_ {<a href="_httpquery_" onMouseover="roll('histbutton_1_',1);" onMouseOut="roll('histbutton_1_',0);" onClick="inputQuery(histvalue_1_); return false;"><img name="histbutton_1_" src="_httpiconmstdsqrof_" onLoad="gbutton(this,'_httpiconmstdsqron_');" border="0" alt="_textusequery_" title="_textusequery_"></a>}
|
---|
67 |
|
---|
68 |
|
---|
69 | #######################################################################
|
---|
70 | # scripts (and some macros for the scripts)
|
---|
71 | #######################################################################
|
---|
72 |
|
---|
73 | _pagescriptextra_ {_If_("_cgiargqt_" eq "1", _formpagescriptextra_, _selectpagescriptextra_)
|
---|
74 | _If_("_cgiarghd_" ne "0",_historypagescriptextra_) }
|
---|
75 |
|
---|
76 | _selectpagescriptextra_{_If_("_cgiargqto_" eq "2", _formpagescriptextra_,_dummypagescriptextra_)}
|
---|
77 | _dummypagescriptextra_{function initialize() \{
|
---|
78 | \} }
|
---|
79 | _formpagescriptextra_ {
|
---|
80 | // query scripts generated by \_query:pagescriptextra\_
|
---|
81 |
|
---|
82 | _standardfunctions_
|
---|
83 | _formfunctions_
|
---|
84 | _searchfunctions_
|
---|
85 |
|
---|
86 | function getsearchargs () \{
|
---|
87 |
|
---|
88 | var args="";
|
---|
89 | args = "&fqa=0&fqv="+argfqv+"&fqf="+argfqf;
|
---|
90 | _If_(_cgiargb_,args += "&fqk="+argfqk+"&fqs="+argfqs+"&fqc="+argfqc;)
|
---|
91 |
|
---|
92 | return args;
|
---|
93 | \}
|
---|
94 |
|
---|
95 |
|
---|
96 |
|
---|
97 | function getqueryargs () \{
|
---|
98 | return "&fqa=1"+"&q="+argq+"&fqv="+argfqv+"&fqf="+argfqf+
|
---|
99 | "&fqk="+argfqk+"&fqs="+argfqs+"&fqc="+argfqc ;
|
---|
100 | \}
|
---|
101 |
|
---|
102 | }
|
---|
103 |
|
---|
104 | _historypagescriptextra_{
|
---|
105 |
|
---|
106 | var histvalue0='_histvalue0_';
|
---|
107 | var histvalue1='_histvalue1_';
|
---|
108 | var histvalue2='_histvalue2_';
|
---|
109 | var histvalue3='_histvalue3_';
|
---|
110 | var histvalue4='_histvalue4_';
|
---|
111 | var histvalue5='_histvalue5_';
|
---|
112 | var histvalue6='_histvalue6_';
|
---|
113 | var histvalue7='_histvalue7_';
|
---|
114 | var histvalue8='_histvalue8_';
|
---|
115 | var histvalue9='_histvalue9_';
|
---|
116 | var histvalue10='_histvalue10_';
|
---|
117 | var histvalue11='_histvalue11_';
|
---|
118 | var histvalue12='_histvalue12_';
|
---|
119 | var histvalue13='_histvalue13_';
|
---|
120 | var histvalue14='_histvalue14_';
|
---|
121 | var histvalue15='_histvalue15_';
|
---|
122 | var histvalue16='_histvalue16_';
|
---|
123 | var histvalue17='_histvalue17_';
|
---|
124 | var histvalue18='_histvalue18_';
|
---|
125 | var histvalue19='_histvalue19_';
|
---|
126 |
|
---|
127 | function inputQuery(value) \{
|
---|
128 | if ("_cgiargqt_" == "0") \{ // text search
|
---|
129 | document.QueryForm.q.value += " "+value;
|
---|
130 | document.QueryForm.q.focus();
|
---|
131 | \}
|
---|
132 | else \{
|
---|
133 | if ("_cgiargb_" == "1") \{ // advanced query
|
---|
134 | document.QueryForm.q.value += " "+value;
|
---|
135 | document.QueryForm.q.focus();
|
---|
136 | updateq();
|
---|
137 | \}
|
---|
138 | else \{ // simple form search
|
---|
139 | // do something here, what??
|
---|
140 | \}
|
---|
141 | \}
|
---|
142 | \}
|
---|
143 |
|
---|
144 | }
|
---|
145 |
|
---|
146 | _standardfunctions_{
|
---|
147 |
|
---|
148 | function getstdargs() \{
|
---|
149 |
|
---|
150 | stdarg = "";
|
---|
151 | _If_(_gselection_,_getgarg_)
|
---|
152 | _If_(_jselection_,_getjarg_)
|
---|
153 | _If_(_nselection_,_getnarg_)
|
---|
154 | _If_(_sfselection_,_getsfarg_)
|
---|
155 | if (document.QueryForm.t != null) \{
|
---|
156 | value = document.QueryForm.t.options[document.QueryForm.t.selectedIndex].value;
|
---|
157 | if (value != "_cgiargt_") stdarg += "&t="+value;
|
---|
158 | \}
|
---|
159 | stdarg += "&r=1&hs=1";
|
---|
160 | return stdarg;
|
---|
161 | \}
|
---|
162 |
|
---|
163 | }
|
---|
164 |
|
---|
165 | _getgarg_{
|
---|
166 | if (document.QueryForm.g!= null) \{
|
---|
167 | value = document.QueryForm.g.options[document.QueryForm.g.selectedIndex].value;
|
---|
168 | if (value != "_cgiargg_") stdarg += "&g="+value;
|
---|
169 | \}
|
---|
170 | }
|
---|
171 |
|
---|
172 | _getjarg_{
|
---|
173 | value = document.QueryForm.j.options[document.QueryForm.j.selectedIndex].value;
|
---|
174 | if (value != "_cgiargj_") stdarg += "&j="+value;
|
---|
175 | }
|
---|
176 |
|
---|
177 | _getnarg_{
|
---|
178 | value = document.QueryForm.n.options[document.QueryForm.n.selectedIndex].value;
|
---|
179 | if (value != "_cgiargn_") stdarg += "&n="+value;
|
---|
180 | }
|
---|
181 |
|
---|
182 | _getsfarg_{
|
---|
183 | value = document.QueryForm.sf.options[document.QueryForm.sf.selectedIndex].value;
|
---|
184 | if (value != "_cgiargsf_") stdarg += "&sf="+value;
|
---|
185 | }
|
---|
186 |
|
---|
187 | _formfunctions_{
|
---|
188 |
|
---|
189 | argfqf="_cgiargfqf_";
|
---|
190 | argfqv="_cgiargfqv_";
|
---|
191 | argfqk="_cgiargfqk_";
|
---|
192 | argfqs="_cgiargfqs_";
|
---|
193 | argfqc="_cgiargfqc_";
|
---|
194 | argq = "";
|
---|
195 |
|
---|
196 | function initialize () \{
|
---|
197 |
|
---|
198 | if (document.QueryForm.fqf != null) \{initfqf(); \}
|
---|
199 | if (document.QueryForm.fqv != null) \{initfqv(); \}
|
---|
200 | if (document.QueryForm.fqs != null) \{initfqs(); \}
|
---|
201 | if (document.QueryForm.fqk != null) \{initfqk(); \}
|
---|
202 | if (document.QueryForm.fqc != null) \{initfqc(); \}
|
---|
203 | if (document.QueryForm.q != null) \{initq(); \}
|
---|
204 | \}
|
---|
205 |
|
---|
206 | // makes a form submit itself when enter is pressed in a text field
|
---|
207 | function entersubmit(event) \{
|
---|
208 |
|
---|
209 | if (window.event && window.event.keyCode == 13) \{
|
---|
210 | beginSearch();
|
---|
211 | \} else \{
|
---|
212 | if (event && event.which == 13) \{
|
---|
213 | beginSearch();
|
---|
214 | \} else \{
|
---|
215 | return true;
|
---|
216 | \}
|
---|
217 | \}
|
---|
218 | \}
|
---|
219 |
|
---|
220 |
|
---|
221 | // fqf - the field selection box
|
---|
222 | function initfqf() \{
|
---|
223 | var i;
|
---|
224 | fqf = argfqf.split(",");
|
---|
225 | num_opts = document.QueryForm.fqf[0].options.length; // assumes all have the same options
|
---|
226 | for (i=0; i<fqf.length && i<document.QueryForm.fqf.length; i++) \{
|
---|
227 | if (fqf[i] != "")\{
|
---|
228 | for (j=0;j<num_opts;j++) \{
|
---|
229 | if (fqf[i]== document.QueryForm.fqf[i].options[j].value) \{
|
---|
230 | document.QueryForm.fqf[i].options[j].selected = true;
|
---|
231 | break;
|
---|
232 | \}
|
---|
233 | \}
|
---|
234 | \}
|
---|
235 | \}
|
---|
236 | if (fqf.length < document.QueryForm.fqf.length) \{ // initialize remaining ones
|
---|
237 | for (i=fqf.length;i<document.QueryForm.fqf.length;i++) \{
|
---|
238 | var z=i;
|
---|
239 | while (z >= num_opts) \{
|
---|
240 | z = z-(num_opts);
|
---|
241 | \}
|
---|
242 | document.QueryForm.fqf[i].options[z].selected = true;
|
---|
243 |
|
---|
244 | \}
|
---|
245 | \}
|
---|
246 | updatefqf();
|
---|
247 |
|
---|
248 | \}
|
---|
249 |
|
---|
250 | function updatefqf() \{
|
---|
251 |
|
---|
252 | var i;
|
---|
253 | argfqf = "";
|
---|
254 | var j = document.QueryForm.fqf[0].selectedIndex;
|
---|
255 | argfqf += document.QueryForm.fqf[0].options[j].value;
|
---|
256 | for (i=1; i<document.QueryForm.fqf.length;i++) \{
|
---|
257 | j = document.QueryForm.fqf[i].selectedIndex;
|
---|
258 | argfqf += "," + document.QueryForm.fqf[i].options[j].value;
|
---|
259 | \}
|
---|
260 |
|
---|
261 | \}
|
---|
262 |
|
---|
263 |
|
---|
264 | function clearfqf() \{
|
---|
265 | var i;
|
---|
266 | for (i=0;i<document.QueryForm.fqf.length;i++) \{
|
---|
267 | var z = i;
|
---|
268 | if (i >= document.QueryForm.fqf[i].options.length) z = z-document.QueryForm.fqf[i].options.length;
|
---|
269 | document.QueryForm.fqf[i].options[z].selected = true;
|
---|
270 | \}
|
---|
271 | updatefqf();
|
---|
272 | \}
|
---|
273 |
|
---|
274 | // fqc - the boolean operator selection box
|
---|
275 | function initfqc() \{
|
---|
276 | var i,j;
|
---|
277 | fqc = argfqc.split(",");
|
---|
278 | if (_cgiargfqn_ == 2) \{ // there will only be one fqc element
|
---|
279 | for (j=0;j<document.QueryForm.fqc.options.length;j++) \{
|
---|
280 | if (fqc[0] == document.QueryForm.fqc.options[j].value) \{
|
---|
281 | document.QueryForm.fqc.options[j].selected = true;
|
---|
282 | break;
|
---|
283 | \}
|
---|
284 | \}
|
---|
285 | \}
|
---|
286 | else \{
|
---|
287 | for (i=0; i<fqc.length;i++) \{
|
---|
288 | for (j=0;j<document.QueryForm.fqc[i].options.length;j++) \{
|
---|
289 | if (fqc[i] == document.QueryForm.fqc[i].options[j].value) \{
|
---|
290 | document.QueryForm.fqc[i].options[j].selected = true;
|
---|
291 | break;
|
---|
292 | \}
|
---|
293 | \}
|
---|
294 | \}
|
---|
295 | \}
|
---|
296 | updatefqc();
|
---|
297 |
|
---|
298 | \}
|
---|
299 |
|
---|
300 | function updatefqc() \{
|
---|
301 |
|
---|
302 | var i,j;
|
---|
303 | argfqc = "";
|
---|
304 | if (_cgiargfqn_ == 2) \{
|
---|
305 | j = document.QueryForm.fqc.selectedIndex;
|
---|
306 | argfqc += document.QueryForm.fqc.options[j].value;
|
---|
307 | \}
|
---|
308 | else \{
|
---|
309 | j = document.QueryForm.fqc[0].selectedIndex;
|
---|
310 | argfqc += document.QueryForm.fqc[0].options[j].value;
|
---|
311 | for (i=1;i<document.QueryForm.fqc.length;i++) \{
|
---|
312 | j = document.QueryForm.fqc[i].selectedIndex;
|
---|
313 | argfqc += "," + document.QueryForm.fqc[i].options[j].value;
|
---|
314 | \}
|
---|
315 | \}
|
---|
316 |
|
---|
317 | \}
|
---|
318 |
|
---|
319 |
|
---|
320 | function clearfqc() \{
|
---|
321 |
|
---|
322 | var i;
|
---|
323 | if (_cgiargfqn_ == 2) \{
|
---|
324 | document.QueryForm.fqc.options[0].selected = true;
|
---|
325 | \}
|
---|
326 | else \{
|
---|
327 | for (i=0; i<document.QueryForm.fqc.length; i++) \{
|
---|
328 | document.QueryForm.fqc[i].options[0].selected = true;
|
---|
329 | \}
|
---|
330 | \}
|
---|
331 | updatefqc();
|
---|
332 | \}
|
---|
333 |
|
---|
334 | // fqv - the query word/phrase text box
|
---|
335 | function initfqv() \{
|
---|
336 | var i;
|
---|
337 | fqv= argfqv.split(",");
|
---|
338 | for (i=0; i<fqv.length && i<document.QueryForm.fqv.length; i++) \{
|
---|
339 | document.QueryForm.fqv[i].value = fqv[i];
|
---|
340 | \}
|
---|
341 | updatefqv();
|
---|
342 |
|
---|
343 |
|
---|
344 | \}
|
---|
345 |
|
---|
346 | //argfqv += escape(format(document.QueryForm.fqv[0].value));
|
---|
347 |
|
---|
348 | function updatefqv() \{
|
---|
349 | var i;
|
---|
350 | argfqv="";
|
---|
351 | argfqv += format(document.QueryForm.fqv[0].value);
|
---|
352 | for (i=1; i<document.QueryForm.fqv.length;i++) \{
|
---|
353 | argfqv += ",";
|
---|
354 | argfqv += format(document.QueryForm.fqv[i].value);
|
---|
355 | \}
|
---|
356 | \}
|
---|
357 |
|
---|
358 | function clearfqv() \{
|
---|
359 | var i;
|
---|
360 | for (i=0; i< document.QueryForm.fqv.length;i++) \{
|
---|
361 | document.QueryForm.fqv[i].value = "";
|
---|
362 | \}
|
---|
363 | updatefqv();
|
---|
364 | \}
|
---|
365 |
|
---|
366 | // fqs - the stemming checkboxes
|
---|
367 | function initfqs() \{
|
---|
368 |
|
---|
369 | var i;
|
---|
370 | fqs = argfqs.split(",");
|
---|
371 | for (i=0; i<fqs.length; i++) \{
|
---|
372 | if (fqs[i]=="1") \{
|
---|
373 | document.QueryForm.fqs[i].checked = true;
|
---|
374 | \}
|
---|
375 | \}
|
---|
376 | updatefqs();
|
---|
377 |
|
---|
378 | \}
|
---|
379 |
|
---|
380 | function updatefqs() \{
|
---|
381 | argfqs="";
|
---|
382 | if (document.QueryForm.fqs[0].checked) \{
|
---|
383 | argfqs += "1";
|
---|
384 | \}
|
---|
385 | else \{
|
---|
386 | argfqs += "0";
|
---|
387 | \}
|
---|
388 | var i;
|
---|
389 | for (i=1; i<document.QueryForm.fqs.length; i++) \{
|
---|
390 | if (document.QueryForm.fqs[i].checked) \{
|
---|
391 | argfqs += ",1";
|
---|
392 | \}
|
---|
393 | else \{
|
---|
394 | argfqs += ",0";
|
---|
395 | \}
|
---|
396 | \}
|
---|
397 | \}
|
---|
398 |
|
---|
399 |
|
---|
400 | function clearfqs() \{
|
---|
401 | var i;
|
---|
402 | for (i=0; i<document.QueryForm.fqs.length; i++) \{
|
---|
403 | document.QueryForm.fqs[i].checked = false;
|
---|
404 | \}
|
---|
405 | updatefqs();
|
---|
406 | \}
|
---|
407 |
|
---|
408 | // kqk - the casefolding checkboxes
|
---|
409 | function initfqk() \{
|
---|
410 | var i;
|
---|
411 | fqk = argfqk.split(",");
|
---|
412 | for (i=0; i<fqk.length; i++) \{
|
---|
413 | if (fqk[i]=="1") \{
|
---|
414 | document.QueryForm.fqk[i].checked = true;
|
---|
415 | \}
|
---|
416 | \}
|
---|
417 | updatefqk();
|
---|
418 |
|
---|
419 | \}
|
---|
420 |
|
---|
421 |
|
---|
422 | function updatefqk() \{
|
---|
423 | argfqk="";
|
---|
424 | if (document.QueryForm.fqk[0].checked) \{
|
---|
425 | argfqk += "1";
|
---|
426 | \}
|
---|
427 | else \{
|
---|
428 | argfqk += "0";
|
---|
429 | \}
|
---|
430 | var i;
|
---|
431 | for (i=1; i<document.QueryForm.fqk.length; i++) \{
|
---|
432 | if (document.QueryForm.fqk[i].checked) \{
|
---|
433 | argfqk += ",1";
|
---|
434 | \}
|
---|
435 | else \{
|
---|
436 | argfqk += ",0";
|
---|
437 | \}
|
---|
438 | \}
|
---|
439 | \}
|
---|
440 |
|
---|
441 | function clearfqk() \{
|
---|
442 | var i;
|
---|
443 | for (i=0; i<document.QueryForm.fqk.length; i++) \{
|
---|
444 | document.QueryForm.fqk[i].checked = false;
|
---|
445 | \}
|
---|
446 | updatefqk();
|
---|
447 | \}
|
---|
448 |
|
---|
449 | // q - the advanced query box
|
---|
450 | function initq() \{
|
---|
451 | updateq();
|
---|
452 | \}
|
---|
453 |
|
---|
454 | function updateq() \{
|
---|
455 |
|
---|
456 | argq = "";
|
---|
457 | argq += format(document.QueryForm.q.value);
|
---|
458 | \}
|
---|
459 |
|
---|
460 | function clearq() \{
|
---|
461 | document.QueryForm.q.value="";
|
---|
462 | \}
|
---|
463 |
|
---|
464 |
|
---|
465 | // convert commas and spaces to plus
|
---|
466 | // also convert other illegal characters to %xx codes
|
---|
467 | function format(string) \{
|
---|
468 | var str = "" + string;
|
---|
469 | var out = "", flag = 0;
|
---|
470 | var ch = "";
|
---|
471 | var j;
|
---|
472 | for (j = 0; j < str.length; j++) \{
|
---|
473 | ch=str.charAt(j);
|
---|
474 | if (ch == " "|| ch == ",") \{
|
---|
475 | if ( flag == 0) \{
|
---|
476 | out += "+";
|
---|
477 | flag=1;
|
---|
478 | \}
|
---|
479 | continue;
|
---|
480 | \}
|
---|
481 | if (ch == ";" || ch == ":" || ch == "/" || ch == "?" ||
|
---|
482 | ch == "@" || ch == "&" || ch == "=" || ch == "#") \{
|
---|
483 | out += escape(ch);
|
---|
484 | flag=0;
|
---|
485 | continue;
|
---|
486 | \}
|
---|
487 | out += str.charAt(j);
|
---|
488 | flag=0;
|
---|
489 | \}
|
---|
490 | return out;
|
---|
491 | \}
|
---|
492 |
|
---|
493 | }
|
---|
494 |
|
---|
495 | #_httpquery_ has a=q&e=compressedargs
|
---|
496 | #if adv form, need to set k=0 and s=0
|
---|
497 | _advformargs_{_If_(_cgiargb_,&k=0&s=0)}
|
---|
498 |
|
---|
499 | _searchfunctions_ {
|
---|
500 |
|
---|
501 | function beginSearch() \{
|
---|
502 | window.location="_httpquery_"+getstdargs()+"_advformargs_"+getsearchargs();
|
---|
503 | \}
|
---|
504 |
|
---|
505 | function runQuery() \{
|
---|
506 | window.location="_httpquery_"+getstdargs()+"_advformargs_"+getqueryargs();
|
---|
507 | \}
|
---|
508 |
|
---|
509 | function clearForm() \{
|
---|
510 | clearfqf();
|
---|
511 | clearfqv();
|
---|
512 |
|
---|
513 | if ("_cgiargb_" == "1") \{
|
---|
514 | clearfqk();
|
---|
515 | clearfqs();
|
---|
516 | clearfqc();
|
---|
517 | \}
|
---|
518 |
|
---|
519 | \}
|
---|
520 |
|
---|
521 | }
|
---|
522 |
|
---|
523 | #######################################################################
|
---|
524 | # headers
|
---|
525 | # these are overridden so we can put an onLoad event handler
|
---|
526 | # in the <body> tag of this page - for mgpp, form search pages
|
---|
527 | #######################################################################
|
---|
528 |
|
---|
529 | #copied from prefs
|
---|
530 |
|
---|
531 | _header_ {_cgihead_
|
---|
532 | _htmlhead_(class="bgimage" onLoad="initialize();")_startspacer__pagebanner_
|
---|
533 | }
|
---|
534 |
|
---|
535 | # this declaration ends up being the same as style=restrict, never mind
|
---|
536 | _header_[v=1] {_cgihead_
|
---|
537 | _htmlhead_(onLoad="initialize();")_pagebanner_
|
---|
538 | }
|
---|
539 |
|
---|
540 | #######################################################################
|
---|
541 | # page content
|
---|
542 | #######################################################################
|
---|
543 |
|
---|
544 |
|
---|
545 | _pagetitle_ {_If_(_cgiargq_,_textquerytitle_,_textnoquerytitle_)}
|
---|
546 |
|
---|
547 |
|
---|
548 | _content_ {
|
---|
549 |
|
---|
550 | _optnavigationbar_
|
---|
551 | <div class="document">
|
---|
552 | <div class="queryform">
|
---|
553 | _If_(_cgiargct_,_selectqueryform_,_queryform_)
|
---|
554 | </div>
|
---|
555 |
|
---|
556 | _If_(_searchhistorylist_,<center>_searchhistorybar_</center><br>
|
---|
557 | <center>
|
---|
558 | _searchhistorylist_
|
---|
559 | </center>)
|
---|
560 | _If_(_cgiargq_,_queryresultsbar_
|
---|
561 | <small>
|
---|
562 | _freqmsg_
|
---|
563 | _textpostprocess_
|
---|
564 | _If_(_stopwordsmsg_,(_stopwordsmsg_))</small><br />
|
---|
565 | _resultline_
|
---|
566 | ,<div class="divbar"> </div>)
|
---|
567 | }
|
---|
568 |
|
---|
569 | _selectqueryform_{_If_("_cgiargqt_" eq "1",_fieldqueryform_,_queryform_)}
|
---|
570 |
|
---|
571 | _queryform_ {
|
---|
572 | <!-- query form (\_query:plainqueryform\_) -->
|
---|
573 | <form name="QueryForm" method="get" action="_gwcgi_">
|
---|
574 | <p>
|
---|
575 | <input type="hidden" name="a" value="q">
|
---|
576 | <input type="hidden" name="r" value="1">
|
---|
577 | <input type="hidden" name="hs" value="1">
|
---|
578 | <input type="hidden" name="e" value="_decodedcompressedoptions_">
|
---|
579 | _queryformcontent_
|
---|
580 | _optdatesearch_
|
---|
581 | </p>
|
---|
582 | </form>
|
---|
583 | <!-- end of query form -->
|
---|
584 | }
|
---|
585 |
|
---|
586 | _ifeellucky_ { <br><input type="checkbox" name="ifl" value="1">_textifeellucky_ }
|
---|
587 | _useifeellucky_ { } # Set this to _ifeellucky_ if you want this functionality available
|
---|
588 |
|
---|
589 | _allowformbreak_{</span> <span class="textselect">}
|
---|
590 |
|
---|
591 | _queryformcontent_{
|
---|
592 | <span class="textselect">
|
---|
593 | _textselect_
|
---|
594 | </span>
|
---|
595 |
|
---|
596 | <span class="querybox">
|
---|
597 | _If_(_cgiargqb_,_largequerybox_,_smallquerybox_)
|
---|
598 | _useifeellucky_
|
---|
599 | </span>
|
---|
600 | }
|
---|
601 |
|
---|
602 | # Automatically set by receptionist if config file switches
|
---|
603 | # date searching on
|
---|
604 | _optdatesearch_ { }
|
---|
605 |
|
---|
606 |
|
---|
607 | _datesearch_
|
---|
608 | {<table><tr><td>
|
---|
609 | <center>
|
---|
610 | _textstartdate_
|
---|
611 | <input type="text" name="ds" value="_cgiargds_" size="4" maxlength="4">
|
---|
612 | <select name="dsbc" value="_cgiargdsbc_" size="1">
|
---|
613 | <option value="0"_If_(_cgiargdsbc_,, selected)>_textad_
|
---|
614 | <option value="1"_If_(_cgiargdsbc_, selected)>_textbc_
|
---|
615 | </select>
|
---|
616 | _textenddate_
|
---|
617 | <input type="text" name="de" value="_cgiargde_" size="4" maxlength="4">
|
---|
618 | <select name="debc" size="1">
|
---|
619 | <option value="0" _If_(_cgiargdebc_,, selected)>_textad_
|
---|
620 | <option value="1" _If_(_cgiargdebc_, selected)>_textbc_
|
---|
621 | </select>
|
---|
622 | </center>
|
---|
623 | </td></tr>
|
---|
624 | <tr><td>
|
---|
625 | _textexplaineras_
|
---|
626 | </td></tr>
|
---|
627 | </table>
|
---|
628 | </center>
|
---|
629 | }
|
---|
630 |
|
---|
631 | _smallquerybox_ {<nobr><input type="text" name="q" value="_cgiargq_" size="50"> <input type="submit" value="_textbeginsearch_"></nobr>}
|
---|
632 |
|
---|
633 | _largequerybox_ {
|
---|
634 | <tr><td><textarea name="q" cols="63" rows="10">
|
---|
635 | _cgiargq_
|
---|
636 | </textarea></td></tr>
|
---|
637 | <tr align="right"><td><table>
|
---|
638 | <tr><td><input type="submit" value="_textbeginsearch_"></td>
|
---|
639 | </tr></table></td></tr>}
|
---|
640 |
|
---|
641 |
|
---|
642 | _fieldqueryform_ {
|
---|
643 | <noscript>
|
---|
644 | <p><b>_textnojsformwarning_</b></p>
|
---|
645 | </noscript>
|
---|
646 | <!-- field query form (\_query:fieldqueryform\_) -->
|
---|
647 | <form name="QueryForm" method="get" action="_gwcgi_">
|
---|
648 |
|
---|
649 | <table><tr><td align="left">
|
---|
650 | _textformselect_
|
---|
651 | </td></tr>
|
---|
652 | <tr><td>
|
---|
653 | _If_(_cgiargb_,_advancedforms_,_simpleforms_)
|
---|
654 | </td></tr>
|
---|
655 | </table>
|
---|
656 | _If_(_cgiargb_,<div class="divbar"> </div>
|
---|
657 | _advancedformextra_)
|
---|
658 |
|
---|
659 | </form>
|
---|
660 | <!-- end of query form -->
|
---|
661 | }
|
---|
662 |
|
---|
663 | _advancedforms_{
|
---|
664 | <table border="0" cellspacing="0" cellpadding="0" width="90%">
|
---|
665 | <tr><th></th><th align="left">_textwordphrase_</th>_If_("_cgiargct_" eq "1",<th colspan="2"><nobr>_textfoldstem_</nobr></th>)<th align="center"> _textinfield_</th></tr>
|
---|
666 | _advformlist_
|
---|
667 | <tr>
|
---|
668 | <td colspan="2" align="left"><input type="button" value="_textclearform_" onClick="clearForm();"></td>
|
---|
669 | <td colspan="3" align="right"><input type="button" value="_textbeginsearch_" onClick="beginSearch();"></td>
|
---|
670 | </tr>
|
---|
671 | </table>
|
---|
672 | }
|
---|
673 |
|
---|
674 | _advancedformextra_{
|
---|
675 | <table>
|
---|
676 | <tr><td align="left">_textadvquery_</td></tr>
|
---|
677 | <tr><td><textarea name="q" cols="57" rows="3" onChange="updateq();">_cgiargq_</textarea></td>
|
---|
678 | <td valign="bottom">
|
---|
679 | <input type="button" value="_textrunquery_" onClick="runQuery();"></td></tr>
|
---|
680 | </table>
|
---|
681 | }
|
---|
682 |
|
---|
683 | _simpleforms_{
|
---|
684 | <table border="0" cellspacing="0" cellpadding="0" width="90%">
|
---|
685 | <tr><th align="left">_textwordphrase_</th><th align="left"> _textinfield_</th></tr>
|
---|
686 | _regformlist_
|
---|
687 | <tr>
|
---|
688 | <td align="left"><input type="button" value="_textclearform_" onClick="clearForm();"></td>
|
---|
689 | <td align="right"><input type="button" value="_textbeginsearch_" onClick="beginSearch();"></td>
|
---|
690 | </tr>
|
---|
691 | </table>}
|
---|
692 |
|
---|
693 | _regformelement_{
|
---|
694 | <tr><td><input type="text" size="39" name="fqv" onChange="updatefqv();" onkeypress="updatefqv(); entersubmit(event);"></td>
|
---|
695 | <td>_fqfselection_</td></tr>}
|
---|
696 |
|
---|
697 | #has no and/or/not selection box
|
---|
698 | _firstadvformelement_{
|
---|
699 | <tr><td></td><td><input type="text" size="31" name="fqv" onChange="updatefqv();" onkeypress="updatefqv(); entersubmit(event);"></td>
|
---|
700 | _If_("_cgiargct_" eq "1",<td align="center"><input type="checkbox" name="fqk" onClick="updatefqk();"></td>
|
---|
701 | <td align="center"><input type="checkbox" name="fqs" onClick="updatefqs();"></td>)
|
---|
702 | <td align="right">_fqfselection_</td></tr>}
|
---|
703 |
|
---|
704 | _advformelement_{
|
---|
705 | <tr><td>_fqcselection_</td>
|
---|
706 | <td><input type="text" size="31" name="fqv" onChange="updatefqv();" onkeypress="updatefqv(); entersubmit(event);"></td>
|
---|
707 | _If_("_cgiargct_" eq "1",<td align="center"><input type="checkbox" name="fqk" onClick="updatefqk();"></td>
|
---|
708 | <td align="center"><input type="checkbox" name="fqs" onClick="updatefqs();"></td>)
|
---|
709 | <td align="right">_fqfselection_</td></tr>}
|
---|
710 |
|
---|
711 |
|
---|
712 |
|
---|
713 | _fqcselection_ {
|
---|
714 | <select name="fqc" onChange="updatefqc();">
|
---|
715 | <option value="and">_textand_
|
---|
716 | <option value="or">_textor_
|
---|
717 | <option value="not">_textandnot_
|
---|
718 | </select>}
|
---|
719 |
|
---|
720 | _textselect_ {_If_(_cgiargb_,_chooseadvancedsearch_,_textsimplesearch_)}
|
---|
721 | _chooseadvancedsearch_ {_If_(_cgiargct_,_If_("_cgiargct_" eq "2",_textadvancedlucenesearch_,_textadvancedmgppsearch_),_textadvancedsearch_}
|
---|
722 | _textformselect_ {_If_(_cgiargb_,_chooseformadvancedsearch_,_textformsimplesearch_)}
|
---|
723 | _chooseformadvancedsearch_ {_If_("_cgiargct_" eq "1",_textformadvancedsearchmgpp_)_If_("_cgiargct_" eq "2",_textformadvancedsearchlucene_)}
|
---|
724 |
|
---|
725 | # mg uses hselection for index, mgpp uses fqfselection
|
---|
726 | _indexselection_{_If_(_cgiargct_,_fqfselection_,_hselection_)}
|
---|
727 |
|
---|
728 | # we want to put the links to previous/next pages of results
|
---|
729 | # in the footer
|
---|
730 | _pagefooterextra_ {
|
---|
731 | <center>
|
---|
732 | <table cellspacing="0" cellpadding="0" width="_pagewidth_">
|
---|
733 | <tr>
|
---|
734 | <td align="left">_If_(_prevfirst_,<a href="_httpquery_&r=_prevfirst_">_iconprev__textmatches__prevfirst_ - _prevlast_</a>)</td>
|
---|
735 | <td align="right">_If_(_nextfirst_,<a href="_httpquery_&r=_nextfirst_">_textmatches__nextfirst_ - _nextlast__iconnext_</a>)</td>
|
---|
736 | </tr></table>
|
---|
737 | </center>
|
---|
738 |
|
---|
739 | </div> <!-- document -->
|
---|
740 | }
|
---|
741 |
|
---|
742 | _querytypeselection_ {
|
---|
743 | <select name="t">
|
---|
744 | <option value="1"_If_(_cgiargt_, selected)>_If_(_cgiargb_,_textranked_,_textsome_)
|
---|
745 | <option value="0"_If_(_cgiargt_,, selected)>_If_(_cgiargb_,_textboolean_,_textall_)
|
---|
746 | </select>
|
---|
747 | }
|
---|
748 |
|
---|
749 |
|
---|
750 | _formquerytypesimpleselection_ {
|
---|
751 | <select name="t">
|
---|
752 | <option value="1"_If_(_cgiargt_, selected)>_textsome_
|
---|
753 | <option value="0"_If_(_cgiargt_,, selected)>_textall_
|
---|
754 | </select>
|
---|
755 | }
|
---|
756 |
|
---|
757 | _formquerytypeadvancedselection_ {
|
---|
758 | <select name="t">
|
---|
759 | <option value="1"_If_(_cgiargt_, selected)>_textranked_
|
---|
760 | <option value="0"_If_(_cgiargt_,, selected)>_textnatural_
|
---|
761 | </select>
|
---|
762 | }
|
---|
763 |
|
---|
764 | # this one is not used by english.dm any more. But I have added it back for the other languages that haven't updated the translations for their form search macros.
|
---|
765 | _formquerytypeselection_ {
|
---|
766 | <select name="t">
|
---|
767 | <option value="1"_If_(_cgiargt_, selected)>_If_(_cgiargb_,_textranked_,_textsome_)
|
---|
768 | <option value="0"_If_(_cgiargt_,, selected)>_If_(_cgiargb_,_textnatural_,_textall_)
|
---|
769 | </select>
|
---|
770 | }
|
---|
771 |
|
---|