CC-1990: Widget to display schedule and "Now Playing" on any website

-First working version, needs to be called using:

<script>
    $(document).ready(function() {
        $("#headerLiveHolder").airtimeLiveInfo();
        $("#onAirToday").airtimeShowSchedule();
    });
</script>
This commit is contained in:
martin 2011-03-22 18:04:27 -04:00
parent 278938f746
commit e92be3c186
4 changed files with 146 additions and 83 deletions

View file

@ -109,6 +109,16 @@ class ApiController extends Zend_Controller_Action
$this->_helper->viewRenderer->setNoRender(true);
$result = Schedule::GetPlayOrderRange(0, 1);
$date = new Application_Model_DateHelper;
$timeNow = $date->getDate();
$result = array("env"=>APPLICATION_ENV,
"schedulerTime"=>gmdate("Y-m-d H:i:s"),
"currentShow"=>Show_DAL::GetCurrentShow($timeNow),
"nextShow"=>Show_DAL::GetNextShows($timeNow, 5),
"timezone"=> date("T"),
"timezoneOffset"=> date("Z"));
//echo json_encode($result);
header("Content-type: text/javascript");
echo $_GET['callback'].'('.json_encode($result).')';