I am using CMS builder to list radio shows for a website. There is a listing page split into 2 filtered viewers, upcoming shows and past shows archive. Each listing has a show page that details the show, topic, guests etc. Also on the page is an iframe which lets the user hear the live stream during broadcast time (Sat 9:30am - 10:00am EST and Sun 10:00am - 10:30am EST) if clicked.
The station provides an audio file which can be played in the archived listings. On the detail page, I use a PHP conditional to only show the mp3 player object code if a field (show_player) is checked after show is aired in the listing db. (show_date + 30min)
What I would like to do is, based on show date/time, conditionally display either the live stream link or the mp3 player object. The problem I am having with my limited knowledge is accomodating the difference in the users time zone and the syntax for accomplishing the conditional statement.
Here is the listing code which roughly filters future and past shows:
list($future_radio_showRecords, $radio_showMetaData) = getRecords(array(
'tableName' => 'radio_show',
'where' => 'hidden="0" and show_date >= (NOW() - INTERVAL 1 DAY)',
));
list($past_radio_showRecords, $radio_showMetaData) = getRecords(array(
'tableName' => 'radio_show',
'orderBy' => 'show_date DESC',
'where' => 'hidden="0" and show_date < (NOW() - INTERVAL 1 DAY)',
));
Condition to display player object on detail page:
<?php if ($radio_showRecord['audio_filename']): ?>
<?php if ($radio_showRecord['show_player']): ?>
/ ******** Object wrapper here *******/
<?php endif ?>
<?php endif ?>
Thanks in advance ....
Ron Conring
Conring Automation Services
----------------------------------------
Software for Business and Industry Since 1987