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