Logs of changes.
[egate.git] / www / targets.egw
1 <html>
2 {
3 # $Id: targets.egw,v 1.21 1996/03/08 16:47:06 adam Exp $
4     source ztargets.conf
5     if {[info commands saveState] == ""} {
6         source z39util.tcl
7     }
8     set mMode 0
9
10     if {![info exists debug]} {
11         if {[lindex $sessionParms 1] == "1"} {
12             set debug 1
13         } else {
14             set debug 0
15         }
16     }
17     set html3 [lindex $sessionParms 0]
18     if {[string length $html3] == 0} {
19         if {![info exists env(HTTP_USER_AGENT)]} {
20             set html3 1
21         } elseif {[string first Mozilla $env(HTTP_USER_AGENT)] == 0} {
22             set html3 1
23             egw_log debug "New user using Netscape"
24         } else {
25             set html3 0
26             egw_log debug "New user Not using Netscape"
27         }
28     }
29 }
30 <head>
31 <title> Europagate, WWW/Z39.50 Gateway </title>
32 </head>
33 <body>
34 {
35     set useIcons 1
36
37     button-europagate
38     if {[info exists nextSetNo]} {
39         button-view-history 1
40     }
41     button-define-target 0
42     html "<h2>Choose a target</h2><br>\n"
43     html "<dl>\n"
44
45     proc targetsCmp {l r} {
46         global targets
47         return [string compare [string tolower [lindex $targets($l) 0]] \
48                                [string tolower [lindex $targets($r) 0]]]
49     }
50     set tt [array names targets]
51     set tn [lsort -command targetsCmp $tt]
52     foreach t $tn {
53         html {<dt><a href="http:} $env(SCRIPT_NAME) /
54         html "$sessionId/query.egw;/$t" {"> } [lindex $targets($t) 0] " </a>\n"
55         set desc [lindex $targets($t) 4]
56         if {$desc != ""} {
57             html "<dd>$desc\n"
58         }
59     }
60     html "</dl><br>\n"
61     set useIcons 0
62     button-europagate 
63     if {[info exists nextSetNo]} {
64         button-view-history 1
65     }
66     button-define-target 0
67 }
68 {
69     catch maintenance
70     global debug
71     if {!$debug} return
72     html "<hr>\n"
73     html "<h3>Debug information</h3>\n"
74     html "sessionId: $sessionId <br>\n"
75     html "sessionParms: $sessionParms <br>\n"
76     foreach n [array names env] {
77         html "env($n) = " $env($n) " <br>\n"
78     }
79 }
80 </body>
81 </html>