view perl/meet_the_artist_descriptions.pl @ 17:46fdf059b154 judyates

preparing to add google analytics
author Robert McIntyre <rlm@mit.edu>
date Mon, 11 Jul 2011 02:43:59 -0400
parents 60668cf4f443
children
line wrap: on
line source
1 @namess = qw(
2 hunting_1
3 hunting_2
4 hunting_3
5 hunting_4
6 hunting_5
7 hunting_6
8 hunting_7
9 hunting_8
10 hunting_9
11 hunting_10
12 hunting_11
13 hunting_12
14 stamp001
15 stamp003
16 stamp005
17 stamp007
18 stamp009
19 stamp011
20 );
23 foreach(0..$#namess){
24 $nnnum = $_;
25 $finla = $namess[$nnnum];
26 $prevla = $namess[$nnnum-1].".html";
27 $nextla = $namess[$nnnum+1].".html";
28 $galnum = int($nnnum/9 + 1);
30 if ($namess[$_]=~/^s/){
31 print "stamp";
32 $galname = "Duck Stamps";
33 $galla = "../Meet the Artist2.html";}
35 if ($namess[$_]=~/^h/){
36 print "hunt";
37 $galname = "Hunting Pics";
38 $galla = "../Meet the Artist1.html";}
43 print "../artwork_descriptions/$finla.html\n" ;
44 open FILE, ">../artwork_descriptions/$finla.html";
48 select FILE;
50 print <<HERE;
51 <html>
52 <title> Gallery of Original Artwork by Judy Yates</title>
53 <head>
54 <link rel="stylesheet" type="text/css"
55 href="../firetest.css" />
56 </head>
57 <body>
58 <span>
59 <img src = "../album_pics/3_logo.jpg"></img>
60 </span>
61 HERE
63 open MENU, "<../menu2.html";
64 while (<MENU>){print;}
65 close MENU;
67 print <<HERE;
68 <table cellpadding="0" cellspacing="0" width="740">
71 HERE
73 if($nnnum == 0){
74 print "<tr><td><a class = \"menu\" href = \"$galla\">$galname</a><a class = \"menu\" href = \"$nextla\">Next</a></td></tr><tr><td align = \"center\">";
75 }
77 elsif ($nnnum == $#namess){
79 print "<tr><td><a class = \"menu\" href = \"$prevla\">Previous</a><a class = \"menu\" href = \"$galla\">$galname</a></td></tr><tr><td align = \"center\">";
80 }
82 else {
83 print "<tr><td><a class = \"menu\" href = \"$prevla\">Previous</a><a class = \"menu\" href = \"$galla\">$galname</a><a class = \"menu\" href = \"$nextla\">Next</a></td></tr><tr><td align=\"center\">";
84 }
88 print "<img src = \"../images/$finla.jpg\"></img>\n";
90 print <<HERE;
92 </td> </tr>
93 </table>
98 HERE
103 if (open TXT, "<../texts/$finla.txt"){
104 while (<TXT>){print;}
105 close TXT;
106 }
110 open MENU, "<../menu2.html";
111 while (<MENU>){print;}
112 close MENU;
114 print <<HERE;
115 </body>
116 </html>
117 HERE
119 close FILE;
120 select STDOUT; }