Attempt to inform user if session has really terminated.
[egate.git] / www / targets.egw
index 2bd313b..bd4838b 100644 (file)
@@ -1,33 +1,71 @@
 <html>
 {
-# $Id: targets.egw,v 1.15 1996/01/12 10:03:20 adam Exp $
+# $Id: targets.egw,v 1.24 1996/03/14 11:50:49 adam Exp $
     source ztargets.conf
+    if {![info exists debug]} {
+        if {[lindex $sessionParms 1] == "1"} {
+            set debug 1
+        } else {
+            set debug 0
+        }
+    }
     if {[info commands saveState] == ""} {
         source z39util.tcl
     }
+    set html3 [lindex $sessionParms 0]
+    if {[string length $html3] == 0} {
+        if {![info exists env(HTTP_USER_AGENT)]} {
+            set html3 1
+        } elseif {[string first Mozilla $env(HTTP_USER_AGENT)] == 0} {
+            set html3 1
+            egw_log debug "New user using Netscape"
+        } else {
+            set html3 0
+            egw_log debug "New user Not using Netscape"
+        }
+    }
 }
 <head>
 <title> Europagate, WWW/Z39.50 Gateway </title>
 </head>
 <body>
-<h2>Choose Z39.50 target</h2><br>
-<dl>
 {
-    if {![info exists debug]} {
-        if {[lindex $sessionParms 0] == "1"} {
-            set debug 1
-        } else {
-            set debug 0
-        }
+    set scriptQuery query.egw
+    set scriptTarget targets.egw
+
+    set useIcons 1
+
+    button-main
+    if {[info exists nextSetNo]} {
+        button-view-history
     }
+    button-define-target
+    html "<h2>Select a target</h2><br>\n"
+    html "<dl>\n"
 
-    if {![info exists useIcons]} {
-        if {[lindex $sessionParms 1] == "1"} {
-            set useIcons 0
-        } else {
-            set useIcons 1
+    if {1} {
+    proc headlineC {h} {
+        html {<dt><h2>} $h \n {</h2>}
+    }
+    proc targetC {t} {
+        global targets
+        global env
+        global sessionId
+
+        html {<dt><b><a href="http:} $env(SCRIPT_NAME) /
+        html "$sessionId/query.egw;/-1+$t" {"> } [lindex $targets($t) 0]
+        html {</a></b>}
+
+        html {<dd>}
+        set desc [lindex $targets($t) 4]
+        if {[string length $desc] > 0} {
+            html "$desc<br>\n"
         }
+        html "<br>\n"
     }
+    serverList headlineC targetC
+
+    } else {
     proc targetsCmp {l r} {
         global targets
         return [string compare [string tolower [lindex $targets($l) 0]] \
     set tt [array names targets]
     set tn [lsort -command targetsCmp $tt]
     foreach t $tn {
-       if {[string index $t 0] == "."} continue
         html {<dt><a href="http:} $env(SCRIPT_NAME) /
-        html "$sessionId/query.egw;/$t" {"> } [lindex $targets($t) 0] " </a>\n"
+        html "$sessionId/query.egw;/-1+$t" {"> } [lindex $targets($t) 0]
+        html " </a>\n"
         set desc [lindex $targets($t) 4]
         if {$desc != ""} {
-            html "<dd><em>$desc</em>\n"
+            html "<dd>$desc\n"
         }
     }
+    }
+    html "</dl><br>\n"
+    set useIcons 0
+    button-main 
+    if {[info exists nextSetNo]} {
+        button-view-history
+    }
+    button-define-target
 }
-</dl>
-
-{
-    button-europagate
-    button-view-history 0
-}
-
 {
     catch maintenance
     global debug