Added some initial z39 gateway scripts.
[egate.git] / www / query.egw
1 <html>
2 {
3 # $Id: query.egw,v 1.1 1995/10/23 17:04:16 adam Exp $
4     source /usr/local/etc/httpd/conf/ztargets.conf
5     set tmp [expr 1 + [string first / $sessionParms]]
6     set t [string range $sessionParms $tmp end]
7     set databases [lindex $targets($t) 1]
8 }
9 <head>
10 <title> WWW/Z39.50 Gateway Query Form</title>
11 </head>
12 <body>
13 sessionId: {html $sessionId} <br>
14 sessionParms: {html $sessionParms} <br>
15 form: {html [form]} <br>
16 target: {html $t} <br>
17 databases: {html $databases} <br>
18 <h2> Search in databases </h2>
19 <h1> <blink> Not Functional Yet </blink> </h1>
20 <form action="http://localhost/cgi-bin/egwcgi/{html $sessionId}/search.egw"
21  method=post>
22 {
23     set nodb [llength $databases]
24     if {$nodb > 1} {
25         if {$nodb > 2} {
26             htmlr {The chosen target supports searching in several databases. <br>}
27             htmlr {Choose the bases you want to search: <br>}
28         }
29         set i 0
30         foreach d $databases {
31             html {<input type="checkbox" name="base" value="} $d 
32             if {[incr i] > 1} {
33                 htmlr {"> } $d
34             } else {
35                 htmlr {" checked> } $d
36             }
37         }
38         htmlr {<br>}
39         if {$nodb > 2} {
40             html {<input type="checkbox" name="base" value="} 
41             htmlr [concat $databases] {"> All <br>}
42         }
43     }
44 }
45 <hr>
46 <strong>Input your search criteria: </strong> <br>
47 {
48     set fields [lindex $targets($t) 2]
49     for {set no 1} {$no < 4} {incr no} {
50         htmlr {<select name="menu} $no {">}
51         foreach f $fields {
52             htmlr {<option> } [lindex $f 0]
53         }
54         htmlr </select>
55         htmlr {<input type="text" name="entry} $no {" size=30>}
56         if {$no < 3} {
57             htmlr {<select name="logic} $no {">}
58             htmlr {<option> And}
59             htmlr {<option> Or}
60             htmlr {<option> And not}
61             htmlr {</select>}
62         }
63         htmlr <br>
64     }
65 }
66 <hr>
67 <p>
68 Alternatively you can enter your query in <a href="ccl.html"> CCL </a> here: <br>
69 <input type=text name="cclentry" size=60> <br>
70 <hr>
71 <strong> Various technical parameters: </strong> <br>
72 Max hits: <input type="text" name="hits" value="50" size=3>
73 Records are shown in:
74 <select name="format">
75 <option> Long format
76 <option> Medium format
77 <option> Short format
78 <option> Raw MARC
79 </select>
80 <br>
81 <p>
82 <input type="submit" value="Send Query">
83 </form>
84 <hr>
85 This page is maintained by <a href="mailto:pwh@dtv.dk"> Peter Wad Hansen </a>.
86 Last modified 29. september 1995. <br>
87 <em> This and the following pages are under construction and will continue to be so
88 until the end of December 1995.</em>
89 </body>
90 </html>