X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=www%2Fquery.egw;h=fec5af11ceecf80a48dd37435b4391a773f78d8b;hb=25db261b6bbbfcc7bc26f679f195b51d31b9d7d7;hp=a8db8ff559bc3761285cb6a81fed47656096cc37;hpb=0d7108cd3425504a09522f915dda5c9158443084;p=egate.git diff --git a/www/query.egw b/www/query.egw index a8db8ff..fec5af1 100644 --- a/www/query.egw +++ b/www/query.egw @@ -4,7 +4,7 @@ { -# $Id: query.egw,v 1.28 1996/01/12 13:08:28 adam Exp $ +# $Id: query.egw,v 1.34 1996/02/29 15:41:39 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl @@ -40,61 +40,72 @@ proc ok-response {} { set hist($setNo,host) $host set hist($setNo,idAuthentication) [lindex $targets($host) 3] - if {[catch {z39 failback fail-response}]} { - ir z39 - } + mkAssoc z39 $host - html "

Search in " [lindex $targets($host) 0] "

\n" z39 callback ok-response z39 failback fail-response - if {$host != $oldHost} { + set thisHost [splitHostSpec $host] + if {[string compare $thisHost $oldHost]} { catch {z39 disconnect} set sessionWait 0 - if {[catch {z39 connect $host}]} { - displayError "Cannot connect to target ${host}" {} + if {[catch {z39 connect $thisHost}]} { + displayError "Cannot connect to target ${thisHost}" {} html "\n" z39 disconnect - wabort + egw_abort } elseif {$sessionWait == 0} { - if {[catch {zwait sessionWait 35}]} { - displayError "Cannot connect to target ${host}" {} + if {[catch {egw_wait sessionWait 35}]} { + displayError "Cannot connect to target ${thisHost}" {} html "\n" z39 disconnect - wabort + egw_abort } if {$sessionWait != 1} { - displayError "Cannot connect to target ${host}" {} + displayError "Cannot connect to target ${thisHost}" {} html "\n" z39 disconnect - wabort + egw_abort } } set sessionWait 0 z39 idAuthentication $hist($setNo,idAuthentication) if {[catch {z39 init}]} { - displayError "Cannot initialize target ${host}" {} + displayError "Cannot initialize target ${thisHost}" {} html "\n" - wabort + egw_abort } - if {[catch {zwait sessionWait 60}]} { - displayError "Cannot initialize target ${host}" {} + if {$sessionWait == 0 && [catch {egw_wait sessionWait 60}]} { + displayError "Cannot initialize target ${thisHost}" {} html "\n" - wabort + egw_abort } if {$sessionWait != "1"} { - displayError "Cannot initialize target ${host}" {} - htmlr "\n" - wabort + displayError "Cannot initialize target ${thisHost}" {} + html "\n" + egw_abort } if {![z39 initResult]} { - displayError "Connection rejected by target ${host}" \ + displayError "Connection rejected by target ${thisHost}" \ [z39 userInformationField] z39 disconnect - htmlr "" - wabort + html "\n" + egw_abort } } + + set useIcons 1 + button-europagate + button-new-target 1 + if {[lsearch [z39 options] scan] >= 0} { + button-scan-window 1 $setNo + } + button-view-history 0 + + html "

" [lindex $targets($host) 0] "


\n" + + html [lindex $targets($host) 4] "
\n" + set databases [lindex $targets($host) 1] if {$initSet == ""} { @@ -128,8 +139,8 @@ proc ok-response {} { html { All
} \n } - html "Input your search criteria:
\n" } + html "Input your search criteria:
\n" set fields [lindex $targets($host) 2] for {set no 1} {$no < 4} {incr no} { html {} + html {} } - html "
\n" if {$no < 3} { - html {
} \n set template {} if {$oSetNo > 0} { set template [join $hist($oSetNo,form,logic$no) " "] @@ -174,7 +184,7 @@ proc ok-response {} { if {$template == $op} continue html "
\n" + html "\n" } html "
\n" } @@ -192,15 +202,12 @@ proc ok-response {} { html 20 } html {" size=4>} -} - -

+ html "\n" + html "

\n" -{ + set useIcons 0 button-europagate - button-new-target 1 - if {[lsearch [z39 options] scan] >= 0} { button-scan-window 1 $setNo } @@ -218,7 +225,7 @@ proc ok-response {} { foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} { html $e {: } $env($e) {
} \n } - html "form: " [wform] "
\n" + html "form: " [egw_form] "
\n" html "target: " $host "
\n" html "databases: " $databases "
\n" html "setNo: " $setNo "
\n" @@ -228,5 +235,3 @@ proc ok-response {} { html "scanTerm: " $scanTerm "
\n" } - -