Код |
---|
<?foreach($arWeek as $arDay):?> <td align="left" valign="top" class='<?=$arDay["td_class"]?>' width="14%"> <span class="<?=$arDay["day_class"]?>"><?=$arDay["day"]?></span> <?foreach($arDay["events"] as $arEvent):?> <div class="NewsCalNews" style="padding-top:5px;"><?=$arEvent["time"]?><a href="<?=$arEvent["url"]?>" title="<?=$arEvent["preview"]?>"><?=$arEvent["title"]?></a></div> <?endforeach;?> </td> <?endforeach?> |
Код |
---|
<?foreach($arWeek as $arDay):?> <? if(count($arDay["events"])>0) { $link_day='<a href="/news/newsonday.php?date='.($isday=($arDay["day"]<10 && $arDay["day"]>0)?'0'.$arDay["day"]:$arDay["day"]).'.'.($ismonth=($arResult["currentMonth"]>0 && $arResult["currentMonth"]<10)?'0'.$arResult["currentMonth"]:$arResult["currentMonth"]).'.'.$arResult["currentYear"].'" title="Новости за '.$arDay["day"].'.'.$arResult["currentMonth"].'.'.$arResult["currentYear"].'">'.$arDay["day"].'</a>'; } else $link_day=$arDay["day"]; ?> <td align="left" valign="top" class='<?=$arDay["td_class"]?>' width="14%"> <span class="<?=$arDay["day_class"]?>"><?=$link_day?></span> </td> <?endforeach?> |
Код |
---|
<a href="/news/newsonday.php?date='.($isday=($arDay["day"]<10 && $arDay["day"]>0)?'0'.$arDay["day"]:$arDay["day"]).'.'.($ismonth=($arResult["currentMonth"]>0 && $arResult["currentMonth"]<10)?'0'.$arResult["currentMonth"]:$arResult["currentMonth"]).'.'.$arResult["currentYear"].'" |
Код |
---|
$items = GetIBlockElementList($ID, $SECTION_ID, $SORT, $NEWS_COUNT, $Filter, $arSelect); |
Код |
---|
if(count($getbydate=explode('.',$_REQUEST['date']))==3) { $arFilter=array("=DATE_ACTIVE_FROM"=>date($DB->DateFormatToPHP(CLang::GetDateFormat("SHORT")), mktime(0,0,0,$getbydate[1],$getbydate[0],$getbydate[2]))); } else $arFilter=array(); |
Цитата |
---|
$items = GetIBlockElementList($ID, $SECTION_ID, $SORT, $NEWS_COUNT, $Filter, $arSelect); |
Цитата |
---|
$rsElement = CIBlockElement::GetList($arSort, array_merge($arFilter, $arrFilter), false, $arNavParams, $arSelect); |
Цитата |
---|
if(count($getbydate=explode('.',$_REQUEST['date']))==3)
{ $arFilter["=DATE_ACTIVE_FROM"]=date($DB->DateFormatToPHP(CLang::GetDateFormat("SHORT")), mktime(0,0,0,$getbydate[1],$getbydate[0],$getbydate[2])); } $rsElement = CIBlockElement::GetList($arSort, array_merge($arFilter, $arrFilter), false, $arNavParams, $arSelect); |
Цитата |
---|
<?$APPLICATION->IncludeComponent("mycomponents:news.list", ".default", Array(
"IBLOCK_TYPE" => "news", "IBLOCK_ID" => "44", "NEWS_COUNT" => "5", "SORT_BY1" => "ACTIVE_FROM", "SORT_ORDER1" => "DESC", "SORT_BY2" => "SORT", "SORT_ORDER2" => "ASC", "FILTER_NAME" => "arrFilter", "FIELD_CODE" => array( 0 => "NAME", 1 => "PREVIEW_TEXT", 2 => "DATE_ACTIVE_FROM", 3 => "SHOW_COUNTER", 4 => "DATE_CREATE", 5 => "", ), "PROPERTY_CODE" => array( 0 => "", 1 => "", ), "DETAIL_URL" => "#ELEMENT_ID#.html", "CACHE_TYPE" => "A", "CACHE_TIME" => "3600", "CACHE_FILTER" => "N", "PREVIEW_TRUNCATE_LEN" => "", "ACTIVE_DATE_FORMAT" => "d.m.Y H:i", "DISPLAY_PANEL" => "N", "SET_TITLE" => "Y", "INCLUDE_IBLOCK_INTO_CHAIN" => "Y", "ADD_SECTIONS_CHAIN" => "Y", "HIDE_LINK_WHEN_NO_DETAIL" => "N", "PARENT_SECTION" => "", "DISPLAY_TOP_PAGER" => "N", "DISPLAY_BOTTOM_PAGER" => "Y", "PAGER_TITLE" => "Страница", "PAGER_SHOW_ALWAYS" => "N", "PAGER_TEMPLATE" => "", "PAGER_DESC_NUMBERING" => "N", "PAGER_DESC_NUMBERING_CACHE_TIME" => "36000", "DISPLAY_DATE" => "Y", "DISPLAY_NAME" => "Y", "DISPLAY_PICTURE" => "Y", "DISPLAY_PREVIEW_TEXT" => "Y" ) );?> |