X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;ds=sidebyside;f=www%2Fsearch.egw;h=ebd2e66fdfb411cedbe2a5496e77367392ecaa0a;hb=6315a552d51ac08b60d25d8500da5574a83ba530;hp=bfb64bd266767041c013b2634210a35754c0f41b;hpb=150d836eb46d0dde8fedeb77fc7fd4ef6eafba4f;p=egate.git
diff --git a/www/search.egw b/www/search.egw
index bfb64bd..ebd2e66 100644
--- a/www/search.egw
+++ b/www/search.egw
@@ -1,228 +1,37 @@
{
-# $Id: search.egw,v 1.7 1995/11/02 16:35:36 adam Exp $
+# $Id: search.egw,v 1.10 1995/11/08 12:42:17 adam Exp $
-proc search-response {sno} {
- global sessionWait
-
- set status [z39.$sno responseStatus]
- if {[lindex $status 0] == "NSD"} {
- z39.$sno 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
- } else {
- set sessionWait 1
- }
-}
-
-proc ok-response {} {
- global sessionWait
- set sessionWait 1
-}
-
-proc fail-response {} {
- global sessionWait
- set sessionWait -1
-}
-
-proc display-brief {zset no} {
- global env
- global setNo
+proc buttons {setNo setMax startPos} {
global sessionId
-
- 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
- }
- if {$type != "DB"} {
- return
- }
- 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} "
- }
- htmlr {
}
-}
-
-proc display-full {zset no} {
- 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 "
\n"
+ if {$setMax < [z39.$setNo resultCount]} {
+ html { Next } "| \n"
}
- z39 callback ok-response
- z39 failback fail-response
- if {$oldHost != $host} {
- catch {z39 disconnect}
-
- html "Connecting to target " $host "
\n"
- set sessionWait 0
- if {[catch {z39 connect $host}]} {
- htmlr "Cannot connect to target ${host}
"
- htmlr "