rlm@11
|
1 #!/usr/bin/perl
|
rlm@11
|
2
|
rlm@11
|
3
|
rlm@11
|
4 use File::Find;
|
rlm@11
|
5 use Set::Object;
|
rlm@11
|
6 use List::Util 'shuffle';
|
rlm@11
|
7
|
rlm@11
|
8 use Image::Size;
|
rlm@11
|
9
|
rlm@11
|
10 $header = <<HERE;
|
rlm@11
|
11 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
rlm@11
|
12 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
rlm@11
|
13 <head>
|
rlm@11
|
14 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
rlm@11
|
15
|
rlm@11
|
16 <title>Judy Yates - Prints</title>
|
rlm@11
|
17
|
rlm@11
|
18
|
rlm@11
|
19 <!--(E)2 Gallery Pro <head> Files-->
|
rlm@11
|
20 <!--(E)2 Gallery Config FIle-->
|
rlm@11
|
21 <!--End (E)2 Gallery Config FIle-->
|
rlm@11
|
22 <!--(E)2 Gallery Style Sheet Link-->
|
rlm@11
|
23
|
rlm@11
|
24 <link href="firetest.css" rel="stylesheet" type="text/css" />
|
rlm@11
|
25
|
rlm@11
|
26 <link href="e2gallerypro/design/e2gallerypro/design.css" rel="stylesheet" type="text/css" />
|
rlm@11
|
27
|
rlm@11
|
28 <script type="text/javascript">
|
rlm@11
|
29 //modify this path if needed ^ Correlates with Style Sheet Path above
|
rlm@11
|
30 var designPath="e2gallerypro/design/e2gallerypro/";
|
rlm@11
|
31 </script>
|
rlm@11
|
32 <!--End (E)2 Gallery Style Sheet Link-->
|
rlm@11
|
33
|
rlm@11
|
34 <!--Mootools-->
|
rlm@11
|
35 <script type="text/javascript" src="e2gallerypro/js/mootools-1.2-core.js"></script>
|
rlm@11
|
36 <script type="text/javascript" src="e2gallerypro/js/mootools-1.2-more.js"></script>
|
rlm@11
|
37 <!--End Mootools-->
|
rlm@11
|
38 <!--(E)2 Gallery Javascript-->
|
rlm@11
|
39
|
rlm@11
|
40 <script type="text/javascript" src="e2gallerypro/js/setupvars.js"></script>
|
rlm@11
|
41 <script type="text/javascript">
|
rlm@11
|
42 var imagesloaded = new Array();
|
rlm@11
|
43 var maingalleries = new Array();
|
rlm@11
|
44 <!--(E)2 Gallery Parse XML output Javascript-->
|
rlm@11
|
45 HERE
|
rlm@11
|
46 ;
|
rlm@11
|
47
|
rlm@11
|
48
|
rlm@11
|
49 $footer = <<HERE
|
rlm@11
|
50 <!--End (E)2 Gallery Parse XML output Javascript-->
|
rlm@11
|
51 </script> <script type="text/javascript" src="e2gallerypro/js/e2gallerypro.js"></script>
|
rlm@11
|
52
|
rlm@11
|
53 <!--End (E)2 Gallery Javascript-->
|
rlm@11
|
54 <!--End (E)2 Gallery Pro </head> Files-->
|
rlm@11
|
55 </head>
|
rlm@11
|
56 <body>
|
rlm@11
|
57
|
rlm@11
|
58
|
rlm@11
|
59
|
rlm@11
|
60 <Title>
|
rlm@11
|
61 Judy Yates -- Wildlife and Pets on Stone
|
rlm@11
|
62 </title>
|
rlm@11
|
63
|
rlm@11
|
64 <span>
|
rlm@11
|
65 <img src = "./album_pics/3_logo.jpg">
|
rlm@11
|
66 </span>
|
rlm@11
|
67
|
rlm@11
|
68 <div class = "menu">
|
rlm@11
|
69 <ul class = "menu">
|
rlm@11
|
70 <li class = "menu"><a class = "menu" href = "index.html">Home</a></li>
|
rlm@11
|
71 <li class = "menu"><a class = "menu" href = "gallery1.html">Gallery</a></li>
|
rlm@11
|
72 <li class = "menu"><a class = "menu" href = "recent_sales.html">Prints</a></li>
|
rlm@11
|
73 <li class = "menu"><a class = "menu" href = "feedback.html">Feedback</a></li>
|
rlm@11
|
74 <li class = "menu"><a class = "menu" href = "hto.html">Orders</a></li>
|
rlm@11
|
75 <li class = "menu"><a class = "menu" href = "pricing.html">Pricing</a></li>
|
rlm@11
|
76 <li class = "menu"><a class = "menu" href = "Meet the Artist2.html"> Meet the Artist</a></li>
|
rlm@11
|
77 <li class = "menu"><a class = "menu" href = "Contact.html"> Contact</a></li>
|
rlm@11
|
78 <li class = "menu"><a class = "menu" href = "pets1.html">Pets</a></li>
|
rlm@11
|
79
|
rlm@11
|
80 </ul>
|
rlm@11
|
81 </div>
|
rlm@11
|
82
|
rlm@11
|
83 <div class = "orangebox">
|
rlm@11
|
84
|
rlm@11
|
85
|
rlm@11
|
86
|
rlm@11
|
87
|
rlm@11
|
88 <!--(E)2 Gallery Pro HTML-->
|
rlm@11
|
89 <div id="gallerywrapper">
|
rlm@11
|
90 <div id="gallery">
|
rlm@11
|
91 <!--Loading Bar-->
|
rlm@11
|
92 <div id="loading">
|
rlm@11
|
93 <div id="loadingbar"><img src="e2gallerypro/design/e2gallerypro/loading_hill.gif" width="50" height="50" alt="" id="bar" /></div>
|
rlm@11
|
94 </div>
|
rlm@11
|
95 <!--End Loading Bar-->
|
rlm@11
|
96 <!--Previous Button Div-->
|
rlm@11
|
97 <div id="previous"></div>
|
rlm@11
|
98
|
rlm@11
|
99 <!--End Previous Button Div-->
|
rlm@11
|
100 <!--Next Button Div-->
|
rlm@11
|
101 <div id="next"></div>
|
rlm@11
|
102 <!--End Next Button Div-->
|
rlm@11
|
103 <!--Main Image Holder Div-->
|
rlm@11
|
104 <div id="images">
|
rlm@11
|
105 <div id="imagewrap">
|
rlm@11
|
106 <div id="imgloader"></div>
|
rlm@11
|
107 </div>
|
rlm@11
|
108
|
rlm@11
|
109 <div id="imageinfo">
|
rlm@11
|
110 <div id="infoloader"></div>
|
rlm@11
|
111 </div>
|
rlm@11
|
112 <div id="smallmessage"></div>
|
rlm@11
|
113 </div>
|
rlm@11
|
114 <!--End Main Image Holder Div-->
|
rlm@11
|
115 <!--Thumb Box Div-->
|
rlm@11
|
116 <div id="thumbbox">
|
rlm@11
|
117 <div id="thumbleft"></div>
|
rlm@11
|
118
|
rlm@11
|
119 <div id="thumbright"></div>
|
rlm@11
|
120 <div id="thumbnails">
|
rlm@11
|
121 <div id="thumbnailwrap"></div>
|
rlm@11
|
122 </div>
|
rlm@11
|
123 </div>
|
rlm@11
|
124 <!--End Thumb Box Div-->
|
rlm@11
|
125 <!--For Sale Box Div-->
|
rlm@11
|
126 <div id="fsbox"></div>
|
rlm@11
|
127 <!--End For Sale Box Div-->
|
rlm@11
|
128
|
rlm@11
|
129 <!--Galleries Holder Div-->
|
rlm@11
|
130 <div id="galleries">
|
rlm@11
|
131 <div id="controls">
|
rlm@11
|
132 <div class="right"><img src="./e2gallerypro/design/e2gallerypro/gallery_view.png" class="controls" rel=" " id="opengallery" title="View Galleries" border="0" /> <img src="e2gallerypro/design/e2gallerypro/infobox.png" id="showinfo" rel=" " class="controls" title="View Info" border="0" /> <img src="e2gallerypro/design/e2gallerypro/thumbbox.png" id="showthumbbox" title="Toggle Thumbs" class="controls" rel=" " border="0" /></div>
|
rlm@11
|
133 <span id="slideshow"><img src="e2gallerypro/design/e2gallerypro/play.png" title="Play Slideshow" border="0" align="absmiddle" class="controls" rel=" " /></span> | <span id="photoNum"></span><span id="flashNum"></span><span id="qtNum"></span></div>
|
rlm@11
|
134 <div id="galleryset"> </div>
|
rlm@11
|
135
|
rlm@11
|
136 </div>
|
rlm@11
|
137 <!--End Galleries Holder Div-->
|
rlm@11
|
138 <!--Thumbnail Pop Up Holder-->
|
rlm@11
|
139 <div id="thumbnailPopUp"></div>
|
rlm@11
|
140 <!--End Thumbnail Pop Up Holder-->
|
rlm@11
|
141 </div>
|
rlm@11
|
142 </div>
|
rlm@11
|
143
|
rlm@11
|
144
|
rlm@11
|
145
|
rlm@11
|
146
|
rlm@11
|
147
|
rlm@11
|
148 </div>
|
rlm@11
|
149
|
rlm@11
|
150 <div class = "menu">
|
rlm@11
|
151 <ul class = "menu">
|
rlm@11
|
152 <li class = "menu"><a class = "menu" href = "index.html">Home</a></li>
|
rlm@11
|
153 <li class = "menu"><a class = "menu" href = "gallery1.html">Gallery</a></li>
|
rlm@11
|
154 <li class = "menu"><a class = "menu" href = "recent_sales.html">Prints</a></li>
|
rlm@11
|
155 <li class = "menu"><a class = "menu" href = "feedback.html">Feedback</a></li>
|
rlm@11
|
156 <li class = "menu"><a class = "menu" href = "hto.html">Orders</a></li>
|
rlm@11
|
157 <li class = "menu"><a class = "menu" href = "pricing.html">Pricing</a></li>
|
rlm@11
|
158 <li class = "menu"><a class = "menu" href = "Meet the Artist2.html"> Meet the Artist</a></li>
|
rlm@11
|
159 <li class = "menu"><a class = "menu" href = "Contact.html"> Contact</a></li>
|
rlm@11
|
160 <li class = "menu"><a class = "menu" href = "pets1.html">Pets</a></li>
|
rlm@11
|
161
|
rlm@11
|
162 </ul>
|
rlm@11
|
163 </div>
|
rlm@11
|
164
|
rlm@11
|
165
|
rlm@11
|
166 <div class = "copyright"><br><br>Copyright © 2007 Robert McIntyre. All pictures Copyright © Judy Yates.<br>Special thanks to Dylan Holmes for designing the main banner.</div>
|
rlm@11
|
167
|
rlm@11
|
168
|
rlm@11
|
169
|
rlm@11
|
170
|
rlm@11
|
171 </body>
|
rlm@11
|
172
|
rlm@11
|
173
|
rlm@11
|
174 </html>
|
rlm@11
|
175 HERE
|
rlm@11
|
176 ;
|
rlm@11
|
177
|
rlm@11
|
178
|
rlm@11
|
179
|
rlm@11
|
180 $pics = Set::Object->new();
|
rlm@11
|
181
|
rlm@11
|
182 open PHOTOS, '>/home/r/Desktop/web/judyates/photos.html';
|
rlm@11
|
183 select PHOTOS;
|
rlm@11
|
184
|
rlm@11
|
185
|
rlm@11
|
186 @include =
|
rlm@11
|
187 (
|
rlm@11
|
188 '/home/r/Desktop/web/judyates/e2gallerypro/e2upload/Galleries/photos/large'
|
rlm@11
|
189 );
|
rlm@11
|
190
|
rlm@11
|
191
|
rlm@11
|
192 find(\&accept_type,@include); #grab all the jpeg files
|
rlm@11
|
193
|
rlm@11
|
194 @pics = $pics->elements();
|
rlm@11
|
195
|
rlm@11
|
196 #@pics = shuffle(@pics);
|
rlm@11
|
197
|
rlm@11
|
198
|
rlm@11
|
199 foreach $id(0..$#pics)
|
rlm@11
|
200
|
rlm@11
|
201 {
|
rlm@11
|
202
|
rlm@11
|
203 $pics[$id] =~ m/(.*\/)([^\/]*)$/;
|
rlm@11
|
204 $lrgpath = $1;
|
rlm@11
|
205 $src = $2;
|
rlm@11
|
206 $lrgpath =~ m/^(.*\/)[^\/]*\/$/;
|
rlm@11
|
207 $path = $1;
|
rlm@11
|
208 $thumbPath = $path."thumbs/";
|
rlm@11
|
209 $filetype = "image";
|
rlm@11
|
210
|
rlm@11
|
211 ($width, $height) = imgsize($path.$src);
|
rlm@11
|
212
|
rlm@11
|
213 ($lrgwidth, $lrgheight) = imgsize($lrgpath.$src);
|
rlm@11
|
214
|
rlm@11
|
215
|
rlm@11
|
216 $title = $src;
|
rlm@11
|
217 $author = 'Judy Yates';
|
rlm@11
|
218 $copyright = 'Copyright Judy Yates Artist 2010';
|
rlm@11
|
219 $description = $src;
|
rlm@11
|
220 $forsale = "true";
|
rlm@11
|
221 $paytype ='paypal';
|
rlm@11
|
222
|
rlm@11
|
223
|
rlm@11
|
224 $price1 = '25';
|
rlm@11
|
225 $pricecurrency1 = 'USD';
|
rlm@11
|
226 $pricecurrencysymbol1 = '$';
|
rlm@11
|
227 $pricesize1 = '16inx20in';
|
rlm@11
|
228 $numOfPrices = 1;
|
rlm@11
|
229 $imgid = $id;
|
rlm@11
|
230
|
rlm@11
|
231
|
rlm@11
|
232 $megaString[$id]= "
|
rlm@11
|
233
|
rlm@11
|
234 {
|
rlm@11
|
235 'filetype' : '$filetype',
|
rlm@11
|
236 'path' : '$path',
|
rlm@11
|
237 'src' : '$src',
|
rlm@11
|
238 'width' : '$width',
|
rlm@11
|
239 'height' : '$height',
|
rlm@11
|
240 'lrgwidth' : '$lrgwidth',
|
rlm@11
|
241 'lrgheight' : '$lrgheight',
|
rlm@11
|
242 'lrgpath' : '$lrgpath',
|
rlm@11
|
243 'title' : '$title',
|
rlm@11
|
244 'author' : '$author',
|
rlm@11
|
245 'copyright' : '$copyright',
|
rlm@11
|
246 'description' : '$description',
|
rlm@11
|
247 'forsale' : $forsale,
|
rlm@11
|
248 'paytype' : '$paytype',
|
rlm@11
|
249 'price1' : '$price1',
|
rlm@11
|
250 'pricecurrency1' : '$pricecurrency1',
|
rlm@11
|
251 'pricecurrencysymbol1' : '$pricecurrencysymbol1',
|
rlm@11
|
252 'pricesize1' : '$pricesize1',
|
rlm@11
|
253 'numOfPrices' : '$numOfPrices',
|
rlm@11
|
254 'imgid' : $imgid,
|
rlm@11
|
255 },
|
rlm@11
|
256
|
rlm@11
|
257 ";
|
rlm@11
|
258
|
rlm@11
|
259 #print "@megaString";
|
rlm@11
|
260
|
rlm@11
|
261
|
rlm@11
|
262 #`$command2`;
|
rlm@11
|
263
|
rlm@11
|
264 }
|
rlm@11
|
265
|
rlm@11
|
266
|
rlm@11
|
267
|
rlm@11
|
268
|
rlm@11
|
269 $maingalleries = "
|
rlm@11
|
270 maingalleries =
|
rlm@11
|
271 [
|
rlm@11
|
272 {'name':'Judy Yates Photos',
|
rlm@11
|
273 'imgpath': '$path',
|
rlm@11
|
274 'lrgpath': '$lrgpath',
|
rlm@11
|
275 'thumbpath': '$thumbPath',
|
rlm@11
|
276 'mainthumb': '$path',
|
rlm@11
|
277 'src':'mainthumb.jpg',
|
rlm@11
|
278 'description':'Awesome Photos From Judy Yates.',
|
rlm@11
|
279 'start':0, 'end':$imgid,
|
rlm@11
|
280 'gallerynum':1}
|
rlm@11
|
281 ];
|
rlm@11
|
282
|
rlm@11
|
283
|
rlm@11
|
284 var galleryimages = new Array();
|
rlm@11
|
285
|
rlm@11
|
286 ";
|
rlm@11
|
287
|
rlm@11
|
288
|
rlm@11
|
289 print $header;
|
rlm@11
|
290
|
rlm@11
|
291
|
rlm@11
|
292 $maingalleries =~ s#/home/r/Desktop/web/judyates/#./#g;
|
rlm@11
|
293
|
rlm@11
|
294
|
rlm@11
|
295 print $maingalleries."\n";
|
rlm@11
|
296
|
rlm@11
|
297 print "galleryimages = [\n";
|
rlm@11
|
298
|
rlm@11
|
299 for (@megaString) {
|
rlm@11
|
300 s#/home/r/Desktop/web/judyates/#./#g;
|
rlm@11
|
301 print;}
|
rlm@11
|
302
|
rlm@11
|
303 print "\n];\n";
|
rlm@11
|
304
|
rlm@11
|
305 print $footer;
|
rlm@11
|
306
|
rlm@11
|
307
|
rlm@11
|
308
|
rlm@11
|
309
|
rlm@11
|
310
|
rlm@11
|
311
|
rlm@11
|
312
|
rlm@11
|
313 sub accept_type
|
rlm@11
|
314 {
|
rlm@11
|
315
|
rlm@11
|
316 /.svn$/ and $File::Find::prune = 1;
|
rlm@11
|
317
|
rlm@11
|
318 /.jpg$/i and $pics->insert($File::Find::name);
|
rlm@11
|
319
|
rlm@11
|
320
|
rlm@11
|
321
|
rlm@11
|
322
|
rlm@11
|
323 }
|
rlm@11
|
324
|