3 # $Id: msearch.egw,v 1.21 1996/03/14 11:50:45 adam Exp $
5 if {[info commands saveState] == ""} {
7 if {![info exists debug]} {
18 html "<head><title> WWW/Z39.50 Gateway Search </title>\n"
19 html "</head><body>\n"
21 set setNo [lindex $sessionParms 0]
23 if {[llength [egw_form]] > 0} {
24 if {[string length [egw_form host]] > 0} {
25 set hist($setNo,0,host) [llength [egw_form host]]
27 foreach t [egw_form host] {
28 set hist($setNo,$i,host) $t
29 set hist($setNo,$i,database) [splitDatabaseSpec $t]
30 set hist($setNo,$i,idAuthentication) {}
34 if {![info exists hist($setNo,0,host)]} {
35 displayError {No servers selected} {}
38 set hist($nextSetNo,0,host) $hist($setNo,0,host)
39 for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} {
40 set hist($nextSetNo,$i,host) $hist($setNo,$i,host)
41 set hist($nextSetNo,$i,database) $hist($setNo,$i,database)
42 set hist($nextSetNo,$i,idAuthentication) \
43 $hist($setNo,$i,idAuthentication)
48 for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} {
49 set hist($setNo,$i,query) [build-query $hist($setNo,$i,host) 3]
52 set hist($setNo,scan) 0
54 set hist($setNo,form,menu1) [egw_form menu1]
55 set hist($setNo,form,menu2) [egw_form menu2]
56 set hist($setNo,form,menu3) [egw_form menu3]
58 set hist($setNo,form,entry1) [egw_form entry1]
59 set hist($setNo,form,entry2) [egw_form entry2]
60 set hist($setNo,form,entry3) [egw_form entry3]
62 set hist($setNo,form,logic1) [egw_form logic1]
63 set hist($setNo,form,logic2) [egw_form logic2]
64 set hist($setNo,form,logic3) {}
66 set hist($setNo,maxPresent) [egw_form hits]
67 if {$hist($setNo,maxPresent) == ""} {
68 set hist($setNo,maxPresent) 20
70 set hist($setNo,format) [egw_form format]
71 if {![string length $hist($setNo,format)]} {
72 set hist($setNo,format) brief
74 set hist($setNo,sort) [egw_form sort]
75 if {![string length $hist($setNo,sort)]} {
76 set hist($setNo,sort) server
82 button-new-query $setNo
87 z39msearch $setNo B 1 $hist($setNo,maxPresent) 1
89 display-result-set-m $setNo
93 button-new-query $setNo
101 html "<h3>Debug information</h3>\n"
102 html "sessionId: $sessionId <br>\n"
103 html "sessionParms: $sessionParms <br>\n"
104 foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} {
105 html $e {: } $env($e) {<br>} \n
107 html "form: " [egw_form] " <br>\n"
108 html "query: --" $hist($setNo,1,query) "-- <br>\n"
109 html "database: " $hist($setNo,1,database) "<br>\n"
110 html "sort: " $hist($setNo,sort) "<br>\n"
111 html "format: " $hist($setNo,format) "<br>\n"
112 html "setNo: " $setNo " <br>\n"
113 html "nextSetNo: " $nextSetNo " <br>\n"