3 # $Id: msearch.egw,v 1.18 1996/03/11 17:40:47 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 {[string length [egw_form entry1]] > 0} {
20 if {[string length [egw_form host]] > 0} {
21 set hist($setNo,0,host) [llength [egw_form host]]
23 foreach t [egw_form host] {
24 set hist($setNo,$i,host) $t
25 set hist($setNo,$i,database) [splitDatabaseSpec $t]
26 set hist($setNo,$i,idAuthentication) {}
30 set hist($nextSetNo,0,host) $hist($setNo,0,host)
31 for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} {
32 set hist($nextSetNo,$i,host) $hist($setNo,$i,host)
33 set hist($nextSetNo,$i,database) $hist($setNo,$i,database)
34 set hist($nextSetNo,$i,idAuthentication) \
35 $hist($setNo,$i,idAuthentication)
40 for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} {
41 set hist($setNo,$i,query) [build-query $hist($setNo,$i,host) 3]
43 set hist($setNo,maxPresent) [egw_form hits]
44 if {$hist($setNo,maxPresent) == ""} {
45 set hist($setNo,maxPresent) 20
47 set hist($setNo,format) [egw_form format]
48 if {![string length $hist($setNo,format)]} {
49 set hist($setNo,format) brief
51 set hist($setNo,sort) [egw_form sort]
52 if {![string length $hist($setNo,sort)]} {
53 set hist($setNo,sort) server
59 button-new-query 1 $setNo
63 z39msearch $setNo B 1 $hist($setNo,maxPresent) 1
65 display-result-set-m $setNo
69 button-new-query 1 $setNo
76 html "<h3>Debug information</h3>\n"
77 html "sessionId: $sessionId <br>\n"
78 html "sessionParms: $sessionParms <br>\n"
79 foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} {
80 html $e {: } $env($e) {<br>} \n
82 html "form: " [egw_form] " <br>\n"
83 html "query: --" $hist($setNo,1,query) "-- <br>\n"
84 html "database: " $hist($setNo,1,database) "<br>\n"
85 html "sort: " $hist($setNo,sort) "<br>\n"
86 html "format: " $hist($setNo,format) "<br>\n"
87 html "setNo: " $setNo " <br>\n"
88 html "nextSetNo: " $nextSetNo " <br>\n"