I'm building a WordPress plugin that will create a radio station "On-Air Now" DJ rotator.
Working options panel I've built so far: https://i.sstatic.net/SiYde.png
I've based the idea on a PHP case statement I wrote back in 2007 where you specify the DJ's start time which is then checked against the server time.
I know how to pull the image, description, and link out of the DB and display it. I just don't know how to code the logic behind showing only ONE DJ during his/her scheduled TIME-FRAME. e.g.; 6a-9a.
Would it be?
script: "hello server, what time is it?"
server: "it's 6:25am"
script: "ok, database it's 6:25am...who is scheduled?"
database: "neal boortz"
script: "thank you sir. i will now write some HTML"
What I have built so far: https://github.com/gregrickaby/DJ-Rotator-for-WordPress/blob/master/dj-rotator-for-wordpress.php
I'm not asking for someone to write it for me. Just shove me in the right direction with the logic. Maybe a code example or two.
Thank you!