0) { /* $fh = fopen($filename,"r"); $data = fread($fh,filesize($filename)); echo "
" . $data . "
"; fclose($fh); */ $dte=strtotime('last Sunday'); if (date("l")=="Thursday" || date("l")=="Friday" || date("l")=="Saturday") $dte=strtotime('last Sunday')+(60 * 60 * 24 * 7); if (date("l",$dte) != "Sunday") $dte=strtotime('last Sunday')+(60 * 60 * 24 * 8); if (date("l")=="Sunday") $dte=strtotime('today'); $wkdate=date("Ymd",$dte); $bname='nofile'; $icnt=1; while (!file_exists($bname) || $icnt==4) { $icnt++; $bname="../pdf/Emails/".$wkdate.".pdf"; $dte=strtotime($wkdate)-(60 * 60 * 24 * 7); $wkdate=date("Ymd",$dte); } //echo "
$bname\n
"; /* echo '

Alternative text - include a link to the PDF!

'; */ echo '

Alternative text - include a link to the PDF!

'; } else { echo "
 
"; } ?>