blob: 38b980e5d3006eeb380273c62393e698ce5ec528 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#!/depot/path/tclsh
# This is a CGI script that shows how to do simple images.
package require cgi
cgi_eval {
source example.tcl
cgi_title "Images"
set NIST_IMAGES http://www.nist.gov/images
cgi_imglink ball $NIST_IMAGES/ball.gif alt=ball
cgi_imglink birdies $NIST_IMAGES/brd-ln.gif alt=birdies
cgi_imglink daemon $NIST_IMAGES/bsd_daemon.gif "alt=Kirk McKusick's BSD daemon"
# use white background because some of these images require it
cgi_body bgcolor=#ffffff text=#00b0b0 {
p "Here are some birdies:[cgi_imglink birdies]"
p "and here is your basic ball [cgi_imglink ball] and here is
the BSD daemon [cgi_imglink daemon]."
p "I like using the same picture"
p "[cgi_imglink ball] over"
p "[cgi_imglink ball] and over"
p "[cgi_imglink ball] and over"
p "[cgi_imglink ball] so I use the cgi_imglink command to make it easy."
proc ball {} {return [cgi_imglink ball]}
p "[cgi_imglink birdies]"
p "[ball]I can make it even easier [ball] by making a ball
procedure [ball] which I've just done. [ball] You could
tell, eh? [ball]"
}
}
|