X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=www%2Fmsearch.egw;h=5544a3c2080592314d58760e3b9b3188a629261d;hb=8bafbc608e1ffba9ee87f4856e586dffa57901b8;hp=08f5ea697fb560ef68a5312c366a1e76ab7016c9;hpb=ebeb5e591b8f1bf6c5045efaddf74f3eee7bdbaf;p=egate.git diff --git a/www/msearch.egw b/www/msearch.egw index 08f5ea6..5544a3c 100644 --- a/www/msearch.egw +++ b/www/msearch.egw @@ -1,9 +1,13 @@ { -# $Id: msearch.egw,v 1.12 1996/01/24 08:27:26 adam Exp $ +# $Id: msearch.egw,v 1.21 1996/03/14 11:50:45 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl + if {![info exists debug]} { + session-lost + egw_abort + } } global sessionWait global nextSetNo @@ -13,9 +17,24 @@ html " WWW/Z39.50 Gateway Search \n" html "\n" + set setNo [lindex $sessionParms 0] - if {[egw_form menu1] != ""} { + if {[llength [egw_form]] > 0} { + if {[string length [egw_form host]] > 0} { + set hist($setNo,0,host) [llength [egw_form host]] + set i 1 + foreach t [egw_form host] { + set hist($setNo,$i,host) $t + set hist($setNo,$i,database) [splitDatabaseSpec $t] + set hist($setNo,$i,idAuthentication) {} + incr i + } + } + if {![info exists hist($setNo,0,host)]} { + displayError {No servers selected} {} + egw_abort + } set hist($nextSetNo,0,host) $hist($setNo,0,host) for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} { set hist($nextSetNo,$i,host) $hist($setNo,$i,host) @@ -29,57 +48,51 @@ for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} { set hist($setNo,$i,query) [build-query $hist($setNo,$i,host) 3] } + + set hist($setNo,scan) 0 + + set hist($setNo,form,menu1) [egw_form menu1] + set hist($setNo,form,menu2) [egw_form menu2] + set hist($setNo,form,menu3) [egw_form menu3] + + set hist($setNo,form,entry1) [egw_form entry1] + set hist($setNo,form,entry2) [egw_form entry2] + set hist($setNo,form,entry3) [egw_form entry3] + + set hist($setNo,form,logic1) [egw_form logic1] + set hist($setNo,form,logic2) [egw_form logic2] + set hist($setNo,form,logic3) {} + set hist($setNo,maxPresent) [egw_form hits] if {$hist($setNo,maxPresent) == ""} { - set hist($setNo,maxPresent) 30 + set hist($setNo,maxPresent) 20 + } + set hist($setNo,format) [egw_form format] + if {![string length $hist($setNo,format)]} { + set hist($setNo,format) brief + } + set hist($setNo,sort) [egw_form sort] + if {![string length $hist($setNo,sort)]} { + set hist($setNo,sort) server } } - z39msearch $setNo 1 B - html "
\n" - set not $hist($setNo,0,host) - for {set i 1} {$i <= $not} {incr i} { - if {$zstatus($i) != 2} continue - html "

" [lindex $targets($hist($setNo,$i,host)) 0] ": " - set status [z39$i.$setNo responseStatus] - if {[lindex $status 0] == "NSD"} { - z39$i.$setNo nextResultSetPosition 0 - set code [lindex $status 1] - set msg [lindex $status 2] - set addinfo [lindex $status 3] - html "Error

\n
NSD$code: $msg: $addinfo" - } else { - set r [z39$i.$setNo resultCount] - html "$r hits\n
\n" - } - html "\n" - } - html "
\n" -} + html "
\n" + z39msearch $setNo B 1 $hist($setNo,maxPresent) 1 -{ - global useIcons + display-result-set-m $setNo - if {$useIcons} { - html {} - } - html {} - } else { - html {"> New target } " | \n" - } - html {} - } else { - html {"> New query } - } + set useIcons 0 + button-main + button-new-query $setNo + button-view-history + button-new-target } { @@ -92,9 +105,10 @@ html $e {: } $env($e) {
} \n } html "form: " [egw_form] "
\n" - html "target: " $host "
\n" html "query: --" $hist($setNo,1,query) "--
\n" html "database: " $hist($setNo,1,database) "
\n" + html "sort: " $hist($setNo,sort) "
\n" + html "format: " $hist($setNo,format) "
\n" html "setNo: " $setNo "
\n" html "nextSetNo: " $nextSetNo "
\n" }