view perl/pet_descriptions.pl @ 28:118cb614cf18 judyates tip

judy bio.
author Robert McIntyre <rlm@mit.edu>
date Tue, 29 Dec 2015 16:26:18 -0800
parents 903b91a97990
children
line wrap: on
line source
1 %names = qw(
2 san_photo001 cat
3 san_photo002 cat
4 san_photo003 cat
5 san_photo004 cat
6 san_photo005 cat
7 san_photo0xx cat
8 san_photo0x2 cat
9 san_photo052 cat
10 san_photo053 cat
11 san_photo054 cat
12 san_photo010 dog
13 san_photo011 dog
14 san_photo012 dog
15 san_photo013 dog
16 san_photo014 dog
17 san_photo015 dog
18 san_photo016 dog
19 san_photo017 dog
20 san_photo018 dog
21 san_photo019 dog
22 san_photo020 dog
23 san_photo021 dog
24 san_photo022 dog
25 san_photo023 dog
26 san_photo024 dog
27 san_photo025 dog
28 san_photo026 dog
29 san_photo027 dog
30 san_photo028 dog
31 san_photo029 dog
32 san_photo030 dog
33 san_photo031 dog
34 san_photo032 dog
35 san_photo033 dog
36 san_photo034 dog
37 san_photo035 dog
38 san_photo036 dog
39 san_photo037 dog
40 san_photo038 dog
41 san_photo039 dog
42 san_photo040 dog
43 san_photo041 dog
44 san_photo042 dog
45 san_photo045 dog
46 san_photo046 dog
47 san_photo047 dog
48 san_photo048 dog
49 san_photo049 dog
50 san_photo050 dog
51 san_photo051 dog
52 san_photo055 dog
53 san_photo056 dog
54 san_photo057 dog
55 san_photo058 dog
56 san_photo006 horse
57 san_photo007 horse
58 san_photo008 horse
59 san_photo009 horse
60 );
62 @namess = qw
64 (
65 san_photo001
66 san_photo002
67 san_photo003
68 san_photo004
69 san_photo005
70 san_photo0x2
71 san_photo0xx
72 san_photo052
73 san_photo053
74 san_photo054
75 san_photo010
76 san_photo011
77 san_photo012
78 san_photo013
79 san_photo014
80 san_photo015
81 san_photo016
82 san_photo017
83 san_photo018
84 san_photo019
85 san_photo020
86 san_photo021
87 san_photo022
88 san_photo023
89 san_photo024
90 san_photo025
91 san_photo026
92 san_photo027
93 san_photo028
94 san_photo029
95 san_photo030
96 san_photo031
97 san_photo032
98 san_photo033
99 san_photo034
100 san_photo035
101 san_photo036
102 san_photo037
103 san_photo038
104 san_photo039
105 san_photo040
106 san_photo041
107 san_photo042
108 san_photo045
109 san_photo046
110 san_photo047
111 san_photo048
112 san_photo049
113 san_photo050
114 san_photo051
115 san_photo055
116 san_photo056
117 san_photo057
118 san_photo058
119 san_photo006
120 san_photo007
121 san_photo008
122 san_photo009);
124 foreach(0..$#namess){
125 $nnnum = $_;
126 $finla = $namess[$nnnum];
127 $prevla = $namess[$nnnum-1].".html";
128 $nextla = $namess[$nnnum+1].".html";
129 $galnum = int($nnnum/9 + 1);
131 if ($names{$finla} eq "dog"){
132 print "dog";
133 $galname = "Dogs";
134 $galla = "../pets2.html";}
136 if ($names{$finla} eq "cat"){
137 print "cat";
138 $galname = "Cats";
139 $galla = "../pets1.html";}
141 if ($names{$finla} eq "horse"){
142 print "horse";
143 $galname = "Horses";
144 $galla = "../pets3.html";}
148 print "../artwork_descriptions/$finla.html\n" ;
149 open FILE, ">../artwork_descriptions/$finla.html";
153 select FILE;
155 print <<HERE;
156 <html>
157 <head>
158 <title> Gallery of Original Artwork by Judy Yates</title>
159 <link rel="stylesheet" type="text/css" href="../firetest.css" />
160 <script type="text/javascript" src="/js/google_analytics.js"></script>
161 </head>
162 <body>
163 <span>
164 <img src = "../album_pics/3_logo.jpg"></img>
165 </span>
166 HERE
168 open MENU, "<../menu2.html";
169 while (<MENU>){print;}
170 close MENU;
172 print <<HERE;
173 <table cellpadding="0" cellspacing="0" width="740">
176 HERE
178 if($nnnum == 0){
179 print "<tr><td><a class = \"menu\" href = \"$galla\">$galname</a><a class = \"menu\" href = \"$nextla\">Next</a></td></tr><tr><td align = \"center\">";
180 }
182 elsif ($nnnum == $#namess){
184 print "<tr><td><a class = \"menu\" href = \"$prevla\">Previous</a><a class = \"menu\" href = \"$galla\">$galname</a></td></tr><tr><td align = \"center\">";
185 }
187 else {
188 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\">";
189 }
193 print "<img src = \"../images/$finla.jpg\"></img>\n";
195 print <<HERE;
197 </td> </tr>
198 </table>
203 HERE
208 if (open TXT, "<../texts/$finla.txt"){
209 while (<TXT>){print;}
210 close TXT;
211 }
215 open MENU, "<../menu2.html";
216 while (<MENU>){print;}
217 close MENU;
219 print <<HERE;
220 </body>
221 </html>
222 HERE
224 close FILE;
225 select STDOUT; }