Your IP : 216.73.216.86


Current Path : /var/www/homesaver/www/bitrix/components/bitrix/news.index/templates/.default/
Upload File :
Current File : /var/www/homesaver/www/bitrix/components/bitrix/news.index/templates/.default/template.php

<?php

if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true)
{
	die();
}
/** @var array $arParams */
/** @var array $arResult */
/** @global CMain $APPLICATION */
/** @global CUser $USER */
/** @global CDatabase $DB */
/** @var CBitrixComponentTemplate $this */
/** @var string $templateName */
/** @var string $templateFile */
/** @var string $templateFolder */
/** @var string $componentPath */
/** @var CBitrixComponent $component */
$this->setFrameMode(true);

$LINE_ELEMENT_COUNT = 2;
?>
<div class="news-index">
<table cellpadding="10" cellspacing="0" border="0" width="100%">
	<tr>
	<?php
	$cell = 0;
	foreach($arResult["IBLOCKS"] as $arIBlock):
	?>
		<td valign="top" width="<?= round(100/$LINE_ELEMENT_COUNT) ?>%;">
			<table class="data-table" cellpadding="0" cellspacing="0" border="0" width="100%">
			<thead>
				<?php
				$this->AddEditAction('iblock_'.$arIBlock['ID'], $arIBlock['ADD_ELEMENT_LINK'], CIBlock::GetArrayByID($arIBlock["ID"], "ELEMENT_ADD"));
				?>
				<tr valign="top" id="<?=$this->GetEditAreaId('iblock_'.$arIBlock['ID']);?>">
					<td colspan="2"><a href="<?=$arIBlock["LIST_PAGE_URL"]?>"><?=$arIBlock["NAME"]?></a></td>
				</tr>
			</thead>
			<?php
			foreach($arIBlock["ITEMS"] as $arItem):
				$this->AddEditAction($arItem['ID'], $arItem['EDIT_LINK'], CIBlock::GetArrayByID($arItem["IBLOCK_ID"], "ELEMENT_EDIT"));
				$this->AddDeleteAction($arItem['ID'], $arItem['DELETE_LINK'], CIBlock::GetArrayByID($arItem["IBLOCK_ID"], "ELEMENT_DELETE"), array("CONFIRM" => GetMessage('CT_BNI_ELEMENT_DELETE_CONFIRM')));
				?>
				<tr valign="top" id="<?=$this->GetEditAreaId($arItem['ID']);?>">
					<td class="news-date-time" style="border:0" nowrap id="<?=$this->GetEditAreaId($arItem['ID']);?>">
						<?= $arItem["DISPLAY_ACTIVE_FROM"] ?>&nbsp;
					</td>
					<td style="border:0">
						<a href="<?=$arItem["DETAIL_PAGE_URL"]?>"><?=$arItem["NAME"]?></a>&nbsp;
					</td>
				</tr>
				<?php
			endforeach;
			?>
			</table>
		</td>
	<?php
	if ((++$cell) >= $LINE_ELEMENT_COUNT):
	{
		$cell = 0;
	}
	?></tr><tr><?php
	endif; // if($n%$LINE_ELEMENT_COUNT == 0):
endforeach;
		while ($cell<$LINE_ELEMENT_COUNT):
			$cell++;
			?><td>&nbsp;</td><?php
		endwhile;
		?>
	</tr>
</table>
</div>