Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: on air

  1. #1
    New Coder
    Join Date
    Jun 2016
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    on air

    hi all i'm trying to get this rite

    PHP Code:
    <?php
    //set timezone
    putenv ('uk=England/London');
    mktime(0,0,0,1,1,1970);
    $day date("N");
    $time date("Hi");
    if (
    $day == 7
    {
    switch(
    $time)
        {
            case (
    $time >= '0600' && $time <= '0959'):
                echo
    "<img src='images/onair/haroldgrimmett.png' alt='Harold Grimmett is On-Air Now' class='onair'/>";
                break;
            case (
    $time >= '1000' && $time <= '1200'):
                echo
    "<img src='images/onair/kix103.png' alt='Harold Grimmett is On-Air Now' class='onair'/>";
                break;
            default:
                echo
    "<img src='images/onair/kix103.png' alt='Kix 103 the Country Leader is On-Air Now' class='onair'/>";
                break;
        }
    }
    elseif(
    $day == 6
    {
        echo
    "<img src='images/onair/kix103.png' alt='Kix 103 the Country Leader is On-Air Now' class='onair'/>";
    }
    else 
    {    
        switch(
    $time)
        {
            case (
    $time >= '0600' && $time <= '0959'):
                echo
    "<img src='images/onair/steveandboomer.png' alt='Steve &amp; Boomer is On-Air Now' class='onair'/>";
                break;
            case (
    $time >= '1000' && $time <= '1459'):
                echo
    "<img src='images/onair/kc.png' alt='K.C. Wright is On-Air Now' class='onair'/>";
                break;
            case (
    $time >= '1500' && $time <= '1859'):
                echo
    "<img src='images/onair/jr.png' alt='J.R. Schumann' class='onair'/>";
                break;     
            case (
    $time >= '1900' && $time <= '2359'):
                echo
    "<img src='images/onair/jrandalharvey.png' alt='J Randal Harvey is On-Air Now' class='onair'/>";
                break;        
            case (
    $time >= '2400' && $time <= '0559'):
                echo
    "<img src='images/onair/blairgarner.png' alt='Blair Garner is On-Air Now' class='onair'/>";
            default:
                echo
    "<img src='images/onair/kix103.png' alt='Kix 103 the Country Leader is On-Air Now' class='onair'/>";
                break;        
        }    
    }
    ?>
    You can see it in action on www.kix1033.com
    i live in the UK and my djs are on at certain times i do 8pm till 10pm every weekend
    could someone help

  2. #2
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    4,296
    Thanks
    3
    Thanked 561 Times in 546 Posts
    See the reply you previously got for this subject - https://www.codingforums.com/php/387207-air-script.html
    Finding out HOW to do something is called research, i.e. keep searching until you find the answer. After you attempt to do something and cannot solve a problem with it yourself, would be when you ask others for help.

  3. #3
    Supreme Master coder!
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    10,396
    Thanks
    10
    Thanked 1,191 Times in 1,181 Posts
    Once again ....

    You do not have the correct PHP timezone set ...

    This is the correct timezone:
    date_default_timezone_set('Europe/London');

    We will not mention this again.

  4. #4
    Administrator VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    11,386
    Thanks
    7
    Thanked 1,370 Times in 1,339 Posts
    Closed for duplicate content. Please continue the discussion at https://www.codingforums.com/php/387207-air-script.html


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •