IrTcl incorporated in the gateway.
[egate.git] / www / query.egw
index c1f3b4c..e188c71 100644 (file)
@@ -1,25 +1,31 @@
 <html>
 {
-# $Id: query.egw,v 1.1 1995/10/23 17:04:16 adam Exp $
-    source /usr/local/etc/httpd/conf/ztargets.conf
-    set tmp [expr 1 + [string first / $sessionParms]]
-    set t [string range $sessionParms $tmp end]
+# $Id: query.egw,v 1.2 1995/10/27 15:12:04 adam Exp $
+proc init-response {} {
+    global sessionWait
+    htmlr {Init ok <br>}
+    htmlr {</body>}
+    htmlr {</html>}
+    set sessionWait 0
+}
+
+    set t $sessionParms
     set databases [lindex $targets($t) 1]
+    ir z39
+    set sessionWait 1
+    z39 connect $t
+    z39 callback init-response
+    z39 init
 }
 <head>
 <title> WWW/Z39.50 Gateway Query Form</title>
 </head>
 <body>
-sessionId: {html $sessionId} <br>
-sessionParms: {html $sessionParms} <br>
-form: {html [form]} <br>
-target: {html $t} <br>
-databases: {html $databases} <br>
 <h2> Search in databases </h2>
 <h1> <blink> Not Functional Yet </blink> </h1>
-<form action="http://localhost/cgi-bin/egwcgi/{html $sessionId}/search.egw"
- method=post>
 {
+    html {<form action="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
+    htmlr / $sessionId {/search.egw" method=post>}
     set nodb [llength $databases]
     if {$nodb > 1} {
         if {$nodb > 2} {
@@ -86,5 +92,14 @@ This page is maintained by <a href="mailto:pwh@dtv.dk"> Peter Wad Hansen </a>.
 Last modified 29. september 1995. <br>
 <em> This and the following pages are under construction and will continue to be so
 until the end of December 1995.</em>
-</body>
-</html>
+<hr>
+sessionId: {html $sessionId} <br>
+sessionParms: {html $sessionParms} <br>
+{
+    foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} {
+        htmlr $e {: } $env($e) {<br>}
+    }
+}
+form: {html [form]} <br>
+target: {html $t} <br>
+databases: {html $databases} <br>