<html>
{
-# $Id: showfull.egw,v 1.1 1995/10/31 16:56:24 adam Exp $
+# $Id: showfull.egw,v 1.7 1995/11/09 15:24:37 adam Exp $
- htmlr {<head><title> WWW/Z39.50 Gateway Record } $host { </title>}
- htmlr {</head><body>}
- wflush
+proc buttons {setNo no format} {
+ global sessionId
+ global env
+ global hist
- set no $sessionParms
+ html "<p>\n"
+ if {$no < [z39.$setNo resultCount]} {
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/showfull.egw/} $setNo + [expr $no + 1] + $format
+ html {"> Next record </a>} "| \n"
+ }
+ if {$no > 1} {
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/showfull.egw/} $setNo + [expr $no - 1] + $format
+ html {"> Previous record </a>} "| \n"
+ }
- display-full z39.1 $no
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/showfull.egw/} $setNo + $no +
+ if {$format == "full"} {
+ html raw {">Raw format</a>} "| \n"
+ } else {
+ html full {">Full format</a>} "| \n"
+ }
+
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/search.egw/} $setNo + 1
+ html + $hist($setNo,maxPresent)
+ html {"> Result </a>} "| \n"
+
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/targets.egw"> New target </a>} " | \n"
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/query.egw/} $hist($setNo,host) + $setNo
+ html {"> New query </a>} "<p>\n"
+
+}
+
+ if {[info commands saveState] == ""} {
+ source z39util.tcl
+ }
+
+ html "<head><title> WWW/Z39.50 Gateway Record " $host " </title>\n"
+ html "</head><body>\n"
+
+ global setNo
+ global hist
+
+ set sno [lindex $sessionParms 0]
+ set no [lindex $sessionParms 1]
+ set format [lindex $sessionParms 2]
+
+ set setNo $sno
+
+ if {[z39search $setNo 0] != "1"} {
+ return
+ }
+ set total [z39.$setNo resultCount]
+ html "<h2>Record \#$no out of $total </h2><br>\n"
+
+ buttons $setNo $no $format
+
+ eval {z39present $setNo $no $no display-$format}
+ buttons $setNo $no $format
}
</body>
</html>