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";
$then = strtotime("$Kick_DATE, +$i day"); //the 'current' date
$now = strtotime("now");
$time_left = $then - $now;
$debug_info .= "\$then=$then (".date("Y-m-d; l j F Y", $then)."), \$now=$now (".date("Y-m-d; l j F Y", $now).")\n
\n";
$time_per_slide = round($time_left / 206);
$print_date = date("l j F", $then);
$date = date("m-d", $then);
$KickStart_Date = date("m-d", strtotime($Kick_DATE));
$Competition_Date = date("m-d", strtotime($Comp_DATE));
$Easter_Day_Date = date("m-d", strtotime($Easter_DATE));
$Pancake_Day_Date = date("m-d", strtotime($Easter_DATE." -47 days"));
$number_of_days = 1+(strtotime($Comp_DATE) - strtotime($Kick_DATE))/(24*60*60);
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","Xmas1.gif","Winter1.jpg","Winter2.jpg","Exam0.jpg","Find_X.jpg","Exam1.jpg",
"Spring0.jpg","Spring1.jpg","Half_Term.jpg","Exam_Results.gif","Spring2.jpg","Spring3.jpg",
"Spring4.jpg","Easter.jpg","Spring5.jpg","Spring6.jpg","Spring7.jpg","Spring8.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 "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);
?>
|
if($no) {?>" title="">Previous } ?> " title=""> echo ($no ? "Continue" : "Pause") ?> if($no) {?> " title="">Next } ?> |
|