3 # $Id: msearch.egw,v 1.22 1996/05/15 18:43:37 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) 6]
52 set hist($setNo,scan) 0
54 for {set i 1} {$i < 6} {incr i} {
55 set hist($setNo,form,menu$i) [egw_form menu$i]
56 set hist($setNo,form,entry$i) [egw_form entry$i]
57 set hist($setNo,form,logic$i) [egw_form logic$i]
59 set hist($setNo,maxPresent) [egw_form hits]
60 if {$hist($setNo,maxPresent) == ""} {
61 set hist($setNo,maxPresent) 20
63 set hist($setNo,format) [egw_form format]
64 if {![string length $hist($setNo,format)]} {
65 set hist($setNo,format) brief
67 set hist($setNo,sort) [egw_form sort]
68 if {![string length $hist($setNo,sort)]} {
69 set hist($setNo,sort) server
75 button-new-query $setNo
80 z39msearch $setNo B 1 $hist($setNo,maxPresent) 1
82 display-result-set-m $setNo
86 button-new-query $setNo
94 html "<h3>Debug information</h3>\n"
95 html "sessionId: $sessionId <br>\n"
96 html "sessionParms: $sessionParms <br>\n"
97 foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} {
98 html $e {: } $env($e) {<br>} \n
100 html "form: " [egw_form] " <br>\n"
101 html "query: --" $hist($setNo,1,query) "-- <br>\n"
102 html "database: " $hist($setNo,1,database) "<br>\n"
103 html "sort: " $hist($setNo,sort) "<br>\n"
104 html "format: " $hist($setNo,format) "<br>\n"
105 html "setNo: " $setNo " <br>\n"
106 html "nextSetNo: " $nextSetNo " <br>\n"