Minor changes.
[egate.git] / www / targets.egw
index bd4838b..4f1ccb3 100644 (file)
@@ -1,6 +1,6 @@
 <html>
 {
-# $Id: targets.egw,v 1.24 1996/03/14 11:50:49 adam Exp $
+# $Id: targets.egw,v 1.26 1996/05/24 11:16:02 adam Exp $
     source ztargets.conf
     if {![info exists debug]} {
         if {[lindex $sessionParms 1] == "1"} {
@@ -36,6 +36,7 @@
     set useIcons 1
 
     button-main
+    button-feedback
     if {[info exists nextSetNo]} {
         button-view-history
     }
@@ -43,7 +44,6 @@
     html "<h2>Select a target</h2><br>\n"
     html "<dl>\n"
 
-    if {1} {
     proc headlineC {h} {
         html {<dt><h2>} $h \n {</h2>}
     }
         global targets
         global env
         global sessionId
+        global waisFlag
 
+        if {!$waisFlag && ![string compare [lindex $targets($t) 1] WAIS]} {
+            return
+        }
         html {<dt><b><a href="http:} $env(SCRIPT_NAME) /
         html "$sessionId/query.egw;/-1+$t" {"> } [lindex $targets($t) 0]
         html {</a></b>}
         }
         html "<br>\n"
     }
-    serverList headlineC targetC
-
-    } else {
-    proc targetsCmp {l r} {
-        global targets
-        return [string compare [string tolower [lindex $targets($l) 0]] \
-                               [string tolower [lindex $targets($r) 0]]]
-    }
-    set tt [array names targets]
-    set tn [lsort -command targetsCmp $tt]
-    foreach t $tn {
-        html {<dt><a href="http:} $env(SCRIPT_NAME) /
-        html "$sessionId/query.egw;/-1+$t" {"> } [lindex $targets($t) 0]
-        html " </a>\n"
-        set desc [lindex $targets($t) 4]
-        if {$desc != ""} {
-            html "<dd>$desc\n"
+    if {![info exists waisFlag]} {
+        set waisFlag 1
+        if {[catch {wais waisdummy}]} {
+            set waisFlag 0
+        } else {
+            rename waisdummy {}
         }
     }
-    }
+    serverList headlineC targetC
+
     html "</dl><br>\n"
     set useIcons 0
     button-main 
+    button-feedback
     if {[info exists nextSetNo]} {
         button-view-history
     }