Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Valid execution check
- defined('_JEXEC') or die('Restricted Access');
- /*
- * Filename: default.php (Part of CM Broadcast Scheduler, Joomla Component)
- * Author: Athanasios Theodorou
- * Version: 2.1.4
- * License: GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
- * Support: http://forum.computerman.gr/
- * Copyright (C) 2009-2012, Computerman.gr. All Rights Reserved.
- */
- // Get the API
- $doc = JFactory::getDocument();
- $language = &JFactory::getLanguage();
- $language->load('com_cmbroadcastscheduler');
- // Include Scripts
- $baseURI = JURI::base()."components/com_cmbroadcastscheduler";
- $doc->addStylesheet( $baseURI.'/css/cmbroadcast_style_modified.css' );
- // Start Rendering
- if( $this->params->get('show_page_heading', 1)) : ?>
- <div class="item-page<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
- <h2 class="item-page-title"><?php echo $this->escape($this->params->get('page_heading')); ?></h2>
- </div>
- <?php endif; ?>
- <script type="text/javascript">
- jQuery(document).ready(function(){
- jQuery("#navlist li").click(function(){
- var clicked = jQuery(this).attr('rel');
- jQuery.post(
- 'programs.php',
- {date: clicked},
- function(responseText){
- jQuery("#viewSchedule").html(responseText);
- },
- "html"
- );
- });
- });
- </script>
- <div class="cmschedule-wrapper">
- <?php
- // With a component parameter, the user will
- // be able to choose to display the day form
- // on the TOP or on the BOTTOM of the component.?>
- <?php
- if (!empty($_POST['ddate'])) {
- $currentday = (date("l", strtotime($_POST['ddate'])));
- } else {
- $currentday = date("l");
- }
- ?>
- <?php $currenttime = (date("H")); ?>
- <?php if($this->items): ?>
- <div class="date-input-form">
- <form action="" method="post" id="ddateform">
- <input type="hidden" name="ddate" id="ddate" size="11" maxlength="10" value="" />
- <?php echo JHTML::_( 'form.token' ); ?>
- </form>
- </div>
- <div id="navcontainer">
- <ul id="navlist">
- <?php if($currentday=="Monday") : ; ?>
- <li class="currentday"><?php echo $currentday; ?></li>
- <?php else : ?>
- <li><a href="#" rel="<?php echo date('Y-m-d', strtotime('monday')); ?>"></a></li>
- <?php endif; ?>
- <?php if($currentday=="Tuesday") : ; ?>
- <li class="currentday"><?php echo $currentday; ?></li>
- <?php else : ?>
- <li><a href="#" rel="<?php echo date('Y-m-d', strtotime('tuesday')); ?>"></a></li>
- <?php endif; ?>
- <?php if($currentday=="Wednesday") : ; ?>
- <li class="currentday"><?php echo $currentday; ?></li>
- <?php else : ?>
- <li><a href="#" rel="<?php echo date('Y-m-d', strtotime('wednesday')); ?>"></a></li>
- <?php endif; ?>
- <?php if($currentday=="Thursday") : ; ?>
- <li class="currentday"><?php echo $currentday; ?></li>
- <?php else : ?>
- <li><a href="#" rel="<?php echo date('Y-m-d', strtotime('thursday')); ?>"></a></li>
- <?php endif; ?>
- <?php if($currentday=="Friday") : ; ?>
- <li class="currentday"><?php echo $currentday; ?></li>
- <?php else : ?>
- <li><a href="#" rel="<?php echo date('Y-m-d', strtotime('friday')); ?>"></a></li>
- <?php endif; ?>
- <?php if($currentday=="Saturday") : ; ?>
- <li class="currentday"><?php echo $currentday; ?></li>
- <?php else : ?>
- <li><a href="#" rel="<?php echo date('Y-m-d', strtotime('saturday')); ?>"></a></li>
- <?php endif; ?>
- <?php if($currentday=="Sunday") : ; ?>
- <li class="currentday"><?php echo $currentday; ?></li>
- <?php else : ?>
- <li><a href="#" rel="<?php echo date('Y-m-d', strtotime('sunday')); ?>"></a></li>
- <?php endif; ?>
- </ul>
- </div>
- <div class="show-item-black">
- </div>
- <div class="cmschedule" id="viewSchedule">
- <?php if($this->items) : ?>
- <ul>
- <?php foreach($this->items as $item) : ?>
- <?php
- // Create Slugs
- $item['slug'] = $item['alias'] ? ($item['s_id'].'-'.$item['alias']) : $item['s_id'];
- ?>
- <?php if(empty($item['onair'])) : ?>
- <li class="show-item-grey">
- <div class="show-item-wrapper">
- <div class="show-item-details">
- <span><?php echo date( "g:ia", strtotime($item['showstart'])); ?></span>
- </div>
- <div class="show-item-desc">
- <div id="show_name_and_onairlogo">
- <div style="float:left; height:auto;">
- <span><b><?php echo $item['show_name']; ?></b></span>
- </div>
- <div style="float:right;">
- </div>
- </div>
- <div style="clear:both;">
- </div>
- <div id="host_name_and_full_desc">
- <span>with <a href="/hosts#<?php $moreinfo = json_decode($item['moreinfo']); $str = $moreinfo->casthost; $hoststring = str_replace(' ','',$str); echo $hoststring; ?>"><?php $moreinfo = json_decode($item['moreinfo']); echo $moreinfo->casthost; ?></a></span>
- <?php if(!empty($item['full_desc'])) : ?><span style="padding-top:9px;"><?php echo $item['full_desc']; ?></span> <?php endif; ?>
- </div>
- </div>
- </div>
- <div class="clearfix"></div>
- </li>
- <?php elseif(!empty($item['onair']) && $currenttime < 2359) : ?>
- <li class="show-item-red">
- <div class="show-item-wrapper">
- <div class="show-item-details">
- <span><?php echo date( "g:ia", strtotime($item['showstart'])); ?></span>
- </div>
- <div class="show-item-desc">
- <div id="show_name_and_onairlogo">
- <div style="float:left; height:auto;">
- <span><b><?php echo $item['show_name']; ?></b></span>
- </div>
- <div style="float:right;">
- <img src="<?php echo $baseURI; ?>/images/on_air_now.png" height="15px" alt="item-graphics" />
- </div>
- </div>
- <div style="clear:both;">
- </div>
- <div id="host_name_and_full_desc">
- <span>with <a href="/hosts#<?php $moreinfo = json_decode($item['moreinfo']); $str = $moreinfo->casthost; $hoststring = str_replace(' ','',$str); echo $hoststring; ?>"><?php $moreinfo = json_decode($item['moreinfo']); echo $moreinfo->casthost; ?></a></span>
- <?php if(!empty($item['full_desc'])) : ?><span style="padding-top:9px;"><?php echo $item['full_desc']; ?></span> <?php endif; ?>
- </div>
- </div>
- </div>
- <?php if($this->params->get('streaming_link') != '#' && $this->params->get('streaming_link') != '') : ?>
- <span class="strlink" style="float:right; text-wrap: none;"><a href="<?php echo $this->params->get('streaming_link'); ?>" title="Live Stream"><?php echo JText::_( "STREAMLINK" ); ?></a></span>
- <?php endif; ?>
- <div class="clearfix"></div>
- </li>
- <?php elseif(!empty($item['onair']) && $currenttime > 2359 && $currenttime < 0300) : ?>
- <li class="goodnight">
- <div class="show-item-wrapper">
- <div class="show-item-details">
- <span>12:00am</span>
- </div>
- <div class="show-item-desc">
- <div id="show_name_and_onairlogo">
- <div style="float:left; height:auto;">
- <span><b>OFF THE AIR</b></span>
- </div>
- <div style="float:right;">
- </div>
- </div>
- <div style="clear:both;">
- </div>
- <div id="host_name_and_full_desc">
- <span>QCCR will resume broadcasting the next day at 7:00am.</span>
- </div>
- </div>
- </div>
- <?php endif; ?>
- <?php endforeach; ?>
- <?php endif; ?>
- </div>
- <li class="goodnight">
- <div class="show-item-wrapper">
- <div class="show-item-details">
- <span>12:00am</span>
- </div>
- <div class="show-item-desc">
- <div id="show_name_and_onairlogo">
- <div style="float:left; height:auto;">
- <span><b>OFF THE AIR</b></span>
- </div>
- <div style="float:right;">
- </div>
- </div>
- <div style="clear:both;">
- </div>
- <div id="host_name_and_full_desc">
- <span>QCCR will resume broadcasting the next day at 7:00am.</span>
- </div>
- </div>
- </div>
- <?php if($this->params->get('streaming_link') != '#' && $this->params->get('streaming_link') != '') : ?>
- <span class="strlink" style="float:right; text-wrap: none;"><a href="<?php echo $this->params->get('streaming_link'); ?>" title="Live Stream"><?php echo JText::_( "STREAMLINK" ); ?></a></span>
- <?php endif; ?>
- <div class="clearfix"></div>
- </li>
- </ul>
- <?php else: ?>
- <div class="date-input-form">
- <form action="" method="post" id="ddateform">
- <input type="hidden" name="ddate" id="ddate" size="11" maxlength="10" value="" />
- <?php echo JHTML::_( 'form.token' ); ?>
- </form>
- </div>
- <div id="navcontainer">
- <ul id="navlist">
- <?php if($currentday=="Monday") : ; ?>
- <li class="currentday"><?php echo $currentday; ?></li>
- <?php else : ?>
- <li><a href="#" rel="<?php echo date('Y-m-d', strtotime('monday')); ?>"></a></li>
- <?php endif; ?>
- <?php if($currentday=="Tuesday") : ; ?>
- <li class="currentday"><?php echo $currentday; ?></li>
- <?php else : ?>
- <li><a href="#" rel="<?php echo date('Y-m-d', strtotime('tuesday')); ?>"></a></li>
- <?php endif; ?>
- <?php if($currentday=="Wednesday") : ; ?>
- <li class="currentday"><?php echo $currentday; ?></li>
- <?php else : ?>
- <li><a href="#" rel="<?php echo date('Y-m-d', strtotime('wednesday')); ?>"></a></li>
- <?php endif; ?>
- <?php if($currentday=="Thursday") : ; ?>
- <li class="currentday"><?php echo $currentday; ?></li>
- <?php else : ?>
- <li><a href="#" rel="<?php echo date('Y-m-d', strtotime('thursday')); ?>"></a></li>
- <?php endif; ?>
- <?php if($currentday=="Friday") : ; ?>
- <li class="currentday"><?php echo $currentday; ?></li>
- <?php else : ?>
- <li><a href="#" rel="<?php echo date('Y-m-d', strtotime('friday')); ?>"></a></li>
- <?php endif; ?>
- <?php if($currentday=="Saturday") : ; ?>
- <li class="currentday"><?php echo $currentday; ?></li>
- <?php else : ?>
- <li><a href="#" rel="<?php echo date('Y-m-d', strtotime('saturday')); ?>"></a></li>
- <?php endif; ?>
- <?php if($currentday=="Sunday") : ; ?>
- <li class="currentday"><?php echo $currentday; ?></li>
- <?php else : ?>
- <li><a href="#" rel="<?php echo date('Y-m-d', strtotime('sunday')); ?>"></a></li>
- <?php endif; ?>
- </ul>
- </div>
- <div class="show-item-black">
- </div>
- <h3 style="padding-top:20px; padding-left:10px;">There are no shows scheduled for today.</h3>
- <?php endif; ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement