<td class="cart-item-actions"> <?if (in_array("DELETE", $arParams["COLUMNS_LIST"]) || in_array("DELAY", $arParams["COLUMNS_LIST"])):?> <?php echo GetMessage("SALE_ACTION"); ?> <?endif;?> </td> </tr> </thead> <tbody> <? $i=0; foreach($arResult["ITEMS"]["AnDelCanBuy"] as $arBasketItems) if (CModule::IncludeModule("iblock")) { $item = GetIBlockElementListEx("1c_catalog", "65", Array(), Array("NAME" => "ASC"), 1, Array("ID" => $arBasketItems["PRODUCT_ID"]), Array("PROPERTY_CML2_ARTICLE")); $item = $item->GetNext(); } { ?> <tr> <td><?php echo $item[PROPERTY_CML2_ARTICLE_VALUE]; ?> </td> <?if (in_array("NAME", $arParams["COLUMNS_LIST"])):?> <td class="cart-item-name"><?
if ($IBLOCK_TYPE == "-") { $IBLOCK_TYPE = ""; } $NEWS_COUNT = strlen($NEWS_COUNT) > 0 ? intval($NEWS_COUNT) : "20"; $SORT_BY1 = isset($SORT_BY1) ? $SORT_BY1 : "ACTIVE_FROM"; $SORT_ORDER1 = isset($SORT_ORDER1) ? $SORT_ORDER1 : "DESC"; $SORT_BY2 = isset($SORT_BY2) ? $SORT_BY2 : "SORT"; $SORT_ORDER2 = isset($SORT_ORDER2) ? $SORT_ORDER2 : "ASC"; $SORT = array($SORT_BY1 => $SORT_ORDER1, $SORT_BY2 => $SORT_ORDER2); $CACHE_TIME = intval($CACHE_TIME); $CACHE_ID = SITE_ID . "|" . __FILE__ . "|" . md5(serialize($arParams)) . "|" . $USER->GetGroups(); $cache = new CPageCache(); if (CModule::IncludeModule("iblock")) { if ($cache->StartDataCache($CACHE_TIME, $CACHE_ID)) { $arSelect = array("ACTIVE_FROM", "DETAIL_PAGE_URL", "NAME"); $items = GetIBlockElementListEx($IBLOCK_TYPE, $IBLOCK, array(), $SORT, array("nTopCount" => $NEWS_COUNT), array(), $arSelect); if ($arItem = $items->GetNext()) { ?> <table border="0" cellspacing="0" cellpadding="2"> <?php do { ?> <tr> <td valign="top"><font class="newsdata"><?php echo $arItem["ACTIVE_FROM"]; ?> </font><a href="<?php echo $arItem["DETAIL_PAGE_URL"]; ?> " class="newstext"><?php echo $arItem["NAME"];
?> </select> <?php } ?> <input type="submit" value="<?php echo GetMessage("SEARCH_GO"); ?> " /> </form><br /> <?php if ($arResult["REQUEST"]["QUERY"] != "") { $sc = "%" . $arResult["REQUEST"]["QUERY"] . "%"; $items = GetIBlockElementListEx("catalogue", "furniture", array(), array("SORT" => "ASC", "NAME" => "ASC", "DATE_ACTIVE_FROM" => "DESC"), 1000000, array("NAME" => $sc)); // цикл по всем новостям while ($arItem = $items->GetNext()) { // выведем ссылку на страницу с детальным просмотром echo "<a href='" . $arItem["DETAIL_PAGE_URL"] . "'>" . $arItem["NAME"] . "</a>"; // выведем дату echo $arItem["DATE_ACTIVE_FROM"] . "<br>"; // выведем картинку для анонса, с ссылкой на детальный просмотр echo ShowImage($arItem["PREVIEW_PICTURE"], 100, 100, "border='0'", $arItem["DETAIL_PAGE_URL"]); // выведем анонс echo $arItem["PREVIEW_TEXT"] . "<hr>"; } } else { echo "Не введено название мебели. "; } ?>
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } ?> <br /> <table width="525" height="175" border="0" cellpadding="0" cellspacing="5" style="BACKGROUND: url(/bitrix/templates/avangard/images/bg_sq.gif) no-repeat left top"> <tr> <td rowspan="3" align="left" valign="middle" style="padding:7px 0px 7px 7px " width="300"> <?php $items = GetIBlockElementListEx("catalogue", "furniture", array(), array("RAND" => "RAND"), 1, array("!PROPERTY_HIT" => false)); while ($arItem = $items->GetNext()) { echo ShowImage($arItem["DETAIL_PICTURE"], 280, 140, "border='0'", "/catalogue/" . $arItem["IBLOCK_SECTION_ID"] . "/tov_" . $arItem["ID"] . ".html"); ?> </td> <td style="padding: 0px 7px" class="hit-title-month" height="35">В этом месяце "<?php echo $arItem["NAME"]; ?> "<br /> <span class="hit-title-hit">Хит Продаж!</span></td> </tr> <tr> <td class="bottext">
?> <td valign="top" class="bottext"> <h1><?php echo $collFields["NAME"]; ?> </h1></br> <?php echo $collFields["PREVIEW_TEXT"]; ?> </td> </tr> </table> <?php } $items = GetIBlockElementListEx("catalogue", "furniture", array(), array("SORT" => "ASC", "NAME" => "ASC", "DATE_ACTIVE_FROM" => "DESC"), 0, array("NAME" => $sc, "PROPERTY_COLLECTION" => $coll_el), $arOutput); // цикл по всем новостям while ($arItem = $items->GetNext()) { ?> <pre> <?php //print_r($arItem) ?> </pre> <table cellpadding="0" cellspacing="5" border="0"> <tr> <td valign="top" width="160" align="left"> <?php
/************************************ Groups ************************************/ $rsSections = GetIBlockSectionList($IBLOCK_ID, $PARENT_SECTION_ID, array($SECTION_SORT_FIELD => $SECTION_SORT_ORDER, "ID" => "ASC"), $SECTION_COUNT, array("ACTIVE" => "Y")); $arrProp = ""; while ($arSection = $rsSections->GetNext()) { /************************************ Elements ************************************/ // list of the element fields that will be used in selection $arSelect = array("ID", "IBLOCK_ID", "IBLOCK_SECTION_ID", "NAME", "PREVIEW_PICTURE", "DETAIL_PICTURE", "DETAIL_PAGE_URL"); // adding values to the filter $arrFilter["ACTIVE"] = "Y"; $arrFilter["IBLOCK_ID"] = $IBLOCK_ID; $arrFilter["SECTION_ID"] = $arSection["ID"]; if ($rsElements = GetIBlockElementListEx($IBLOCK_TYPE, false, false, array($ELEMENT_SORT_FIELD => $ELEMENT_SORT_ORDER, "ID" => "ASC"), array("nTopCount" => $ELEMENT_COUNT), $arrFilter, $arSelect)) { $rsElements->NavStart($ELEMENT_COUNT); $count = intval($rsElements->SelectedRowsCount()); if ($count > 0) { /**************************************************************** HTML form ****************************************************************/ ?> <a class="subtitletext" href="<?php echo $arSection["SECTION_PAGE_URL"]; ?> "><?php echo htmlspecialchars($arSection["NAME"]); ?> </a><br><img height="10" src="/bitrix/images/1.gif" width="1"><br> <table cellpadding="10" cellspacing="0" border="0" width="80%">
<select name="sel" style="width: 145px;" onchange="MM_jumpMenu('parent',this,0)"> <option value="" selected>список изделий</option>; <?php CModule::IncludeModule("iblock"); $IBLOCK_TYPE = "catalogue"; // тип инфо-блока $IBLOCK_ID = 5; // ID инфо-блока $SECTION_ID = $arResult["IBLOCK_SECTION_ID"]; $arFilterSect["ACTIVE"] = "Y"; // $arFilterSect["DEPTH_LEVEL"] = 1; $arFilterSect["INCLUDE_SUBSECTIONS"] = "Y"; // иначе собираем разделы $rsSections = GetIBlockSectionList($IBLOCK_ID, false, array("SORT" => "ASC", "ID" => "DESC"), false, $arFilterSect); if ($rsElements = GetIBlockElementListEx($IBLOCK_TYPE, $IBLOCK_ID, false, array("NAME" => "ASC"), false, array("ACTIVE" => "Y", "IBLOCK_ID" => $IBLOCK_ID, "SECTION_ID" => $SECTION_ID), array())) { while ($arElement = $rsElements->GetNext()) { $arrAddLinks[] = $arElement["DETAIL_PAGE_URL"]; if ($arElement["ID"] == $arResult["ID"]) { echo "<option selected value='/catalogue/" . $SECTION_ID . "/tov_" . $arElement["ID"] . ".html' style='font-size: 11px;'> " . $arElement["NAME"] . "</option>"; } else { echo "<option value='/catalogue/" . $SECTION_ID . "/tov_" . $arElement["ID"] . ".html' style='font-size: 11px;'> " . $arElement["NAME"] . "</option>"; } } } ?> </select> <?php if (count($arResult["MORE_PHOTO"]) > 0) { reset($arResult["MORE_PHOTO"]);
<?php $arOutput = array("DETAIL_PAGE_URL", "PROPERTY_TOP_PHOTO", "IBLOCK_SECTION_ID", "ID", "SECTION_ID"); $items = GetIBlockElementListEx("catalogue", "furniture", array(), array("RAND" => "RAND"), 1, array("!PROPERTY_TOP" => false), $arOutput); while ($arItem = $items->GetNext()) { echo ShowImage($arItem["PROPERTY_TOP_PHOTO_VALUE"], 530, 250, "border='0' style='margin-top:3px;'", "/catalogue/" . $arItem["IBLOCK_SECTION_ID"] . "/tov_" . $arItem["ID"] . ".html"); } ?>
<tr> <td valign="top"><?php echo $arItem["NAME"]; ?> :</td> <td valign="top"> <select name="<?php echo $arItem["INPUT_NAME"]; ?> " id="<?php echo $arItem["INPUT_NAME"]; ?> "> <option value="" ></option> <?if(CModule::IncludeModule("iblock")){ $asd = GetIBlockElementListEx("vdk_cities_type","vdk_cities");$asd->NavStart(1000); foreach($asd->arResult as $item) { ?> <option value="<?php echo $item["ID"]; ?> " <?if ($arItem["INPUT_VALUE"] == $item["ID"]){echo "selected";}?> ><?php echo $item["NAME"]; ?> </option> <? } }?> </select> </td> </tr> <?else:?> <tr> <td valign="top"><?php
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } ?> <?php $items = GetIBlockElementListEx("catalogue", "furniture", array(), array("SORT" => "ASC", "ID" => "DESC"), 1000, array("!PROPERTY_NOVELTY" => false, "!ID" => $item)); $cnt = 0; $arParams = 3; while ($arItem = $items->GetNext()) { $arRes[$cnt] = $arItem; $cnt++; } ?> <table cellpadding="0" cellspacing="0" border="0"> <?php foreach ($arRes as $cell => $arItem) { ?> <?php if ($cell % $arParams == 0) { ?> <tr> <?php
$arrProp[$arProp["CODE"]] = $arProp["NAME"]; } } } // prices if (count($arrPRICE_CODE) > 0 && CModule::IncludeModule("catalog")) { $rsPrice = CCatalogGroup::GetList($v1, $v2); while ($arPrice = $rsPrice->Fetch()) { if (in_array($arPrice["NAME"], $arrPRICE_CODE)) { $arrPrice[$arPrice["NAME"]] = array("ID" => $arPrice["ID"], "TITLE" => $arPrice["NAME_LANG"]); $arSelect[] = "CATALOG_GROUP_" . $arPrice["ID"]; } } } // getting selection from elements if ($rsElements = GetIBlockElementListEx($IBLOCK_TYPE, false, false, array($ELEMENT_SORT_FIELD => $ELEMENT_SORT_ORDER, "ID" => "DESC"), false, $aFilter, $arSelect)) { /**************************************************************** HTML form ****************************************************************/ ?> <script language="JavaScript"> <!-- function checkUncheckAll(Element) { var theForm = Element.form, i = 0; for(i=0; i<theForm.length; i++) { if(theForm[i].type == 'checkbox' && theForm[i].name != 'selectall') theForm[i].checked = Element.checked; }
$arVars = $obMenuCache->GetVars(); $arSections = $arVars["arSections"]; $arElementLinks = $arVars["arElementLinks"]; } else { // иначе собираем разделы $rsSections = GetIBlockSectionList($IBLOCK_ID, 0, array("SORT" => "ASC", "ID" => "ASC"), false, array("ACTIVE" => "Y")); $arSections = array(); while ($arSection = $rsSections->Fetch()) { $arSections[] = $arSection; $arElementLinks[$arSection["ID"]] = array(); } } if ($ID > 0) { $arSelect = array("ID", "IBLOCK_ID", "DETAIL_PAGE_URL", "IBLOCK_SECTION_ID"); $arFilter = array("ID" => $ID, "ACTIVE" => "Y", "IBLOCK_ID" => $IBLOCK_ID); if ($rsElements = GetIBlockElementListEx($IBLOCK_TYPE, false, false, array(), false, $arFilter, $arSelect)) { while ($arElement = $rsElements->GetNext()) { $arElementLinks[$arElement["IBLOCK_SECTION_ID"]][] = $arElement["DETAIL_PAGE_URL"]; } } } foreach ($arSections as $arSection) { // пройдемся по элементам раздела $aMenuLinksNew[] = array($arSection["NAME"], SITE_DIR . $SECTION_URL . "SECTION_ID=" . $arSection["ID"], $arElementLinks[$arSection["ID"]]); } // сохраняем данные в кэше if ($obMenuCache->StartDataCache()) { $obMenuCache->EndDataCache(array("arSections" => $arSections, "arElementLinks" => $arElementLinks)); } } return $aMenuLinksNew;
} $arrCompareList = $_SESSION[$NAME][$IBLOCK_ID]; // array for storing the IDs of elements that are being campared ?> <a name="compare_list"></a><?php if (is_array($arrCompareList) && count($arrCompareList) > 0) { /************************************************************************* Work with cache *************************************************************************/ $CACHE_ID = SITE_ID . "|" . __FILE__ . "|" . md5(serialize($arParams) . "|" . serialize($arrCompareList) . "|" . $USER->GetGroups()); $obCache = new CPHPCache(); if ($obCache->StartDataCache($CACHE_TIME, $CACHE_ID, "/")) { foreach ($arrCompareList as $eid) { $aFilter["ID"][] = $eid; } if ($rsElements = GetIBlockElementListEx($IBLOCK_TYPE, false, false, array($ELEMENT_SORT_FIELD => $ELEMENT_SORT_ORDER, "ID" => "DESC"), false, $aFilter, array("ID", "NAME", "IBLOCK_ID", "DETAIL_PAGE_URL"))) { /**************************************************************** HTML form ****************************************************************/ ?> <?php echo ShowNote($strNote); ?> <?php echo ShowError($strError); ?> <table cellspacing=0 cellpadding=1 class="tableborder"> <form action="<?php echo $COMPARE_URL; ?> " method="GET">
if (is_array($prop["VALUE"]) && count($prop["VALUE"]) > 0 || !is_array($prop["VALUE"]) && strlen($prop["VALUE"]) > 0) { $arResult["DISPLAY_PROPERTIES"][$pid] = CIBlockFormatProperties::GetDisplayValue($arResult, $prop, "catalog_out"); } } $arResult["MORE_PHOTO"] = array(); if (isset($arResult["PROPERTIES"]["MORE_PHOTO"]["VALUE"]) && is_array($arResult["PROPERTIES"]["MORE_PHOTO"]["VALUE"])) { foreach ($arResult["PROPERTIES"]["MORE_PHOTO"]["VALUE"] as $FILE) { $FILE = CFile::GetFileArray($FILE); if (is_array($FILE)) { $arResult["MORE_PHOTO"][] = $FILE; } } } $arResult["LINKED_ELEMENTS"] = array(); if (strlen($arParams["LINK_PROPERTY_SID"]) > 0 && strlen($arParams["LINK_IBLOCK_TYPE"]) > 0 && $arParams["LINK_IBLOCK_ID"] > 0) { $rsLinkElements = GetIBlockElementListEx($arParams["LINK_IBLOCK_TYPE"], $arParams["LINK_IBLOCK_ID"], array(), array(), false, array("PROPERTY_" . $arParams["LINK_PROPERTY_SID"] => $arResult["ID"]), array("ID", "IBLOCK_ID", "NAME", "DETAIL_PAGE_URL", "IBLOCK_NAME")); while ($ar = $rsLinkElements->GetNext()) { $arResult["LINKED_ELEMENTS"][] = $ar; } } $arSectionFilter = array("IBLOCK_ID" => $arResult["IBLOCK_ID"], "ACTIVE" => "Y"); if ($arParams["SECTION_ID"]) { $arSectionFilter["ID"] = $arParams["SECTION_ID"]; } elseif ($arResult["IBLOCK_SECTION_ID"]) { $arSectionFilter["ID"] = $arResult["IBLOCK_SECTION_ID"]; } elseif ($arParams["SECTION_CODE"]) { $arSectionFilter["CODE"] = $arParams["SECTION_CODE"]; } $rsSection = CIBlockSection::GetList(array(), $arSectionFilter); if ($arResult["SECTION"] = $rsSection->GetNext()) { if (strlen($arParams["SECTION_URL"]) > 0) {
Work with cache *************************************************************************/ $found = "N"; $obCache = new CPHPCache(); $CACHE_ID = __FILE__ . md5(serialize($arParams) . $USER->GetGroups()); if ($obCache->InitCache($CACHE_TIME, $CACHE_ID, "/")) { $arVars = $obCache->GetVars(); $arElement = $arVars["arElement"]; $arProperty = $arVars["arProperty"]; $arSection = $arVars["arSection"]; $arrPath = $arVars["arrPath"]; $found = "Y"; } else { if ($ELEMENT_ID > 0) { $arSelect = array("ID", "NAME", "IBLOCK_ID", "IBLOCK_SECTION_ID", "PROPERTY_*", "DETAIL_PICTURE", "PREVIEW_PICTURE", "DETAIL_TEXT", "DETAIL_TEXT_TYPE", "PREVIEW_TEXT", "SECTION_PAGE_URL", "PREVIEW_TEXT_TYPE"); if ($rsElement = GetIBlockElementListEx($IBLOCK_TYPE, false, false, array(), false, array("ID" => $ELEMENT_ID), $arSelect)) { if ($obElement = $rsElement->GetNextElement()) { $found = "Y"; $arElement = $obElement->GetFields(); $arProperty = $obElement->GetProperties(); } } if ($rsSection = CIBlockSection::GetList(array(), array("IBLOCK_ID" => $IBLOCK_ID, "ID" => $arElement["IBLOCK_SECTION_ID"], "ACTIVE" => "Y"))) { $arSection = $rsSection->GetNext(); } $arrPath = array(); $rsPath = GetIBlockSectionPath($IBLOCK_ID, $arElement["IBLOCK_SECTION_ID"]); while ($arPath = $rsPath->GetNext()) { $arrPath[] = array("ID" => $arPath["ID"], "NAME" => $arPath["NAME"]); } }
if ($list != "") { } else { $sss = 0; $arFilter = array('IBLOCK_ID' => 5, 'ACTIVE' => 'Y'); $db_list = CIBlockSection::GetList(array("SORT" => "ASC"), $arFilter); while ($ar_result = $db_list->GetNext()) { $list["{$sss}"] = $ar_result['ID']; $sss++; } } //print_r($list); $arOutput = array("PREVIEW_PICTURE", "DETAIL_PAGE_URL", "NAME", "SECTION_ID", "IBLOCK_SECTION_ID", "PROPERTY_F_TYPE", "PROPERTY_COLLECTION", array("PROPERTY_W_SEARCH_PARAM")); $sc = "%" . $q . "%"; $items = array(); foreach ($list as $_list) { $items = GetIBlockElementListEx("catalogue", "furniture", array(), array("SORT" => "ASC"), 10000, array("NAME" => $sc, "SECTION_ID" => $_list), $arOutput); /*echo ("<br><br> <pre>"); print_r($res_items); echo ("</pre>"); */ ?> <a name="list"> <?php // цикл по всем новост¤м $cnt = 0; while ($arItem = $items->GetNext()) { $listItem[$arItem["ID"]] = $arItem; $cnt++; } }