<html>
{
-# $Id: targets.egw,v 1.23 1996/03/13 14:07:31 adam Exp $
+# $Id: targets.egw,v 1.27 1996/08/28 09:36:02 adam Exp $
source ztargets.conf
- if {[info commands saveState] == ""} {
- source z39util.tcl
- }
if {![info exists debug]} {
if {[lindex $sessionParms 1] == "1"} {
set debug 1
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 useIcons 1
button-main
+ button-feedback
if {[info exists nextSetNo]} {
button-view-history
}
button-define-target
- html "<h2>Choose a target</h2><br>\n"
+ html "<h2>Select a target</h2><br>\n"
html "<dl>\n"
- proc targetsCmp {l r} {
- global targets
- return [string compare [string tolower [lindex $targets($l) 0]] \
- [string tolower [lindex $targets($r) 0]]]
+ proc headlineC {h} {
+ html {<dt><h2>} $h \n {</h2>}
}
- set tt [array names targets]
- set tn [lsort -command targetsCmp $tt]
- foreach t $tn {
- html {<dt><a href="http:} $env(SCRIPT_NAME) /
+ 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>\n"
+ html {</a></b>}
+
+ html {<dd>}
set desc [lindex $targets($t) 4]
- if {$desc != ""} {
- html "<dd>$desc\n"
+ if {[string length $desc] > 0} {
+ html "$desc<br>\n"
}
+ html "<br>\n"
}
+ serverList headlineC targetC
+
html "</dl><br>\n"
set useIcons 0
button-main
+ button-feedback
if {[info exists nextSetNo]} {
button-view-history
}