paulae |
Oct 1, 2009 08:21 AM |
I didn't change the code itself while messing with whether the plugin was active or not....
Code:
<?php
$totalPics="30"; // Total photos in folder
$photoOfTheDay = Array ( // Add up to 31 photos below
'1' => '/ads/weichert/0701Janet.jpg', // Name of or Path to image
'2' => '/ads/weichert/0620Rita.jpg', // Name of or Path to image
'3' => '/ads/weichert/0621JenMarsh.jpg',
'4' => '/ads/weichert/0615Mary.jpg',
'5' => '/ads/weichert/0705Jay.jpg',
'6' => '/ads/weichert/0706Barbara.jpg',
'7' => '/ads/weichert/0707Dottie.jpg',
'8' => '/ads/weichert/0620Rita.jpg',
'9' => '/ads/weichert/0621JenMarsh.jpg',
'10' => '/ads/weichert/0615Mary.jpg',
'11' => '/ads/weichert/0705Jay.jpg',
'12' => '/ads/weichert/0706Barbara.jpg',
'13' => '/ads/weichert/0707Dottie.jpg',
'14' => '/ads/weichert/0914Dottie.jpg',
'15' => '/ads/weichert/0915Barbara.jpg',
'16' => '/ads/weichert/0916Jay.jpg',
'17' => '/ads/weichert/0917Rita.jpg',
'18' => '/ads/weichert/0918Mary.jpg',
'19' => '/ads/weichert/0919Janet.jpg',
'20' => '/ads/weichert/0920Jen.jpg',
'21' => '/ads/weichert/0914Dottie.jpg',
'22' => '/ads/weichert/0915Barbara.jpg',
'23' => '/ads/weichert/0916Jay.jpg',
'24' => '/ads/weichert/0917Rita.jpg',
'25' => '/ads/weichert/0918Mary.jpg',
'26' => '/ads/weichert/0919Janet.jpg',
'27' => '/ads/weichert/0920Jen.jpg',
'28' => '/ads/weichert/0914Dottie.jpg',
'29' => '/ads/weichert/0915Barbara.jpg',
'30' => '/ads/weichert/0916Jay.jpg',
);
$linkOfTheDay = Array (
'1' => 'http://rosejanetdemasi.weichertagentpages.com/', // Name of or Path to image
'2' => 'http://ritamarsh.weichertagentpages.com/', // Name of or Path to image
'3' => 'http://www.larchmont-homes.com/about-jennifer-marsh.htm',
'4' => 'http://www.larchmontmanorhomes.com/',
'5' => 'http://jaydollinger.weichertagentpages.com/',
'6' => 'http://barbarabarber.weichertagentpages.com/',
'7' => 'http://www.weichert.com/NY/Westchester/Larchmont/',
'8' => 'http://ritamarsh.weichertagentpages.com/',
'9' => 'http://www.larchmont-homes.com/about-jennifer-marsh.htm',
'10' => 'http://www.larchmontmanorhomes.com/',
'11' => 'http://jaydollinger.weichertagentpages.com/',
'12' => 'http://barbarabarber.weichertagentpages.com/',
'13' => 'http://www.larchmontgazette.com/',
'14' => 'http://www.larchmontgazette.com/',
'15' => 'http://barbarabarber.weichertagentpages.com/',
'16' => 'http://jaydollinger.weichertagentpages.com/',
'17' => 'http://ritamarsh.weichertagentpages.com/',
'18' => 'http://www.larchmontmanorhomes.com/',
'19' => 'http://rosejanetdemasi.weichertagentpages.com/',
'20' => 'http://www.larchmont-homes.com/about-jennifer-marsh.htm',
'21' => 'http://www.larchmontgazette.com/',
'22' => 'http://barbarabarber.weichertagentpages.com/',
'23' => 'http://jaydollinger.weichertagentpages.com/',
'24' => 'http://ritamarsh.weichertagentpages.com/',
'25' => 'http://www.larchmontmanorhomes.com/',
'26' => 'http://rosejanetdemasi.weichertagentpages.com/',
'27' => 'http://www.larchmont-homes.com/about-jennifer-marsh.htm',
'28' => 'http://www.larchmontgazette.com/',
'29' => 'http://barbarabarber.weichertagentpages.com/',
'30' => 'http://jaydollinger.weichertagentpages.com/',
);
// published at: scripts.tropicalpcsolutions.com
// Place day of month in variable 'x'
//$x=date("d");
// A website vistor made a suggestion to change the date function to use j
// instead of d. This causes the date to be read without leading zeros.
$x=date("j"); //Thanks for the suggestion Andrew
// If value of date exceeds the amount of photos then pick a random photo to display
if($x > $totalPics) { $x=rand(1,$totalPics); }
$ad_image = '';
$ad_image = '<a href=' . $linkOfTheDay[$x] . '><img src=' . $photoOfTheDay[$x] . '></a>';
// Display image
//echo "potd=" . $photoOfTheDay[$x] . "</ br>";
//echo "lotd=" . $linkOfTheDay[$x] . "</ br>";
//echo "x=" . $x . "</ br>";
echo "<center> " . $ad_image . " </center>" ;
?>
|