3 <title> WWW/Z39.50 Gateway Query Form</title>
7 # $Id: query.egw,v 1.6 1995/10/31 16:56:23 adam Exp $
8 proc fail-response {} {
19 set host $sessionParms
20 set databases [lindex $targets($host) 1]
21 catch {z39 disconnect}
24 z39 failback fail-response
25 z39 callback ok-response
26 if {[catch {z39 connect $host}]} {
27 htmlr "Cannot connect to target ${host} <br>"
28 htmlr "</body></html>"
30 } elseif {$sessionWait == 0} {
32 if {$sessionWait != 1} {
33 htmlr "Cannot connect to target ${host} <br>"
34 htmlr "</body></html>"
41 if {$sessionWait == -1} {
42 htmlr "Cannot initialize with target ${host} <br>"
43 htmlr "</body></html>"
46 htmlr {<h2> Search in databases </h2>}
47 html {<form action="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
48 htmlr / $sessionId {/search.egw/} $host {" method=post>}
49 set nodb [llength $databases]
52 html {The chosen target supports searching in }
53 htmlr {several databases. <br>}
54 htmlr {Choose the bases you want to search: <br>}
57 foreach d $databases {
58 html {<input type="checkbox" name="base" value="} $d
62 htmlr {" checked> } $d
67 html {<input type="checkbox" name="base" value="}
68 htmlr [concat $databases] {"> All <br>}
73 <strong>Input your search criteria: </strong> <br>
75 set fields [lindex $targets($host) 2]
76 for {set no 1} {$no < 4} {incr no} {
77 htmlr {<select name="menu} $no {">}
79 htmlr {<option> } [lindex $f 0]
82 htmlr {<input type="text" name="entry} $no {" size=30>}
84 htmlr {<select name="logic} $no {">}
87 htmlr {<option> And not}
94 Alternatively you can enter your query in
95 <a href="ccl.html"> CCL </a> here: <br>
96 <input type=text name="cclentry" size=60> <br>
98 <strong> Various technical parameters: </strong> <br>
99 Max hits: <input type="text" name="hits" value="50" size=3>
100 Records are shown in:
101 <select name="format">
103 <option> Medium format
104 <option> Short format
109 <input type="submit" value="Send Query">
112 This page is maintained by <a href="mailto:pwh@dtv.dk"> Peter Wad Hansen </a>.
113 Last modified 29. september 1995. <br>
114 <em> This and the following pages are under construction
115 and will continue to be so until the end of December 1995.</em>
117 sessionId: {html $sessionId} <br>
118 sessionParms: {html $sessionParms}<br>
120 foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} {
121 htmlr $e {: } $env($e) {<br>}
124 form: {html [wform]} <br>
125 target: {html $host} <br>
126 databases: {html $databases} <br>