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