Minor changes.
[egate.git] / www / mquery.egw
1 <html>
2 <head>
3 <title> WWW/Z39.50 Gateway Query Form</title>
4 </head>
5 <body>
6 {
7 # $Id: mquery.egw,v 1.3 1995/11/08 18:07:22 adam Exp $
8
9     if {[info commands saveState] == ""} {
10         source z39util.tcl
11     }
12
13     global setNo
14     global nextSetNo
15     global hist
16
17     html {<form action="http:} $env(SCRIPT_NAME)
18     html / $sessionId {/msearch.egw/} $setNo {" method=post>} \n
19
20     if {[catch {set setNo $nextSetNo}]} {
21         set nextSetNo 1
22         set setNo 1
23     }
24     if {1} {
25     set i 1
26     foreach host [array names targets] {
27         set databases [wform target$host]
28         if {$databases == ""} continue
29         html "host=$host, $databases <br>\n"
30         set hist($setNo,$i,host) $host
31         set hist($setNo,$i,database) $databases
32         incr i
33     }
34     } else {
35     set hosts [wform target]
36     html "hosts=$hosts <br>\n"
37     set i 1
38     foreach host $hosts {
39         set hist($setNo,$i,host) $host
40         set hist($setNo,$i,database) [lindex [lindex $targets($host) 1] 0]
41         incr i
42     }
43     set host [lindex $hosts 0]
44     }
45     set hist($setNo,0,host) [expr $i - 1]
46 }
47 <hr>
48 <h3>Input your search criteria: </h3> <br>
49 {
50     set fields [lindex $targets($host) 2]
51     for {set no 1} {$no < 4} {incr no} {
52         html {<select name="menu} $no {">} \n
53         foreach f $fields {
54             html {<option> } [lindex $f 0] \n
55         }
56         html "</select>\n"
57         html {<input type="text" name="entry} $no {" size=30>} \n
58         if {$no < 3} {
59             html {<select name="logic} $no {">} \n
60             html "<option> And\n"
61             html "<option> Or\n"
62             html "<option> And not\n"
63             html "</select>\n"
64         }
65         html "<br>\n"
66     }
67 }
68 <h3> Various technical parameters: </h3> <br>
69 Max hits: <input type="text" name="hits" value="10" size=3>
70 Records are shown in:
71 <select name="format">
72 <option> Long format
73 <option> Medium format
74 <option> Short format
75 <option> Raw MARC
76 </select>
77 <br>
78 <p>
79 <input type=submit value="Search"><input type=reset value="Reset">
80 </form>
81 <hr>
82 This page is maintained by <a href="mailto:pwh@dtv.dk"> Peter Wad Hansen </a>.
83 Last modified 29. september 1995. <br>
84 <em> This and the following pages are under construction
85 and will continue to be so until the end of December 1995.</em>
86 <hr>
87
88 {
89     html {<a href="http:} $env(SCRIPT_NAME)
90     html / $sessionId {/mtargets.egw"> New target </a>}
91 }
92 {
93     html "<hr>\n"
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
99     }
100     html "form: " [wform] " <br>\n"
101     html "target: " $host " <br>\n"
102     html "setNo: " $setNo " <br>\n"
103     html "nextSetNo: " $nextSetNo " <br>\n"
104 }
105 </body></html>