<html>
{
-# $Id: showfull.egw,v 1.4 1995/11/07 14:56:59 adam Exp $
+# $Id: showfull.egw,v 1.7 1995/11/09 15:24:37 adam Exp $
+
+proc buttons {setNo no format} {
+ global sessionId
+ global env
+ global hist
+
+ 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"
+ }
+
+ 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
set sno [lindex $sessionParms 0]
set no [lindex $sessionParms 1]
+ set format [lindex $sessionParms 2]
set setNo $sno
}
set total [z39.$setNo resultCount]
html "<h2>Record \#$no out of $total </h2><br>\n"
-}
-{
- if {$no < [z39.$setNo resultCount]} {
- html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/showfull.egw/} $setNo + [expr $no + 1]
- html {"> Next </a>} "| \n"
- }
- if {$no > 0} {
- html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/showfull.egw/} $setNo + [expr $no - 1]
- html {"> Prev </a>} "| \n"
- }
- html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/search.egw/} $setNo + 1
- html + [expr $hist($setNo,maxPresent) - 1]
- html {"> Result </a>} "| \n"
-
- html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/targets.egw"> New target </a>} " | \n"
- html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/query.egw/} $host + $setNo {"> New query </a>}
-}
+ buttons $setNo $no $format
-{
- z39present $setNo $no $no display-full
-}
-<hr>
-{
- if {$no < [z39.$setNo resultCount]} {
- html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/showfull.egw/} $setNo + [expr $no + 1]
- html {"> Next </a>} "| \n"
- }
- if {$no > 0} {
- html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/showfull.egw/} $setNo + [expr $no - 1]
- html {"> Prev </a>} "| \n"
- }
- html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/search.egw/} $setNo + 1
- html + [expr $hist($setNo,maxPresent) - 1]
- html {"> Result </a>} "| \n"
-
- html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/targets.egw"> New target </a>} " | \n"
- html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/query.egw/} $host + $setNo {"> New query </a>}
+ eval {z39present $setNo $no $no display-$format}
+ buttons $setNo $no $format
}
-
</body>
</html>