Improved history.
[egate.git] / www / targets.egw
1 <html>
2 {
3 # $Id: targets.egw,v 1.11 1996/01/03 15:19:50 adam Exp $
4     source /usr/local/etc/httpd/conf/ztargets.conf
5     if {[info commands saveState] == ""} {
6         source z39util.tcl
7     }
8 }
9 <head>
10 <title> Europagate, WWW/Z39.50 Gateway </title>
11 </head>
12 <body>
13 <h2>Choose Z39.50 target</h2><br>
14 <dl>
15 {
16     if {![info exists debug]} {
17         if {[lindex $sessionParms 0] == "1"} {
18             set debug 1
19         } else {
20             set debug 0
21         }
22     }
23
24     if {![info exists useIcons]} {
25         if {[lindex $sessionParms 1] == "1"} {
26             set useIcons 0
27         } else {
28             set useIcons 1
29         }
30     }
31     proc targetsCmp {l r} {
32         global targets
33         return [string compare [string tolower [lindex $targets($l) 0]] \
34                                [string tolower [lindex $targets($r) 0]]]
35     }
36     set tt [array names targets]
37     set tn [lsort -command targetsCmp $tt]
38     foreach t $tn {
39         html {<dt><a href="http:} $env(SCRIPT_NAME) /
40         html "$sessionId/query.egw/$t" {"> } [lindex $targets($t) 0] " </a>\n"
41         set desc [lindex $targets($t) 4]
42         if {$desc != ""} {
43             html "<dd><em>$desc</em>\n"
44         }
45     }
46 }
47 </dl>
48
49 {
50     button-europagate
51     button-view-history 0
52 }
53
54 {
55     catch maintenance
56     global debug
57     if {!$debug} return
58     html "<hr>\n"
59     html "<h3>Debug information</h3>\n"
60     html "sessionId: $sessionId <br>\n"
61     html "sessionParms: $sessionParms <br>\n"
62     foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} {
63         html $e {: } $env($e) {<br>} \n
64     }
65 }
66 </body>
67 </html>