<?CModule::IncludeModule("iblock") || die('Could not load "iblock" module.');?>
<?
$rsUser = CUser::GetByID($USER->GetID()); // получили инфо о пользователе.
$arUser = $rsUser->Fetch();
/* echo "<pre>"; print_r($arUser); echo "</pre>"; */ // Здесь можем посмотреть какая информация нам доступна
?>
<?$rsData = CIBlockSection::GetList (Array(), Array("IBLOCK_ID"=>5, "ID"=>"$arUser[UF_BIKE]"), false,Array("UF_*")); // тут получил все перемнные которые у меня содержаться
в пользовательских полях самого раздела.
while($arRes = $rsData->Fetch())
{
$res_prise[]=$arRes;
//print_r($arRes);
}
?>
<table class="blue_table">
<tr>
<th>Type</th>
<th>Price ˆ</th>
</tr>
<tr>
<td>X2 Wheel bike:</td>
<td><?echo $res_prise[0][UF_PRISEX2];?></td>
</tr>
<tr>
<td> X3 Wheel bike:</td>
<td><?echo $res_prise[0][UF_PRISEX3];?></td>
</tr>
</table>
<br>
<?echo $res_prise[0][UF_DISCOUNT_PERSENT];?> discount is valid for rental of more than <?echo $res_prise[0][UF_DAY_DISCOUNT];?> days
<table >
<tbody>
<tr width="800"><td width="800">
<div style="width:300px;">
<?$APPLICATION->IncludeComponent("bitrix:news.list", "manager_list", array( //Подключаю компонент - "bitrix:news.list"
"IBLOCK_TYPE" => "bicycle",
"IBLOCK_ID" => "5",
"NEWS_COUNT" => "80",
"SORT_BY1" => "ACTIVE_FROM",
"SORT_ORDER1" => "DESC",
"SORT_BY2" => "SORT",
"SORT_ORDER2" => "ASC",
"FILTER_NAME" => "",
"FIELD_CODE" => array(
0 => "ID",
1 => "",
),
"PROPERTY_CODE" => array(
0 => "INVITE_DATE",
1 => "",
2 => "STATUS",
3 => "",
),
"CHECK_DATES" => "N",
"DETAIL_URL" => "/rents/private_office/bike.php?ID=#ID#", //Страница детального просмотра - передаём индефикатор новости.
"AJAX_MODE" => "N",
"AJAX_OPTION_JUMP" => "N",
"AJAX_OPTION_STYLE" => "Y",
"AJAX_OPTION_HISTORY" => "N",
"CACHE_TYPE" => "N",
"CACHE_TIME" => "36000000",
"CACHE_FILTER" => "N",
"CACHE_GROUPS" => "Y",
"PREVIEW_TRUNCATE_LEN" => "",
"ACTIVE_DATE_FORMAT" => "d.m.Y",
"SET_TITLE" => "Y",
"SET_STATUS_404" => "N",
"INCLUDE_IBLOCK_INTO_CHAIN" => "Y",
"ADD_SECTIONS_CHAIN" => "Y",
"HIDE_LINK_WHEN_NO_DETAIL" => "N",
"PARENT_SECTION" => "$arUser[UF_BIKE]", // Собственно устанавливаем для пользователя родительский раздел, который мы вытащили в начале документа
"PARENT_SECTION_CODE" => "",
"DISPLAY_TOP_PAGER" => "N",
"DISPLAY_BOTTOM_PAGER" => "N",
"PAGER_TITLE" => "Íîâîñòè",
"PAGER_SHOW_ALWAYS" => "Y",
"PAGER_TEMPLATE" => "",
"PAGER_DESC_NUMBERING" => "N",
"PAGER_DESC_NUMBERING_CACHE_TIME" => "36000",
"PAGER_SHOW_ALL" => "Y",
"DISPLAY_DATE" => "Y",
"DISPLAY_NAME" => "Y",
"DISPLAY_PICTURE" => "Y",
"DISPLAY_PREVIEW_TEXT" => "Y",
"AJAX_OPTION_ADDITIONAL" => ""
),
false
);?></div>
</td> <td valign="top" >
</td> </tr>
</tbody>
</table>
|