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_(_cgiargqf_,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 ("_cgiargqf_" == "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 |
|
---|
155 | value = document.QueryForm.t.options[document.QueryForm.t.selectedIndex].value;
|
---|
156 | if (value != "_cgiargt_") stdarg += "&t="+value;
|
---|
157 |
|
---|
158 | stdarg += "&r=1&hs=1";
|
---|
159 | return stdarg;
|
---|
160 | \}
|
---|
161 |
|
---|
162 | }
|
---|
163 |
|
---|
164 | _getgarg_{
|
---|
165 | if (document.QueryForm.g!= null) \{
|
---|
166 | value = document.QueryForm.g.options[document.QueryForm.g.selectedIndex].value;
|
---|
167 | if (value != "_cgiargg_") stdarg += "&g="+value;
|
---|
168 | \}
|
---|
169 | }
|
---|
170 |
|
---|
171 | _getjarg_{
|
---|
172 | value = document.QueryForm.j.options[document.QueryForm.j.selectedIndex].value;
|
---|
173 | if (value != "_cgiargj_") stdarg += "&j="+value;
|
---|
174 | }
|
---|
175 |
|
---|
176 | _getnarg_{
|
---|
177 | value = document.QueryForm.n.options[document.QueryForm.n.selectedIndex].value;
|
---|
178 | if (value != "_cgiargn_") stdarg += "&n="+value;
|
---|
179 | }
|
---|
180 |
|
---|
181 | _formfunctions_{
|
---|
182 |
|
---|
183 | argfqf="_cgiargfqf_";
|
---|
184 | argfqv="_cgiargfqv_";
|
---|
185 | argfqk="_cgiargfqk_";
|
---|
186 | argfqs="_cgiargfqs_";
|
---|
187 | argfqc="_cgiargfqc_";
|
---|
188 | argq = "";
|
---|
189 |
|
---|
190 | function initialize () \{
|
---|
191 |
|
---|
192 | if (document.QueryForm.fqf != null) \{initfqf();\}
|
---|
193 | initfqv();
|
---|
194 | if ( "_cgiargqf_" == "1") \{
|
---|
195 | initfqs();
|
---|
196 | initfqk();
|
---|
197 | initfqc();
|
---|
198 | initq();
|
---|
199 | \}
|
---|
200 |
|
---|
201 | \}
|
---|
202 |
|
---|
203 | // fqf - the field selection box
|
---|
204 | function initfqf() \{
|
---|
205 | var i;
|
---|
206 | fqf = argfqf.split(",");
|
---|
207 | num_opts = document.QueryForm.fqf[0].options.length; // assumes all have the same options
|
---|
208 | for (i=0; i<fqf.length && i<document.QueryForm.fqf.length; i++) \{
|
---|
209 | if (fqf[i] != "")\{
|
---|
210 | for (j=0;j<num_opts;j++) \{
|
---|
211 | if (fqf[i]== document.QueryForm.fqf[i].options[j].value) \{
|
---|
212 | document.QueryForm.fqf[i].options[j].selected = true;
|
---|
213 | break;
|
---|
214 | \}
|
---|
215 | \}
|
---|
216 | \}
|
---|
217 | \}
|
---|
218 | if (fqf.length < document.QueryForm.fqf.length) \{ // initialize remaining ones
|
---|
219 | for (i=fqf.length;i<document.QueryForm.fqf.length;i++) \{
|
---|
220 | var z=i;
|
---|
221 | while (z >= num_opts) \{
|
---|
222 | z = z-(num_opts);
|
---|
223 | \}
|
---|
224 | document.QueryForm.fqf[i].options[z].selected = true;
|
---|
225 |
|
---|
226 | \}
|
---|
227 | \}
|
---|
228 | updatefqf();
|
---|
229 |
|
---|
230 | \}
|
---|
231 |
|
---|
232 | function updatefqf() \{
|
---|
233 |
|
---|
234 | var i;
|
---|
235 | argfqf = "";
|
---|
236 | var j = document.QueryForm.fqf[0].selectedIndex;
|
---|
237 | argfqf += document.QueryForm.fqf[0].options[j].value;
|
---|
238 | for (i=1; i<document.QueryForm.fqf.length;i++) \{
|
---|
239 | j = document.QueryForm.fqf[i].selectedIndex;
|
---|
240 | argfqf += "," + document.QueryForm.fqf[i].options[j].value;
|
---|
241 | \}
|
---|
242 |
|
---|
243 | \}
|
---|
244 |
|
---|
245 |
|
---|
246 | function clearfqf() \{
|
---|
247 | var i;
|
---|
248 | for (i=0;i<document.QueryForm.fqf.length;i++) \{
|
---|
249 | var z = i;
|
---|
250 | if (i >= document.QueryForm.fqf[i].options.length) z = z-document.QueryForm.fqf[i].options.length;
|
---|
251 | document.QueryForm.fqf[i].options[z].selected = true;
|
---|
252 | \}
|
---|
253 | updatefqf();
|
---|
254 | \}
|
---|
255 |
|
---|
256 | // fqc - the boolean operator selection box
|
---|
257 | function initfqc() \{
|
---|
258 | var i,j;
|
---|
259 | fqc = argfqc.split(",");
|
---|
260 | if (_cgiargfqn_ == 2) \{ // there will only be one fqc element
|
---|
261 | for (j=0;j<document.QueryForm.fqc.options.length;j++) \{
|
---|
262 | if (fqc[0] == document.QueryForm.fqc.options[j].value) \{
|
---|
263 | document.QueryForm.fqc.options[j].selected = true;
|
---|
264 | break;
|
---|
265 | \}
|
---|
266 | \}
|
---|
267 | \}
|
---|
268 | else \{
|
---|
269 | for (i=0; i<fqc.length;i++) \{
|
---|
270 | for (j=0;j<document.QueryForm.fqc[i].options.length;j++) \{
|
---|
271 | if (fqc[i] == document.QueryForm.fqc[i].options[j].value) \{
|
---|
272 | document.QueryForm.fqc[i].options[j].selected = true;
|
---|
273 | break;
|
---|
274 | \}
|
---|
275 | \}
|
---|
276 | \}
|
---|
277 | \}
|
---|
278 | updatefqc();
|
---|
279 |
|
---|
280 | \}
|
---|
281 |
|
---|
282 | function updatefqc() \{
|
---|
283 |
|
---|
284 | var i,j;
|
---|
285 | argfqc = "";
|
---|
286 | if (_cgiargfqn_ == 2) \{
|
---|
287 | j = document.QueryForm.fqc.selectedIndex;
|
---|
288 | argfqc += document.QueryForm.fqc.options[j].value;
|
---|
289 | \}
|
---|
290 | else \{
|
---|
291 | j = document.QueryForm.fqc[0].selectedIndex;
|
---|
292 | argfqc += document.QueryForm.fqc[0].options[j].value;
|
---|
293 | for (i=1;i<document.QueryForm.fqc.length;i++) \{
|
---|
294 | j = document.QueryForm.fqc[i].selectedIndex;
|
---|
295 | argfqc += "," + document.QueryForm.fqc[i].options[j].value;
|
---|
296 | \}
|
---|
297 | \}
|
---|
298 |
|
---|
299 | \}
|
---|
300 |
|
---|
301 |
|
---|
302 | function clearfqc() \{
|
---|
303 |
|
---|
304 | var i;
|
---|
305 | if (_cgiargfqn_ == 2) \{
|
---|
306 | document.QueryForm.fqc.options[0].selected = true;
|
---|
307 | \}
|
---|
308 | else \{
|
---|
309 | for (i=0; i<document.QueryForm.fqc.length; i++) \{
|
---|
310 | document.QueryForm.fqc[i].options[0].selected = true;
|
---|
311 | \}
|
---|
312 | \}
|
---|
313 | updatefqc();
|
---|
314 | \}
|
---|
315 |
|
---|
316 | // fqv - the query word/phrase text box
|
---|
317 | function initfqv() \{
|
---|
318 | var i;
|
---|
319 | fqv= argfqv.split(",");
|
---|
320 | for (i=0; i<fqv.length && i<document.QueryForm.fqv.length; i++) \{
|
---|
321 | document.QueryForm.fqv[i].value = fqv[i];
|
---|
322 | \}
|
---|
323 | updatefqv();
|
---|
324 |
|
---|
325 |
|
---|
326 | \}
|
---|
327 |
|
---|
328 | //argfqv += escape(format(document.QueryForm.fqv[0].value));
|
---|
329 |
|
---|
330 | function updatefqv() \{
|
---|
331 |
|
---|
332 | var i;
|
---|
333 | argfqv="";
|
---|
334 | argfqv += format(document.QueryForm.fqv[0].value);
|
---|
335 | for (i=1; i<document.QueryForm.fqv.length;i++) \{
|
---|
336 | argfqv += ",";
|
---|
337 | argfqv += format(document.QueryForm.fqv[i].value);
|
---|
338 | \}
|
---|
339 | \}
|
---|
340 |
|
---|
341 | function clearfqv() \{
|
---|
342 | var i;
|
---|
343 | for (i=0; i< document.QueryForm.fqv.length;i++) \{
|
---|
344 | document.QueryForm.fqv[i].value = "";
|
---|
345 | \}
|
---|
346 | updatefqv();
|
---|
347 | \}
|
---|
348 |
|
---|
349 | // fqs - the stemming checkboxes
|
---|
350 | function initfqs() \{
|
---|
351 |
|
---|
352 | var i;
|
---|
353 | fqs = argfqs.split(",");
|
---|
354 | for (i=0; i<fqs.length; i++) \{
|
---|
355 | if (fqs[i]=="1") \{
|
---|
356 | document.QueryForm.fqs[i].checked = true;
|
---|
357 | \}
|
---|
358 | \}
|
---|
359 | updatefqs();
|
---|
360 |
|
---|
361 | \}
|
---|
362 |
|
---|
363 | function updatefqs() \{
|
---|
364 | argfqs="";
|
---|
365 | if (document.QueryForm.fqs[0].checked) \{
|
---|
366 | argfqs += "1";
|
---|
367 | \}
|
---|
368 | else \{
|
---|
369 | argfqs += "0";
|
---|
370 | \}
|
---|
371 | var i;
|
---|
372 | for (i=1; i<document.QueryForm.fqs.length; i++) \{
|
---|
373 | if (document.QueryForm.fqs[i].checked) \{
|
---|
374 | argfqs += ",1";
|
---|
375 | \}
|
---|
376 | else \{
|
---|
377 | argfqs += ",0";
|
---|
378 | \}
|
---|
379 | \}
|
---|
380 | \}
|
---|
381 |
|
---|
382 |
|
---|
383 | function clearfqs() \{
|
---|
384 | var i;
|
---|
385 | for (i=0; i<document.QueryForm.fqs.length; i++) \{
|
---|
386 | document.QueryForm.fqs[i].checked = false;
|
---|
387 | \}
|
---|
388 | updatefqs();
|
---|
389 | \}
|
---|
390 |
|
---|
391 | // kqk - the casefolding checkboxes
|
---|
392 | function initfqk() \{
|
---|
393 | var i;
|
---|
394 | fqk = argfqk.split(",");
|
---|
395 | for (i=0; i<fqk.length; i++) \{
|
---|
396 | if (fqk[i]=="1") \{
|
---|
397 | document.QueryForm.fqk[i].checked = true;
|
---|
398 | \}
|
---|
399 | \}
|
---|
400 | updatefqk();
|
---|
401 |
|
---|
402 | \}
|
---|
403 |
|
---|
404 |
|
---|
405 | function updatefqk() \{
|
---|
406 | argfqk="";
|
---|
407 | if (document.QueryForm.fqk[0].checked) \{
|
---|
408 | argfqk += "1";
|
---|
409 | \}
|
---|
410 | else \{
|
---|
411 | argfqk += "0";
|
---|
412 | \}
|
---|
413 | var i;
|
---|
414 | for (i=1; i<document.QueryForm.fqk.length; i++) \{
|
---|
415 | if (document.QueryForm.fqk[i].checked) \{
|
---|
416 | argfqk += ",1";
|
---|
417 | \}
|
---|
418 | else \{
|
---|
419 | argfqk += ",0";
|
---|
420 | \}
|
---|
421 | \}
|
---|
422 | \}
|
---|
423 |
|
---|
424 | function clearfqk() \{
|
---|
425 | var i;
|
---|
426 | for (i=0; i<document.QueryForm.fqk.length; i++) \{
|
---|
427 | document.QueryForm.fqk[i].checked = false;
|
---|
428 | \}
|
---|
429 | updatefqk();
|
---|
430 | \}
|
---|
431 |
|
---|
432 | // q - the advanced query box
|
---|
433 | function initq() \{
|
---|
434 | updateq();
|
---|
435 | \}
|
---|
436 |
|
---|
437 | function updateq() \{
|
---|
438 | argq = "";
|
---|
439 | argq += format(document.QueryForm.q.value);
|
---|
440 | \}
|
---|
441 |
|
---|
442 | function clearq() \{
|
---|
443 | document.QueryForm.q.value="";
|
---|
444 | \}
|
---|
445 |
|
---|
446 |
|
---|
447 | // convert commas and spaces to plus
|
---|
448 | // also convert other illegal characters to %xx codes
|
---|
449 | function format(string) \{
|
---|
450 | var str = "" + string;
|
---|
451 | var out = "", flag = 0;
|
---|
452 | var ch = "";
|
---|
453 | var j;
|
---|
454 | for (j = 0; j < str.length; j++) \{
|
---|
455 | ch=str.charAt(j);
|
---|
456 | if (ch == " "|| ch == ",") \{
|
---|
457 | if ( flag == 0) \{
|
---|
458 | out += "+";
|
---|
459 | flag=1;
|
---|
460 | \}
|
---|
461 | continue;
|
---|
462 | \}
|
---|
463 | if (ch == ";" || ch == ":" || ch == "/" || ch == "?" ||
|
---|
464 | ch == "@" || ch == "&" || ch == "=" || ch == "#") \{
|
---|
465 | out += escape(ch);
|
---|
466 | flag=0;
|
---|
467 | continue;
|
---|
468 | \}
|
---|
469 | out += str.charAt(j);
|
---|
470 | flag=0;
|
---|
471 | \}
|
---|
472 | return out;
|
---|
473 | \}
|
---|
474 |
|
---|
475 | }
|
---|
476 |
|
---|
477 | #_httpquery_ has a=q&e=compressedargs
|
---|
478 | #if adv form, need to set k=0 and s=0
|
---|
479 | _advformargs_{_If_(_cgiargqf_,&k=0&s=0)}
|
---|
480 |
|
---|
481 | _searchfunctions_ {
|
---|
482 |
|
---|
483 | function beginSearch() \{
|
---|
484 | window.location="_httpquery_"+getstdargs()+"_advformargs_"+getsearchargs();
|
---|
485 | \}
|
---|
486 |
|
---|
487 | function runQuery() \{
|
---|
488 | window.location="_httpquery_"+getstdargs()+"_advformargs_"+getqueryargs();
|
---|
489 | \}
|
---|
490 |
|
---|
491 | function clearForm() \{
|
---|
492 | clearfqf();
|
---|
493 | clearfqv();
|
---|
494 |
|
---|
495 | if ("_cgiargqf_" == "1") \{
|
---|
496 | clearfqk();
|
---|
497 | clearfqs();
|
---|
498 | clearfqc();
|
---|
499 | \}
|
---|
500 |
|
---|
501 | \}
|
---|
502 |
|
---|
503 | }
|
---|
504 |
|
---|
505 | #######################################################################
|
---|
506 | # headers
|
---|
507 | # these are overridden so we can put an onLoad event handler
|
---|
508 | # in the <body> tag of this page - for mgpp, form search pages
|
---|
509 | #######################################################################
|
---|
510 |
|
---|
511 | #copied from prefs
|
---|
512 |
|
---|
513 | _header_ {_cgihead_
|
---|
514 | _htmlhead_(class="bgimage" onLoad="initialize();")_startspacer__pagebanner_
|
---|
515 | }
|
---|
516 |
|
---|
517 | # this declaration ends up being the same as style=restrict, never mind
|
---|
518 | _header_[v=1] {_cgihead_
|
---|
519 | _htmlhead_(onLoad="initialize();")_pagebanner_
|
---|
520 | }
|
---|
521 |
|
---|
522 | #######################################################################
|
---|
523 | # page content
|
---|
524 | #######################################################################
|
---|
525 |
|
---|
526 |
|
---|
527 | _pagetitle_ {_If_(_cgiargq_,_textquerytitle_,_textnoquerytitle_)}
|
---|
528 |
|
---|
529 |
|
---|
530 | _content_ {
|
---|
531 | _optnavigationbar_
|
---|
532 |
|
---|
533 | <div class="document">
|
---|
534 | <div class="queryform">
|
---|
535 | _If_(_cgiargct_,_selectqueryform_,_queryform_)
|
---|
536 | </div>
|
---|
537 | _If_(_searchhistorylist_,<center>_searchhistorybar_</center><br>
|
---|
538 | <center>
|
---|
539 | _searchhistorylist_
|
---|
540 | </center>)
|
---|
541 | _If_(_cgiargq_,_queryresultsbar_
|
---|
542 | <small>
|
---|
543 | _freqmsg_
|
---|
544 | _textpostprocess_
|
---|
545 | _If_(_stopwordsmsg_,(_stopwordsmsg_))</small><br />
|
---|
546 | _resultline_
|
---|
547 | ,<div class="divbar"> </div>)
|
---|
548 | }
|
---|
549 |
|
---|
550 | _selectqueryform_{_If_("_cgiargqt_" eq "1",_fieldqueryform_,_queryform_)}
|
---|
551 |
|
---|
552 | _queryform_ {
|
---|
553 | <!-- query form (\_query:plainqueryform\_) -->
|
---|
554 | <form name=QueryForm method=get action="_gwcgi_">
|
---|
555 | <p>
|
---|
556 | <input type=hidden name="a" value="q">
|
---|
557 | <input type=hidden name="r" value="1">
|
---|
558 | <input type=hidden name="hs" value="1">
|
---|
559 | <input type=hidden name="e" value="_decodedcompressedoptions_">
|
---|
560 | _queryformcontent_
|
---|
561 | _optdatesearch_
|
---|
562 | </p>
|
---|
563 | </form>
|
---|
564 | <!-- end of query form -->
|
---|
565 | }
|
---|
566 |
|
---|
567 | _ifeellucky_ { <br><input type=checkbox name="ifl">_textifeellucky_ }
|
---|
568 | _useifeellucky_ { } # Set this to _ifeellucky_ if you want this functionality available
|
---|
569 |
|
---|
570 | _queryformcontent_{
|
---|
571 | <span class="textselect">
|
---|
572 | _textselect_
|
---|
573 | </span>
|
---|
574 |
|
---|
575 | <span class="querybox">
|
---|
576 | _If_(_cgiargqb_,_largequerybox_,_smallquerybox_)
|
---|
577 | _useifeellucky_
|
---|
578 | </span>
|
---|
579 | }
|
---|
580 |
|
---|
581 | # Automatically set by receptionist if config file switches
|
---|
582 | # date searching on
|
---|
583 | _optdatesearch_ { }
|
---|
584 |
|
---|
585 |
|
---|
586 | _datesearch_
|
---|
587 | {<table><tr><td>
|
---|
588 | <center>
|
---|
589 | _textstartdate_
|
---|
590 | <input type="text" name="ds" value = "_cgiargds_" size="4" maxlength="4">
|
---|
591 | <select name="dsbc" value="_cgiargdsbc_" size="1">
|
---|
592 | <option value = "0"_If_(_cgiargdsbc_,, selected)>_textad_
|
---|
593 | <option value = "1"_If_(_cgiargdsbc_, selected)>_textbc_
|
---|
594 | </select>
|
---|
595 | _textenddate_
|
---|
596 | <input type="text" name="de" value = "_cgiargde_" size="4" maxlength="4">
|
---|
597 | <select name="debc" size="1">
|
---|
598 | <option value = "0" _If_(_cgiargdebc_,, selected)>_textad_
|
---|
599 | <option value = "1" _If_(_cgiargdebc_, selected)>_textbc_
|
---|
600 | </select>
|
---|
601 | </center>
|
---|
602 | </tr></td>
|
---|
603 | <tr><td>
|
---|
604 | _textexplaineras_
|
---|
605 | </tr></td>
|
---|
606 | </table>
|
---|
607 | </center>
|
---|
608 | }
|
---|
609 |
|
---|
610 | _smallquerybox_ {<tr><td><nobr><input type="text" name="q" value="_cgiargq_" size="50">
|
---|
611 | <input type="submit" value="_textbeginsearch_"></nobr>}
|
---|
612 |
|
---|
613 | _largequerybox_ {
|
---|
614 | <tr><td><textarea name="q" cols=63 rows=10>
|
---|
615 | _cgiargq_
|
---|
616 | </textarea></td></tr>
|
---|
617 | <tr align=right><td><table>
|
---|
618 | <tr><td><input type="submit" value="_textbeginsearch_"></td>
|
---|
619 | </tr></table></td></tr>}
|
---|
620 |
|
---|
621 |
|
---|
622 | _fieldqueryform_ {
|
---|
623 | <noscript>
|
---|
624 | <p><b>_textnojsformwarning_</b><p>
|
---|
625 | </noscript>
|
---|
626 | <!-- field query form (\_query:fieldqueryform\_) -->
|
---|
627 | <form name=QueryForm method=get action="_gwcgi_">
|
---|
628 |
|
---|
629 | <table><tr><td>
|
---|
630 | <nobr>
|
---|
631 | _textformselect_
|
---|
632 | </nobr>
|
---|
633 | </td></tr>
|
---|
634 | _If_(_cgiargqf_,_advancedforms_,_simpleforms_)
|
---|
635 | </table>
|
---|
636 | _If_(_cgiargqf_,<div class="divbar"> </div>
|
---|
637 | <center>_advancedformextra_</center>)
|
---|
638 |
|
---|
639 | </form>
|
---|
640 | <!-- end of query form -->
|
---|
641 | }
|
---|
642 |
|
---|
643 | _advancedforms_{
|
---|
644 | <tr><td><center> <table border=0 cellspacing=0 cellpadding=0 width="90%">
|
---|
645 | <tr><th></th><th align=left>_textwordphrase_</th><th colspan=2><nobr>_textfoldstem_</nobr></th><th align=center> _textinfield_</th></tr>
|
---|
646 | _advformlist_
|
---|
647 | <tr><td colspan=2><input type=button value="_textclearform_" onClick="clearForm();"></td>
|
---|
648 | <td colspan=3><table>
|
---|
649 | <tr><td><input type=button value="_textbeginsearch_" onClick="beginSearch();"></td>
|
---|
650 | </tr></table></td></tr>
|
---|
651 | </table></td></tr>
|
---|
652 | }
|
---|
653 |
|
---|
654 | _advancedformextra_{
|
---|
655 | <table>
|
---|
656 | <tr><td>_textadvquery_</td></tr>
|
---|
657 | <tr><td><textarea name=q cols=57 rows=3 onChange="updateq();">_cgiargq_</textarea></td>
|
---|
658 | <td valign=bottom>
|
---|
659 | <input type="button" value="_textrunquery_" onClick="runQuery();"></td></tr>
|
---|
660 | </table>
|
---|
661 | }
|
---|
662 |
|
---|
663 | _simpleforms_{
|
---|
664 | <tr><td><center> <table border=0 cellspacing=0 cellpadding=0 width="90%">
|
---|
665 | <tr><th align=left>_textwordphrase_</th><th align=left> _textinfield_</th></tr>
|
---|
666 | _regformlist_
|
---|
667 | <tr><td><input type=button value="_textclearform_" onClick="clearForm();"></td>
|
---|
668 | <td><table>
|
---|
669 | <tr><td><input type=button value="_textbeginsearch_" onClick="beginSearch();"></td>
|
---|
670 | </tr>
|
---|
671 | </table></td></tr>
|
---|
672 | </table></td></tr>}
|
---|
673 |
|
---|
674 | _regformelement_{
|
---|
675 | <td><input type=text size=39 name="fqv" onChange="updatefqv();"></td>
|
---|
676 | <td>_fqfselection_</td>}
|
---|
677 |
|
---|
678 | #has no and/or/not selection box
|
---|
679 | _firstadvformelement_{
|
---|
680 | <td></td><td><input type=text size=31 name="fqv" onChange="updatefqv();"></td>
|
---|
681 | <td align=center><input type=checkbox name="fqk" onClick="updatefqk();"></td>
|
---|
682 | <td align-center><input type=checkbox name="fqs" onClick="updatefqs();"></td>
|
---|
683 | <td align=right>_fqfselection_</td>}
|
---|
684 |
|
---|
685 | _advformelement_{
|
---|
686 | <td>_fqcselection_</td>
|
---|
687 | <td><input type=text size=31 name="fqv" onChange="updatefqv();"></td>
|
---|
688 | <td align=center><input type=checkbox name="fqk" onClick="updatefqk();"></td>
|
---|
689 | <td align-center><input type=checkbox name="fqs" onClick="updatefqs();"></td>
|
---|
690 | <td align=right>_fqfselection_</td>}
|
---|
691 |
|
---|
692 | _fqcselection_ {
|
---|
693 | <select name="fqc" onChange="updatefqc();">
|
---|
694 | <option value="and">_textand_
|
---|
695 | <option value="or">_textor_
|
---|
696 | <option value="not">_textandnot_
|
---|
697 | </select>}
|
---|
698 |
|
---|
699 | _textselect_ {_If_(_cgiargb_,_chooseadvancedsearch_,_textsimplesearch_)}
|
---|
700 | _chooseadvancedsearch_ {_If_(_cgiargct_,_If_(_cgiargct_ eq "2",_textadvancedlucenesearch_,_textadvancedmgppsearch_),_textadvancedsearch_}
|
---|
701 | _textformselect_ {_If_(_cgiargqf_,_textformadvancedsearch_,_textformsimplesearch_)}
|
---|
702 | # mg uses hselection for index, mgpp uses fqfselection
|
---|
703 | _indexselection_{_If_(_cgiargct_,_fqfselection_,_hselection_)}
|
---|
704 |
|
---|
705 | # we want to put the links to previous/next pages of results
|
---|
706 | # in the footer
|
---|
707 | _pagefooterextra_ {
|
---|
708 | <center>
|
---|
709 | <table cellspacing=0 cellpadding=0 width="_pagewidth_">
|
---|
710 | <tr>
|
---|
711 | <td align=left>_If_(_prevfirst_,<a href="_httpquery_&r=_prevfirst_">_iconprev__textmatches__prevfirst_ - _prevlast_</a>)</td>
|
---|
712 | <td align=right>_If_(_nextfirst_,<a href="_httpquery_&r=_nextfirst_">_textmatches__nextfirst_ - _nextlast__iconnext_</a>)</td>
|
---|
713 | </tr></table>
|
---|
714 | </center>
|
---|
715 |
|
---|
716 | </div> <!-- document -->
|
---|
717 | }
|
---|
718 |
|
---|
719 | _querytypeselection_ {
|
---|
720 | <select name="t">
|
---|
721 | <option value="1"_If_(_cgiargt_, selected)>_If_(_cgiargb_,_textranked_,_textsome_)
|
---|
722 | <option value="0"_If_(_cgiargt_,, selected)>_If_(_cgiargb_,_textboolean_,_textall_)
|
---|
723 | </select>
|
---|
724 | }
|
---|
725 |
|
---|
726 |
|
---|
727 | _formquerytypesimpleselection_ {
|
---|
728 | <select name="t">
|
---|
729 | <option value="1"_If_(_cgiargt_, selected)>_textsome_
|
---|
730 | <option value="0"_If_(_cgiargt_,, selected)>_textall_
|
---|
731 | </select>
|
---|
732 | }
|
---|
733 |
|
---|
734 | _formquerytypeadvancedselection_ {
|
---|
735 | <select name="t">
|
---|
736 | <option value="1"_If_(_cgiargt_, selected)>_textranked_
|
---|
737 | <option value="0"_If_(_cgiargt_,, selected)>_textnatural_
|
---|
738 | </select>
|
---|
739 | }
|
---|
740 |
|
---|
741 | # 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.
|
---|
742 | _formquerytypeselection_ {
|
---|
743 | <select name="t">
|
---|
744 | <option value="1"_If_(_cgiargt_, selected)>_If_(_cgiargqf_,_textranked_,_textsome_)
|
---|
745 | <option value="0"_If_(_cgiargt_,, selected)>_If_(_cgiargqf_,_textnatural_,_textall_)
|
---|
746 | </select>
|
---|
747 | }
|
---|
748 |
|
---|