package query
#######################################################################
# Macros whose values are set from within the server at runtime. These
# are here only for reference and to set default values if required.
#######################################################################
_quotedquery_ {}
_freqmsg_ {}
_resultline_ {}
_thisfirst_ {}
_thislast_ {}
_nextfirst_ {}
_nextlast_ {}
_prevfirst_ {}
_prevlast_ {}
_searchhistorylist_ {}
#_histvalue0_ to _histvalue19_
_advformlist_ {}
_regformlist_ {}
_fqfselection_ {}
#######################################################################
# icons
#######################################################################
_iconthispage_ {}
_iconthispage_ [v=1] {
_texticonthispage_
}
_iconqueryresultsbar_ {}
_iconqueryresultsbar_[v=1] {_texticonqueryresultsbar_}
_iconsearchhistorybar_ {}
_iconsearchhistorybar_[v=1] {_texticonsearchhistorybar_}
# _iconnext_ and _iconprev_ are overridden in this package as we
# don't want alt text here
_iconnext_{}
_iconnext_ [v=1] {}
_iconprev_{}
_iconprev_ [v=1] {}
# the small squares for search history
## " " ## handmade ## mstdsqr ##
_httpiconmstdsqrof_ {_httpimg_/mstdsqrof.gif}
_httpiconmstdsqron_ {_httpimg_/mstdsqron.gif}
_widthmstdsqrx_ {13}
_heightmstdsqrx_ {13}
#######################################################################
# images
#######################################################################
_imagethispage_ {_iconthispage_}
#the buttons for the search history entries
# takes one arg - the entry number (0-num entries)
_imagehistbutton_ {}
#######################################################################
# scripts (and some macros for the scripts)
#######################################################################
_pagescriptextra_ {_If_("_cgiargct_" eq "1" && "_cgiargqt_" eq "1",_formpagescriptextra_,_dummypagescriptextra_)
_If_("_cgiarghd_" ne "0",_historypagescriptextra_) }
_dummypagescriptextra_{
function initialize() \{
\}
}
_formpagescriptextra_ {
// query scripts generated by \_query:pagescriptextra\_
_standardfunctions_
_formfunctions_
_searchfunctions_
function getsearchargs () \{
var args="";
args = "&fqa=0&fqv="+argfqv+"&fqf="+argfqf;
_If_(_cgiargb_,args += "&fqk="+argfqk+"&fqs="+argfqs+"&fqc="+argfqc;)
return args;
\}
function getqueryargs () \{
return "&fqa=1"+"&q="+argq+"&fqv="+argfqv+"&fqf="+argfqf+
"&fqk="+argfqk+"&fqs="+argfqs+"&fqc="+argfqc ;
\}
}
_historypagescriptextra_{
var histvalue0='_histvalue0_';
var histvalue1='_histvalue1_';
var histvalue2='_histvalue2_';
var histvalue3='_histvalue3_';
var histvalue4='_histvalue4_';
var histvalue5='_histvalue5_';
var histvalue6='_histvalue6_';
var histvalue7='_histvalue7_';
var histvalue8='_histvalue8_';
var histvalue9='_histvalue9_';
var histvalue10='_histvalue10_';
var histvalue11='_histvalue11_';
var histvalue12='_histvalue12_';
var histvalue13='_histvalue13_';
var histvalue14='_histvalue14_';
var histvalue15='_histvalue15_';
var histvalue16='_histvalue16_';
var histvalue17='_histvalue17_';
var histvalue18='_histvalue18_';
var histvalue19='_histvalue19_';
function inputQuery(value) \{
if ("_cgiargqt_" == "0") \{ // text search
document.QueryForm.q.value += " "+value;
\}
else \{
if ("_cgiargb_" == "1") \{ // advanced query
document.QueryForm.q.value += " "+value;
updateq();
\}
else \{ // simple form search
// do something here, what??
\}
\}
\}
}
_standardfunctions_{
function getstdargs() \{
stdarg = "";
_If_(_cgiargh_,_getharg_)
_If_(_cgiargg_,_getgarg_)
_If_(_cgiargj_,_getjarg_)
value = document.QueryForm.t.options[document.QueryForm.t.selectedIndex].value;
if (value != "_cgiargt_") stdarg += "&t="+value;
stdarg += "&r=1&hs=1";
return stdarg;
\}
}
#some macros to go with getstdargs()
_getharg_{
value = document.QueryForm.h.options[document.QueryForm.h.selectedIndex].value;
if (value != "_cgiargh_") stdarg += "&h="+value;
}
_getgarg_{
value = document.QueryForm.g.options[document.QueryForm.g.selectedIndex].value;
if (value != "_cgiargg_") stdarg += "&g="+value;
}
_getjarg_{
value = document.QueryForm.j.options[document.QueryForm.j.selectedIndex].value;
if (value != "_cgiargj_") stdarg += "&j="+value;
}
_formfunctions_{
argfqf="_cgiargfqf_";
argfqv="_cgiargfqv_";
argfqk="_cgiargfqk_";
argfqs="_cgiargfqs_";
argfqc="_cgiargfqc_";
argq = "";
function initialize () \{
initfqf();
initfqv();
if ( "_cgiargb_" == "1") \{
initfqs();
initfqk();
initfqc();
initq();
\}
\}
// fqf - the field selection box
function initfqf() \{
var i;
fqf = argfqf.split(",");
for (i=0; i= document.QueryForm.fqf[i].options.length)
z = z-document.QueryForm.fqf[i].options.length;
document.QueryForm.fqf[i].options[z].selected = true;
\}
\}
updatefqf();
\}
function updatefqf() \{
var i;
argfqf = "";
var j = document.QueryForm.fqf[0].selectedIndex;
argfqf += document.QueryForm.fqf[0].options[j].value;
for (i=1; i= document.QueryForm.fqf[i].options.length) z = z-document.QueryForm.fqf[i].options.length;
document.QueryForm.fqf[i].options[z].selected = true;
\}
updatefqf();
\}
// fqc - the boolean operator selection box
function initfqc() \{
var i,j;
fqc = argfqc.split(",");
if (_cgiargfqn_ == 2) \{ // there will only be one fqc element
for (j=0;j tag of this page - for mgpp, form search pages
#######################################################################
#copied from prefs
_header_ {_cgihead_
_htmlhead_(background="_httpiconchalk_" onLoad="initialize();")_startspacer__pagebanner_
}
# this declaration ends up being the same as style=restrict, never mind
_header_[v=1] {_cgihead_
_htmlhead_(onLoad="initialize();")_pagebanner_
}
#######################################################################
# page content
#######################################################################
_pagetitle_ {_If_(_cgiargq_,_textquerytitle_,_textnoquerytitle_)}
_content_ {
}
#has no and/or/not selection box
_firstadvformelement_{
_fqfselection_
}
_advformelement_{
_fqcselection_
_fqfselection_
}
_fqcselection_ {
}
_textselect_ {_If_(_cgiargb_,_textadvancedsearch_,_textsimplesearch_)}
_textformselect_ {_If_(_cgiargb_,_textformadvancedsearch_,_textformsimplesearch_)}
_ZZ_{_textallfields_}
# we want to put the links to previous/next pages of results
# in the footer
_pagefooterextra_ {