<?php
/*Skrypt pochodzi z ksi±¿ki "PHP. 101 praktycznych skryptów"
  autor: Marcin Lis                    http://marcinlis.com*/

function dayOfWeekImage()
{
  $dow = date("w");
  switch($dow){
    case 0 : $str = "niedziela";break;
    case 1 : $str = "poniedzialek";break;
    case 2 : $str = "wtorek";break;
    case 3 : $str = "sroda";break;
    case 4 : $str = "czwartek";break;
    case 5 : $str = "piatek";break;
    case 6 : $str = "sobota";break;
  }
  $imgStr = "<img src=\"$str.jpg\" alt=\"$str\">";
  return $imgStr;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<title>Moja strona WWW</title>
</head>
<body>
<div>
<?echo dayOfWeekImage(); ?>
</div>
</body>
</html>
