示例#1
0
文件: header.php 项目: Hawkart/megatv
?>
	                </div>
                    <?php 
$APPLICATION->IncludeComponent("hawkart:city.list", "", array(), false);
$APPLICATION->IncludeComponent("hawkart:lang.list", "", array(), false);
?>
	            </div>
	            <div class="header__box-right box-right">
                    <?php 
if ($APPLICATION->GetCurDir() != "/personal/records/") {
    ?>
                        <div class="calendar-carousel" data-module="calendar-carousel">
                    		<script type="text/x-config">
                    			{
                    				"currentDate": "<?php 
    echo CTimeEx::getCurDate();
    ?>
",
                                    "minDate": 1,
                                    "maxDate":<?php 
    echo CTimeEx::getCalendarDays();
    ?>
                    			}
                    		</script>
                    		<a href="#" class="prev-trigger disabled" data-type="prev-trigger"><span data-icon="icon-left-arrow-days"></span></a>
                    		<div class="dates-holder" data-type="dates-carousel"></div>
                    		<a href="#" class="next-trigger" data-type="next-trigger"><span data-icon="icon-right-arrow-days"></span></a>
                    	</div>
                    <?php 
}
?>
示例#2
0
<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
ini_set('max_execution_time', 30);
global $USER, $APPLICATION;
$arParams = $arParams + array("DATETIME" => \CTimeEx::getDatetime(), "AJAX" => $_REQUEST["AJAX"], "LIST_URL" => $APPLICATION->GetCurDir());
//Get dates
$arResult["CONFIG_DATES"] = array();
$fisrt_date = date('d.m.Y', strtotime(\CTimeEx::getCurDate()));
for ($i = 0; $i < \CTimeEx::getCalendarDays() + 2; $i++) {
    $date_confing = date('d.m.Y', strtotime("+" . $i . " day", strtotime($fisrt_date)));
    $arResult["CONFIG_DATES"][] = $date_confing;
}
//Get channel list
$arChannels = array();
$arResult["ITEMS"] = \Hawkart\Megatv\ChannelTable::getActiveByCity();
foreach ($arResult["ITEMS"] as $arChannel) {
    $arChannels[$arChannel["UF_CHANNEL_BASE_ID"]] = $arChannel;
}
$arResult["ITEMS"] = $arChannels;
/**
 * sort channels for user according statistics
 */
if ($USER->IsAuthorized()) {
    $arItems = array();
    $arStatistic = \Hawkart\Megatv\CStat::getByUser();
    //sort channels by raiting
    uasort($arStatistic["CHANNELS"], function ($a, $b) {
        return strcmp($b, $a);