{
# $Id: msearch.egw,v 1.17 1996/03/08 16:47:04 adam Exp $
if {[info commands saveState] == ""} {
source z39util.tcl
}
global sessionWait
global nextSetNo
global setNo
global hist
global zstatus
html "
WWW/Z39.50 Gateway Search \n"
html "\n"
set setNo [lindex $sessionParms 0]
if {[egw_form menu1] != ""} {
set hist($nextSetNo,0,host) $hist($setNo,0,host)
for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} {
set hist($nextSetNo,$i,host) $hist($setNo,$i,host)
set hist($nextSetNo,$i,database) $hist($setNo,$i,database)
set hist($nextSetNo,$i,idAuthentication) \
$hist($setNo,$i,idAuthentication)
}
set setNo $nextSetNo
incr nextSetNo
for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} {
set hist($setNo,$i,query) [build-query $hist($setNo,$i,host) 3]
}
set hist($setNo,maxPresent) [egw_form hits]
if {$hist($setNo,maxPresent) == ""} {
set hist($setNo,maxPresent) 20
}
set hist($setNo,format) [egw_form format]
if {![string length $hist($setNo,format)]} {
set hist($setNo,format) brief
}
set hist($setNo,sort) [egw_form sort]
if {![string length $hist($setNo,sort)]} {
set hist($setNo,sort) server
}
}
set useIcons 1
button-europagate
button-new-query 1 $setNo
button-new-target 0
html " \n"
z39msearch $setNo B 1 $hist($setNo,maxPresent) 1
display-result-set-m $setNo
set useIcons 0
button-europagate
button-new-query 1 $setNo
button-new-target 0
}
{
if {!$debug} return
html "\n"
html "
Debug information
\n"
html "sessionId: $sessionId \n"
html "sessionParms: $sessionParms \n"
foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} {
html $e {: } $env($e) { } \n
}
html "form: " [egw_form] " \n"
html "target: " $host " \n"
html "query: --" $hist($setNo,1,query) "-- \n"
html "database: " $hist($setNo,1,database) " \n"
html "sort: " $hist($setNo,sort) " \n"
html "format: " $hist($setNo,format) " \n"
html "setNo: " $setNo " \n"
html "nextSetNo: " $nextSetNo " \n"
}