3 <title> WWW/Z39.50 Gateway Query Form</title>
7 # $Id: query.egw,v 1.8 1995/11/02 16:35:36 adam Exp $
8 proc fail-response {} {
22 set host [lindex $sessionParms 0]
24 if {[info exists setNo]} {
25 set oldHost $hist($setNo,host)
29 if {[catch {set setNo $nextSetNo}]} {
33 set hist($setNo,host) $host
35 if {[catch {z39 failback fail-response}]} {
38 z39 callback ok-response
39 z39 failback fail-response
40 if {$host != $oldHost} {
41 catch {z39 disconnect}
43 html "Connecting to target " $host " <br>\n"
45 if {[catch {z39 connect $host}]} {
46 html "Cannot connect to target ${host} <br>\n"
47 html "</body></html>\n"
49 } elseif {$sessionWait == 0} {
51 if {$sessionWait != 1} {
52 html "Cannot connect to target ${host} <br>\n"
53 html "</body></html>\n"
60 if {$sessionWait != "1"} {
61 htmlr "Cannot initialize with target ${host} <br>"
62 htmlr "</body></html>"
66 set databases [lindex $targets($host) 1]
68 html "<h2> Search in databases </h2>\n"
69 html {<form action="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
70 html / $sessionId {/search.egw/} $setNo {" method=post>} \n
71 set nodb [llength $databases]
74 html "The chosen target supports searching in "
75 html "several databases. <br>\n"
76 html "Choose the bases you want to search: <br>\n"
79 foreach d $databases {
80 html {<input type="checkbox" name="base" value="} $d
84 html {" checked> } $d \n
89 html {<input type="checkbox" name="base" value="}
90 html [concat $databases] {"> All <br>} \n
95 <strong>Input your search criteria: </strong> <br>
97 set fields [lindex $targets($host) 2]
98 for {set no 1} {$no < 4} {incr no} {
99 html {<select name="menu} $no {">} \n
101 html {<option> } [lindex $f 0] \n
104 html {<input type="text" name="entry} $no {" size=30>} \n
106 html {<select name="logic} $no {">} \n
107 html "<option> And\n"
109 html "<option> And not\n"
116 Alternatively you can enter your query in
117 <a href="ccl.html"> CCL </a> here: <br>
118 <input type=text name="cclentry" size=52> <br>
120 <strong> Various technical parameters: </strong> <br>
121 Max hits: <input type="text" name="hits" value="10" size=3>
122 Records are shown in:
123 <select name="format">
125 <option> Medium format
126 <option> Short format
131 <input type="submit" value="Send Query">
134 This page is maintained by <a href="mailto:pwh@dtv.dk"> Peter Wad Hansen </a>.
135 Last modified 29. september 1995. <br>
136 <em> This and the following pages are under construction
137 and will continue to be so until the end of December 1995.</em>
141 html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
142 html / $sessionId {/targets.egw"> New target </a>}
146 html "<strong>Debug information</strong><br>\n"
147 html "sessionId: $sessionId <br>\n"
148 html "sessionParms: $sessionParms <br>\n"
149 foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} {
150 html $e {: } $env($e) {<br>} \n
152 html "form: " [wform] " <br>\n"
153 html "target: " $host " <br>\n"
154 html "databases: " $databases " <br>\n"
155 html "setNo: " $setNo " <br>\n"
156 html "nextSetNo: " $nextSetNo " <br>\n"