Major revision. Single-target result set can be reached from the
[egate.git] / www / showfull.egw
1 <html>
2 {
3 # $Id: showfull.egw,v 1.23 1996/03/13 14:07:31 adam Exp $
4
5 proc buttons {setNo tno no format count host after} {
6     global sessionId
7     global useIcons
8     global env
9     global hist
10
11     html "<p>\n"
12     button-main
13     if {$no < $count} {
14         if {!$useIcons} {
15             html "\n | "
16         }
17         html {<a href="http:} $env(SCRIPT_NAME)
18         html / $sessionId {/showfull.egw/} $setNo + $tno + 
19         html [expr $no + 1] + $format
20         if {$useIcons} {
21             html {"><img src="/egwgif/button-next-record.gif" }
22             html {alt="Next Record" border=0></a>}
23         } else {
24             html {">Next</a>}
25         }
26     }
27     if {$no > 1} {
28         if {!$useIcons} {
29             html "\n | "
30         }
31         html {<a href="http:} $env(SCRIPT_NAME)
32         html / $sessionId {/showfull.egw/} $setNo + $tno +
33         html [expr $no - 1] + $format
34         if {$useIcons} {
35             html {"><img src="/egwgif/button-previous-record.gif" }
36             html {alt="Previous Record" border=0></a>}
37         } else {
38             html {">Previous</a>}
39         }
40     }
41
42     if {!$useIcons} {
43         html "\n | "
44     }
45     html {<a href="http:} $env(SCRIPT_NAME)
46     html / $sessionId {/showfull.egw/} $setNo + $tno + $no +
47     if {$format == "full"} {
48         html raw 
49         if {$useIcons} {        
50             html {"><img src="/egwgif/button-raw-marc.gif" }
51             html {alt="Raw Format" border=0></a>}
52         } else {
53             html {">Raw Format</a>}
54         }
55     } else {
56         html full
57         if {$useIcons} {
58             html {"><img src="/egwgif/button-full-format.gif" }
59             html {alt="Full Format" border=0></a>}
60         } else {
61             html {">Full Format</a>}
62         }
63     }
64
65     button-result-set $setNo $tno
66     button-new-query $setNo
67     button-new-target
68     html "<p>\n"
69 }
70
71     if {[info commands saveState] == ""} {
72         source z39util.tcl
73     }
74
75     global setNo
76     global hist
77
78     set sno [lindex $sessionParms 0]
79     set tno [lindex $sessionParms 1]
80     set no [lindex $sessionParms 2]
81     set format [lindex $sessionParms 3]
82
83     set setNo $sno
84
85     set zz z39$tno
86     set host $hist($setNo,$tno,host)
87     
88     html "<head><title> WWW/Z39.50 Gateway Record " [lindex $targets($host) 0]
89     html " </title>\n"
90     html "</head><body>\n"
91
92     if {[z39search $setNo 0 $tno F] != "1"} {
93         return
94     }
95
96     set count [$zz.$setNo resultCount]
97
98     set useIcons 1
99     buttons $setNo $tno $no $format $count $host 0
100
101     html "<h3>Record \#$no out of $count in " [lindex $targets($host) 0]
102     html "</h3><br>\n"
103
104     eval {z39present $setNo $tno $no $no display-$format F}
105     set useIcons 0
106     buttons $setNo $tno $no $format $count $host 1
107 }
108 </body>
109 </html>
110