Merge pull request #742 from mikeopensauce/apistatus

Apistatus
This commit is contained in:
Robb 2019-02-18 12:22:17 -05:00 committed by GitHub
commit f3b1133c3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 3 deletions

View File

@ -186,6 +186,10 @@ class ApiController extends Zend_Controller_Action
$result["on_air_light"] = false;
$result["on_air_light_expected_status"] = false;
$result["station_down"] = false;
$result["master_stream"] = false;
$result["live_stream"] = false;
$result["master_stream_on_air"] = false;
$result["live_stream_on_air"] = false;
$range = Application_Model_Schedule::GetPlayOrderRange();
@ -211,6 +215,25 @@ class ApiController extends Zend_Controller_Action
$result["station_down"] = true;
}
$live_dj_stream = Application_Model_Preference::GetSourceStatus("live_dj");
$master_dj_stream = Application_Model_Preference::GetSourceStatus("master_dj");
$live_dj_on_air = Application_Model_Preference::GetSourceSwitchStatus("live_dj");
$master_dj_on_air = Application_Model_Preference::GetSourceSwitchStatus("master_dj");
if($live_dj_stream == true){
$result["live_stream"] = true;
if ($live_dj_on_air == "on") {
$result["live_stream_on_air"] = true;
}
}
if($master_dj_stream == true){
$result["master_stream"] = true;
if ($master_dj_on_air == "on") {
$result["master_stream_on_air"] = true;
}
}
$this->returnJsonOrJsonp($request, $result);
}

View File

@ -13,12 +13,12 @@
<div id="weekly-schedule-widget-preview" <?php if (isset($this->weekly_schedule_error_msg)) echo "style=display:none"; ?>>
<label><?php echo _("Preview:") ?></label>
<div class="schedule_iframe_wrapper">
<iframe id="schedule_iframe" height="400px" width="550px" scrolling="no" frameborder="0" src=<?php echo Application_Common_HTTPHelper::getStationUrl()."embed/weekly-program"?>></iframe>
<iframe id="schedule_iframe" height="400px" width="550px" scrolling="no" frameborder="0" src="<?php echo Application_Common_HTTPHelper::getStationUrl()."embed/weekly-program"?>"></iframe>
</div>
<div style="clear:both"></div>
<label>Embeddable Code:</label>
<textarea style="width:98%" rows="3" readonly="readonly"><iframe height="400px" width="550px" scrolling="no" frameborder="0" src=<?php echo Application_Common_HTTPHelper::getStationUrl()."embed/weekly-program"?>></iframe>
<textarea style="width:98%" rows="3" readonly="readonly"><iframe height="400px" width="550px" scrolling="no" frameborder="0" src="<?php echo Application_Common_HTTPHelper::getStationUrl()."embed/weekly-program"?>"></iframe>
</textarea>
<div><p>
Copy this code and paste it into your website's HTML to embed the weekly schedule in your site.

View File

@ -34,7 +34,7 @@
<?php endif; ?>
<div id="tab-1" class="schedule tab_content current">
<iframe onLoad="autoResize('schedule_iframe');" id="schedule_iframe" height="300px" scrolling="yes" frameborder="0" src=<?php echo $this->stationUrl."embed/weekly-program?style=premium"?>></iframe>
<iframe onLoad="autoResize('schedule_iframe');" id="schedule_iframe" height="300px" scrolling="yes" frameborder="0" src="<?php echo $this->stationUrl."embed/weekly-program?style=premium"?>"></iframe>
</div>