Jump to content

joomla mod jock


djultra89

Recommended Posts

hi there all im new to this forum and im wondering if you can

help me out with this code at all.

 

 

/**
 * Time switching
 *
 * TO CUSTOMIZE: edit the HTML in each respective time-slot below.
 *
 * @author Greg Rickaby
 * @since 1.0
 */
function jock_rotator() {
    
$i = date( 'w' );
$x = date( 'Hi' );

switch ( $i ) {

################################### Monday - Friday ###################################

case "1":
case "2":
case "3":
case "4":
case "5":

//------------------------------- Weekday Overnights 12a-6a ---------------------------
if ( $x < 600 ) { echo '

    <a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>

'; }
//------------------------------- Weekday Mornings 6a-10a -----------------------------
elseif ( $x < 1000 ) { echo '

    <a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>

'; }
//------------------------------ Weekday Middays 10a-3p ------------------------------
elseif ( $x < 1500 ) { echo '

    <a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>

'; }

//------------------------------- Weekday Afternoons 3p-7p ----------------------------
elseif ( $x < 1900 ) { echo '

    <a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>

'; }
//------------------------------- Weekday Nights 5p-6:59p ----------------------------
elseif ( $x < 2359 ) { echo '

    <a href="http://spwr.co.uk/presenters-djs?layout=edit&id=11">DJ AUBREY<br /><img src="images/presenters/jay.png"></a>

'; }

break;

####################################### Saturday ######################################

case "6":  

//------------------------------ Saturday Overnights 12a-6a ---------------------------
if ( $x < 600 ) { echo '

    <a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>

'; }
//----------------------------- Saturday Mornings 6a-10a ------------------------------
elseif ( $x < 1000 ) { echo '

    <a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>

'; }
//------------------------------- Saturday Middays 10a-3p -----------------------------
elseif ( $x < 1500 ) { echo '

    <a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>

'; }
//-------------------------------- Saturday Afternoons 3p-7p --------------------------
elseif ( $x < 1900 ) { echo '

    <a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>

'; }
//-------------------------------- Saturday Nights 7p-11:59p---------------------------
elseif ( $x < 2359 ) { echo '

    <a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>

'; }

break;

########################################## Sunday ######################################

case "0":

//------------------------- Sunday Overnights 12a-6a-------------------------------------
if ( $x < 600 ) { echo '

    <a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>

'; }
//-------------------------- Sunday Mornings 6a-10a---------------------------------------
elseif ( $x < 1000 ) { echo '

    <a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>

'; }
//-------------------------- Sunday Middays 10a-3p ----------------------------------------
elseif ( $x < 1500 ) { echo '

    <a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>

'; }
//------------------------- Sunday Afternoons 3p-7p ---------------------------------------
elseif ( $x < 1900 ) { echo '

    <a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>

'; }
//-------------------------- Sunday Nights 7p-11:59p ----------------------------------------
elseif ( $x < 2359 ) { echo '

    <a href="jock-page.html">Jock Name<br /><img src="/images/jock_pics/jock.jpg"></a>

'; }

 // end switch
 }

// end jock_rotator()
}
?>

 

and my presenters are on at this time

 

Mondays

Mike:  4pm-6pm

DANIEL  8 am-10 am

DANIEL 6 pm-8 pm

Phillip- 8-10pm

Tuesdays

Mike:  4pm-6pm

Ethan&Chris 12-5

leon: 9-11pm

Rachel: 6-7pm

 

Wednesdays

Mike:  4pm-6pm

DJ AUBREY 5:00 PM 6:00 PM

Lee Mills 9-11pm 

Thursdays

 Leoni 5-6pm

Fridays

leon: 9-11pm

 

Saturdays

kojo: 5-9pm

Jamie- 7-9pm 

Sundays

Damien- 8am-9am

Leoni 3-5pm

kojo: 5-9pm

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.