hello all, first time poster…have borrowed an on air script from another radio station (permission granted but they will not give coding support) and it is working, my question is will it cover each day of the week? I tried putting individual days in and it broke the code. So is it set up for weekdays and then the weekend? Please take a look and make suggestions. I’d like to make sure it displays my images each day. Thanks for your help!
[php]<?php
//set timezone
putenv (‘TZ=America/Chicago’);
mktime(0,0,0,1,1,1970);
$day = date(“N”);
$time = date(“Hi”);
if ($day == 7)
{
switch($time)
{
case ($time >= ‘0000’ && $time <= ‘0459’):
echo"";
break;
case ($time >= ‘0500’ && $time <= ‘0600’):
echo"";
break;
case ($time >= ‘0600’ && $time <= ‘0900’):
echo"";
break;
case ($time >= ‘0900’ && $time <= ‘1200’):
echo"";
break;
case ($time >= ‘1200’ && $time <= ‘1400’):
echo"";
break;
case ($time >= ‘1400’ && $time <= ‘1600’):
echo"";
break;
case ($time >= ‘1600’ && $time <= ‘1900’):
echo"";
break;
case ($time >= ‘1900’ && $time <= ‘2100’):
echo"";
break;
case ($time >= ‘2100’ && $time <= ‘2400’):
echo"";
break;
default:
echo"<img src='http://southwestarkansasradio.com/images/Foxsportsradiologo.jpg' alt='On-Air Now' class='onair'/>";
break;
}
}
elseif($day == 6)
{
echo"";
}
else
{
switch($time)
{
case ($time >= ‘0000’ && $time <= ‘0459’):
echo"";
break;
case ($time >= ‘0500’ && $time <= ‘0600’):
echo"";
break;
case ($time >= ‘0600’ && $time <= ‘0900’):
echo"";
break;
case ($time >= ‘0900’ && $time <= ‘1200’):
echo"";
break;
case ($time >= ‘1200’ && $time <= ‘1400’):
echo"";
break;
case ($time >= ‘1400’ && $time <= ‘1600’):
echo"";
break;
case ($time >= ‘1600’ && $time <= ‘1900’):
echo"";
break;
case ($time >= ‘1900’ && $time <= ‘2100’):
echo"";
break;
case ($time >= ‘2100’ && $time <= ‘2400’):
echo"";
break;
}
}
?> [/php]