3 # $Id: targets.egw,v 1.24 1996/03/14 11:50:49 adam Exp $
5 if {![info exists debug]} {
6 if {[lindex $sessionParms 1] == "1"} {
12 if {[info commands saveState] == ""} {
15 set html3 [lindex $sessionParms 0]
16 if {[string length $html3] == 0} {
17 if {![info exists env(HTTP_USER_AGENT)]} {
19 } elseif {[string first Mozilla $env(HTTP_USER_AGENT)] == 0} {
21 egw_log debug "New user using Netscape"
24 egw_log debug "New user Not using Netscape"
29 <title> Europagate, WWW/Z39.50 Gateway </title>
33 set scriptQuery query.egw
34 set scriptTarget targets.egw
39 if {[info exists nextSetNo]} {
43 html "<h2>Select a target</h2><br>\n"
48 html {<dt><h2>} $h \n {</h2>}
55 html {<dt><b><a href="http:} $env(SCRIPT_NAME) /
56 html "$sessionId/query.egw;/-1+$t" {"> } [lindex $targets($t) 0]
60 set desc [lindex $targets($t) 4]
61 if {[string length $desc] > 0} {
66 serverList headlineC targetC
69 proc targetsCmp {l r} {
71 return [string compare [string tolower [lindex $targets($l) 0]] \
72 [string tolower [lindex $targets($r) 0]]]
74 set tt [array names targets]
75 set tn [lsort -command targetsCmp $tt]
77 html {<dt><a href="http:} $env(SCRIPT_NAME) /
78 html "$sessionId/query.egw;/-1+$t" {"> } [lindex $targets($t) 0]
80 set desc [lindex $targets($t) 4]
89 if {[info exists nextSetNo]} {
99 html "<h3>Debug information</h3>\n"
100 html "sessionId: $sessionId <br>\n"
101 html "sessionParms: $sessionParms <br>\n"
102 foreach n [array names env] {
103 html "env($n) = " $env($n) " <br>\n"