A lot of work on scan. Tables used to display scan terms and hits.
[egate.git] / www / showfull.egw
1 <html>
2 {
3 # $Id: showfull.egw,v 1.17 1996/01/26 15:50:09 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-europagate
13     if {$no < $count} {
14         html {<a href="http:} $env(SCRIPT_NAME)
15         html / $sessionId {/showfull.egw/} $setNo + $tno + 
16         html [expr $no + 1] + $format
17         if {$useIcons} {
18             html {"><img src="/egwgif/button-next-record.gif" }
19             html {alt="Next Record" border=0></a>}
20         } else {
21             html {">Next</a>} " | \n"
22         }
23     }
24     if {$no > 1} {
25         html {<a href="http:} $env(SCRIPT_NAME)
26         html / $sessionId {/showfull.egw/} $setNo + $tno +
27         html [expr $no - 1] + $format
28         if {$useIcons} {
29             html {"><img src="/egwgif/button-previous-record.gif" }
30             html {alt="Previous Record" border=0></a>}
31         } else {
32             html {">Previous</a>} " | \n"
33         }
34     }
35
36     html {<a href="http:} $env(SCRIPT_NAME)
37     html / $sessionId {/showfull.egw/} $setNo + $tno + $no +
38     if {$format == "full"} {
39         html raw 
40         if {$useIcons} {        
41             html {"><img src="/egwgif/button-raw-marc.gif" }
42             html {alt="Raw Format" border=0></a>}
43         } else {
44             html {">Raw Format</a>} " | \n"
45         }
46     } else {
47         html full
48         if {$useIcons} {
49             html {"><img src="/egwgif/button-full-format.gif" }
50             html {alt="Full Format" border=0></a>}
51         } else {
52             html {">Full Format</a>} " | \n"
53         }
54     }
55
56     html {<a href="http:} $env(SCRIPT_NAME) / $sessionId 
57     if {$tno > 0} {
58         html {/msearch.egw/} 
59     } else {
60         html {/search.egw/}
61     }
62     html $setNo + 1
63     html + $hist($setNo,maxPresent)
64     if {$useIcons} {
65         html {"><img src="/egwgif/button-result-set.gif" }
66         html {alt="Result Set" border=0></a>}
67     } else {
68         html {">Result Set</a>} " | \n"
69     }
70     html {<a href="http:} $env(SCRIPT_NAME) / $sessionId 
71     if {$tno > 0} {
72         html {/mquery.egw/} 
73     } else {
74         html {/query.egw/} 
75     }
76     html $host + $setNo 
77     if {$useIcons} {
78         html {"><img src="/egwgif/button-new-query.gif" }
79         html {alt="New Query" border=0></a>}
80     } else {
81         html {">New Query</a>} " | \n"
82     }
83     html {<a href="http:} $env(SCRIPT_NAME) / $sessionId 
84     if {$tno > 0} {
85         html {/mtargets.egw} 
86     } else {
87         html {/targets.egw} 
88     }
89     if {$useIcons} {
90         html {"><img src="/egwgif/button-new-target.gif" }
91         html {alt="New Target" border=0></a>}
92     } else {
93         html {">New Target</a>}
94     }
95     html "<p>\n"
96 }
97
98     if {[info commands saveState] == ""} {
99         source z39util.tcl
100     }
101
102     html "<head><title> WWW/Z39.50 Gateway Record " [splitHostSpec $host]
103     html " </title>\n"
104     html "</head><body>\n"
105
106     global setNo
107     global hist
108
109     set sno [lindex $sessionParms 0]
110     set tno [lindex $sessionParms 1]
111     set no [lindex $sessionParms 2]
112     set format [lindex $sessionParms 3]
113
114     set setNo $sno
115
116     if {$tno > 0} {
117         set zz z39$tno
118         set host $hist($setNo,$tno,host)
119     } else {
120         set zz z39
121         set host $hist($setNo,host)
122     }
123     
124     if {[z39search $setNo 0 $tno F] != "1"} {
125         return
126     }
127
128     set count [$zz.$setNo resultCount]
129
130     set useIcons 1
131     buttons $setNo $tno $no $format $count $host 0
132
133     html "<h3>Record \#$no out of $count </h3><br>\n"
134
135     eval {z39present $setNo $tno $no $no display-$format F}
136     set useIcons 0
137     buttons $setNo $tno $no $format $count $host 1
138 }
139 </body>
140 </html>
141