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 | _resultline_ {}
|
---|
13 | _thisfirst_ {}
|
---|
14 | _thislast_ {}
|
---|
15 | _nextfirst_ {}
|
---|
16 | _nextlast_ {}
|
---|
17 | _prevfirst_ {}
|
---|
18 | _prevlast_ {}
|
---|
19 | _searchhistorylist_ {}
|
---|
20 | #_histvalue0_ to _histvalue19_
|
---|
21 | _advformlist_ {}
|
---|
22 | _regformlist_ {}
|
---|
23 | #_fqfselection_ {}
|
---|
24 |
|
---|
25 |
|
---|
26 | #######################################################################
|
---|
27 | # icons
|
---|
28 | #######################################################################
|
---|
29 |
|
---|
30 | _queryresultsbar_ {
|
---|
31 | <div class="divbar">
|
---|
32 | <p class="navbar">_texthresults_</p>
|
---|
33 | </div>
|
---|
34 | }
|
---|
35 |
|
---|
36 | _searchhistorybar_ {
|
---|
37 | <div class="divbar">
|
---|
38 | <p class="navbar">_texticonsearchhistorybar_</p>
|
---|
39 | </div>
|
---|
40 | }
|
---|
41 |
|
---|
42 |
|
---|
43 | # _iconnext_ and _iconprev_ are overridden in this package as we
|
---|
44 | # don't want alt text here
|
---|
45 | _iconnext_{<img src="_httpiconmore_" width=_widthmore_ height=_heightmore_ border=0 align=top>}
|
---|
46 | _iconnext_ [v=1] {}
|
---|
47 | _iconprev_{<img src="_httpiconless_" width=_widthless_ height=_heightless_ border=0 align=top>}
|
---|
48 | _iconprev_ [v=1] {}
|
---|
49 |
|
---|
50 | # the small squares for search history
|
---|
51 | ## " " ## handmade ## mstds ##
|
---|
52 | _httpiconmstdsqrof_ {_httpimg_/mstdsof.gif}
|
---|
53 | _httpiconmstdsqron_ {_httpimg_/mstdson.gif}
|
---|
54 | _widthmstdsqrx_ {13}
|
---|
55 | _heightmstdsqrx_ {13}
|
---|
56 |
|
---|
57 | #######################################################################
|
---|
58 | # images
|
---|
59 | #######################################################################
|
---|
60 |
|
---|
61 | # _imagethispage_ set in nav_css/nav_ns4 macro files
|
---|
62 |
|
---|
63 | #the buttons for the search history entries
|
---|
64 | # takes one arg - the entry number (0-num entries)
|
---|
65 | _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>}
|
---|
66 |
|
---|
67 |
|
---|
68 | #######################################################################
|
---|
69 | # scripts (and some macros for the scripts)
|
---|
70 | #######################################################################
|
---|
71 |
|
---|
72 | _pagescriptextra_ {_If_("_cgiargqt_" eq "1", _formpagescriptextra_, _selectpagescriptextra_)
|
---|
73 | _If_("_cgiarghd_" ne "0",_historypagescriptextra_) }
|
---|
74 |
|
---|
75 | _selectpagescriptextra_{_If_("_cgiargqto_" eq "2", _formpagescriptextra_,_dummypagescriptextra_)}
|
---|
76 | _dummypagescriptextra_{function initialize() \{
|
---|
77 | \} }
|
---|
78 | _formpagescriptextra_ {
|
---|
79 | // query scripts generated by \_query:pagescriptextra\_
|
---|
80 |
|
---|
81 | _standardfunctions_
|
---|
82 | _formfunctions_
|
---|
83 | _searchfunctions_
|
---|
84 |
|
---|
85 | function getsearchargs () \{
|
---|
86 |
|
---|
87 | var args="";
|
---|
88 | args = "&fqa=0&fqv="+argfqv+"&fqf="+argfqf;
|
---|
89 | _If_(_cgiargqf_,args += "&fqk="+argfqk+"&fqs="+argfqs+"&fqc="+argfqc;)
|
---|
90 |
|
---|
91 | return args;
|
---|
92 | \}
|
---|
93 |
|
---|
94 |
|
---|
95 |
|
---|
96 | function getqueryargs () \{
|
---|
97 | return "&fqa=1"+"&q="+argq+"&fqv="+argfqv+"&fqf="+argfqf+
|
---|
98 | "&fqk="+argfqk+"&fqs="+argfqs+"&fqc="+argfqc ;
|
---|
99 | \}
|
---|
100 |
|
---|
101 | }
|
---|
102 |
|
---|
103 | _historypagescriptextra_{
|
---|
104 |
|
---|
105 | var histvalue0='_histvalue0_';
|
---|
106 | var histvalue1='_histvalue1_';
|
---|
107 | var histvalue2='_histvalue2_';
|
---|
108 | var histvalue3='_histvalue3_';
|
---|
109 | var histvalue4='_histvalue4_';
|
---|
110 | var histvalue5='_histvalue5_';
|
---|
111 | var histvalue6='_histvalue6_';
|
---|
112 | var histvalue7='_histvalue7_';
|
---|
113 | var histvalue8='_histvalue8_';
|
---|
114 | var histvalue9='_histvalue9_';
|
---|
115 | var histvalue10='_histvalue10_';
|
---|
116 | var histvalue11='_histvalue11_';
|
---|
117 | var histvalue12='_histvalue12_';
|
---|
118 | var histvalue13='_histvalue13_';
|
---|
119 | var histvalue14='_histvalue14_';
|
---|
120 | var histvalue15='_histvalue15_';
|
---|
121 | var histvalue16='_histvalue16_';
|
---|
122 | var histvalue17='_histvalue17_';
|
---|
123 | var histvalue18='_histvalue18_';
|
---|
124 | var histvalue19='_histvalue19_';
|
---|
125 |
|
---|
126 | function inputQuery(value) \{
|
---|
127 | if ("_cgiargqt_" == "0") \{ // text search
|
---|
128 | document.QueryForm.q.value += " "+value;
|
---|
129 | document.QueryForm.q.focus();
|
---|
130 | \}
|
---|
131 | else \{
|
---|
132 | if ("_cgiargqf_" == "1") \{ // advanced query
|
---|
133 | document.QueryForm.q.value += " "+value;
|
---|
134 | document.QueryForm.q.focus();
|
---|
135 | updateq();
|
---|
136 | \}
|
---|
137 | else \{ // simple form search
|
---|
138 | // do something here, what??
|
---|
139 | \}
|
---|
140 | \}
|
---|
141 | \}
|
---|
142 |
|
---|
143 | }
|
---|
144 |
|
---|
145 | _standardfunctions_{
|
---|
146 |
|
---|
147 | function getstdargs() \{
|
---|
148 |
|
---|
149 | stdarg = "";
|
---|
150 | _If_(_gselection_,_getgarg_)
|
---|
151 | _If_(_jselection_,_getjarg_)
|
---|
152 | _If_(_nselection_,_getnarg_)
|
---|
153 |
|
---|
154 | value = document.QueryForm.t.options[document.QueryForm.t.selectedIndex].value;
|
---|
155 | if (value != "_cgiargt_") stdarg += "&t="+value;
|
---|
156 |
|
---|
157 | stdarg += "&r=1&hs=1";
|
---|
158 | return stdarg;
|
---|
159 | \}
|
---|
160 |
|
---|
161 | }
|
---|
162 |
|
---|
163 | _getgarg_{
|
---|
164 | if (document.QueryForm.g!= null) \{
|
---|
165 | value = document.QueryForm.g.options[document.QueryForm.g.selectedIndex].value;
|
---|
166 | if (value != "_cgiargg_") stdarg += "&g="+value;
|
---|
167 | \}
|
---|
168 | }
|
---|
169 |
|
---|
170 | _getjarg_{
|
---|
171 | value = document.QueryForm.j.options[document.QueryForm.j.selectedIndex].value;
|
---|
172 | if (value != "_cgiargj_") stdarg += "&j="+value;
|
---|
173 | }
|
---|
174 |
|
---|
175 | _getnarg_{
|
---|
176 | value = document.QueryForm.n.options[document.QueryForm.n.selectedIndex].value;
|
---|
177 | if (value != "_cgiargn_") stdarg += "&n="+value;
|
---|
178 | }
|
---|
179 |
|
---|
180 | _formfunctions_{
|
---|
181 |
|
---|
182 | argfqf="_cgiargfqf_";
|
---|
183 | argfqv="_cgiargfqv_";
|
---|
184 | argfqk="_cgiargfqk_";
|
---|
185 | argfqs="_cgiargfqs_";
|
---|
186 | argfqc="_cgiargfqc_";
|
---|
187 | argq = "";
|
---|
188 |
|
---|
189 | function initialize () \{
|
---|
190 |
|
---|
191 | if (document.QueryForm.fqf != null) \{initfqf();\}
|
---|
192 | initfqv();
|
---|
193 | if ( "_cgiargqf_" == "1") \{
|
---|
194 | initfqs();
|
---|
195 | initfqk();
|
---|
196 | initfqc();
|
---|
197 | initq();
|
---|
198 | \}
|
---|
199 |
|
---|
200 | \}
|
---|
201 |
|
---|
202 | // fqf - the field selection box
|
---|
203 | function initfqf() \{
|
---|
204 | var i;
|
---|
205 | fqf = argfqf.split(",");
|
---|
206 | num_opts = document.QueryForm.fqf[0].options.length; // assumes all have the same options
|
---|
207 | for (i=0; i<fqf.length && i<document.QueryForm.fqf.length; i++) \{
|
---|
208 | if (fqf[i] != "")\{
|
---|
209 | for (j=0;j<num_opts;j++) \{
|
---|
210 | if (fqf[i]== document.QueryForm.fqf[i].options[j].value) \{
|
---|
211 | document.QueryForm.fqf[i].options[j].selected = true;
|
---|
212 | break;
|
---|
213 | \}
|
---|
214 | \}
|
---|
215 | \}
|
---|
216 | \}
|
---|
217 | if (fqf.length < document.QueryForm.fqf.length) \{ // initialize remaining ones
|
---|
218 | for (i=fqf.length;i<document.QueryForm.fqf.length;i++) \{
|
---|
219 | var z=i;
|
---|
220 | while (z >= num_opts) \{
|
---|
221 | z = z-(num_opts);
|
---|
222 | \}
|
---|
223 | document.QueryForm.fqf[i].options[z].selected = true;
|
---|
224 |
|
---|
225 | \}
|
---|
226 | \}
|
---|
227 | updatefqf();
|
---|
228 |
|
---|
229 | \}
|
---|
230 |
|
---|
231 | function updatefqf() \{
|
---|
232 |
|
---|
233 | var i;
|
---|
234 | argfqf = "";
|
---|
235 | var j = document.QueryForm.fqf[0].selectedIndex;
|
---|
236 | argfqf += document.QueryForm.fqf[0].options[j].value;
|
---|
237 | for (i=1; i<document.QueryForm.fqf.length;i++) \{
|
---|
238 | j = document.QueryForm.fqf[i].selectedIndex;
|
---|
239 | argfqf += "," + document.QueryForm.fqf[i].options[j].value;
|
---|
240 | \}
|
---|
241 |
|
---|
242 | \}
|
---|
243 |
|
---|
244 |
|
---|
245 | function clearfqf() \{
|
---|
246 | var i;
|
---|
247 | for (i=0;i<document.QueryForm.fqf.length;i++) \{
|
---|
248 | var z = i;
|
---|
249 | if (i >= document.QueryForm.fqf[i].options.length) z = z-document.QueryForm.fqf[i].options.length;
|
---|
250 | document.QueryForm.fqf[i].options[z].selected = true;
|
---|
251 | \}
|
---|
252 | updatefqf();
|
---|
253 | \}
|
---|
254 |
|
---|
255 | // fqc - the boolean operator selection box
|
---|
256 | function initfqc() \{
|
---|
257 | var i,j;
|
---|
258 | fqc = argfqc.split(",");
|
---|
259 | if (_cgiargfqn_ == 2) \{ // there will only be one fqc element
|
---|
260 | for (j=0;j<document.QueryForm.fqc.options.length;j++) \{
|
---|
261 | if (fqc[0] == document.QueryForm.fqc.options[j].value) \{
|
---|
262 | document.QueryForm.fqc.options[j].selected = true;
|
---|
263 | break;
|
---|
264 | \}
|
---|
265 | \}
|
---|
266 | \}
|
---|
267 | else \{
|
---|
268 | for (i=0; i<fqc.length;i++) \{
|
---|
269 | for (j=0;j<document.QueryForm.fqc[i].options.length;j++) \{
|
---|
270 | if (fqc[i] == document.QueryForm.fqc[i].options[j].value) \{
|
---|
271 | document.QueryForm.fqc[i].options[j].selected = true;
|
---|
272 | break;
|
---|
273 | \}
|
---|
274 | \}
|
---|
275 | \}
|
---|
276 | \}
|
---|
277 | updatefqc();
|
---|
278 |
|
---|
279 | \}
|
---|
280 |
|
---|
281 | function updatefqc() \{
|
---|
282 |
|
---|
283 | var i,j;
|
---|
284 | argfqc = "";
|
---|
285 | if (_cgiargfqn_ == 2) \{
|
---|
286 | j = document.QueryForm.fqc.selectedIndex;
|
---|
287 | argfqc += document.QueryForm.fqc.options[j].value;
|
---|
288 | \}
|
---|
289 | else \{
|
---|
290 | j = document.QueryForm.fqc[0].selectedIndex;
|
---|
291 | argfqc += document.QueryForm.fqc[0].options[j].value;
|
---|
292 | for (i=1;i<document.QueryForm.fqc.length;i++) \{
|
---|
293 | j = document.QueryForm.fqc[i].selectedIndex;
|
---|
294 | argfqc += "," + document.QueryForm.fqc[i].options[j].value;
|
---|
295 | \}
|
---|
296 | \}
|
---|
297 |
|
---|
298 | \}
|
---|
299 |
|
---|
300 |
|
---|
301 | function clearfqc() \{
|
---|
302 |
|
---|
303 | var i;
|
---|
304 | if (_cgiargfqn_ == 2) \{
|
---|
305 | document.QueryForm.fqc.options[0].selected = true;
|
---|
306 | \}
|
---|
307 | else \{
|
---|
308 | for (i=0; i<document.QueryForm.fqc.length; i++) \{
|
---|
309 | document.QueryForm.fqc[i].options[0].selected = true;
|
---|
310 | \}
|
---|
311 | \}
|
---|
312 | updatefqc();
|
---|
313 | \}
|
---|
314 |
|
---|
315 | // fqv - the query word/phrase text box
|
---|
316 | function initfqv() \{
|
---|
317 | var i;
|
---|
318 | fqv= argfqv.split(",");
|
---|
319 | for (i=0; i<fqv.length && i<document.QueryForm.fqv.length; i++) \{
|
---|
320 | document.QueryForm.fqv[i].value = fqv[i];
|
---|
321 | \}
|
---|
322 | updatefqv();
|
---|
323 |
|
---|
324 |
|
---|
325 | \}
|
---|
326 |
|
---|
327 | //argfqv += escape(format(document.QueryForm.fqv[0].value));
|
---|
328 |
|
---|
329 | function updatefqv() \{
|
---|
330 |
|
---|
331 | var i;
|
---|
332 | argfqv="";
|
---|
333 | argfqv += format(document.QueryForm.fqv[0].value);
|
---|
334 | for (i=1; i<document.QueryForm.fqv.length;i++) \{
|
---|
335 | argfqv += ",";
|
---|
336 | argfqv += format(document.QueryForm.fqv[i].value);
|
---|
337 | \}
|
---|
338 | \}
|
---|
339 |
|
---|
340 | function clearfqv() \{
|
---|
341 | var i;
|
---|
342 | for (i=0; i< document.QueryForm.fqv.length;i++) \{
|
---|
343 | document.QueryForm.fqv[i].value = "";
|
---|
344 | \}
|
---|
345 | updatefqv();
|
---|
346 | \}
|
---|
347 |
|
---|
348 | // fqs - the stemming checkboxes
|
---|
349 | function initfqs() \{
|
---|
350 |
|
---|
351 | var i;
|
---|
352 | fqs = argfqs.split(",");
|
---|
353 | for (i=0; i<fqs.length; i++) \{
|
---|
354 | if (fqs[i]=="1") \{
|
---|
355 | document.QueryForm.fqs[i].checked = true;
|
---|
356 | \}
|
---|
357 | \}
|
---|
358 | updatefqs();
|
---|
359 |
|
---|
360 | \}
|
---|
361 |
|
---|
362 | function updatefqs() \{
|
---|
363 | argfqs="";
|
---|
364 | if (document.QueryForm.fqs[0].checked) \{
|
---|
365 | argfqs += "1";
|
---|
366 | \}
|
---|
367 | else \{
|
---|
368 | argfqs += "0";
|
---|
369 | \}
|
---|
370 | var i;
|
---|
371 | for (i=1; i<document.QueryForm.fqs.length; i++) \{
|
---|
372 | if (document.QueryForm.fqs[i].checked) \{
|
---|
373 | argfqs += ",1";
|
---|
374 | \}
|
---|
375 | else \{
|
---|
376 | argfqs += ",0";
|
---|
377 | \}
|
---|
378 | \}
|
---|
379 | \}
|
---|
380 |
|
---|
381 |
|
---|
382 | function clearfqs() \{
|
---|
383 | var i;
|
---|
384 | for (i=0; i<document.QueryForm.fqs.length; i++) \{
|
---|
385 | document.QueryForm.fqs[i].checked = false;
|
---|
386 | \}
|
---|
387 | updatefqs();
|
---|
388 | \}
|
---|
389 |
|
---|
390 | // kqk - the casefolding checkboxes
|
---|
391 | function initfqk() \{
|
---|
392 | var i;
|
---|
393 | fqk = argfqk.split(",");
|
---|
394 | for (i=0; i<fqk.length; i++) \{
|
---|
395 | if (fqk[i]=="1") \{
|
---|
396 | document.QueryForm.fqk[i].checked = true;
|
---|
397 | \}
|
---|
398 | \}
|
---|
399 | updatefqk();
|
---|
400 |
|
---|
401 | \}
|
---|
402 |
|
---|
403 |
|
---|
404 | function updatefqk() \{
|
---|
405 | argfqk="";
|
---|
406 | if (document.QueryForm.fqk[0].checked) \{
|
---|
407 | argfqk += "1";
|
---|
408 | \}
|
---|
409 | else \{
|
---|
410 | argfqk += "0";
|
---|
411 | \}
|
---|
412 | var i;
|
---|
413 | for (i=1; i<document.QueryForm.fqk.length; i++) \{
|
---|
414 | if (document.QueryForm.fqk[i].checked) \{
|
---|
415 | argfqk += ",1";
|
---|
416 | \}
|
---|
417 | else \{
|
---|
418 | argfqk += ",0";
|
---|
419 | \}
|
---|
420 | \}
|
---|
421 | \}
|
---|
422 |
|
---|
423 | function clearfqk() \{
|
---|
424 | var i;
|
---|
425 | for (i=0; i<document.QueryForm.fqk.length; i++) \{
|
---|
426 | document.QueryForm.fqk[i].checked = false;
|
---|
427 | \}
|
---|
428 | updatefqk();
|
---|
429 | \}
|
---|
430 |
|
---|
431 | // q - the advanced query box
|
---|
432 | function initq() \{
|
---|
433 | updateq();
|
---|
434 | \}
|
---|
435 |
|
---|
436 | function updateq() \{
|
---|
437 | argq = "";
|
---|
438 | argq += format(document.QueryForm.q.value);
|
---|
439 | \}
|
---|
440 |
|
---|
441 | function clearq() \{
|
---|
442 | document.QueryForm.q.value="";
|
---|
443 | \}
|
---|
444 |
|
---|
445 |
|
---|
446 | // convert commas and spaces to plus
|
---|
447 | // also convert other illegal characters to %xx codes
|
---|
448 | function format(string) \{
|
---|
449 | var str = "" + string;
|
---|
450 | var out = "", flag = 0;
|
---|
451 | var ch = "";
|
---|
452 | var j;
|
---|
453 | for (j = 0; j < str.length; j++) \{
|
---|
454 | ch=str.charAt(j);
|
---|
455 | if (ch == " "|| ch == ",") \{
|
---|
456 | if ( flag == 0) \{
|
---|
457 | out += "+";
|
---|
458 | flag=1;
|
---|
459 | \}
|
---|
460 | continue;
|
---|
461 | \}
|
---|
462 | if (ch == ";" || ch == ":" || ch == "/" || ch == "?" ||
|
---|
463 | ch == "@" || ch == "&" || ch == "=" || ch == "#") \{
|
---|
464 | out += escape(ch);
|
---|
465 | flag=0;
|
---|
466 | continue;
|
---|
467 | \}
|
---|
468 | out += str.charAt(j);
|
---|
469 | flag=0;
|
---|
470 | \}
|
---|
471 | return out;
|
---|
472 | \}
|
---|
473 |
|
---|
474 | }
|
---|
475 |
|
---|
476 | #_httpquery_ has a=q&e=compressedargs
|
---|
477 | #if adv form, need to set k=0 and s=0
|
---|
478 | _advformargs_{_If_(_cgiargqf_,&k=0&s=0)}
|
---|
479 |
|
---|
480 | _searchfunctions_ {
|
---|
481 |
|
---|
482 | function beginSearch() \{
|
---|
483 | window.location="_httpquery_"+getstdargs()+"_advformargs_"+getsearchargs();
|
---|
484 | \}
|
---|
485 |
|
---|
486 | function runQuery() \{
|
---|
487 | window.location="_httpquery_"+getstdargs()+"_advformargs_"+getqueryargs();
|
---|
488 | \}
|
---|
489 |
|
---|
490 | function clearForm() \{
|
---|
491 | clearfqf();
|
---|
492 | clearfqv();
|
---|
493 |
|
---|
494 | if ("_cgiargqf_" == "1") \{
|
---|
495 | clearfqk();
|
---|
496 | clearfqs();
|
---|
497 | clearfqc();
|
---|
498 | \}
|
---|
499 |
|
---|
500 | \}
|
---|
501 |
|
---|
502 | }
|
---|
503 |
|
---|
504 | #######################################################################
|
---|
505 | # headers
|
---|
506 | # these are overridden so we can put an onLoad event handler
|
---|
507 | # in the <body> tag of this page - for mgpp, form search pages
|
---|
508 | #######################################################################
|
---|
509 |
|
---|
510 | #copied from prefs
|
---|
511 |
|
---|
512 | _header_ {_cgihead_
|
---|
513 | _htmlhead_(class="bgimage" onLoad="initialize();")_startspacer__pagebanner_
|
---|
514 | }
|
---|
515 |
|
---|
516 | # this declaration ends up being the same as style=restrict, never mind
|
---|
517 | _header_[v=1] {_cgihead_
|
---|
518 | _htmlhead_(onLoad="initialize();")_pagebanner_
|
---|
519 | }
|
---|
520 |
|
---|
521 | #######################################################################
|
---|
522 | # page content
|
---|
523 | #######################################################################
|
---|
524 |
|
---|
525 |
|
---|
526 | _pagetitle_ {_If_(_cgiargq_,_textquerytitle_,_textnoquerytitle_)}
|
---|
527 |
|
---|
528 |
|
---|
529 | _content_ {
|
---|
530 | _optnavigationbar_
|
---|
531 |
|
---|
532 | <div class="document">
|
---|
533 |
|
---|
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_</small><br>
|
---|
545 | _resultline_
|
---|
546 | ,<div class="divbar"> </div>)
|
---|
547 | }
|
---|
548 |
|
---|
549 | _selectqueryform_{_If_("_cgiargqt_" eq "1",_fieldqueryform_,_selectqueryform2_)}
|
---|
550 | _selectqueryform2_{_If_("_cgiargqto_" eq "2", _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_,_textadvancedsearch_,_textsimplesearch_)}
|
---|
700 | _textformselect_ {_If_(_cgiargqf_,_textformadvancedsearch_,_textformsimplesearch_)}
|
---|
701 | # mg uses hselection for index, mgpp uses fqfselection
|
---|
702 | _indexselection_{_If_(_cgiargct_,_fqfselection_,_hselection_)}
|
---|
703 |
|
---|
704 | # we want to put the links to previous/next pages of results
|
---|
705 | # in the footer
|
---|
706 | _pagefooterextra_ {
|
---|
707 | <center>
|
---|
708 | <table cellspacing=0 cellpadding=0 width="_pagewidth_">
|
---|
709 | <tr>
|
---|
710 | <td align=left>_If_(_prevfirst_,<a href="_httpquery_&r=_prevfirst_">_iconprev__textmatches__prevfirst_ - _prevlast_</a>)</td>
|
---|
711 | <td align=right>_If_(_nextfirst_,<a href="_httpquery_&r=_nextfirst_">_textmatches__nextfirst_ - _nextlast__iconnext_</a>)</td>
|
---|
712 | </tr></table>
|
---|
713 | </center>
|
---|
714 |
|
---|
715 | </div> <!-- document -->
|
---|
716 | }
|
---|
717 |
|
---|
718 | _querytypeselection_ {
|
---|
719 | <select name="t">
|
---|
720 | <option value="1"_If_(_cgiargt_, selected)>_If_(_cgiargb_,_textranked_,_textsome_)
|
---|
721 | <option value="0"_If_(_cgiargt_,, selected)>_If_(_cgiargb_,_textboolean_,_textall_)
|
---|
722 | </select>
|
---|
723 | }
|
---|
724 |
|
---|
725 | _formquerytypeselection_ {
|
---|
726 | <select name="t">
|
---|
727 | <option value="1"_If_(_cgiargt_, selected)>_If_(_cgiargqf_,_textranked_,_textsome_)
|
---|
728 | <option value="0"_If_(_cgiargt_,, selected)>_If_(_cgiargqf_,_textnatural_,_textall_)
|
---|
729 | </select>
|
---|
730 | }
|
---|
731 |
|
---|
732 |
|
---|