annotate perl/pets.pl @ 16:e902d48caadf judyates

added access.log and error.log
author Robert McIntyre <rlm@mit.edu>
date Tue, 22 Jun 2010 13:41:04 -0400
parents b6ba604307fc
children 903b91a97990
rev   line source
rlm@0 1
rlm@0 2 @dogs = qw (
rlm@0 3
rlm@0 4 san_photo010(small).jpg
rlm@0 5 san_photo011(small).jpg
rlm@0 6 san_photo012(small).jpg
rlm@0 7 san_photo013(small).jpg
rlm@0 8 san_photo014(small).jpg
rlm@0 9 san_photo015(small).jpg
rlm@0 10 san_photo016(small).jpg
rlm@0 11 san_photo017(small).jpg
rlm@0 12 san_photo018(small).jpg
rlm@0 13 san_photo019(small).jpg
rlm@0 14 san_photo020(small).jpg
rlm@0 15 san_photo021(small).jpg
rlm@0 16 san_photo022(small).jpg
rlm@0 17 san_photo023(small).jpg
rlm@0 18 san_photo024(small).jpg
rlm@0 19 san_photo025(small).jpg
rlm@0 20 san_photo026(small).jpg
rlm@0 21 san_photo027(small).jpg
rlm@0 22 san_photo028(small).jpg
rlm@0 23 san_photo029(small).jpg
rlm@0 24 san_photo030(small).jpg
rlm@0 25 san_photo031(small).jpg
rlm@0 26 san_photo032(small).jpg
rlm@0 27 san_photo033(small).jpg
rlm@0 28 san_photo034(small).jpg
rlm@0 29 san_photo035(small).jpg
rlm@0 30 san_photo036(small).jpg
rlm@0 31 san_photo037(small).jpg
rlm@0 32 san_photo038(small).jpg
rlm@0 33 san_photo039(small).jpg
rlm@0 34 san_photo040(small).jpg
rlm@0 35 san_photo041(small).jpg
rlm@0 36 san_photo042(small).jpg
rlm@0 37 san_photo045(small).jpg
rlm@0 38 san_photo046(small).jpg
rlm@0 39 san_photo047(small).jpg
rlm@0 40 san_photo048(small).jpg
rlm@0 41 san_photo049(small).jpg
rlm@0 42 san_photo050(small).jpg
rlm@0 43 san_photo051(small).jpg
rlm@0 44 san_photo055(small).jpg
rlm@0 45 san_photo056(small).jpg
rlm@0 46 san_photo057(small).jpg
rlm@0 47 san_photo058(small).jpg
rlm@0 48 );
rlm@0 49
rlm@0 50 @dogs1 = qw(
rlm@0 51
rlm@0 52 san_photo010
rlm@0 53 san_photo011
rlm@0 54 san_photo012
rlm@0 55 san_photo013
rlm@0 56 san_photo014
rlm@0 57 san_photo015
rlm@0 58 san_photo016
rlm@0 59 san_photo017
rlm@0 60 san_photo018
rlm@0 61 san_photo019
rlm@0 62 san_photo020
rlm@0 63 san_photo021
rlm@0 64 san_photo022
rlm@0 65 san_photo023
rlm@0 66 san_photo024
rlm@0 67 san_photo025
rlm@0 68 san_photo026
rlm@0 69 san_photo027
rlm@0 70 san_photo028
rlm@0 71 san_photo029
rlm@0 72 san_photo030
rlm@0 73 san_photo031
rlm@0 74 san_photo032
rlm@0 75 san_photo033
rlm@0 76 san_photo034
rlm@0 77 san_photo035
rlm@0 78 san_photo036
rlm@0 79 san_photo037
rlm@0 80 san_photo038
rlm@0 81 san_photo039
rlm@0 82 san_photo040
rlm@0 83 san_photo041
rlm@0 84 san_photo042
rlm@0 85 san_photo045
rlm@0 86 san_photo046
rlm@0 87 san_photo047
rlm@0 88 san_photo048
rlm@0 89 san_photo049
rlm@0 90 san_photo050
rlm@0 91 san_photo051
rlm@0 92 san_photo055
rlm@0 93 san_photo056
rlm@0 94 san_photo057
rlm@0 95 san_photo058
rlm@0 96 );
rlm@0 97
rlm@0 98 @cats = qw(
rlm@0 99
rlm@0 100
rlm@0 101 san_photo001(small).jpg
rlm@0 102 san_photo002(small).jpg
rlm@0 103 san_photo003(small).jpg
rlm@0 104 san_photo004(small).jpg
rlm@0 105 san_photo005(small).jpg
rlm@0 106 san_photo039(small).jpg
rlm@0 107 san_photo051(small).jpg
rlm@0 108 san_photo052(small).jpg
rlm@0 109 san_photo053(small).jpg
rlm@0 110 san_photo054(small).jpg
rlm@0 111 );
rlm@0 112
rlm@0 113 @cats1 = qw(
rlm@0 114 san_photo001
rlm@0 115 san_photo002
rlm@0 116 san_photo003
rlm@0 117 san_photo004
rlm@0 118 san_photo005
rlm@0 119 san_photo0xx
rlm@0 120 san_photo0x2
rlm@0 121 san_photo052
rlm@0 122 san_photo053
rlm@0 123 san_photo054
rlm@0 124 );
rlm@0 125
rlm@0 126
rlm@0 127
rlm@0 128 @horses = qw(
rlm@0 129
rlm@0 130 san_photo006(small).jpg
rlm@0 131 san_photo007(small).jpg
rlm@0 132 san_photo008(small).jpg
rlm@0 133 san_photo009(small).jpg
rlm@0 134 );
rlm@0 135
rlm@0 136 @horses1 = qw(
rlm@0 137 san_photo006
rlm@0 138 san_photo007
rlm@0 139 san_photo008
rlm@0 140 san_photo009
rlm@0 141 );
rlm@0 142
rlm@0 143
rlm@0 144
rlm@0 145 &make_page(1,"cats");
rlm@0 146 &make_page(2,"dogs");
rlm@0 147 &make_page(3,"horses");
rlm@0 148
rlm@0 149
rlm@0 150
rlm@0 151 sub make_page{
rlm@0 152
rlm@0 153
rlm@0 154 $page = $_[0];
rlm@0 155 $arr = $_[1];
rlm@0 156
rlm@0 157 @names = @{$arr};
rlm@0 158
rlm@0 159 @namess = @{$arr."1"};
rlm@0 160
rlm@0 161
rlm@0 162
rlm@0 163
rlm@0 164 open FILE, ">../pets$page.html";
rlm@0 165 select FILE;
rlm@0 166
rlm@0 167 print <<HERE;
rlm@0 168 <html>
rlm@0 169 <title>Pet Portrait Gallery</title>
rlm@0 170 <head>
rlm@0 171 <link rel="stylesheet" type="text/css"
rlm@0 172 href="firetest.css"> </link>
rlm@0 173 </head>
rlm@0 174 <body>
rlm@0 175 <span>
rlm@0 176 <img src = "./album_pics/3_logo.jpg"></img> <span class = "vcenter"></span>
rlm@0 177 </span>
rlm@0 178 HERE
rlm@0 179 open MENU, "<../menu.html";
rlm@0 180 while (<MENU>){print;}
rlm@0 181 close MENU;
rlm@0 182
rlm@0 183 print <<HERE;
rlm@0 184 <table>
rlm@0 185
rlm@0 186
rlm@0 187
rlm@0 188
rlm@0 189 <table cellpadding="0" cellspacing="0" width="640">
rlm@0 190
rlm@0 191 HERE
rlm@0 192
rlm@15 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>';
rlm@0 194 print "<tr><td>$menux</td></tr></table>";
rlm@0 195
rlm@0 196
rlm@0 197 $start = 0;
rlm@0 198 $end = $#namess;
rlm@0 199 print '<table cellpadding="0" cellspacing="20px" width="640">';
rlm@0 200
rlm@0 201 foreach($start..$end){
rlm@0 202 #print "\n\n****".($_%3)."****\n\n";
rlm@0 203 if (($_%3 )== 0){print '<tr>'; }
rlm@0 204 print '<td>';
rlm@0 205 $name = $names[$_];
rlm@0 206 $namess = $namess[$_];
rlm@0 207 print '<a href ="artwork_descriptions/'.$namess.'.html" class = "gallery"> <img class = "gallery" src = "album_pics/'.$name.'" width = "200"></img></a>'."\n";
rlm@0 208 print '</td>';
rlm@0 209 if (($_%3) == 2){print '</tr>'; }
rlm@0 210
rlm@0 211 }
rlm@0 212
rlm@0 213
rlm@0 214 print <<THERE;
rlm@0 215
rlm@0 216
rlm@0 217
rlm@0 218
rlm@0 219 </table>
rlm@0 220
rlm@0 221
rlm@0 222 </table>
rlm@0 223 THERE
rlm@0 224
rlm@0 225 if (open TXT, "<../texts/pets$page.txt"){
rlm@0 226 while (<TXT>){print;}
rlm@0 227 close TXT;
rlm@0 228 }
rlm@0 229
rlm@0 230
rlm@0 231
rlm@0 232 open MENU, "<../menu.html";
rlm@0 233 while (<MENU>){print;}
rlm@0 234 close MENU;
rlm@0 235
rlm@0 236 print <<THERE;
rlm@0 237 </body>
rlm@0 238 </html>
rlm@0 239
rlm@0 240
rlm@0 241
rlm@0 242 THERE
rlm@0 243
rlm@0 244
rlm@15 245 }