3 # $Id: msearch.egw,v 1.13 1996/01/26 15:50:07 adam Exp $
5 if {[info commands saveState] == ""} {
14 html "<head><title> WWW/Z39.50 Gateway Search </title>\n"
15 html "</head><body>\n"
17 set setNo [lindex $sessionParms 0]
19 if {[egw_form menu1] != ""} {
20 set hist($nextSetNo,0,host) $hist($setNo,0,host)
21 for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} {
22 set hist($nextSetNo,$i,host) $hist($setNo,$i,host)
23 set hist($nextSetNo,$i,database) $hist($setNo,$i,database)
24 set hist($nextSetNo,$i,idAuthentication) \
25 $hist($setNo,$i,idAuthentication)
30 for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} {
31 set hist($setNo,$i,query) [build-query $hist($setNo,$i,host) 3]
33 set hist($setNo,maxPresent) [egw_form hits]
34 if {$hist($setNo,maxPresent) == ""} {
35 set hist($setNo,maxPresent) 30
41 button-new-query 1 $setNo
48 set not $hist($setNo,0,host)
49 for {set i 1} {$i <= $not} {incr i} {
50 if {$zstatus($i) != 2} continue
51 html "<dt><h3>" [lindex $targets($hist($setNo,$i,host)) 0] ": "
52 set status [z39$i.$setNo responseStatus]
53 if {[lindex $status 0] == "NSD"} {
54 z39$i.$setNo nextResultSetPosition 0
55 set code [lindex $status 1]
56 set msg [lindex $status 2]
57 set addinfo [lindex $status 3]
58 html "Error</h3>\n<dd>NSD$code: $msg: $addinfo"
60 set r [z39$i.$setNo resultCount]
61 html "$r hits</h3>\n<dd>\n<ul>\n"
63 display-rec 1 $hist($setNo,$i,offset) display-brief $i
72 button-new-query 1 $setNo
79 html "<h3>Debug information</h3>\n"
80 html "sessionId: $sessionId <br>\n"
81 html "sessionParms: $sessionParms <br>\n"
82 foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} {
83 html $e {: } $env($e) {<br>} \n
85 html "form: " [egw_form] " <br>\n"
86 html "target: " $host " <br>\n"
87 html "query: --" $hist($setNo,1,query) "-- <br>\n"
88 html "database: " $hist($setNo,1,database) "<br>\n"
89 html "setNo: " $setNo " <br>\n"
90 html "nextSetNo: " $nextSetNo " <br>\n"