X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=www%2Fsearch.egw;h=587e94d392dd9aac820ff5684ff9e5a41d951f31;hb=ce3ef5c24347417e973e9e6739466dfc701fe19d;hp=26fce8de8c2143e6af4747fb040db09807c841d5;hpb=cbf0ef7549f996f4d96f41c6dafa76dc17dd7782;p=egate.git
diff --git a/www/search.egw b/www/search.egw
index 26fce8d..587e94d 100644
--- a/www/search.egw
+++ b/www/search.egw
@@ -1,254 +1,303 @@
{
-# $Id: search.egw,v 1.5 1995/10/31 16:56:24 adam Exp $
+# $Id: search.egw,v 1.25 1996/01/08 08:42:17 adam Exp $
-proc search-response {} {
+proc start-scan {scanNo cache dir} {
+ global sessionId
+ global sessionParms
global sessionWait
+ global setNo
+ global hist
+ global targets
+ global nextSetNo
+ global env
+ global useIcons
+ global debug
- set status [z39.1 responseStatus]
- if {[lindex $status 0] == "NSD"} {
- z39.1 nextResultSetPosition 0
- set code [lindex $status 1]
- set msg [lindex $status 2]
- set addinfo [lindex $status 3]
- htmlr {Error} $code {: } $msg {: } $addinfo {
}
- set sessionWait -2
+ set host $hist($setNo,host)
+
+ html "
\n" + display-scan $setNo $scanNo 0 + html "
\n"
- set type [$zset type $no]
- if {$type == "SD"} {
- set err [lindex [$zset diag $no] 1]
- set add [lindex [$zset diag $no] 2]
- if {$add != {}} {
- set add " :${add}"
- }
- htmlr "${no} Error ${err}${add}
"
- return
+ button-europagate
+
+ html {}
+ if {$useIcons} {
+ html {}
+ } else {
+ html {Previous Terms | }
}
- if {$type != "DB"} {
- return
+
+ html {}
+ if {$useIcons} {
+ html {}
+ } else {
+ html {Next Terms | }
}
- html "${no} "
- set rtype [$zset recordType $no]
- if {$rtype == "SUTRS"} {
- html [join [$zset getSutrs $no]]
- htmlr {
}
- return
- }
- if {![catch {
- set title [lindex [$zset getMarc $no field 245 * a] 0]
- set year [lindex [$zset getMarc $no field 260 * c] 0]
- } ] } {
- html { } $title {}
- html " ${year} "
+ html {}
+ button-new-query 0 $setNo
+
+ if {!$debug} return
+ html "
\n" + button-europagate + if {$setMax < [z39.$setNo resultCount]} { + html {} + } else { + html {">Next Records} " | \n" } - htmlr "
\n" } -proc display-rec {from to} { - while {$from <= $to} { - display-brief z39.1 $from - incr from + if {[info commands saveState] == ""} { + source z39util.tcl } -} + global sessionWait + global nextSetNo + global setNo + global hist -proc build-query {} { - global targets - global t - - set op {} - set q {} - for {set i 1} {$i < 4} {incr i} { - set term [wform entry$i] - if {$term != ""} { - set field [wform menu$i] - foreach x [lindex $targets($t) 2] { - if {[lindex $x 0] == $field} { - set attr [lindex $x 1] - } - } - switch $op { - And - { set q "@and $q ${attr} ${term}" } - Or - { set q "@or $q ${attr} ${term}" } - {And not} - { set q "@not $q ${attr} ${term}" } - {} - { set q "${attr} ${term}" } - } - set op [wform logic$i] + set setNo [lindex $sessionParms 0] + + if {[wform] != ""} { + set hist($nextSetNo,idAuthentication) $hist($setNo,idAuthentication) + set hist($nextSetNo,host) $hist($setNo,host) + + if {$nextSetNo == $setNo} { + set setNo $nextSetNo + incr nextSetNo + } else { + catch {unset hist($setNo,hits)} } - } - return $q -} + set hist($setNo,scan) 0 - global sessionWait - global host + set hist($setNo,form,menu1) [wform menu1] + set hist($setNo,form,menu2) [wform menu2] + set hist($setNo,form,menu3) [wform menu3] - set newHost $sessionParms - set databases [lindex $targets($newHost) 1] + set hist($setNo,form,entry1) [wform entry1] + set hist($setNo,form,entry2) [wform entry2] + set hist($setNo,form,entry3) [wform entry3] - htmlr {