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