[7343] | 1 | # this file must be UTF-8 encoded
|
---|
[128] | 2 | package query
|
---|
| 3 |
|
---|
[276] | 4 |
|
---|
[148] | 5 | #######################################################################
|
---|
[276] | 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.
|
---|
[148] | 8 | #######################################################################
|
---|
[128] | 9 |
|
---|
[276] | 10 | _quotedquery_ {}
|
---|
| 11 | _freqmsg_ {}
|
---|
[12382] | 12 | _stopwordsmsg_ {}
|
---|
[276] | 13 | _resultline_ {}
|
---|
| 14 | _thisfirst_ {}
|
---|
| 15 | _thislast_ {}
|
---|
| 16 | _nextfirst_ {}
|
---|
| 17 | _nextlast_ {}
|
---|
| 18 | _prevfirst_ {}
|
---|
| 19 | _prevlast_ {}
|
---|
[964] | 20 | _searchhistorylist_ {}
|
---|
[1923] | 21 | #_histvalue0_ to _histvalue19_
|
---|
| 22 | _advformlist_ {}
|
---|
| 23 | _regformlist_ {}
|
---|
[22053] | 24 | _sqladvformlist_ {}
|
---|
| 25 | _sqlregformlist_ {}
|
---|
[4765] | 26 | #_fqfselection_ {}
|
---|
[128] | 27 |
|
---|
[1923] | 28 |
|
---|
[148] | 29 | #######################################################################
|
---|
| 30 | # icons
|
---|
| 31 | #######################################################################
|
---|
[128] | 32 |
|
---|
[10948] | 33 | _queryresultsbar_ {
|
---|
| 34 | <div class="divbar">
|
---|
| 35 | <p class="navbar">_texthresults_</p>
|
---|
| 36 | </div>
|
---|
| 37 | }
|
---|
[128] | 38 |
|
---|
[11209] | 39 | _searchhistorybar_ {
|
---|
| 40 | <div class="divbar">
|
---|
| 41 | <p class="navbar">_texticonsearchhistorybar_</p>
|
---|
| 42 | </div>
|
---|
| 43 | }
|
---|
[1923] | 44 |
|
---|
[11209] | 45 |
|
---|
[276] | 46 | # _iconnext_ and _iconprev_ are overridden in this package as we
|
---|
| 47 | # don't want alt text here
|
---|
[12557] | 48 | _iconnext_{<img src="_httpiconmore_" width="_widthmore_" height="_heightmore_" border="0" align="top">}
|
---|
[1263] | 49 | _iconnext_ [v=1] {}
|
---|
[12557] | 50 | _iconprev_{<img src="_httpiconless_" width="_widthless_" height="_heightless_" border="0" align="top">}
|
---|
[1263] | 51 | _iconprev_ [v=1] {}
|
---|
[148] | 52 |
|
---|
[1923] | 53 | # the small squares for search history
|
---|
[2042] | 54 | ## " " ## handmade ## mstds ##
|
---|
| 55 | _httpiconmstdsqrof_ {_httpimg_/mstdsof.gif}
|
---|
| 56 | _httpiconmstdsqron_ {_httpimg_/mstdson.gif}
|
---|
[1923] | 57 | _widthmstdsqrx_ {13}
|
---|
| 58 | _heightmstdsqrx_ {13}
|
---|
| 59 |
|
---|
[148] | 60 | #######################################################################
|
---|
| 61 | # images
|
---|
| 62 | #######################################################################
|
---|
| 63 |
|
---|
[11156] | 64 | # _imagethispage_ set in nav_css/nav_ns4 macro files
|
---|
[148] | 65 |
|
---|
[1923] | 66 | #the buttons for the search history entries
|
---|
| 67 | # takes one arg - the entry number (0-num entries)
|
---|
[12557] | 68 | _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] | 69 |
|
---|
[1923] | 70 |
|
---|
[148] | 71 | #######################################################################
|
---|
[1923] | 72 | # scripts (and some macros for the scripts)
|
---|
| 73 | #######################################################################
|
---|
| 74 |
|
---|
[22053] | 75 | _pagescriptextra_ {_If_("_cgiargqt_" ge "1", _formpagescriptextra_, _selectpagescriptextra_)
|
---|
[1923] | 76 | _If_("_cgiarghd_" ne "0",_historypagescriptextra_) }
|
---|
| 77 |
|
---|
[4772] | 78 | _selectpagescriptextra_{_If_("_cgiargqto_" eq "2", _formpagescriptextra_,_dummypagescriptextra_)}
|
---|
[10872] | 79 | _dummypagescriptextra_{function initialize() \{
|
---|
| 80 | \} }
|
---|
[1923] | 81 | _formpagescriptextra_ {
|
---|
| 82 | // query scripts generated by \_query:pagescriptextra\_
|
---|
| 83 |
|
---|
| 84 | _standardfunctions_
|
---|
| 85 | _formfunctions_
|
---|
| 86 | _searchfunctions_
|
---|
| 87 |
|
---|
| 88 | function getsearchargs () \{
|
---|
| 89 |
|
---|
| 90 | var args="";
|
---|
| 91 | args = "&fqa=0&fqv="+argfqv+"&fqf="+argfqf;
|
---|
[22053] | 92 | _If_(_cgiargb_,
|
---|
| 93 | args += "&fqk="+argfqk+"&fqs="+argfqs+"&fqc="+argfqc;
|
---|
| 94 | )
|
---|
| 95 | _If_("_cgiarga_" eq "sqlq",args += "&sqlfqf="+argsqlfqf + "&sqlfqc="+argsqlfqc;)
|
---|
[1923] | 96 |
|
---|
| 97 | return args;
|
---|
| 98 | \}
|
---|
| 99 |
|
---|
| 100 |
|
---|
| 101 |
|
---|
| 102 | function getqueryargs () \{
|
---|
[22876] | 103 | var args = "&fqa=1"+"&q="+argq+"&fqv="+argfqv+"&fqf="+argfqf+
|
---|
| 104 | "&fqk="+argfqk+"&fqs="+argfqs+"&fqc="+argfqc;
|
---|
| 105 | _If_("_cgiarga_" eq "sqlq",args += "&sqlfqf="+argsqlfqf + "&sqlfqc="+argsqlfqc;)
|
---|
| 106 | return args;
|
---|
[1923] | 107 | \}
|
---|
| 108 |
|
---|
| 109 | }
|
---|
| 110 |
|
---|
| 111 | _historypagescriptextra_{
|
---|
| 112 |
|
---|
| 113 | var histvalue0='_histvalue0_';
|
---|
| 114 | var histvalue1='_histvalue1_';
|
---|
| 115 | var histvalue2='_histvalue2_';
|
---|
| 116 | var histvalue3='_histvalue3_';
|
---|
| 117 | var histvalue4='_histvalue4_';
|
---|
| 118 | var histvalue5='_histvalue5_';
|
---|
| 119 | var histvalue6='_histvalue6_';
|
---|
| 120 | var histvalue7='_histvalue7_';
|
---|
| 121 | var histvalue8='_histvalue8_';
|
---|
| 122 | var histvalue9='_histvalue9_';
|
---|
| 123 | var histvalue10='_histvalue10_';
|
---|
| 124 | var histvalue11='_histvalue11_';
|
---|
| 125 | var histvalue12='_histvalue12_';
|
---|
| 126 | var histvalue13='_histvalue13_';
|
---|
| 127 | var histvalue14='_histvalue14_';
|
---|
| 128 | var histvalue15='_histvalue15_';
|
---|
| 129 | var histvalue16='_histvalue16_';
|
---|
| 130 | var histvalue17='_histvalue17_';
|
---|
| 131 | var histvalue18='_histvalue18_';
|
---|
| 132 | var histvalue19='_histvalue19_';
|
---|
| 133 |
|
---|
| 134 | function inputQuery(value) \{
|
---|
| 135 | if ("_cgiargqt_" == "0") \{ // text search
|
---|
| 136 | document.QueryForm.q.value += " "+value;
|
---|
[8151] | 137 | document.QueryForm.q.focus();
|
---|
[1923] | 138 | \}
|
---|
| 139 | else \{
|
---|
[12768] | 140 | if ("_cgiargb_" == "1") \{ // advanced query
|
---|
[1923] | 141 | document.QueryForm.q.value += " "+value;
|
---|
[8151] | 142 | document.QueryForm.q.focus();
|
---|
[1923] | 143 | updateq();
|
---|
| 144 | \}
|
---|
| 145 | else \{ // simple form search
|
---|
| 146 | // do something here, what??
|
---|
| 147 | \}
|
---|
| 148 | \}
|
---|
| 149 | \}
|
---|
| 150 |
|
---|
| 151 | }
|
---|
| 152 |
|
---|
| 153 | _standardfunctions_{
|
---|
| 154 |
|
---|
| 155 | function getstdargs() \{
|
---|
| 156 |
|
---|
| 157 | stdarg = "";
|
---|
[2744] | 158 | _If_(_gselection_,_getgarg_)
|
---|
[5618] | 159 | _If_(_jselection_,_getjarg_)
|
---|
[9668] | 160 | _If_(_nselection_,_getnarg_)
|
---|
[22053] | 161 | _If_(_sqlsfselection_,_getsqlsfarg_)
|
---|
[12780] | 162 | _If_(_sfselection_,_getsfarg_)
|
---|
[22053] | 163 |
|
---|
[12780] | 164 | if (document.QueryForm.t != null) \{
|
---|
| 165 | value = document.QueryForm.t.options[document.QueryForm.t.selectedIndex].value;
|
---|
| 166 | if (value != "_cgiargt_") stdarg += "&t="+value;
|
---|
| 167 | \}
|
---|
[4813] | 168 | stdarg += "&r=1&hs=1";
|
---|
[1923] | 169 | return stdarg;
|
---|
| 170 | \}
|
---|
| 171 |
|
---|
| 172 | }
|
---|
| 173 |
|
---|
| 174 | _getgarg_{
|
---|
[4813] | 175 | if (document.QueryForm.g!= null) \{
|
---|
[1923] | 176 | value = document.QueryForm.g.options[document.QueryForm.g.selectedIndex].value;
|
---|
| 177 | if (value != "_cgiargg_") stdarg += "&g="+value;
|
---|
[4813] | 178 | \}
|
---|
[1923] | 179 | }
|
---|
| 180 |
|
---|
| 181 | _getjarg_{
|
---|
| 182 | value = document.QueryForm.j.options[document.QueryForm.j.selectedIndex].value;
|
---|
| 183 | if (value != "_cgiargj_") stdarg += "&j="+value;
|
---|
| 184 | }
|
---|
| 185 |
|
---|
[9668] | 186 | _getnarg_{
|
---|
| 187 | value = document.QueryForm.n.options[document.QueryForm.n.selectedIndex].value;
|
---|
| 188 | if (value != "_cgiargn_") stdarg += "&n="+value;
|
---|
| 189 | }
|
---|
[1923] | 190 |
|
---|
[22053] | 191 | # currently only supported in lucene
|
---|
[12780] | 192 | _getsfarg_{
|
---|
[22053] | 193 | _If_("_cgiarga__cgiargct_" eq "q2",
|
---|
[12780] | 194 | value = document.QueryForm.sf.options[document.QueryForm.sf.selectedIndex].value;
|
---|
| 195 | if (value != "_cgiargsf_") stdarg += "&sf="+value;
|
---|
[22053] | 196 | )
|
---|
[12780] | 197 | }
|
---|
| 198 |
|
---|
[22053] | 199 | # only when in sql mode
|
---|
| 200 | _getsqlsfarg_{
|
---|
| 201 | _If_("_cgiarga__cgiargqt_" eq "sqlq2",
|
---|
| 202 | value = document.QueryForm.sqlsf.options[document.QueryForm.sqlsf.selectedIndex].value;
|
---|
| 203 | if (value != "_cgiargsqlsf_") stdarg += "&sqlsf="+value;
|
---|
| 204 | )
|
---|
| 205 | }
|
---|
| 206 |
|
---|
[1923] | 207 | _formfunctions_{
|
---|
| 208 |
|
---|
| 209 | argfqf="_cgiargfqf_";
|
---|
| 210 | argfqv="_cgiargfqv_";
|
---|
| 211 | argfqk="_cgiargfqk_";
|
---|
| 212 | argfqs="_cgiargfqs_";
|
---|
| 213 | argfqc="_cgiargfqc_";
|
---|
[22053] | 214 | _If_("_cgiarga_" eq "sqlq",
|
---|
| 215 | argsqlfqf="_cgiargsqlfqf_";
|
---|
| 216 | argsqlfqc="_cgiargsqlfqc_";
|
---|
| 217 | )
|
---|
[1923] | 218 | argq = "";
|
---|
| 219 |
|
---|
| 220 | function initialize () \{
|
---|
| 221 |
|
---|
[12780] | 222 | if (document.QueryForm.fqf != null) \{initfqf(); \}
|
---|
| 223 | if (document.QueryForm.fqv != null) \{initfqv(); \}
|
---|
| 224 | if (document.QueryForm.fqs != null) \{initfqs(); \}
|
---|
| 225 | if (document.QueryForm.fqk != null) \{initfqk(); \}
|
---|
| 226 | if (document.QueryForm.fqc != null) \{initfqc(); \}
|
---|
[22053] | 227 | _If_("_cgiarga_" eq "sqlq",
|
---|
| 228 | if (document.QueryForm.sqlfqf != null) \{initsqlfqf(); \}
|
---|
| 229 | if (document.QueryForm.sqlfqc != null) \{initsqlfqc(); \}
|
---|
| 230 | )
|
---|
[12780] | 231 | if (document.QueryForm.q != null) \{initq(); \}
|
---|
[1923] | 232 | \}
|
---|
| 233 |
|
---|
[12441] | 234 | // makes a form submit itself when enter is pressed in a text field
|
---|
| 235 | function entersubmit(event) \{
|
---|
| 236 |
|
---|
| 237 | if (window.event && window.event.keyCode == 13) \{
|
---|
| 238 | beginSearch();
|
---|
| 239 | \} else \{
|
---|
| 240 | if (event && event.which == 13) \{
|
---|
| 241 | beginSearch();
|
---|
| 242 | \} else \{
|
---|
| 243 | return true;
|
---|
| 244 | \}
|
---|
| 245 | \}
|
---|
| 246 | \}
|
---|
| 247 |
|
---|
[12780] | 248 |
|
---|
[1923] | 249 | // fqf - the field selection box
|
---|
| 250 | function initfqf() \{
|
---|
| 251 | var i;
|
---|
[7262] | 252 | fqf = argfqf.split(",");
|
---|
| 253 | num_opts = document.QueryForm.fqf[0].options.length; // assumes all have the same options
|
---|
[10661] | 254 | for (i=0; i<fqf.length && i<document.QueryForm.fqf.length; i++) \{
|
---|
| 255 | if (fqf[i] != "")\{
|
---|
[7262] | 256 | for (j=0;j<num_opts;j++) \{
|
---|
[10661] | 257 | if (fqf[i]== document.QueryForm.fqf[i].options[j].value) \{
|
---|
[1923] | 258 | document.QueryForm.fqf[i].options[j].selected = true;
|
---|
| 259 | break;
|
---|
| 260 | \}
|
---|
| 261 | \}
|
---|
[10661] | 262 | \}
|
---|
[1923] | 263 | \}
|
---|
| 264 | if (fqf.length < document.QueryForm.fqf.length) \{ // initialize remaining ones
|
---|
| 265 | for (i=fqf.length;i<document.QueryForm.fqf.length;i++) \{
|
---|
| 266 | var z=i;
|
---|
[7262] | 267 | while (z >= num_opts) \{
|
---|
| 268 | z = z-(num_opts);
|
---|
[3157] | 269 | \}
|
---|
[1923] | 270 | document.QueryForm.fqf[i].options[z].selected = true;
|
---|
| 271 |
|
---|
| 272 | \}
|
---|
| 273 | \}
|
---|
| 274 | updatefqf();
|
---|
| 275 |
|
---|
| 276 | \}
|
---|
| 277 |
|
---|
| 278 | function updatefqf() \{
|
---|
| 279 |
|
---|
| 280 | var i;
|
---|
| 281 | argfqf = "";
|
---|
| 282 | var j = document.QueryForm.fqf[0].selectedIndex;
|
---|
| 283 | argfqf += document.QueryForm.fqf[0].options[j].value;
|
---|
| 284 | for (i=1; i<document.QueryForm.fqf.length;i++) \{
|
---|
| 285 | j = document.QueryForm.fqf[i].selectedIndex;
|
---|
| 286 | argfqf += "," + document.QueryForm.fqf[i].options[j].value;
|
---|
| 287 | \}
|
---|
| 288 |
|
---|
| 289 | \}
|
---|
| 290 |
|
---|
| 291 |
|
---|
| 292 | function clearfqf() \{
|
---|
| 293 | var i;
|
---|
| 294 | for (i=0;i<document.QueryForm.fqf.length;i++) \{
|
---|
| 295 | var z = i;
|
---|
| 296 | if (i >= document.QueryForm.fqf[i].options.length) z = z-document.QueryForm.fqf[i].options.length;
|
---|
| 297 | document.QueryForm.fqf[i].options[z].selected = true;
|
---|
| 298 | \}
|
---|
| 299 | updatefqf();
|
---|
| 300 | \}
|
---|
| 301 |
|
---|
[22053] | 302 |
|
---|
| 303 | // sqlfqf - the field selection box
|
---|
| 304 | function initsqlfqf() \{
|
---|
| 305 | var i;
|
---|
| 306 | sqlfqf = argsqlfqf.split(",");
|
---|
| 307 | num_opts = document.QueryForm.sqlfqf[0].options.length; // assumes all have the same options
|
---|
| 308 | for (i=0; i<sqlfqf.length && i<document.QueryForm.sqlfqf.length; i++) \{
|
---|
| 309 | if (sqlfqf[i] != "")\{
|
---|
| 310 | for (j=0;j<num_opts;j++) \{
|
---|
| 311 | if (sqlfqf[i]== document.QueryForm.sqlfqf[i].options[j].value) \{
|
---|
| 312 | document.QueryForm.sqlfqf[i].options[j].selected = true;
|
---|
| 313 | break;
|
---|
| 314 | \}
|
---|
| 315 | \}
|
---|
| 316 | \}
|
---|
| 317 | \}
|
---|
| 318 | if (sqlfqf.length < document.QueryForm.sqlfqf.length) \{ // initialize remaining ones
|
---|
| 319 | for (i=sqlfqf.length;i<document.QueryForm.sqlfqf.length;i++) \{
|
---|
| 320 | var z=i;
|
---|
| 321 | while (z >= num_opts) \{
|
---|
| 322 | z = z-(num_opts);
|
---|
| 323 | \}
|
---|
| 324 | document.QueryForm.sqlfqf[i].options[z].selected = true;
|
---|
| 325 |
|
---|
| 326 | \}
|
---|
| 327 | \}
|
---|
| 328 | updatesqlfqf();
|
---|
| 329 |
|
---|
| 330 | \}
|
---|
| 331 |
|
---|
| 332 | function updatesqlfqf() \{
|
---|
| 333 |
|
---|
| 334 | var i;
|
---|
| 335 | argsqlfqf = "";
|
---|
| 336 | var j = document.QueryForm.sqlfqf[0].selectedIndex;
|
---|
| 337 | argsqlfqf += document.QueryForm.sqlfqf[0].options[j].value;
|
---|
| 338 | for (i=1; i<document.QueryForm.sqlfqf.length;i++) \{
|
---|
| 339 | j = document.QueryForm.sqlfqf[i].selectedIndex;
|
---|
| 340 | argsqlfqf += "," + document.QueryForm.sqlfqf[i].options[j].value;
|
---|
| 341 | \}
|
---|
| 342 |
|
---|
| 343 | \}
|
---|
| 344 |
|
---|
| 345 |
|
---|
| 346 | function clearsqlfqf() \{
|
---|
| 347 | var i;
|
---|
| 348 | for (i=0;i<document.QueryForm.sqlfqf.length;i++) \{
|
---|
| 349 | var z = i;
|
---|
| 350 | if (i >= document.QueryForm.sqlfqf[i].options.length) z = z-document.QueryForm.sqlfqf[i].options.length;
|
---|
| 351 | document.QueryForm.sqlfqf[i].options[z].selected = true;
|
---|
| 352 | \}
|
---|
| 353 | updatesqlfqf();
|
---|
| 354 | \}
|
---|
| 355 |
|
---|
| 356 |
|
---|
| 357 |
|
---|
| 358 |
|
---|
[1923] | 359 | // fqc - the boolean operator selection box
|
---|
| 360 | function initfqc() \{
|
---|
| 361 | var i,j;
|
---|
| 362 | fqc = argfqc.split(",");
|
---|
| 363 | if (_cgiargfqn_ == 2) \{ // there will only be one fqc element
|
---|
| 364 | for (j=0;j<document.QueryForm.fqc.options.length;j++) \{
|
---|
| 365 | if (fqc[0] == document.QueryForm.fqc.options[j].value) \{
|
---|
| 366 | document.QueryForm.fqc.options[j].selected = true;
|
---|
| 367 | break;
|
---|
| 368 | \}
|
---|
| 369 | \}
|
---|
| 370 | \}
|
---|
| 371 | else \{
|
---|
| 372 | for (i=0; i<fqc.length;i++) \{
|
---|
| 373 | for (j=0;j<document.QueryForm.fqc[i].options.length;j++) \{
|
---|
| 374 | if (fqc[i] == document.QueryForm.fqc[i].options[j].value) \{
|
---|
| 375 | document.QueryForm.fqc[i].options[j].selected = true;
|
---|
| 376 | break;
|
---|
| 377 | \}
|
---|
| 378 | \}
|
---|
| 379 | \}
|
---|
| 380 | \}
|
---|
| 381 | updatefqc();
|
---|
| 382 |
|
---|
| 383 | \}
|
---|
| 384 |
|
---|
| 385 | function updatefqc() \{
|
---|
| 386 |
|
---|
| 387 | var i,j;
|
---|
| 388 | argfqc = "";
|
---|
| 389 | if (_cgiargfqn_ == 2) \{
|
---|
| 390 | j = document.QueryForm.fqc.selectedIndex;
|
---|
| 391 | argfqc += document.QueryForm.fqc.options[j].value;
|
---|
| 392 | \}
|
---|
| 393 | else \{
|
---|
| 394 | j = document.QueryForm.fqc[0].selectedIndex;
|
---|
| 395 | argfqc += document.QueryForm.fqc[0].options[j].value;
|
---|
| 396 | for (i=1;i<document.QueryForm.fqc.length;i++) \{
|
---|
| 397 | j = document.QueryForm.fqc[i].selectedIndex;
|
---|
| 398 | argfqc += "," + document.QueryForm.fqc[i].options[j].value;
|
---|
| 399 | \}
|
---|
| 400 | \}
|
---|
| 401 |
|
---|
| 402 | \}
|
---|
| 403 |
|
---|
| 404 |
|
---|
| 405 | function clearfqc() \{
|
---|
| 406 |
|
---|
| 407 | var i;
|
---|
| 408 | if (_cgiargfqn_ == 2) \{
|
---|
| 409 | document.QueryForm.fqc.options[0].selected = true;
|
---|
| 410 | \}
|
---|
| 411 | else \{
|
---|
| 412 | for (i=0; i<document.QueryForm.fqc.length; i++) \{
|
---|
| 413 | document.QueryForm.fqc[i].options[0].selected = true;
|
---|
| 414 | \}
|
---|
| 415 | \}
|
---|
| 416 | updatefqc();
|
---|
| 417 | \}
|
---|
| 418 |
|
---|
[22053] | 419 |
|
---|
| 420 |
|
---|
| 421 | // sqlfqc - the SQL operator selection box
|
---|
| 422 | function initsqlfqc() \{
|
---|
| 423 | var i,j;
|
---|
| 424 | sqlfqc = argsqlfqc.split(",");
|
---|
| 425 | if (_cgiargsqlfqn_ == 2) \{ // there will only be one sqlfqc element
|
---|
| 426 | for (j=0;j<document.QueryForm.sqlfqc.options.length;j++) \{
|
---|
| 427 | if (sqlfqc[0] == document.QueryForm.sqlfqc.options[j].value) \{
|
---|
| 428 | document.QueryForm.sqlfqc.options[j].selected = true;
|
---|
| 429 | break;
|
---|
| 430 | \}
|
---|
| 431 | \}
|
---|
| 432 | \}
|
---|
| 433 | else \{
|
---|
| 434 | for (i=0; i<sqlfqc.length;i++) \{
|
---|
| 435 | for (j=0;j<document.QueryForm.sqlfqc[i].options.length;j++) \{
|
---|
| 436 | if (sqlfqc[i] == document.QueryForm.sqlfqc[i].options[j].value) \{
|
---|
| 437 | document.QueryForm.sqlfqc[i].options[j].selected = true;
|
---|
| 438 | break;
|
---|
| 439 | \}
|
---|
| 440 | \}
|
---|
| 441 | \}
|
---|
| 442 | \}
|
---|
| 443 | updatesqlfqc();
|
---|
| 444 |
|
---|
| 445 | \}
|
---|
| 446 |
|
---|
| 447 | function updatesqlfqc() \{
|
---|
| 448 |
|
---|
| 449 | var i,j;
|
---|
| 450 | argsqlfqc = "";
|
---|
| 451 | if (_cgiargsqlfqn_ == 2) \{
|
---|
| 452 | j = document.QueryForm.sqlfqc.selectedIndex;
|
---|
| 453 | argsqlfqc += document.QueryForm.sqlfqc.options[j].value;
|
---|
| 454 | \}
|
---|
| 455 | else \{
|
---|
| 456 | j = document.QueryForm.sqlfqc[0].selectedIndex;
|
---|
| 457 | argsqlfqc += document.QueryForm.sqlfqc[0].options[j].value;
|
---|
| 458 | for (i=1;i<document.QueryForm.sqlfqc.length;i++) \{
|
---|
| 459 | j = document.QueryForm.sqlfqc[i].selectedIndex;
|
---|
| 460 | argsqlfqc += "," + document.QueryForm.sqlfqc[i].options[j].value;
|
---|
| 461 | \}
|
---|
| 462 | \}
|
---|
| 463 |
|
---|
| 464 | \}
|
---|
| 465 |
|
---|
| 466 |
|
---|
| 467 | function clearsqlfqc() \{
|
---|
| 468 |
|
---|
| 469 | var i;
|
---|
| 470 | if (_cgiargsqlfqn_ == 2) \{
|
---|
| 471 | document.QueryForm.sqlfqc.options[0].selected = true;
|
---|
| 472 | \}
|
---|
| 473 | else \{
|
---|
| 474 | for (i=0; i<document.QueryForm.sqlfqc.length; i++) \{
|
---|
| 475 | document.QueryForm.sqlfqc[i].options[0].selected = true;
|
---|
| 476 | \}
|
---|
| 477 | \}
|
---|
| 478 | updatesqlfqc();
|
---|
| 479 | \}
|
---|
| 480 |
|
---|
| 481 |
|
---|
| 482 |
|
---|
| 483 |
|
---|
[1923] | 484 | // fqv - the query word/phrase text box
|
---|
| 485 | function initfqv() \{
|
---|
| 486 | var i;
|
---|
| 487 | fqv= argfqv.split(",");
|
---|
[10661] | 488 | for (i=0; i<fqv.length && i<document.QueryForm.fqv.length; i++) \{
|
---|
[1923] | 489 | document.QueryForm.fqv[i].value = fqv[i];
|
---|
| 490 | \}
|
---|
| 491 | updatefqv();
|
---|
| 492 |
|
---|
| 493 |
|
---|
| 494 | \}
|
---|
| 495 |
|
---|
[4175] | 496 | //argfqv += escape(format(document.QueryForm.fqv[0].value));
|
---|
[1923] | 497 |
|
---|
[12441] | 498 | function updatefqv() \{
|
---|
[1923] | 499 | var i;
|
---|
| 500 | argfqv="";
|
---|
[4175] | 501 | argfqv += format(document.QueryForm.fqv[0].value);
|
---|
[1923] | 502 | for (i=1; i<document.QueryForm.fqv.length;i++) \{
|
---|
| 503 | argfqv += ",";
|
---|
[4175] | 504 | argfqv += format(document.QueryForm.fqv[i].value);
|
---|
[1923] | 505 | \}
|
---|
| 506 | \}
|
---|
| 507 |
|
---|
| 508 | function clearfqv() \{
|
---|
| 509 | var i;
|
---|
| 510 | for (i=0; i< document.QueryForm.fqv.length;i++) \{
|
---|
| 511 | document.QueryForm.fqv[i].value = "";
|
---|
| 512 | \}
|
---|
| 513 | updatefqv();
|
---|
| 514 | \}
|
---|
| 515 |
|
---|
| 516 | // fqs - the stemming checkboxes
|
---|
| 517 | function initfqs() \{
|
---|
| 518 |
|
---|
| 519 | var i;
|
---|
| 520 | fqs = argfqs.split(",");
|
---|
| 521 | for (i=0; i<fqs.length; i++) \{
|
---|
| 522 | if (fqs[i]=="1") \{
|
---|
| 523 | document.QueryForm.fqs[i].checked = true;
|
---|
| 524 | \}
|
---|
| 525 | \}
|
---|
| 526 | updatefqs();
|
---|
| 527 |
|
---|
| 528 | \}
|
---|
| 529 |
|
---|
| 530 | function updatefqs() \{
|
---|
| 531 | argfqs="";
|
---|
| 532 | if (document.QueryForm.fqs[0].checked) \{
|
---|
| 533 | argfqs += "1";
|
---|
| 534 | \}
|
---|
| 535 | else \{
|
---|
| 536 | argfqs += "0";
|
---|
| 537 | \}
|
---|
| 538 | var i;
|
---|
| 539 | for (i=1; i<document.QueryForm.fqs.length; i++) \{
|
---|
| 540 | if (document.QueryForm.fqs[i].checked) \{
|
---|
| 541 | argfqs += ",1";
|
---|
| 542 | \}
|
---|
| 543 | else \{
|
---|
| 544 | argfqs += ",0";
|
---|
| 545 | \}
|
---|
| 546 | \}
|
---|
| 547 | \}
|
---|
| 548 |
|
---|
| 549 |
|
---|
| 550 | function clearfqs() \{
|
---|
| 551 | var i;
|
---|
| 552 | for (i=0; i<document.QueryForm.fqs.length; i++) \{
|
---|
| 553 | document.QueryForm.fqs[i].checked = false;
|
---|
| 554 | \}
|
---|
| 555 | updatefqs();
|
---|
| 556 | \}
|
---|
| 557 |
|
---|
| 558 | // kqk - the casefolding checkboxes
|
---|
| 559 | function initfqk() \{
|
---|
| 560 | var i;
|
---|
| 561 | fqk = argfqk.split(",");
|
---|
| 562 | for (i=0; i<fqk.length; i++) \{
|
---|
| 563 | if (fqk[i]=="1") \{
|
---|
| 564 | document.QueryForm.fqk[i].checked = true;
|
---|
| 565 | \}
|
---|
| 566 | \}
|
---|
| 567 | updatefqk();
|
---|
| 568 |
|
---|
| 569 | \}
|
---|
| 570 |
|
---|
| 571 |
|
---|
| 572 | function updatefqk() \{
|
---|
| 573 | argfqk="";
|
---|
| 574 | if (document.QueryForm.fqk[0].checked) \{
|
---|
| 575 | argfqk += "1";
|
---|
| 576 | \}
|
---|
| 577 | else \{
|
---|
| 578 | argfqk += "0";
|
---|
| 579 | \}
|
---|
| 580 | var i;
|
---|
| 581 | for (i=1; i<document.QueryForm.fqk.length; i++) \{
|
---|
| 582 | if (document.QueryForm.fqk[i].checked) \{
|
---|
| 583 | argfqk += ",1";
|
---|
| 584 | \}
|
---|
| 585 | else \{
|
---|
| 586 | argfqk += ",0";
|
---|
| 587 | \}
|
---|
| 588 | \}
|
---|
| 589 | \}
|
---|
| 590 |
|
---|
| 591 | function clearfqk() \{
|
---|
| 592 | var i;
|
---|
| 593 | for (i=0; i<document.QueryForm.fqk.length; i++) \{
|
---|
| 594 | document.QueryForm.fqk[i].checked = false;
|
---|
| 595 | \}
|
---|
| 596 | updatefqk();
|
---|
| 597 | \}
|
---|
| 598 |
|
---|
| 599 | // q - the advanced query box
|
---|
| 600 | function initq() \{
|
---|
| 601 | updateq();
|
---|
| 602 | \}
|
---|
| 603 |
|
---|
| 604 | function updateq() \{
|
---|
[12441] | 605 |
|
---|
[22981] | 606 | argq = "";
|
---|
| 607 | _If_("_cgiarga_" eq "sqlq",argq += format(document.QueryForm.q.value, 1);)
|
---|
| 608 | _If_("_cgiarga_" eq "q",argq += format(document.QueryForm.q.value);)
|
---|
[1923] | 609 | \}
|
---|
| 610 |
|
---|
| 611 | function clearq() \{
|
---|
| 612 | document.QueryForm.q.value="";
|
---|
[23614] | 613 | updateq();
|
---|
[1923] | 614 | \}
|
---|
| 615 |
|
---|
[22948] | 616 | // convert spaces to plus
|
---|
[22981] | 617 | // also convert other illegal characters to %xx codes
|
---|
[22948] | 618 | // This routine used to treat commas like spaces (replacing them with a plus),
|
---|
[22981] | 619 | // but this is no longer good enough for handling sql-queries.
|
---|
| 620 | // Now if keepcommas == 1, URL encode commas, else (if undefined or 0),
|
---|
| 621 | // convert commas to plus.
|
---|
| 622 | function format(string, keepcommas) \{
|
---|
[1923] | 623 | var str = "" + string;
|
---|
| 624 | var out = "", flag = 0;
|
---|
[4175] | 625 | var ch = "";
|
---|
[1923] | 626 | var j;
|
---|
[22981] | 627 | for (j = 0; j < str.length; j++) \{
|
---|
[4175] | 628 | ch=str.charAt(j);
|
---|
[22981] | 629 |
|
---|
| 630 | if(ch == ",") \{
|
---|
| 631 | if(keepcommas == 1) \{
|
---|
| 632 | out += escape(ch);
|
---|
| 633 | flag=0;
|
---|
| 634 | continue;
|
---|
| 635 | \}
|
---|
| 636 | else \{ // can be undefined or maybe 0?
|
---|
| 637 | if (flag == 0) \{
|
---|
| 638 | out += "+";
|
---|
| 639 | flag=1;
|
---|
| 640 | \}
|
---|
| 641 | \}
|
---|
| 642 | continue;
|
---|
| 643 | \}
|
---|
| 644 |
|
---|
[22948] | 645 | if (ch == " ") \{
|
---|
[22053] | 646 | if (flag == 0) \{
|
---|
[4175] | 647 | out += "+";
|
---|
| 648 | flag=1;
|
---|
| 649 | \}
|
---|
| 650 | continue;
|
---|
[1923] | 651 | \}
|
---|
[22981] | 652 | if (ch == ";" || ch == ":" || ch == "/" || ch == "?" ||
|
---|
[22053] | 653 | ch == "@" || ch == "&" || ch == "=" || ch == "#" ||
|
---|
| 654 | ch == "%") \{
|
---|
[4175] | 655 | out += escape(ch);
|
---|
| 656 | flag=0;
|
---|
| 657 | continue;
|
---|
| 658 | \}
|
---|
| 659 | out += str.charAt(j);
|
---|
| 660 | flag=0;
|
---|
[1923] | 661 | \}
|
---|
| 662 | return out;
|
---|
| 663 | \}
|
---|
| 664 |
|
---|
| 665 | }
|
---|
| 666 |
|
---|
| 667 | #_httpquery_ has a=q&e=compressedargs
|
---|
| 668 | #if adv form, need to set k=0 and s=0
|
---|
[12768] | 669 | _advformargs_{_If_(_cgiargb_,&k=0&s=0)}
|
---|
[1923] | 670 |
|
---|
| 671 | _searchfunctions_ {
|
---|
| 672 |
|
---|
| 673 | function beginSearch() \{
|
---|
[22053] | 674 | window.location="_httpquery_"+getstdargs()+"_advformargs_"+getsearchargs();
|
---|
[1923] | 675 | \}
|
---|
| 676 |
|
---|
| 677 | function runQuery() \{
|
---|
[22876] | 678 | window.location="_httpquery_"+getstdargs()+"_advformargs_"+getqueryargs();
|
---|
[1923] | 679 | \}
|
---|
| 680 |
|
---|
| 681 | function clearForm() \{
|
---|
[22053] | 682 | _If_("_cgiarga_" eq "sqlq",
|
---|
[23619] | 683 | clearsqlfqf(), clearfqf();
|
---|
[22053] | 684 | )
|
---|
[1923] | 685 | clearfqv();
|
---|
| 686 |
|
---|
[12768] | 687 | if ("_cgiargb_" == "1") \{
|
---|
[23619] | 688 | if (document.QueryForm.fqk != null) \{clearfqk();\}
|
---|
| 689 | if (document.QueryForm.fqs != null) \{clearfqs();\}
|
---|
| 690 | if (document.QueryForm.fqs != null) \{clearfqc();\}
|
---|
[22053] | 691 | _If_("_cgiarga_" eq "sqlq",
|
---|
| 692 | clearsqlfqc();
|
---|
| 693 | )
|
---|
[23614] | 694 | if (document.QueryForm.q != null) \{clearq(); \}
|
---|
[1923] | 695 | \}
|
---|
| 696 |
|
---|
| 697 | \}
|
---|
| 698 |
|
---|
| 699 | }
|
---|
| 700 |
|
---|
| 701 | #######################################################################
|
---|
| 702 | # headers
|
---|
| 703 | # these are overridden so we can put an onLoad event handler
|
---|
| 704 | # in the <body> tag of this page - for mgpp, form search pages
|
---|
| 705 | #######################################################################
|
---|
| 706 |
|
---|
| 707 | #copied from prefs
|
---|
| 708 |
|
---|
| 709 | _header_ {_cgihead_
|
---|
[10872] | 710 | _htmlhead_(class="bgimage" onLoad="initialize();")_startspacer__pagebanner_
|
---|
[1923] | 711 | }
|
---|
| 712 |
|
---|
| 713 | # this declaration ends up being the same as style=restrict, never mind
|
---|
| 714 | _header_[v=1] {_cgihead_
|
---|
| 715 | _htmlhead_(onLoad="initialize();")_pagebanner_
|
---|
| 716 | }
|
---|
| 717 |
|
---|
| 718 | #######################################################################
|
---|
[148] | 719 | # page content
|
---|
| 720 | #######################################################################
|
---|
| 721 |
|
---|
[1923] | 722 |
|
---|
[276] | 723 | _pagetitle_ {_If_(_cgiargq_,_textquerytitle_,_textnoquerytitle_)}
|
---|
[148] | 724 |
|
---|
[1923] | 725 |
|
---|
[276] | 726 | _content_ {
|
---|
[14972] | 727 |
|
---|
[7503] | 728 | _optnavigationbar_
|
---|
[10958] | 729 | <div class="document">
|
---|
| 730 | <div class="queryform">
|
---|
[22053] | 731 |
|
---|
| 732 | _If_("_cgiarga_" eq "sqlq",
|
---|
| 733 |
|
---|
| 734 | _If_("_cgiargqt_" eq "2",_sqlfieldqueryform_,_sqlqueryform_)
|
---|
| 735 | ,
|
---|
| 736 | _If_(_cgiargct_,_selectqueryform_,_queryform_)
|
---|
| 737 | )
|
---|
| 738 |
|
---|
[10958] | 739 | </div>
|
---|
[12780] | 740 |
|
---|
[11209] | 741 | _If_(_searchhistorylist_,<center>_searchhistorybar_</center><br>
|
---|
[1923] | 742 | <center>
|
---|
[942] | 743 | _searchhistorylist_
|
---|
| 744 | </center>)
|
---|
[10948] | 745 | _If_(_cgiargq_,_queryresultsbar_
|
---|
[276] | 746 | <small>
|
---|
| 747 | _freqmsg_
|
---|
[12382] | 748 | _textpostprocess_
|
---|
[12389] | 749 | _If_(_stopwordsmsg_,(_stopwordsmsg_))</small><br />
|
---|
[128] | 750 | _resultline_
|
---|
[10872] | 751 | ,<div class="divbar"> </div>)
|
---|
[128] | 752 | }
|
---|
| 753 |
|
---|
[22053] | 754 | _selectqueryform_{_If_("_cgiargqt_" ge "1",_fieldqueryform_,_queryform_)}
|
---|
[1923] | 755 |
|
---|
[128] | 756 | _queryform_ {
|
---|
[4765] | 757 | <!-- query form (\_query:plainqueryform\_) -->
|
---|
[12557] | 758 | <form name="QueryForm" method="get" action="_gwcgi_">
|
---|
[10872] | 759 | <p>
|
---|
[12557] | 760 | <input type="hidden" name="a" value="q">
|
---|
| 761 | <input type="hidden" name="r" value="1">
|
---|
| 762 | <input type="hidden" name="hs" value="1">
|
---|
| 763 | <input type="hidden" name="e" value="_decodedcompressedoptions_">
|
---|
[2768] | 764 | _queryformcontent_
|
---|
[5634] | 765 | _optdatesearch_
|
---|
[10872] | 766 | </p>
|
---|
[2768] | 767 | </form>
|
---|
| 768 | <!-- end of query form -->
|
---|
| 769 | }
|
---|
| 770 |
|
---|
[22053] | 771 |
|
---|
| 772 | _sqlqueryform_ {
|
---|
| 773 |
|
---|
| 774 | <!-- simple query box that requires you to type SQL where clause directly -->
|
---|
| 775 | <!-- sqlquery form (\_query:plainqueryform\_) -->
|
---|
| 776 | <form name="QueryForm" method="get" action="_gwcgi_">
|
---|
| 777 | <p>
|
---|
| 778 | <input type="hidden" name="a" value="sqlq">
|
---|
| 779 | <input type="hidden" name="r" value="1">
|
---|
| 780 | <input type="hidden" name="hs" value="1">
|
---|
| 781 | <input type="hidden" name="e" value="_decodedcompressedoptions_">
|
---|
| 782 | _sqlqueryformcontent_
|
---|
| 783 | </p>
|
---|
| 784 | </form>
|
---|
| 785 | <!-- end of sqlquery form -->
|
---|
| 786 | }
|
---|
| 787 |
|
---|
| 788 |
|
---|
[17929] | 789 | _ifeellucky_ { <br><input type="checkbox" name="ifl" value="1">_textifeellucky_ }
|
---|
[7596] | 790 | _useifeellucky_ { } # Set this to _ifeellucky_ if you want this functionality available
|
---|
| 791 |
|
---|
[12780] | 792 | _allowformbreak_{</span> <span class="textselect">}
|
---|
| 793 |
|
---|
[10872] | 794 | _queryformcontent_{
|
---|
| 795 | <span class="textselect">
|
---|
| 796 | _textselect_
|
---|
| 797 | </span>
|
---|
| 798 |
|
---|
| 799 | <span class="querybox">
|
---|
[1923] | 800 | _If_(_cgiargqb_,_largequerybox_,_smallquerybox_)
|
---|
[7596] | 801 | _useifeellucky_
|
---|
[10872] | 802 | </span>
|
---|
[1923] | 803 | }
|
---|
| 804 |
|
---|
[22053] | 805 |
|
---|
| 806 | _sqlqueryformcontent_ {
|
---|
| 807 | <span class="querybox">
|
---|
| 808 | _If_(_cgiargqb_,_query:largequerybox_,_query:smallquerybox_)
|
---|
| 809 | _query:useifeellucky_
|
---|
| 810 | </span>
|
---|
| 811 | }
|
---|
| 812 |
|
---|
[5634] | 813 | # Automatically set by receptionist if config file switches
|
---|
| 814 | # date searching on
|
---|
| 815 | _optdatesearch_ { }
|
---|
| 816 |
|
---|
| 817 |
|
---|
[2768] | 818 | _datesearch_
|
---|
| 819 | {<table><tr><td>
|
---|
| 820 | <center>
|
---|
| 821 | _textstartdate_
|
---|
[12557] | 822 | <input type="text" name="ds" value="_cgiargds_" size="4" maxlength="4">
|
---|
[2768] | 823 | <select name="dsbc" value="_cgiargdsbc_" size="1">
|
---|
[12557] | 824 | <option value="0"_If_(_cgiargdsbc_,, selected)>_textad_
|
---|
| 825 | <option value="1"_If_(_cgiargdsbc_, selected)>_textbc_
|
---|
[2768] | 826 | </select>
|
---|
| 827 | _textenddate_
|
---|
[12557] | 828 | <input type="text" name="de" value="_cgiargde_" size="4" maxlength="4">
|
---|
[2768] | 829 | <select name="debc" size="1">
|
---|
[12557] | 830 | <option value="0" _If_(_cgiargdebc_,, selected)>_textad_
|
---|
| 831 | <option value="1" _If_(_cgiargdebc_, selected)>_textbc_
|
---|
[2768] | 832 | </select>
|
---|
| 833 | </center>
|
---|
[13433] | 834 | </td></tr>
|
---|
[2768] | 835 | <tr><td>
|
---|
| 836 | _textexplaineras_
|
---|
[13433] | 837 | </td></tr>
|
---|
[2768] | 838 | </table>
|
---|
| 839 | </center>
|
---|
| 840 | }
|
---|
| 841 |
|
---|
[12780] | 842 | _smallquerybox_ {<nobr><input type="text" name="q" value="_cgiargq_" size="50"> <input type="submit" value="_textbeginsearch_"></nobr>}
|
---|
[1923] | 843 |
|
---|
| 844 | _largequerybox_ {
|
---|
[12557] | 845 | <tr><td><textarea name="q" cols="63" rows="10">
|
---|
[1923] | 846 | _cgiargq_
|
---|
| 847 | </textarea></td></tr>
|
---|
[12557] | 848 | <tr align="right"><td><table>
|
---|
[1923] | 849 | <tr><td><input type="submit" value="_textbeginsearch_"></td>
|
---|
| 850 | </tr></table></td></tr>}
|
---|
| 851 |
|
---|
| 852 |
|
---|
| 853 | _fieldqueryform_ {
|
---|
[4784] | 854 | <noscript>
|
---|
[14109] | 855 | <p><b>_textnojsformwarning_</b></p>
|
---|
[4784] | 856 | </noscript>
|
---|
[1923] | 857 | <!-- field query form (\_query:fieldqueryform\_) -->
|
---|
[12557] | 858 | <form name="QueryForm" method="get" action="_gwcgi_">
|
---|
[4765] | 859 |
|
---|
[12780] | 860 | <table><tr><td align="left">
|
---|
[22053] | 861 |
|
---|
[1923] | 862 | _textformselect_
|
---|
| 863 | </td></tr>
|
---|
[12780] | 864 | <tr><td>
|
---|
[12768] | 865 | _If_(_cgiargb_,_advancedforms_,_simpleforms_)
|
---|
[13433] | 866 | </td></tr>
|
---|
[1923] | 867 | </table>
|
---|
[12768] | 868 | _If_(_cgiargb_,<div class="divbar"> </div>
|
---|
[12780] | 869 | _advancedformextra_)
|
---|
[5634] | 870 |
|
---|
[128] | 871 | </form>
|
---|
[276] | 872 | <!-- end of query form -->
|
---|
[128] | 873 | }
|
---|
[148] | 874 |
|
---|
[22053] | 875 | _sqlfieldqueryform_ {
|
---|
| 876 | <noscript>
|
---|
| 877 | <p><b>_textnojsformwarning_</b></p>
|
---|
| 878 | </noscript>
|
---|
| 879 | <!--sql field query form (\_query:fieldqueryform\_) -->
|
---|
| 880 | <form name="QueryForm" method="get" action="_gwcgi_">
|
---|
| 881 |
|
---|
| 882 | <table><tr><td align="left">
|
---|
| 883 | _textformselect_
|
---|
| 884 | </td></tr>
|
---|
| 885 | <tr><td>
|
---|
| 886 | _If_(_cgiargb_,_sqladvancedforms_,_sqlsimpleforms_)
|
---|
| 887 | </td></tr>
|
---|
| 888 | </table>
|
---|
| 889 | _If_(_cgiargb_,<div class="divbar"> </div>
|
---|
| 890 | _advancedformextra_)
|
---|
| 891 |
|
---|
| 892 | </form>
|
---|
| 893 | <!-- end of sql query form -->
|
---|
| 894 | }
|
---|
| 895 |
|
---|
| 896 |
|
---|
| 897 |
|
---|
[1923] | 898 | _advancedforms_{
|
---|
[12780] | 899 | <table border="0" cellspacing="0" cellpadding="0" width="90%">
|
---|
| 900 | <tr><th></th><th align="left">_textwordphrase_</th>_If_("_cgiargct_" eq "1",<th colspan="2"><nobr>_textfoldstem_</nobr></th>)<th align="center"> _textinfield_</th></tr>
|
---|
[1923] | 901 | _advformlist_
|
---|
[12780] | 902 | <tr>
|
---|
| 903 | <td colspan="2" align="left"><input type="button" value="_textclearform_" onClick="clearForm();"></td>
|
---|
| 904 | <td colspan="3" align="right"><input type="button" value="_textbeginsearch_" onClick="beginSearch();"></td>
|
---|
| 905 | </tr>
|
---|
| 906 | </table>
|
---|
[1923] | 907 | }
|
---|
| 908 |
|
---|
[22053] | 909 | _sqladvancedforms_{
|
---|
| 910 | <table border="0" cellspacing="0" cellpadding="0" width="90%">
|
---|
| 911 | <tr>
|
---|
| 912 | <th></th>
|
---|
| 913 | <th align="left">_textfieldphrase_</th>
|
---|
| 914 | <th></th>
|
---|
| 915 | <th align="center"> _textinwords_</th>
|
---|
| 916 | </tr>
|
---|
| 917 | _sqladvformlist_
|
---|
| 918 | <tr>
|
---|
| 919 | <td colspan="2" align="left">
|
---|
| 920 | <input type="button" value="_textclearform_" onClick="clearForm();">
|
---|
| 921 | </td>
|
---|
| 922 | <td colspan="3" align="right">
|
---|
| 923 | <input type="button" value="_textbeginsearch_" onClick="beginSearch();">
|
---|
| 924 | </td>
|
---|
| 925 | </tr>
|
---|
| 926 | </table>
|
---|
| 927 | }
|
---|
| 928 |
|
---|
| 929 |
|
---|
| 930 |
|
---|
[1923] | 931 | _advancedformextra_{
|
---|
| 932 | <table>
|
---|
[12780] | 933 | <tr><td align="left">_textadvquery_</td></tr>
|
---|
[12557] | 934 | <tr><td><textarea name="q" cols="57" rows="3" onChange="updateq();">_cgiargq_</textarea></td>
|
---|
| 935 | <td valign="bottom">
|
---|
[1923] | 936 | <input type="button" value="_textrunquery_" onClick="runQuery();"></td></tr>
|
---|
| 937 | </table>
|
---|
[22053] | 938 |
|
---|
| 939 |
|
---|
| 940 | _If_("_cgiarga_" eq "sqlq",
|
---|
| 941 | <p>For example:<br>
|
---|
| 942 | <i>
|
---|
[22948] | 943 | element in (\'dc.Keywords\') AND value=\'Farming\'<br>
|
---|
| 944 | element in (\'dls.Title\') AND value LIKE \'F%\'<br>
|
---|
| 945 | element in (\'dls.Title\') AND value<\'F%\'<br>
|
---|
[22053] | 946 | </i>
|
---|
| 947 | )
|
---|
| 948 |
|
---|
[1923] | 949 | }
|
---|
| 950 |
|
---|
| 951 | _simpleforms_{
|
---|
[12780] | 952 | <table border="0" cellspacing="0" cellpadding="0" width="90%">
|
---|
[12557] | 953 | <tr><th align="left">_textwordphrase_</th><th align="left"> _textinfield_</th></tr>
|
---|
[1923] | 954 | _regformlist_
|
---|
[12780] | 955 | <tr>
|
---|
| 956 | <td align="left"><input type="button" value="_textclearform_" onClick="clearForm();"></td>
|
---|
| 957 | <td align="right"><input type="button" value="_textbeginsearch_" onClick="beginSearch();"></td>
|
---|
[1923] | 958 | </tr>
|
---|
[12780] | 959 | </table>}
|
---|
[1923] | 960 |
|
---|
[22053] | 961 | _sqlsimpleforms_{
|
---|
| 962 | <table border="0" cellspacing="0" cellpadding="0" width="90%">
|
---|
| 963 | <tr>
|
---|
| 964 | <th align="left">_textfieldphrase_</th>
|
---|
| 965 | <th></th>
|
---|
| 966 | <th align="left"> _textinwords_</th>
|
---|
| 967 | </tr>
|
---|
| 968 | _sqlregformlist_
|
---|
| 969 | <tr>
|
---|
| 970 | <td align="left">
|
---|
| 971 | <input type="button" value="_textclearform_" onClick="clearForm();">
|
---|
| 972 | </td>
|
---|
| 973 | <td align="right">
|
---|
| 974 | <input type="button" value="_textbeginsearch_" onClick="beginSearch();">
|
---|
| 975 | </td>
|
---|
| 976 | </tr>
|
---|
| 977 | </table>
|
---|
| 978 | }
|
---|
| 979 |
|
---|
| 980 | #
|
---|
| 981 | # Full-text versions
|
---|
| 982 | #
|
---|
| 983 |
|
---|
[1923] | 984 | _regformelement_{
|
---|
[12780] | 985 | <tr><td><input type="text" size="39" name="fqv" onChange="updatefqv();" onkeypress="updatefqv(); entersubmit(event);"></td>
|
---|
| 986 | <td>_fqfselection_</td></tr>}
|
---|
[1923] | 987 |
|
---|
| 988 | #has no and/or/not selection box
|
---|
| 989 | _firstadvformelement_{
|
---|
[12780] | 990 | <tr><td></td><td><input type="text" size="31" name="fqv" onChange="updatefqv();" onkeypress="updatefqv(); entersubmit(event);"></td>
|
---|
| 991 | _If_("_cgiargct_" eq "1",<td align="center"><input type="checkbox" name="fqk" onClick="updatefqk();"></td>
|
---|
| 992 | <td align="center"><input type="checkbox" name="fqs" onClick="updatefqs();"></td>)
|
---|
| 993 | <td align="right">_fqfselection_</td></tr>}
|
---|
[1923] | 994 |
|
---|
| 995 | _advformelement_{
|
---|
[12780] | 996 | <tr><td>_fqcselection_</td>
|
---|
[12557] | 997 | <td><input type="text" size="31" name="fqv" onChange="updatefqv();" onkeypress="updatefqv(); entersubmit(event);"></td>
|
---|
[12780] | 998 | _If_("_cgiargct_" eq "1",<td align="center"><input type="checkbox" name="fqk" onClick="updatefqk();"></td>
|
---|
| 999 | <td align="center"><input type="checkbox" name="fqs" onClick="updatefqs();"></td>)
|
---|
| 1000 | <td align="right">_fqfselection_</td></tr>}
|
---|
[1923] | 1001 |
|
---|
[12780] | 1002 |
|
---|
| 1003 |
|
---|
[1923] | 1004 | _fqcselection_ {
|
---|
| 1005 | <select name="fqc" onChange="updatefqc();">
|
---|
| 1006 | <option value="and">_textand_
|
---|
| 1007 | <option value="or">_textor_
|
---|
| 1008 | <option value="not">_textandnot_
|
---|
| 1009 | </select>}
|
---|
| 1010 |
|
---|
[12780] | 1011 |
|
---|
[22053] | 1012 | _andorfqcselection_ {
|
---|
| 1013 | <select name="fqc" onChange="updatefqc();">
|
---|
| 1014 | <option value="and">_textand_
|
---|
| 1015 | <option value="or">_textor_
|
---|
| 1016 | </select>}
|
---|
| 1017 |
|
---|
| 1018 |
|
---|
| 1019 | #
|
---|
| 1020 | # SQL versions of regformelement, firstsqladvformelement, advformelement
|
---|
| 1021 | #
|
---|
| 1022 |
|
---|
| 1023 | _sqlregformelement_{
|
---|
| 1024 | <tr>
|
---|
| 1025 | <td>
|
---|
| 1026 | _sqlfqfselection_
|
---|
| 1027 | </td>
|
---|
| 1028 | <td>
|
---|
| 1029 | _sqlfqcselection_
|
---|
| 1030 | </td>
|
---|
| 1031 | <td>
|
---|
| 1032 | <input type="text" size="39" name="fqv" onChange="updatefqv();"
|
---|
| 1033 | onkeypress="updatefqv(); entersubmit(event);">
|
---|
| 1034 | </td>
|
---|
| 1035 | </tr>
|
---|
| 1036 | }
|
---|
| 1037 |
|
---|
| 1038 | _firstsqladvformelement_{
|
---|
| 1039 | <tr>
|
---|
| 1040 | <td>
|
---|
| 1041 | </td>
|
---|
| 1042 | <td align="right">
|
---|
| 1043 | _sqlfqfselection_
|
---|
| 1044 | </td>
|
---|
| 1045 | <td>
|
---|
| 1046 | _sqlfqcselection_
|
---|
| 1047 | </td>
|
---|
| 1048 | <td>
|
---|
| 1049 | <input type="text" size="31" name="fqv" onChange="updatefqv();"
|
---|
| 1050 | onkeypress="updatefqv(); entersubmit(event);">
|
---|
| 1051 | </td>
|
---|
| 1052 | </tr>
|
---|
| 1053 | }
|
---|
| 1054 |
|
---|
| 1055 | _sqladvformelement_{
|
---|
| 1056 | <tr>
|
---|
| 1057 | <td>
|
---|
| 1058 | _andorfqcselection_
|
---|
| 1059 | </td>
|
---|
| 1060 | <td align="right">
|
---|
| 1061 | _sqlfqfselection_
|
---|
| 1062 | </td>
|
---|
| 1063 | <td>
|
---|
| 1064 | _sqlfqcselection_
|
---|
| 1065 | </td>
|
---|
| 1066 | <td>
|
---|
| 1067 | <input type="text" size="31" name="fqv" onChange="updatefqv();" onkeypress="updatefqv(); entersubmit(event);">
|
---|
| 1068 | </td>
|
---|
| 1069 | </tr>
|
---|
| 1070 | }
|
---|
| 1071 |
|
---|
| 1072 |
|
---|
| 1073 | _sqlfqcselection_ {
|
---|
| 1074 | <select name="sqlfqc" onChange="updatesqlfqc();">
|
---|
| 1075 | <option value="=">matches
|
---|
| 1076 | <option value="<"><
|
---|
| 1077 | <option value="<="><=
|
---|
| 1078 | <option value="LIKE">like
|
---|
| 1079 | <option value=">=">>=
|
---|
| 1080 | <option value=">">>
|
---|
| 1081 | <option value="<>"><>
|
---|
| 1082 |
|
---|
| 1083 | </select>}
|
---|
| 1084 |
|
---|
| 1085 | #
|
---|
| 1086 | # end of SQL version
|
---|
| 1087 | #
|
---|
| 1088 |
|
---|
| 1089 | _textselect_ {_If_(_cgiargb_,_chooseadvancedsearch_,_choosesimplesearch_)}
|
---|
| 1090 |
|
---|
| 1091 | _choosesimplesearch_ {_If_("_cgiargqt_" eq "2",_textsimplesqlsearch_,_textsimplesearch_)}
|
---|
| 1092 |
|
---|
[22875] | 1093 | _chooseadvancedsearch_ {_If_("_cgiarqt_" eq "2",_textadvancedsqlsearch_,_chooseadvancedsearchct_)}
|
---|
[22053] | 1094 | _chooseadvancedsearchct_ {_If_(_cgiargct_,_If_("_cgiargct_" eq "2",_textadvancedlucenesearch_,_textadvancedmgppsearch_),_textadvancedsearch_}
|
---|
| 1095 |
|
---|
| 1096 | # formed based versions
|
---|
| 1097 | _textformselect_ {_If_(_cgiargb_,_chooseformadvancedsearch_,_chooseformsimplesearch_)}
|
---|
| 1098 | _chooseformsimplesearch_ {_If_("_cgiargqt_" eq "2",_textformsimplesearchsql_,_textformsimplesearch_)}
|
---|
| 1099 |
|
---|
| 1100 | _chooseformadvancedsearch_ {_If_("_cgiargqt_" eq "2",_textformadvancedsearchsql_,_chooseformadvancedsearchct_)}
|
---|
| 1101 | _chooseformadvancedsearchct_ {_If_("_cgiargct_" eq "1",_textformadvancedsearchmgpp_)_If_("_cgiargct_" eq "2",_textformadvancedsearchlucene_)}
|
---|
| 1102 |
|
---|
[6541] | 1103 | # mg uses hselection for index, mgpp uses fqfselection
|
---|
| 1104 | _indexselection_{_If_(_cgiargct_,_fqfselection_,_hselection_)}
|
---|
[1289] | 1105 |
|
---|
[276] | 1106 | # we want to put the links to previous/next pages of results
|
---|
| 1107 | # in the footer
|
---|
| 1108 | _pagefooterextra_ {
|
---|
| 1109 | <center>
|
---|
[12557] | 1110 | <table cellspacing="0" cellpadding="0" width="_pagewidth_">
|
---|
[276] | 1111 | <tr>
|
---|
[13424] | 1112 | <td align="left">_If_(_prevfirst_,<a href="_httpquery_&r=_prevfirst_">_iconprev__textmatches__prevfirst_ - _prevlast_</a>)</td>
|
---|
| 1113 | <td align="right">_If_(_nextfirst_,<a href="_httpquery_&r=_nextfirst_">_textmatches__nextfirst_ - _nextlast__iconnext_</a>)</td>
|
---|
[276] | 1114 | </tr></table>
|
---|
| 1115 | </center>
|
---|
[10958] | 1116 |
|
---|
| 1117 | </div> <!-- document -->
|
---|
[276] | 1118 | }
|
---|
| 1119 |
|
---|
[1289] | 1120 | _querytypeselection_ {
|
---|
| 1121 | <select name="t">
|
---|
[4765] | 1122 | <option value="1"_If_(_cgiargt_, selected)>_If_(_cgiargb_,_textranked_,_textsome_)
|
---|
| 1123 | <option value="0"_If_(_cgiargt_,, selected)>_If_(_cgiargb_,_textboolean_,_textall_)
|
---|
[1289] | 1124 | </select>
|
---|
| 1125 | }
|
---|
[1923] | 1126 |
|
---|
[12181] | 1127 |
|
---|
[11768] | 1128 | _formquerytypesimpleselection_ {
|
---|
[1923] | 1129 | <select name="t">
|
---|
[11768] | 1130 | <option value="1"_If_(_cgiargt_, selected)>_textsome_
|
---|
| 1131 | <option value="0"_If_(_cgiargt_,, selected)>_textall_
|
---|
[1923] | 1132 | </select>
|
---|
| 1133 | }
|
---|
| 1134 |
|
---|
[11768] | 1135 | _formquerytypeadvancedselection_ {
|
---|
| 1136 | <select name="t">
|
---|
| 1137 | <option value="1"_If_(_cgiargt_, selected)>_textranked_
|
---|
| 1138 | <option value="0"_If_(_cgiargt_,, selected)>_textnatural_
|
---|
| 1139 | </select>
|
---|
| 1140 | }
|
---|
[1923] | 1141 |
|
---|
[12181] | 1142 | # 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.
|
---|
| 1143 | _formquerytypeselection_ {
|
---|
| 1144 | <select name="t">
|
---|
[12768] | 1145 | <option value="1"_If_(_cgiargt_, selected)>_If_(_cgiargb_,_textranked_,_textsome_)
|
---|
| 1146 | <option value="0"_If_(_cgiargt_,, selected)>_If_(_cgiargb_,_textnatural_,_textall_)
|
---|
[12181] | 1147 | </select>
|
---|
| 1148 | }
|
---|
[11768] | 1149 |
|
---|