0) $nameoffile = substr($nameoffile, 0, -1*($ext_len+1)); return $nameoffile; } /* This function takes in the file name and retruns its extention */ function returnFileEXT($nameoffile) { global $debug_info; $all = explode(".", $nameoffile); $ext = $all[count($all)-1]; return ($ext == $nameoffile) ? '' : strtolower($ext); } if (!empty($_GET)) extract($_GET, EXTR_OVERWRITE); include "Date.inc.php"; $Kick_time = strtotime(date('Y-m-d', strtotime($Kick_DATE))); $Comp_time = strtotime($Comp_DATE); $Comp_days = round(($Comp_time - $Kick_time)/(24 * 60 * 60)); //the number of days between kickstart and competition $days_left = $Comp_days - $i; //the number of days not yet shown $KickStart_Date = date("m-d", $Kick_time); $Competition_Date = date("m-d", $Comp_time); $Easter_Day_Date = date("m-d", strtotime($Easter_DATE)); $Pancake_Day_Date = date("m-d", strtotime($Easter_DATE." -47 days")); $then = strtotime("$Kick_DATE, +$i days"); //the 'current' date: the one that the page is showing $now = strtotime("now"); $time_left = strtotime($Kick_DATE) - $now; if($time_left <= 0) $then = $Comp_time; $long_date_format = "Y-m-d; l j F Y H:i:s (a)"; $debug_info .= "\$then=$then (".date($long_date_format, $then)."),
\$now=$now (".date($long_date_format, $now)."),
\$Comp_days=$Comp_days,
\$days_left=$days_left\n
\n"; $time_per_slide = round($time_left / ($days_left+1) ); $print_date = date("l j F", $then); $date = date("m-d", $then); if($no) $yes = 0; $image_array = array("Autumn0.jpg","Autumn1.jpg","Autumn2.jpg","Autumn3.jpg","Autumn4.jpg", "Autumn5.jpg","Autumn6.jpg","Autumn7.jpg","Autumn8.jpg","Autumn9.jpg","Autumn10.jpg", "Winter0.jpg","Winter1.jpg","Winter2.jpg","Xmas1.gif","Exam0.jpg","Find_X.jpg","Exam1.jpg", "Spring0.jpg","Spring1.jpg","Half_Term.jpg","Exam_Results.gif","Spring2.jpg","Spring3.jpg", "Spring4.jpg","Spring5.jpg","Spring6.jpg","Easter.jpg","Spring7.jpg","Spring8.jpg","Spring9.jpg"); $image = $image_array[floor($i/7)]; switch ($date) { case $KickStart_Date: $addon = " (Today)"; break; case "10-31": $addon = " (Halloween)"; $image = "Halloween.jpg"; break; case "11-05": $addon = " (Bonfire Night)"; $image = "Bonfire.jpg"; break; case "12-24": $addon = " (Christmas Eve)"; $image = "Xmas_Eve.jpg"; break; case "12-25": $addon = " (Christmas Day)"; $image = "Xmas_Day.gif"; break; case "12-26": $addon = " (Boxing Day)"; $image = "Xmas_Day.gif"; break; case "12-31": $addon = " (New Year's Eve)"; $image = "NY_Eve.jpg"; break; case "01-01": $addon = " (New Year's Day)"; $image = "NY_Day.jpg"; break; case $Pancake_Day_Date: $addon = " (Pancake Day)"; $image = "Pancake.jpg"; break; case $Easter_Day_Date: $addon = " (Easter Day)"; $image = "Easter_Day.jpg"; break; case $Competition_Date: $addon = " (Competition Day)"; $image = "Competition.jpg"; break; default: $addon = ""; break; } // add the " (Custom)" generated by the resize tool // $image = returnFileName($image)." (Custom).".returnFileEXT($image); // find the size of the image // spit: the width and height of the image list($width, $height, $type, $attr) = getimagesize($image); ?> " /> Six Months in 1 Hour: <?php echo $date.$addon; ?> );">


" title="">Previous    " title="">    " title="">Next