Logs of changes.
[egate.git] / www / msearch.egw
1 <html>
2 {
3 # $Id: msearch.egw,v 1.17 1996/03/08 16:47:04 adam Exp $
4
5     if {[info commands saveState] == ""} {
6         source z39util.tcl
7     }
8     global sessionWait
9     global nextSetNo
10     global setNo
11     global hist
12     global zstatus
13
14     html "<head><title> WWW/Z39.50 Gateway Search </title>\n"
15     html "</head><body>\n"
16
17     set setNo [lindex $sessionParms 0]
18
19     if {[egw_form menu1] != ""} {
20         set hist($nextSetNo,0,host) $hist($setNo,0,host)
21         for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} {
22             set hist($nextSetNo,$i,host) $hist($setNo,$i,host)
23             set hist($nextSetNo,$i,database) $hist($setNo,$i,database)
24             set hist($nextSetNo,$i,idAuthentication) \
25                 $hist($setNo,$i,idAuthentication) 
26         }
27         set setNo $nextSetNo
28         incr nextSetNo
29
30         for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} {
31             set hist($setNo,$i,query) [build-query $hist($setNo,$i,host) 3]
32         }
33         set hist($setNo,maxPresent) [egw_form hits]
34         if {$hist($setNo,maxPresent) == ""} {
35             set hist($setNo,maxPresent) 20
36         }
37         set hist($setNo,format) [egw_form format]
38         if {![string length $hist($setNo,format)]} {
39             set hist($setNo,format) brief
40         }
41         set hist($setNo,sort) [egw_form sort]
42         if {![string length $hist($setNo,sort)]} {
43             set hist($setNo,sort) server
44         }
45     }
46
47     set useIcons 1
48     button-europagate
49     button-new-query 1 $setNo
50     button-new-target 0
51
52     html "<br>\n"
53     z39msearch $setNo B 1 $hist($setNo,maxPresent) 1
54
55     display-result-set-m $setNo
56
57     set useIcons 0
58     button-europagate
59     button-new-query 1 $setNo
60     button-new-target 0
61 }
62
63 {
64     if {!$debug} return
65     html "<hr>\n"
66     html "<h3>Debug information</h3>\n"
67     html "sessionId: $sessionId <br>\n"
68     html "sessionParms: $sessionParms <br>\n"
69     foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} {
70         html $e {: } $env($e) {<br>} \n
71     }
72     html "form: " [egw_form] " <br>\n"
73     html "target: " $host " <br>\n"
74     html "query: --" $hist($setNo,1,query) "-- <br>\n"
75     html "database: " $hist($setNo,1,database) "<br>\n"
76     html "sort: " $hist($setNo,sort) "<br>\n"
77     html "format: " $hist($setNo,format) "<br>\n"
78     html "setNo: " $setNo " <br>\n"
79     html "nextSetNo: " $nextSetNo " <br>\n"
80 }
81
82 </body>
83 </html>