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