3 <title> WWW/Z39.50 Gateway Query Form</title>
7 # $Id: query.egw,v 1.7 1995/11/01 16:15:44 adam Exp $
8 proc fail-response {} {
22 set host $sessionParms
24 if {[info exists setNo]} {
25 set oldHost $hist($setNo,host)
30 set hist($setNo,host) $host
32 if {[catch {z39 failback fail-response}]} {
35 z39 callback ok-response
36 z39 failback fail-response
37 if {$host != $oldHost} {
38 catch {z39 disconnect}
40 html "Connecting to target " $host " <br>\n"
42 if {[catch {z39 connect $host}]} {
43 html "Cannot connect to target ${host} <br>\n"
44 html "</body></html>\n"
46 } elseif {$sessionWait == 0} {
48 if {$sessionWait != 1} {
49 html "Cannot connect to target ${host} <br>\n"
50 html "</body></html>\n"
57 if {$sessionWait != "1"} {
58 htmlr "Cannot initialize with target ${host} <br>"
59 htmlr "</body></html>"
63 set databases [lindex $targets($host) 1]
65 html "<h2> Search in databases </h2>\n"
66 html {<form action="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
67 html / $sessionId {/search.egw/} $setNo {" method=post>} \n
68 set nodb [llength $databases]
71 html "The chosen target supports searching in "
72 html "several databases. <br>\n"
73 html "Choose the bases you want to search: <br>\n"
76 foreach d $databases {
77 html {<input type="checkbox" name="base" value="} $d
81 html {" checked> } $d \n
86 html {<input type="checkbox" name="base" value="}
87 html [concat $databases] {"> All <br>} \n
92 <strong>Input your search criteria: </strong> <br>
94 set fields [lindex $targets($host) 2]
95 for {set no 1} {$no < 4} {incr no} {
96 html {<select name="menu} $no {">} \n
98 html {<option> } [lindex $f 0] \n
101 html {<input type="text" name="entry} $no {" size=30>} \n
103 html {<select name="logic} $no {">} \n
104 html "<option> And\n"
106 html "<option> And not\n"
113 Alternatively you can enter your query in
114 <a href="ccl.html"> CCL </a> here: <br>
115 <input type=text name="cclentry" size=52> <br>
117 <strong> Various technical parameters: </strong> <br>
118 Max hits: <input type="text" name="hits" value="50" size=3>
119 Records are shown in:
120 <select name="format">
122 <option> Medium format
123 <option> Short format
128 <input type="submit" value="Send Query">
131 This page is maintained by <a href="mailto:pwh@dtv.dk"> Peter Wad Hansen </a>.
132 Last modified 29. september 1995. <br>
133 <em> This and the following pages are under construction
134 and will continue to be so until the end of December 1995.</em>
138 html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
139 html / $sessionId {/targets.egw"> New target </a>}
143 html "<strong>Debug information</strong><br>\n"
144 html "sessionId: $sessionId <br>\n"
145 html "sessionParms: $sessionParms <br>\n"
146 foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} {
147 html $e {: } $env($e) {<br>} \n
149 html "form: " [wform] " <br>\n"
150 html "target: " $host " <br>\n"
151 html "databases: " $databases " <br>\n"
152 html "setNo: " $setNo " <br>\n"
153 html "nextSetNo: " $nextSetNo " <br>\n"