89 lines
3.2 KiB
PHTML
89 lines
3.2 KiB
PHTML
<script language="JavaScript">
|
|
function autoResize(id){
|
|
var newheight;
|
|
var newwidth;
|
|
|
|
if(document.getElementById){
|
|
newheight=document.getElementById(id).contentWindow.document.body.scrollHeight;
|
|
// Hack to get height in Firefox
|
|
if (newheight == 0) newheight = newheight = document.getElementById(id).contentWindow.document.documentElement.scrollHeight;
|
|
newwidth=document.getElementById(id).contentWindow.document.body.scrollWidth;
|
|
}
|
|
document.getElementById(id).height= (newheight) + "px";
|
|
document.getElementById(id).width= (newwidth) + "px";
|
|
}
|
|
</script>
|
|
|
|
<div class="wrapper">
|
|
|
|
<div class="bck_cover"></div>
|
|
|
|
<?php if ($this->stationLogo === DEFAULT_LOGO_PLACEHOLDER) {
|
|
echo "<a href='#' class='logo'><img src='".DEFAULT_LOGO_FILE."'></a>";
|
|
} else {
|
|
echo "<a href='#' class='logo'><img src='data:image/png;base64," . $this->stationLogo . "'></a>";
|
|
} ?>
|
|
|
|
<div class="login-btn">
|
|
<a href="/login" target="_parent">
|
|
<span>Login</span>
|
|
<span class="login-img"></span>
|
|
</a>
|
|
</div>
|
|
|
|
<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>
|
|
</div>
|
|
|
|
|
|
<div id="tab-2" class="about_us tab_content">
|
|
<h1><?php echo $this->escape($this->stationName) ?></h1>
|
|
<p><?php echo $this->escape($this->stationDescription) ?></p>
|
|
</div>
|
|
|
|
<div id="tab-3" class="login tab_content">
|
|
<h2>Login</h2>
|
|
<form action="demo_form.asp">
|
|
<input type="text" name="FirstName" value="username"><br>
|
|
<input type="text" name="Password" value="password"><br>
|
|
<input type="submit" value="Login">
|
|
</form>
|
|
</div>
|
|
|
|
<iframe id="player_iframe" frameborder="0" width="100%" style="bottom:0px; left:0px; position:fixed; right:0px;" src=<?php echo $this->stationUrl."embed/player?stream=auto&style=premium";?>></iframe>
|
|
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
|
|
$("#player_iframe").load(function () {
|
|
$("#player_iframe").contents().find('.bottom_bar').append("<div class='about_us_btn button' data-tab='tab-2'></div>");
|
|
$("#player_iframe").contents().find('.bottom_bar').append("<div class='schedule_btn button current' data-tab='tab-1'></div>");
|
|
|
|
|
|
$("#player_iframe").contents().find('.bottom_bar .button').click(function(){
|
|
var tab_id = $(this).attr('data-tab');
|
|
|
|
$("#player_iframe").contents().find('.bottom_bar .button').removeClass('current');
|
|
$('.tab_content').removeClass('current');
|
|
|
|
window.scrollTo(0,0);
|
|
$(this).addClass('current');
|
|
$("#"+tab_id).addClass('current');
|
|
});
|
|
});
|
|
|
|
// schedule widget tabs
|
|
$('.tabs li').click(function(){
|
|
var tab_id = $(this).attr('data-tab');
|
|
|
|
$('.tabs li').removeClass('active');
|
|
$('.schedule_item').removeClass('active');
|
|
|
|
$(this).addClass('active');
|
|
$("#"+tab_id).addClass('active');
|
|
});
|
|
|
|
})
|
|
</script>
|