Many improvements and bug fixes.
[egate.git] / www / query.egw
index 8f816be..e2f9468 100644 (file)
@@ -4,7 +4,7 @@
 </head>
 <body>
 {
-# $Id: query.egw,v 1.10 1995/11/08 12:42:17 adam Exp $
+# $Id: query.egw,v 1.11 1995/11/08 16:14:33 adam Exp $
 
     if {[info commands saveState] == ""} {
         source z39util.tcl
@@ -55,10 +55,16 @@ proc ok-response {} {
             html "</body></html>\n"
             wabort
         } elseif {$sessionWait == 0} {
-            zwait sessionWait
+            if {[catch {zwait sessionWait 30}]} {
+                html "Cannot connect to target ${host} <br>\n"
+                html "</body></html>\n"
+               z39 disconnect
+                wabort
+            }
             if {$sessionWait != 1} {
                 html "Cannot connect to target ${host} <br>\n"
                 html "</body></html>\n"
+               z39 disconnect
                 wabort
             }
         }
@@ -69,7 +75,11 @@ proc ok-response {} {
             htmlr "</body></html>"
             wabort
         }
-        zwait sessionWait
+        if {[catch {zwait sessionWait 60}]} {
+            htmlr "Cannot initialize with target ${host} <br>"
+            htmlr "</body></html>"
+            wabort
+       }       
         if {$sessionWait != "1"} {
             htmlr "Cannot initialize with target ${host} <br>"
             htmlr "</body></html>"
@@ -78,7 +88,7 @@ proc ok-response {} {
     }
     set databases [lindex $targets($host) 1]
 
-    html {<form action="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
+    html {<form action="http:} $env(SCRIPT_NAME)
     html / $sessionId {/search.egw/} $setNo {" method=post>} \n
     set nodb [llength $databases]
     if {$nodb > 1} {
@@ -126,7 +136,7 @@ proc ok-response {} {
 }
 <hr><p>
 Alternatively you can enter your query in
-<a href="ccl.html"> CCL </a> here: <br>
+<a href="http://www.dtv.dk/ccl.html"> CCL </a> here: <br>
 <input type=text name="cclentry" size=52> <br>
 <hr>
 <h3> Various technical parameters: </h3> <br>
@@ -150,7 +160,7 @@ and will continue to be so until the end of December 1995.</em>
 <hr>
 
 {
-    html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
+    html {<a href="http:} $env(SCRIPT_NAME)
     html / $sessionId {/targets.egw"> New target </a>}
 }
 {