view perl/pets.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

2 @dogs = qw (
4 san_photo010(small).jpg
5 san_photo011(small).jpg
6 san_photo012(small).jpg
7 san_photo013(small).jpg
8 san_photo014(small).jpg
9 san_photo015(small).jpg
10 san_photo016(small).jpg
11 san_photo017(small).jpg
12 san_photo018(small).jpg
13 san_photo019(small).jpg
14 san_photo020(small).jpg
15 san_photo021(small).jpg
16 san_photo022(small).jpg
17 san_photo023(small).jpg
18 san_photo024(small).jpg
19 san_photo025(small).jpg
20 san_photo026(small).jpg
21 san_photo027(small).jpg
22 san_photo028(small).jpg
23 san_photo029(small).jpg
24 san_photo030(small).jpg
25 san_photo031(small).jpg
26 san_photo032(small).jpg
27 san_photo033(small).jpg
28 san_photo034(small).jpg
29 san_photo035(small).jpg
30 san_photo036(small).jpg
31 san_photo037(small).jpg
32 san_photo038(small).jpg
33 san_photo039(small).jpg
34 san_photo040(small).jpg
35 san_photo041(small).jpg
36 san_photo042(small).jpg
37 san_photo045(small).jpg
38 san_photo046(small).jpg
39 san_photo047(small).jpg
40 san_photo048(small).jpg
41 san_photo049(small).jpg
42 san_photo050(small).jpg
43 san_photo051(small).jpg
44 san_photo055(small).jpg
45 san_photo056(small).jpg
46 san_photo057(small).jpg
47 san_photo058(small).jpg
48 );
50 @dogs1 = qw(
52 san_photo010
53 san_photo011
54 san_photo012
55 san_photo013
56 san_photo014
57 san_photo015
58 san_photo016
59 san_photo017
60 san_photo018
61 san_photo019
62 san_photo020
63 san_photo021
64 san_photo022
65 san_photo023
66 san_photo024
67 san_photo025
68 san_photo026
69 san_photo027
70 san_photo028
71 san_photo029
72 san_photo030
73 san_photo031
74 san_photo032
75 san_photo033
76 san_photo034
77 san_photo035
78 san_photo036
79 san_photo037
80 san_photo038
81 san_photo039
82 san_photo040
83 san_photo041
84 san_photo042
85 san_photo045
86 san_photo046
87 san_photo047
88 san_photo048
89 san_photo049
90 san_photo050
91 san_photo051
92 san_photo055
93 san_photo056
94 san_photo057
95 san_photo058
96 );
98 @cats = qw(
101 san_photo001(small).jpg
102 san_photo002(small).jpg
103 san_photo003(small).jpg
104 san_photo004(small).jpg
105 san_photo005(small).jpg
106 san_photo039(small).jpg
107 san_photo051(small).jpg
108 san_photo052(small).jpg
109 san_photo053(small).jpg
110 san_photo054(small).jpg
111 );
113 @cats1 = qw(
114 san_photo001
115 san_photo002
116 san_photo003
117 san_photo004
118 san_photo005
119 san_photo0xx
120 san_photo0x2
121 san_photo052
122 san_photo053
123 san_photo054
124 );
128 @horses = qw(
130 san_photo006(small).jpg
131 san_photo007(small).jpg
132 san_photo008(small).jpg
133 san_photo009(small).jpg
134 );
136 @horses1 = qw(
137 san_photo006
138 san_photo007
139 san_photo008
140 san_photo009
141 );
145 &make_page(1,"cats");
146 &make_page(2,"dogs");
147 &make_page(3,"horses");
151 sub make_page{
154 $page = $_[0];
155 $arr = $_[1];
157 @names = @{$arr};
159 @namess = @{$arr."1"};
164 open FILE, ">../pets$page.html";
165 select FILE;
167 print <<HERE;
168 <html>
169 <head>
170 <title>Pet Portrait Gallery</title>
171 <link rel="stylesheet" type="text/css" href="firetest.css"> </link>
172 <script type="text/javascript" src="/js/google_analytics.js"></script>
173 </head>
174 <body>
175 <span>
176 <img src = "./album_pics/3_logo.jpg"></img> <span class = "vcenter"></span>
177 </span>
178 HERE
179 open MENU, "<../menu.html";
180 while (<MENU>){print;}
181 close MENU;
183 print <<HERE;
184 <table>
189 <table cellpadding="0" cellspacing="0" width="640">
191 HERE
193 $menux = '<div class = "menu"><ul class = "menu"><li class = "menu"><a class = "menu" href = "./pets1.html">( Cats</a></li><li class = "menu"><a class = "menu" href = "./pets2.html">Dogs</a></li><li class = "menu"><a class = "menu" href = "./pets3.html">Horses )</a></li></ul></div>';
194 print "<tr><td>$menux</td></tr></table>";
197 $start = 0;
198 $end = $#namess;
199 print '<table cellpadding="0" cellspacing="20px" width="640">';
201 foreach($start..$end){
202 #print "\n\n****".($_%3)."****\n\n";
203 if (($_%3 )== 0){print '<tr>'; }
204 print '<td>';
205 $name = $names[$_];
206 $namess = $namess[$_];
207 print '<a href ="artwork_descriptions/'.$namess.'.html" class = "gallery"> <img class = "gallery" src = "album_pics/'.$name.'" width = "200"></img></a>'."\n";
208 print '</td>';
209 if (($_%3) == 2){print '</tr>'; }
211 }
214 print <<THERE;
219 </table>
222 </table>
223 THERE
225 if (open TXT, "<../texts/pets$page.txt"){
226 while (<TXT>){print;}
227 close TXT;
228 }
232 open MENU, "<../menu.html";
233 while (<MENU>){print;}
234 close MENU;
236 print <<THERE;
237 </body>
238 </html>
242 THERE
245 }