Many improvements and bug fixes.
[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.2 1995/11/08 16:14:32 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     set hosts [wform target]
25     html "hosts=$hosts <br>\n"
26     set i 1
27     foreach host $hosts {
28         set hist($setNo,$i,host) $host
29         set hist($setNo,$i,database) [lindex [lindex $targets($host) 1] 0]
30         incr i
31     }
32     set hist($setNo,0,host) [expr $i - 1]
33     set host [lindex $hosts 0]
34 }
35 <hr>
36 <h3>Input your search criteria: </h3> <br>
37 {
38     set fields [lindex $targets($host) 2]
39     for {set no 1} {$no < 4} {incr no} {
40         html {<select name="menu} $no {">} \n
41         foreach f $fields {
42             html {<option> } [lindex $f 0] \n
43         }
44         html "</select>\n"
45         html {<input type="text" name="entry} $no {" size=30>} \n
46         if {$no < 3} {
47             html {<select name="logic} $no {">} \n
48             html "<option> And\n"
49             html "<option> Or\n"
50             html "<option> And not\n"
51             html "</select>\n"
52         }
53         html "<br>\n"
54     }
55 }
56 <h3> Various technical parameters: </h3> <br>
57 Max hits: <input type="text" name="hits" value="10" size=3>
58 Records are shown in:
59 <select name="format">
60 <option> Long format
61 <option> Medium format
62 <option> Short format
63 <option> Raw MARC
64 </select>
65 <br>
66 <p>
67 <input type="submit" value="Send Query">
68 </form>
69 <hr>
70 This page is maintained by <a href="mailto:pwh@dtv.dk"> Peter Wad Hansen </a>.
71 Last modified 29. september 1995. <br>
72 <em> This and the following pages are under construction
73 and will continue to be so until the end of December 1995.</em>
74 <hr>
75
76 {
77     html {<a href="http:} $env(SCRIPT_NAME)
78     html / $sessionId {/mtargets.egw"> New target </a>}
79 }
80 {
81     html "<hr>\n"
82     html "<h3>Debug information</h3>\n"
83     html "sessionId: $sessionId <br>\n"
84     html "sessionParms: $sessionParms <br>\n"
85     foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} {
86         html $e {: } $env($e) {<br>} \n
87     }
88     html "form: " [wform] " <br>\n"
89     html "target: " $host " <br>\n"
90     html "setNo: " $setNo " <br>\n"
91     html "nextSetNo: " $nextSetNo " <br>\n"
92 }
93 </body></html>