Mercurial > judyates
view 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 |
line wrap: on
line source
2 @dogs = qw (4 san_photo010(small).jpg5 san_photo011(small).jpg6 san_photo012(small).jpg7 san_photo013(small).jpg8 san_photo014(small).jpg9 san_photo015(small).jpg10 san_photo016(small).jpg11 san_photo017(small).jpg12 san_photo018(small).jpg13 san_photo019(small).jpg14 san_photo020(small).jpg15 san_photo021(small).jpg16 san_photo022(small).jpg17 san_photo023(small).jpg18 san_photo024(small).jpg19 san_photo025(small).jpg20 san_photo026(small).jpg21 san_photo027(small).jpg22 san_photo028(small).jpg23 san_photo029(small).jpg24 san_photo030(small).jpg25 san_photo031(small).jpg26 san_photo032(small).jpg27 san_photo033(small).jpg28 san_photo034(small).jpg29 san_photo035(small).jpg30 san_photo036(small).jpg31 san_photo037(small).jpg32 san_photo038(small).jpg33 san_photo039(small).jpg34 san_photo040(small).jpg35 san_photo041(small).jpg36 san_photo042(small).jpg37 san_photo045(small).jpg38 san_photo046(small).jpg39 san_photo047(small).jpg40 san_photo048(small).jpg41 san_photo049(small).jpg42 san_photo050(small).jpg43 san_photo051(small).jpg44 san_photo055(small).jpg45 san_photo056(small).jpg46 san_photo057(small).jpg47 san_photo058(small).jpg48 );50 @dogs1 = qw(52 san_photo01053 san_photo01154 san_photo01255 san_photo01356 san_photo01457 san_photo01558 san_photo01659 san_photo01760 san_photo01861 san_photo01962 san_photo02063 san_photo02164 san_photo02265 san_photo02366 san_photo02467 san_photo02568 san_photo02669 san_photo02770 san_photo02871 san_photo02972 san_photo03073 san_photo03174 san_photo03275 san_photo03376 san_photo03477 san_photo03578 san_photo03679 san_photo03780 san_photo03881 san_photo03982 san_photo04083 san_photo04184 san_photo04285 san_photo04586 san_photo04687 san_photo04788 san_photo04889 san_photo04990 san_photo05091 san_photo05192 san_photo05593 san_photo05694 san_photo05795 san_photo05896 );98 @cats = qw(101 san_photo001(small).jpg102 san_photo002(small).jpg103 san_photo003(small).jpg104 san_photo004(small).jpg105 san_photo005(small).jpg106 san_photo039(small).jpg107 san_photo051(small).jpg108 san_photo052(small).jpg109 san_photo053(small).jpg110 san_photo054(small).jpg111 );113 @cats1 = qw(114 san_photo001115 san_photo002116 san_photo003117 san_photo004118 san_photo005119 san_photo0xx120 san_photo0x2121 san_photo052122 san_photo053123 san_photo054124 );128 @horses = qw(130 san_photo006(small).jpg131 san_photo007(small).jpg132 san_photo008(small).jpg133 san_photo009(small).jpg134 );136 @horses1 = qw(137 san_photo006138 san_photo007139 san_photo008140 san_photo009141 );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 <title>Pet Portrait Gallery</title>170 <head>171 <link rel="stylesheet" type="text/css"172 href="firetest.css"> </link>173 </head>174 <body>175 <span>176 <img src = "./album_pics/3_logo.jpg"></img> <span class = "vcenter"></span>177 </span>178 HERE179 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 HERE193 $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 THERE225 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 THERE245 }