{ # $Id: mquery.egw,v 1.16 1996/03/14 11:50:45 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl if {![info exists debug]} { session-lost egw_abort } } global setNo global nextSetNo global hist global targets if {[catch {set setNo $nextSetNo}]} { set nextSetNo 1 set setNo 1 } html { WWW/Z39.50 Gateway Query Form} set useIcons 1 button-main button-new-target html {
} \n set phost {} set i 0 foreach t [lsort [egw_form target]] { set host [lindex $t 0] set base [lindex $t 1] if {$host != $phost} { set phost $host incr i set hist($setNo,$i,host) $host set hist($setNo,$i,idAuthentication) [lindex $targets($host) 3] } lappend hist($setNo,$i,database) $base } set oSetNo [lindex $sessionParms 0] if {$oSetNo < 0} { set oSetNo 0 } if {$i == 0 && $oSetNo && [info exists hist($oSetNo,0,host)]} { for {set i 1} {$i <= $hist($oSetNo,0,host)} {incr i} { set hist($setNo,$i,host) $hist($oSetNo,$i,host) set hist($setNo,$i,idAuthentication) \ $hist($oSetNo,$i,idAuthentication) set hist($setNo,$i,database) $hist($oSetNo,$i,database) } incr i -1 } if {$i == 0} { html "

No targets specified

" egw_abort 1 } set curSort server set curFormat brief if {$oSetNo} { set curSort $hist($oSetNo,sort) set curFormat $hist($oSetNo,format) } set hist($setNo,0,host) $i html "Fill-in this search form:
\n" set fields [lindex $targets($host) 2] for {set no 1} {$no < 4} {incr no} { html {\n" html {} \n if {$no < 3} { html {\n" } html "
\n" } html {} html "
\n" html {Display each record in notation" html { and sort by
\n" set useIcons 0 button-main button-new-target } { catch maintenance if {!$debug} return html "
\n" html "

Debug information

\n" html "sessionId: $sessionId
\n" html "sessionParms: $sessionParms
\n" foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} { html $e {: } $env($e) {
} \n } set j $hist($setNo,0,host) for {set i 1} {$i <= $j} {incr i} { html "host=" $hist($setNo,$i,host) " " $hist($setNo,$i,database) html "
\n" } html "form: " [egw_form] "
\n" html "target: " $host "
\n" html "setNo: " $setNo "
\n" html "nextSetNo: " $nextSetNo "
\n" }