3 # $Id: msearch.egw,v 1.12 1996/01/24 08:27:26 adam Exp $
5 if {[info commands saveState] == ""} {
14 html "<head><title> WWW/Z39.50 Gateway Search </title>\n"
15 html "</head><body>\n"
16 set setNo [lindex $sessionParms 0]
18 if {[egw_form menu1] != ""} {
19 set hist($nextSetNo,0,host) $hist($setNo,0,host)
20 for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} {
21 set hist($nextSetNo,$i,host) $hist($setNo,$i,host)
22 set hist($nextSetNo,$i,database) $hist($setNo,$i,database)
23 set hist($nextSetNo,$i,idAuthentication) \
24 $hist($setNo,$i,idAuthentication)
29 for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} {
30 set hist($setNo,$i,query) [build-query $hist($setNo,$i,host) 3]
32 set hist($setNo,maxPresent) [egw_form hits]
33 if {$hist($setNo,maxPresent) == ""} {
34 set hist($setNo,maxPresent) 30
40 set not $hist($setNo,0,host)
41 for {set i 1} {$i <= $not} {incr i} {
42 if {$zstatus($i) != 2} continue
43 html "<dt><h3>" [lindex $targets($hist($setNo,$i,host)) 0] ": "
44 set status [z39$i.$setNo responseStatus]
45 if {[lindex $status 0] == "NSD"} {
46 z39$i.$setNo nextResultSetPosition 0
47 set code [lindex $status 1]
48 set msg [lindex $status 2]
49 set addinfo [lindex $status 3]
50 html "Error</h3>\n<dd>NSD$code: $msg: $addinfo"
52 set r [z39$i.$setNo resultCount]
53 html "$r hits</h3>\n<dd>\n<ul>\n"
55 display-rec 1 $hist($setNo,$i,offset) display-brief $i
67 html {<img src="/egwgif/button-egw.gif">}
69 html {<a href="http:} $env(SCRIPT_NAME)
70 html / $sessionId {/mtargets.egw}
72 html {"><img src="/egwgif/button-new-target.gif" border=0></a>}
74 html {"> New target </a>} " | \n"
76 html {<a href="http:} $env(SCRIPT_NAME)
77 html / $sessionId {/mquery.egw/} $setNo
79 html {"><img src="/egwgif/button-new-query.gif" border=0></a>}
81 html {"> New query </a>}
88 html "<h3>Debug information</h3>\n"
89 html "sessionId: $sessionId <br>\n"
90 html "sessionParms: $sessionParms <br>\n"
91 foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} {
92 html $e {: } $env($e) {<br>} \n
94 html "form: " [egw_form] " <br>\n"
95 html "target: " $host " <br>\n"
96 html "query: --" $hist($setNo,1,query) "-- <br>\n"
97 html "database: " $hist($setNo,1,database) "<br>\n"
98 html "setNo: " $setNo " <br>\n"
99 html "nextSetNo: " $nextSetNo " <br>\n"