Mercurial > judyates
diff perl/pets.pl @ 0:60668cf4f443 judyates
[svn r1] initial import
author | rlm |
---|---|
date | Sun, 03 Jan 2010 04:38:50 -0500 |
parents | |
children | b6ba604307fc |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/perl/pets.pl Sun Jan 03 04:38:50 2010 -0500 1.3 @@ -0,0 +1,245 @@ 1.4 + 1.5 +@dogs = qw ( 1.6 + 1.7 +san_photo010(small).jpg 1.8 +san_photo011(small).jpg 1.9 +san_photo012(small).jpg 1.10 +san_photo013(small).jpg 1.11 +san_photo014(small).jpg 1.12 +san_photo015(small).jpg 1.13 +san_photo016(small).jpg 1.14 +san_photo017(small).jpg 1.15 +san_photo018(small).jpg 1.16 +san_photo019(small).jpg 1.17 +san_photo020(small).jpg 1.18 +san_photo021(small).jpg 1.19 +san_photo022(small).jpg 1.20 +san_photo023(small).jpg 1.21 +san_photo024(small).jpg 1.22 +san_photo025(small).jpg 1.23 +san_photo026(small).jpg 1.24 +san_photo027(small).jpg 1.25 +san_photo028(small).jpg 1.26 +san_photo029(small).jpg 1.27 +san_photo030(small).jpg 1.28 +san_photo031(small).jpg 1.29 +san_photo032(small).jpg 1.30 +san_photo033(small).jpg 1.31 +san_photo034(small).jpg 1.32 +san_photo035(small).jpg 1.33 +san_photo036(small).jpg 1.34 +san_photo037(small).jpg 1.35 +san_photo038(small).jpg 1.36 +san_photo039(small).jpg 1.37 +san_photo040(small).jpg 1.38 +san_photo041(small).jpg 1.39 +san_photo042(small).jpg 1.40 +san_photo045(small).jpg 1.41 +san_photo046(small).jpg 1.42 +san_photo047(small).jpg 1.43 +san_photo048(small).jpg 1.44 +san_photo049(small).jpg 1.45 +san_photo050(small).jpg 1.46 +san_photo051(small).jpg 1.47 +san_photo055(small).jpg 1.48 +san_photo056(small).jpg 1.49 +san_photo057(small).jpg 1.50 +san_photo058(small).jpg 1.51 + ); 1.52 + 1.53 +@dogs1 = qw( 1.54 + 1.55 +san_photo010 1.56 +san_photo011 1.57 +san_photo012 1.58 +san_photo013 1.59 +san_photo014 1.60 +san_photo015 1.61 +san_photo016 1.62 +san_photo017 1.63 +san_photo018 1.64 +san_photo019 1.65 +san_photo020 1.66 +san_photo021 1.67 +san_photo022 1.68 +san_photo023 1.69 +san_photo024 1.70 +san_photo025 1.71 +san_photo026 1.72 +san_photo027 1.73 +san_photo028 1.74 +san_photo029 1.75 +san_photo030 1.76 +san_photo031 1.77 +san_photo032 1.78 +san_photo033 1.79 +san_photo034 1.80 +san_photo035 1.81 +san_photo036 1.82 +san_photo037 1.83 +san_photo038 1.84 +san_photo039 1.85 +san_photo040 1.86 +san_photo041 1.87 +san_photo042 1.88 +san_photo045 1.89 +san_photo046 1.90 +san_photo047 1.91 +san_photo048 1.92 +san_photo049 1.93 +san_photo050 1.94 +san_photo051 1.95 +san_photo055 1.96 +san_photo056 1.97 +san_photo057 1.98 +san_photo058 1.99 +); 1.100 + 1.101 +@cats = qw( 1.102 + 1.103 + 1.104 +san_photo001(small).jpg 1.105 +san_photo002(small).jpg 1.106 +san_photo003(small).jpg 1.107 +san_photo004(small).jpg 1.108 +san_photo005(small).jpg 1.109 +san_photo039(small).jpg 1.110 +san_photo051(small).jpg 1.111 +san_photo052(small).jpg 1.112 +san_photo053(small).jpg 1.113 +san_photo054(small).jpg 1.114 +); 1.115 + 1.116 +@cats1 = qw( 1.117 +san_photo001 1.118 +san_photo002 1.119 +san_photo003 1.120 +san_photo004 1.121 +san_photo005 1.122 +san_photo0xx 1.123 +san_photo0x2 1.124 +san_photo052 1.125 +san_photo053 1.126 +san_photo054 1.127 +); 1.128 + 1.129 + 1.130 + 1.131 +@horses = qw( 1.132 + 1.133 +san_photo006(small).jpg 1.134 +san_photo007(small).jpg 1.135 +san_photo008(small).jpg 1.136 +san_photo009(small).jpg 1.137 +); 1.138 + 1.139 +@horses1 = qw( 1.140 +san_photo006 1.141 +san_photo007 1.142 +san_photo008 1.143 +san_photo009 1.144 +); 1.145 + 1.146 + 1.147 + 1.148 +&make_page(1,"cats"); 1.149 +&make_page(2,"dogs"); 1.150 +&make_page(3,"horses"); 1.151 + 1.152 + 1.153 + 1.154 +sub make_page{ 1.155 + 1.156 + 1.157 + $page = $_[0]; 1.158 + $arr = $_[1]; 1.159 + 1.160 + @names = @{$arr}; 1.161 + 1.162 + @namess = @{$arr."1"}; 1.163 + 1.164 + 1.165 + 1.166 + 1.167 +open FILE, ">../pets$page.html"; 1.168 +select FILE; 1.169 + 1.170 +print <<HERE; 1.171 +<html> 1.172 +<title>Pet Portrait Gallery</title> 1.173 +<head> 1.174 +<link rel="stylesheet" type="text/css" 1.175 +href="firetest.css"> </link> 1.176 +</head> 1.177 +<body> 1.178 +<span> 1.179 +<img src = "./album_pics/3_logo.jpg"></img> <span class = "vcenter"></span> 1.180 +</span> 1.181 +HERE 1.182 +open MENU, "<../menu.html"; 1.183 +while (<MENU>){print;} 1.184 +close MENU; 1.185 + 1.186 +print <<HERE; 1.187 +<table> 1.188 + 1.189 + 1.190 + 1.191 + 1.192 +<table cellpadding="0" cellspacing="0" width="640"> 1.193 + 1.194 +HERE 1.195 + 1.196 +$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>'; 1.197 +print "<tr><td>$menux</td></tr></table>"; 1.198 + 1.199 + 1.200 +$start = 0; 1.201 +$end = $#namess; 1.202 +print '<table cellpadding="0" cellspacing="20px" width="640">'; 1.203 + 1.204 +foreach($start..$end){ 1.205 + #print "\n\n****".($_%3)."****\n\n"; 1.206 + if (($_%3 )== 0){print '<tr>'; } 1.207 + print '<td>'; 1.208 + $name = $names[$_]; 1.209 + $namess = $namess[$_]; 1.210 + print '<a href ="artwork_descriptions/'.$namess.'.html" class = "gallery"> <img class = "gallery" src = "album_pics/'.$name.'" width = "200"></img></a>'."\n"; 1.211 + print '</td>'; 1.212 + if (($_%3) == 2){print '</tr>'; } 1.213 + 1.214 + } 1.215 + 1.216 + 1.217 +print <<THERE; 1.218 + 1.219 + 1.220 + 1.221 + 1.222 +</table> 1.223 + 1.224 + 1.225 +</table> 1.226 +THERE 1.227 + 1.228 +if (open TXT, "<../texts/pets$page.txt"){ 1.229 + while (<TXT>){print;} 1.230 +close TXT; 1.231 +} 1.232 + 1.233 + 1.234 + 1.235 +open MENU, "<../menu.html"; 1.236 +while (<MENU>){print;} 1.237 +close MENU; 1.238 + 1.239 +print <<THERE; 1.240 +</body> 1.241 +</html> 1.242 + 1.243 + 1.244 + 1.245 +THERE 1.246 + 1.247 + 1.248 +} 1.249 \ No newline at end of file