3 # $Id: msearch.egw,v 1.19 1996/03/12 16:30:26 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 {[llength [egw_form]] > 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 if {![info exists hist($setNo,0,host)]} {
31 displayError {No servers selected} {}
34 set hist($nextSetNo,0,host) $hist($setNo,0,host)
35 for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} {
36 set hist($nextSetNo,$i,host) $hist($setNo,$i,host)
37 set hist($nextSetNo,$i,database) $hist($setNo,$i,database)
38 set hist($nextSetNo,$i,idAuthentication) \
39 $hist($setNo,$i,idAuthentication)
44 for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} {
45 set hist($setNo,$i,query) [build-query $hist($setNo,$i,host) 3]
48 set hist($setNo,form,menu1) [egw_form menu1]
49 set hist($setNo,form,menu2) [egw_form menu2]
50 set hist($setNo,form,menu3) [egw_form menu3]
52 set hist($setNo,form,entry1) [egw_form entry1]
53 set hist($setNo,form,entry2) [egw_form entry2]
54 set hist($setNo,form,entry3) [egw_form entry3]
56 set hist($setNo,form,logic1) [egw_form logic1]
57 set hist($setNo,form,logic2) [egw_form logic2]
58 set hist($setNo,form,logic3) {}
60 set hist($setNo,maxPresent) [egw_form hits]
61 if {$hist($setNo,maxPresent) == ""} {
62 set hist($setNo,maxPresent) 20
64 set hist($setNo,format) [egw_form format]
65 if {![string length $hist($setNo,format)]} {
66 set hist($setNo,format) brief
68 set hist($setNo,sort) [egw_form sort]
69 if {![string length $hist($setNo,sort)]} {
70 set hist($setNo,sort) server
76 button-new-query 1 $setNo
80 z39msearch $setNo B 1 $hist($setNo,maxPresent) 1
82 display-result-set-m $setNo
86 button-new-query 1 $setNo
93 html "<h3>Debug information</h3>\n"
94 html "sessionId: $sessionId <br>\n"
95 html "sessionParms: $sessionParms <br>\n"
96 foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} {
97 html $e {: } $env($e) {<br>} \n
99 html "form: " [egw_form] " <br>\n"
100 html "query: --" $hist($setNo,1,query) "-- <br>\n"
101 html "database: " $hist($setNo,1,database) "<br>\n"
102 html "sort: " $hist($setNo,sort) "<br>\n"
103 html "format: " $hist($setNo,format) "<br>\n"
104 html "setNo: " $setNo " <br>\n"
105 html "nextSetNo: " $nextSetNo " <br>\n"