X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;ds=sidebyside;f=www%2Fquery.egw;h=d07e2c3d0a11ef9970c67af389c1403810e7ed28;hb=949f8c4efedfe6d191264853690c84f527e1790b;hp=e188c71d361d56e2dd4449fbf84700da32e4d6b4;hpb=a6f3beb071fe8c894ee6c846c86296c84f48e3d4;p=egate.git
diff --git a/www/query.egw b/www/query.egw
index e188c71..d07e2c3 100644
--- a/www/query.egw
+++ b/www/query.egw
@@ -1,78 +1,118 @@
+
+ WWW/Z39.50 Gateway Query Form
+
+
{
-# $Id: query.egw,v 1.2 1995/10/27 15:12:04 adam Exp $
-proc init-response {} {
+# $Id: query.egw,v 1.7 1995/11/01 16:15:44 adam Exp $
+proc fail-response {} {
global sessionWait
- htmlr {Init ok
}
- htmlr {}
- htmlr {}
- set sessionWait 0
+ set sessionWait -1
}
- set t $sessionParms
- set databases [lindex $targets($t) 1]
- ir z39
+proc ok-response {} {
+ global sessionWait
set sessionWait 1
- z39 connect $t
- z39 callback init-response
- z39 init
}
-
- WWW/Z39.50 Gateway Query Form
-
-
- Search in databases
-
-{
+
+ global setNo
+ global nextSetNo
+ global hist
+
+ set host $sessionParms
+
+ if {[info exists setNo]} {
+ set oldHost $hist($setNo,host)
+ } else {
+ set oldHost ""
+ }
+ set setNo $nextSetNo
+ set hist($setNo,host) $host
+
+ if {[catch {z39 failback fail-response}]} {
+ ir z39
+ }
+ z39 callback ok-response
+ z39 failback fail-response
+ if {$host != $oldHost} {
+ catch {z39 disconnect}
+
+ html "Connecting to target " $host "
\n"
+ set sessionWait 0
+ if {[catch {z39 connect $host}]} {
+ html "Cannot connect to target ${host}
\n"
+ html "