Jump to content

now on air


djultra89
 Share

Recommended Posts

hi there could someone help me sort the top bits out

of the coding please as it's not in GMT time or day

 

= '2000' && $time ";             break;         case ($time >= '1000' && $time ";             break;         default:             echo"images/onair/kix103.png";             break;     } } elseif($day == 6)  {     echo"images/onair/kix103.png"; } else  {         switch($time)     {         case ($time >= '0600' && $time ";             break;         case ($time >= '1000' && $time ";             break;         case ($time >= '1500' && $time ";             break;              case ($time >= '1900' && $time ";             break;                 case ($time >= '2400' && $time ";         default:             echo"images/onair/kix103.png";             break;             }     } ?>

Link to comment
Share on other sites

ok so is this how it goes

please correct me if im wrong

 

= '2000' && $time ";             break;         case ($time >= '1000' && $time ";             break;         default:             echo"images/onair/kix103.png";             break;     } } elseif($day == 6)  {     echo"images/onair/kix103.png"; } else  {         switch($time)     {         case ($time >= '0600' && $time ";             break;         case ($time >= '1000' && $time ";             break;         case ($time >= '1500' && $time ";             break;              case ($time >= '1900' && $time ";             break;                 case ($time >= '2400' && $time ";         default:             echo"images/onair/kix103.png";             break;             }     } ?>

Link to comment
Share on other sites

//set timezone using date_default_timezone_set()

date_default_timezone_set("GMT");

//mktime(0,0,0,1,1,1970);

$day = date("N");
$time = date("Hi");

if ($day == 7)  {
   switch($time) {
       case ($time >= '2000' && $time             echo"http://hyper-radio.co.uk/djimages/djultra.jpg";
       break;
       case ($time >= '1000' && $time             echo"images/onair/kix103.png";
       break;
       default:
           echo"images/onair/kix103.png";
       break;
   }
}
elseif($day == 6) {
   echo"images/onair/kix103.png";
} else {
   switch($time) {
       case ($time >= '0600' && $time             echo"images/onair/steveandboomer.png";
       break;
       case ($time >= '1000' && $time             echo"images/onair/kc.png";
       break;
       case ($time >= '1500' && $time             echo"images/onair/jr.png";
       break;
       case ($time >= '1900' && $time             echo"images/onair/jrandalharvey.png";
       break;
       case ($time >= '2400' && $time             echo"images/onair/blairgarner.png";
       break;
       default:
           echo"images/onair/kix103.png";
       break;
   }
}
?> 

Link to comment
Share on other sites

  • 3 years later...

If by "est" you mean Eastern Standard Time in the USA for the timezone, then you would need to use:

 

date_default_timezone_set("US/Eastern");

 

As to where you put your images, that should work too as long as you address it correctly in the script (see below) and the djsimg folder is located in the same location as the php file.

 

echo"djsimg/djpic.jpg";

 

Hope that helps.

  • Thanks 1
Link to comment
Share on other sites

If by "est" you mean Eastern Standard Time in the USA for the timezone, then you would need to use:

 

date_default_timezone_set("US/Eastern");

 

As to where you put your images, that should work too as long as you address it correctly in the script (see below) and the djsimg folder is located in the same location as the php file.

 

echo"djsimg/djpic.jpg";

 

Hope that helps.

 

Most definitly, thank you so much!!!

 

got another ?

 

can we make this into a file & use a code like this

 

Yes, I don't have the codeing right but this is example.

 

I want to put a simple php code in the body where I want it to appear vs having to put entire code in body

🌺 Xhilaration 🌺
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...