- source /usr/local/etc/httpd/conf/ztargets.conf
- foreach t [array names targets] {
- htmlr "<dt> <a href=\"http://localhost/cgi-bin/egwcgi/egwtcl/query.egw/$t\"> $t </a>"
- htmlr "<dd> " [lindex $targets($t) 0]
+ set scriptQuery query.egw
+ set scriptTarget targets.egw
+
+ set useIcons 1
+
+ button-main
+ if {[info exists nextSetNo]} {
+ button-view-history
+ }
+ button-define-target
+ html "<h2>Select a target</h2><br>\n"
+ html "<dl>\n"
+
+ if {1} {
+ proc headlineC {h} {
+ html {<dt><h2>} $h \n {</h2>}
+ }
+ 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></b>}
+
+ html {<dd>}
+ set desc [lindex $targets($t) 4]
+ if {[string length $desc] > 0} {
+ html "$desc<br>\n"
+ }
+ 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"
+ }
+ }
+ }
+ html "</dl><br>\n"
+ set useIcons 0
+ button-main
+ if {[info exists nextSetNo]} {
+ button-view-history
+ }
+ button-define-target
+}
+{
+ catch maintenance
+ global debug
+ if {!$debug} return
+ html "<hr>\n"
+ html "<h3>Debug information</h3>\n"
+ html "sessionId: $sessionId <br>\n"
+ html "sessionParms: $sessionParms <br>\n"
+ foreach n [array names env] {
+ html "env($n) = " $env($n) " <br>\n"