PageRenderTime 57ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 1ms

/bitrix_personal/templates/beta2.citrus.ua/components/delta/catalog.element/.default/template.php

https://bitbucket.org/spivovartsev/citrus.ua
PHP | 1967 lines | 1468 code | 230 blank | 269 comment | 197 complexity | a0caa7d353d594243c6b2aac2bc6adee MD5 | raw file
Possible License(s): BSD-3-Clause

Large files files are truncated, but you can click here to view the full file

  1. <?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
  2. <?php
  3. // редирект на страницу товара с родной секцией товара
  4. $googIblockSection = 0;
  5. $sql = "SELECT bise.`IBLOCK_SECTION_ID`
  6. FROM `b_iblock_section_element` AS bise
  7. JOIN `b_iblock_section` AS bis ON bis.`ID` = bise.`IBLOCK_SECTION_ID` AND bis.`NAME` != 'Все товары'
  8. WHERE bise.`IBLOCK_ELEMENT_ID` = '{$arResult["ID"]}'
  9. LIMIT 1";
  10. $result = mysql_query($sql);
  11. if (mysql_num_rows($result) > 0) {
  12. $row = mysql_fetch_assoc($result);
  13. $arrRequestUri = explode('/', $_SERVER['REQUEST_URI']);
  14. $googIblockSection = $row['IBLOCK_SECTION_ID'];
  15. if ($row['IBLOCK_SECTION_ID'] != $arrRequestUri[4]) {
  16. $arrRequestUri = explode('/', $_SERVER['REQUEST_URI']);
  17. if ($_GET['acc']==1){$redirectUrl = '/' . $arrRequestUri[1] . '/' . $arrRequestUri[2] . '/' . $arrRequestUri[3] . '/'
  18. . $row['IBLOCK_SECTION_ID'] . '/' . $arResult["ID"]. '?acc=1';}
  19. else {$redirectUrl = '/' . $arrRequestUri[1] . '/' . $arrRequestUri[2] . '/' . $arrRequestUri[3] . '/'
  20. . $row['IBLOCK_SECTION_ID'] . '/' . $arResult["ID"];}
  21. /*$redirectUrl = '/' . $arrRequestUri[1] . '/' . $arrRequestUri[2] . '/' . $arrRequestUri[3] . '/'
  22. . $row['IBLOCK_SECTION_ID'] . '/' . $arResult["ID"];
  23. */
  24. header("HTTP/1.1 301 Moved Permamently");
  25. header("Location: http://" . $_SERVER['HTTP_HOST'] . $redirectUrl);
  26. die();
  27. }
  28. }
  29. mysql_free_result($result);
  30. require $_SERVER['DOCUMENT_ROOT'] . '/bitrix/templates/main-template/catalog-functions.php';
  31. $objImageGd = new Vi_Image_Gd();
  32. $arrIblockNames = getIblocksNames_forGoodsNames();
  33. $arrIblock = getIblocksNames_howItIsInDB();
  34. ?>
  35. <?php
  36. //-----------------------------------------------------------------------------------------------
  37. // получаем названия секций товаров
  38. $arrSectionsName = array();
  39. $iblockId = (int) $arResult["IBLOCK_ID"];
  40. $sql = "SELECT `ID`, `NAME`
  41. FROM `b_iblock_section`
  42. WHERE `IBLOCK_ID` = '{$iblockId}'";
  43. $result = mysql_query($sql);
  44. if (mysql_num_rows($result) > 0) {
  45. while ($row = mysql_fetch_assoc($result)) {
  46. $id = (int) $row['ID'];
  47. $arrSectionsName[$id] = stripslashes($row['NAME']);
  48. }
  49. }
  50. $sql = "SELECT `ID`
  51. FROM `b_iblock_section`
  52. WHERE `IBLOCK_ID` = '{$iblockId}'
  53. AND `NAME` = 'Все товары'";
  54. $result = mysql_query($sql);
  55. if (mysql_num_rows($result) > 0) {
  56. $row = mysql_fetch_assoc($result);
  57. $id2 = (int) $row['ID'];
  58. }
  59. mysql_free_result($result);
  60. $arrRequestUri = explode('/', $_SERVER['REQUEST_URI']);
  61. $pathToDescription = $_SERVER['DOCUMENT_ROOT'] . '/' . $arrRequestUri[1] . '/' . $arrRequestUri[2] . '/' . $arrRequestUri[3];
  62. global $pageTitle, $pageKeywords, $pageDescription;
  63. if (is_file($pathToDescription . '/.section.php')) {
  64. include $pathToDescription . '/.section.php';
  65. $pageH1 = $arrIblockNames[$arResult["IBLOCK_ID"]] . ' ' . $arResult["NAME"];
  66. $pageN = $arResult["NAME"];
  67. }
  68. // формируем хлебные крошки
  69. require $_SERVER['DOCUMENT_ROOT'] . '/bitrix/templates/main-template/breadcrumbs.php';
  70. $arrCrumbs = array();
  71. $arrCrumbs[] = array(
  72. 'link' => 'http://www.citrus.ua/',
  73. 'name' => 'Главная'
  74. );
  75. $arrCrumbs[] = array(
  76. 'link' => 'http://www.citrus.ua/shop/goods/' . $arrRequestUri[3] . '/' . $id2 . '/',
  77. 'name' => $catPrefixName
  78. );
  79. $arrCrumbs[] = array(
  80. 'link' => 'http://www.citrus.ua/shop/goods/' . $arrRequestUri[3] . '/' . $arrRequestUri[4] . '/',
  81. 'name' => $arrSectionsName[$arrRequestUri[4]]
  82. );
  83. $arrCrumbs[] = array(
  84. /*'link' => 'http://www.citrus.ua/shop/goods/' . $arrRequestUri[3] . '/' . $arrRequestUri[4] . '/' . $arResult["ID"],*/
  85. 'name' => $arResult["NAME"]
  86. );
  87. echo getBreadcrumbsXhtml($arrCrumbs);
  88. //-------------------------------------------------------------------------------------------------------------------------
  89. ?>
  90. <div class="catalog-element">
  91. <style type="text/css">
  92. .catalog-element {
  93. ___width: 960px;
  94. }
  95. .catalog-element {
  96. overflow: inherit;
  97. }
  98. .breadcrumbs {
  99. float: inherit;
  100. }
  101. </style>
  102. <?php
  103. echo "<div class='top_h1'><h1>" . $pageH1 . "</h1></div>";
  104. //----------------------------------новый шаблон----------------------------
  105. ?>
  106. <!-- <script src="http://code.jquery.com/jquery-1.6.3.min.js"></script> -->
  107. <script>
  108. $(document).ready(function() {
  109. // $(".tab_all").hide(); // Initially hide all content
  110. // $("#tabs li:first").attr("id","current"); // Activate first tab
  111. // $(".tab_all:first").fadeIn(); // Show first tab content
  112. $(".acc").attr("id","current"); // Activate first tab
  113. // $(".tab_all .acc").css("display", "block"); // Show first tab content
  114. $(".tab_all").css("display", "none");; // Show first tab content
  115. // $(".acc").css("display", "block"); // Show first tab content
  116. $(".acc1").fadeIn();; // Show first tab content
  117. $('#tabs a').click(function(e) {
  118. e.preventDefault();
  119. $(".tab_all").hide(); //Hide all content
  120. $("#tabs li a").attr("id",""); //Reset id's
  121. //$(this).parent().attr("id","current"); // Activate this
  122. $(this).attr("id","current"); // Activate this
  123. $('#' + $(this).attr('tabl')).fadeIn(); // Show content for current tab
  124. });
  125. $('a[rel=external]').attr('target','_blank');
  126. });
  127. </script>
  128. <ul id="tabs">
  129. <?
  130. if ($_GET['acc']==1){?><li><a href="#" id="tab1" tabl="tab1" title="Витрина">Витрина</a></li><?}
  131. else {?><li><a class="acc" href="#" id="tab1" tabl="tab1" title="Витрина">Витрина</a></li><?}
  132. ?>
  133. <!--<li><a href="#" id="tab1" tabl="tab1" title="Витрина">Витрина</a></li>-->
  134. <li><a href="#" id="tab2" tabl="tab2" title="Характеристики">Характеристики</a></li>
  135. <li><a href="#" id="tab3" tabl="tab3" title="Отзывы">Отзывы</a></li>
  136. <li><a href="#" id="tab4" tabl="tab4" title="Сравнить">Сравнить</a></li>
  137. <li><a href="#" id="tab5" tabl="tab5" title="Похожие товары">Похожие товары</a></li>
  138. <?
  139. if ($_GET['acc']==1){?><li><a class="acc" href="#" id="tab6" tabl="tab6" title="Акессуары">Аксессуары</a></li><?}
  140. else {?><li><a href="#" id="tab6" tabl="tab6" title="Акессуары">Аксессуары</a></li><?}
  141. ?>
  142. <!--
  143. <li><a class="acc" href="#" id="tab6" tabl="tab6" title="Акессуары">Акессуары</a></li>
  144. -->
  145. </ul>
  146. <div id="content_m">
  147. <?
  148. if ($_GET['acc']==1){?><div class="tab_all" id="tab1"><?}
  149. else {?><div class="tab_all acc1" id="tab1"><?}
  150. ?>
  151. <!--
  152. <div class="tab_all" id="tab1">
  153. -->
  154. <!------------------------------------------------------------------------------------------------>
  155. <table class="content-top" width="100%" border="0">
  156. <tr>
  157. <td class="big-photo33">
  158. <?php
  159. //echo '<div class="big-photo">';
  160. $label = 0;
  161. /*if ($arResult["IBLOCK_ID"] == 22) {
  162. if (substr_count($arResult["NAME"], 'Sony') || substr_count($arResult["NAME"], 'SONY')) {
  163. $label = 3;
  164. }
  165. }*/
  166. foreach ($arResult['PROPERTIES']['STATE']['VALUE'] as $stateValue) {
  167. if ($stateValue == 'Новинка') {
  168. $label = 3000;
  169. echo '<span class="vm_new_b vm_sd_b"></span>';
  170. }
  171. if ($stateValue == 'Рапродажа') {
  172. $label = 1000;
  173. echo '<span class="vm_best_price_b vm_sd_b"></span>';
  174. }
  175. if ($stateValue == 'Скоро в продаже') {
  176. $label = 5000;
  177. echo '<span class="vm_soon_b vm_sd_b"></span>';
  178. }
  179. if ($stateValue == 'Специальное предложение') {
  180. $label = 4000;
  181. echo '<span class="vm_action_b vm_sd_b"></span>';
  182. }
  183. if ($stateValue == 'Top 10') {
  184. $label = 8000;
  185. echo '<span class="vm_hit_b vm_sd_b"></span>';
  186. }
  187. if ($stateValue == 'Акция Цитрус-Обмен') {
  188. $label = 9000;
  189. echo '<span class="vm_action_b vm_sd_b"></span>';
  190. }
  191. if ($stateValue == 'Две сим-карты') {
  192. $label = 10000;
  193. echo '<span class="vm_2sim_b vm_sd_b"></span>';
  194. }
  195. }
  196. // формируем строку Id для галереи
  197. //echo "<pre>";
  198. //print_r ($arResult["MORE_PHOTO"]);
  199. //echo "</pre>";
  200. foreach ($arResult["MORE_PHOTO"] as $PHOTO) {
  201. $i+=1;
  202. $id_str[$i] = $PHOTO["ID"];
  203. }
  204. $id_st = implode(",", $id_str);
  205. echo '<div class="big-photo">';
  206. if (count($arResult["MORE_PHOTO"]) > 0) {
  207. echo '<a rel="external" href="/gallery/index.php?id='.$id_st.'&current='.$arResult["MORE_PHOTO"]["0"]["ID"].'">';
  208. } else {
  209. echo '<a rel="external" href="/gallery/index.php?id&current='.$arResult["ID"].'">';
  210. }
  211. //echo '<a href="/gallery/index.php?id='.$id_st.'&current='.$arResult["MORE_PHOTO"]["0"]["ID"].'">';
  212. if (is_array($arResult["DETAIL_PICTURE"])) {
  213. // если надо ватемарк на фотографии, то поменять с нижней
  214. //echo '<img border="0" src="' . $objImageGd->getImage($arResult["DETAIL_PICTURE"]["SRC"], 200, 400, $label)
  215. //echo '<img width="200" border="0" src="' . $objImageGd->getImage($arResult["DETAIL_PICTURE"]["SRC"], 200, 400, 0)
  216. echo '<img border="0" src="' . $objImageGd->getImage($arResult["DETAIL_PICTURE"]["SRC"], 200, 400, 0)
  217. . '" alt="' . $arrIblock[$arResult["IBLOCK_ID"]] . ' - ' . $arResult["NAME"]
  218. . '" title="' . $arResult["NAME"] . '" />';
  219. } elseif (is_array($arResult["PREVIEW_PICTURE"])) {
  220. // если надо ватемарк на фотографии, то поменять с нижней
  221. //echo '<img border="0" src="' . $objImageGd->getImage($arResult["PREVIEW_PICTURE"]["SRC"], 200, 400, $label)
  222. echo '<img width="200" border="0" src="' . $objImageGd->getImage($arResult["PREVIEW_PICTURE"]["SRC"], 200, 400, 0)
  223. . '" alt="' . $arrIblock[$arResult["IBLOCK_ID"]] . ' - ' . $arResult["NAME"]
  224. . '" title="' . $arResult["NAME"] . '" />';
  225. }
  226. echo "</a>";
  227. //БАННЕР ПОД ФОТО
  228. ?>
  229. <div class="banner_bottom_photo"><center>
  230. <?php echo ($arResult['PROPERTIES']['LABEL5']['~VALUE']['TEXT']); ?>
  231. </center>
  232. </div>
  233. <?php
  234. echo '</div>';
  235. ?>
  236. </td>
  237. <td rowspan="5" style="height: 100%;" width="420px;">
  238. <!-- ------------------------------ таблица справа --->
  239. <table class="content-right" width="100%" border="0">
  240. <tr>
  241. <td valign="top" align="right">
  242. <!-- блок с ценами -->
  243. <?php
  244. $xHtml33 = '';
  245. $xHtml44 = '';
  246. $off_line= 0 ;
  247. $lending_line = 0 ;
  248. foreach ($arResult["PRICES"] as $code => $arPrice) {
  249. if($arPrice["VALUE"] < 1 OR $arPrice["VALUE"] > 2 ){
  250. if ($arResult['PROPERTIES']['OBMEN']['VALUE']=='') {
  251. //Вывод цены розницы
  252. if ($code == 'RETAIL') {
  253. $xHtml33 .= '&nbsp;&nbsp;&nbsp;';
  254. if ($arPrice["DISCOUNT_VALUE"] < $arPrice["VALUE"]) {
  255. $xHtml33 .= '<s>' . $arPrice["PRINT_VALUE"] . '</s>';
  256. $newphrase = str_replace("грн.", "<span class='price34'>грн</span>", $arPrice["PRINT_DISCOUNT_VALUE"]);
  257. $newphrase = str_replace(".00", "", $newphrase);
  258. $xHtml33 .= '<span class="catalog-price trrtr">' . $newphrase . '</span>';
  259. $price_credit = $arPrice["DISCOUNT_VALUE"];
  260. } else {
  261. $newphrase = str_replace("грн.", "<span class='price34'>грн</span>", $arPrice["PRINT_VALUE"]);
  262. $newphrase = str_replace(".00", "", $newphrase);
  263. $xHtml33 .= '<span class="catalog-price trrtr">' . $newphrase . '</span>';
  264. $price_credit = $arPrice["VALUE"];
  265. }
  266. }
  267. } else {
  268. //Вывод цены Акционного поля
  269. if ($code == 'STOCK') {
  270. $xHtml33 .= '&nbsp;&nbsp;&nbsp;';
  271. if ($arPrice["DISCOUNT_VALUE"] < $arPrice["VALUE"]) {
  272. $xHtml33 .= '<s>' . $arPrice["PRINT_VALUE"] . '</s>';
  273. $newphrase = str_replace("грн.", "<span class='price34'>грн</span>", $arPrice["PRINT_DISCOUNT_VALUE"]);
  274. $newphrase = str_replace(".00", "", $newphrase);
  275. $xHtml33 .= '<span class="catalog-price trrtr">' . $newphrase . '</span>';
  276. $price_credit = $arPrice["DISCOUNT_VALUE"];
  277. } else {
  278. $newphrase = str_replace("грн.", "<span class='price34'>грн</span>", $arPrice["PRINT_VALUE"]);
  279. $newphrase = str_replace(".00", "", $newphrase);
  280. $xHtml33 .= '<span class="catalog-price trrtr">' . $newphrase . '</span>';
  281. $price_credit = $arPrice["VALUE"];
  282. }
  283. }
  284. }
  285. $code_s = 'OFFLINE';
  286. if ($arResult['PROPERTIES']['OBMEN']['VALUE']=='' && $code == 'OFFLINE' ) {
  287. $code_s = 'OFFLINE';
  288. }elseif ($arResult['PROPERTIES']['OBMEN']['VALUE']<>'' && $code == 'OFFLINE'){
  289. $code_s = 'RETAIL';
  290. }elseif ($arResult['PROPERTIES']['OBMEN']['VALUE']<>'' && $code == 'RETAIL'){
  291. $code_s = 'RETAIL';
  292. }
  293. // echo $code . "=" . $code_s . "<br />";
  294. // if ($code == 'OFFLINE' && $arResult["PRICES"]['RETAIL']["VALUE"] < $arPrice["VALUE"] && $arResult["PRICES"]['LENDING']["VALUE"]=='') {
  295. if (($code == 'OFFLINE' AND $arResult['PROPERTIES']['OBMEN']['VALUE']=='') OR ($code == 'RETAIL' AND $arResult['PROPERTIES']['OBMEN']['VALUE']<>'')) {
  296. // echo "=======";
  297. $xHtml44 .= '&nbsp;&nbsp;&nbsp;';
  298. if ($arPrice["DISCOUNT_VALUE"] < $arPrice["VALUE"]) {
  299. $price_credit = $arResult["PRICES"][$code_s]["DISCOUNT_VALUE"];
  300. $newphrase = str_replace("грн.", "", $arResult["PRICES"][$code_s]["PRINT_DISCOUNT_VALUE"]);
  301. $newphrase = str_replace(".00", "", $newphrase);
  302. if ($arResult['PROPERTIES']['LENDING']['VALUE']<>'да' && $arResult['PROPERTIES']['OBMEN']['VALUE'] == '' ) {
  303. $xHtml44 .= '<span class="catalog-price-offline dss"><strike>' . $newphrase . '</strike></span>';
  304. } else {
  305. $xHtml44 .= '<span class="catalog-price-offline dss">' . $newphrase . '</span>';
  306. }
  307. } else {
  308. $price_credit =$arResult["PRICES"][$code_s]["VALUE"];
  309. $newphrase = str_replace("грн.", "", $arResult["PRICES"][$code_s]["PRINT_VALUE"]);
  310. $newphrase = str_replace(".00", "", $newphrase);
  311. if ($arResult['PROPERTIES']['LENDING']['VALUE']<>'да' && $arResult['PROPERTIES']['OBMEN']['VALUE'] == '') {
  312. $xHtml44 .= '<span class="catalog-price-offline dss"><strike>' . $newphrase . '</strike></span>';
  313. } else {
  314. $xHtml_bez_nal .= '<tr> <td colspan="2" class="ttte45"><span class="text_1120">цена б/н</span>
  315. <span class="catalog-price-offline dss">' . $newphrase . '</span><span class="price34">грн</span>
  316. </td>
  317. <td>
  318. </td>
  319. </tr>';
  320. }
  321. }
  322. }
  323. }
  324. else{
  325. // $xHtml33 .= '<span class="catalog-price trrtr2">' . 'Уже скоро!' . '</span>';
  326. $xHtml33 .= '<style type="text/css"> .top44 {display: none;} </style>';
  327. //$xHtml33 .= '<style type="text/css"> .element-cart-btn {display: none;} </style>';
  328. }
  329. }
  330. ?>
  331. <table cellpadding="0" cellspacing="0" class="yyy" width="330" border="0">
  332. <tr>
  333. <td colspan="2" class="deliv_tab4" align="left">
  334. <?php
  335. if(($arPrice["VALUE"] < 1 OR $arPrice["VALUE"] > 2 )&&($arResult["CAN_BUY"])) {
  336. ?><img src="/img/vnalichii.png" /><span class="nalich">Есть в наличии</span><?
  337. } else {
  338. ?><img src="/img/netvnalichii.png" /><span class="nalichno">Нет в наличии</span><?
  339. }
  340. ?>
  341. </td>
  342. <td align="right" class="deliv_tab4">
  343. <?php
  344. echo "<span class='code_deliv'>Код товара : ".$arResult["ID"]."<span>";
  345. ?>
  346. </td>
  347. </tr>
  348. <tr>
  349. <!-- <td class="yyy1">
  350. <div class="top44">
  351. <span class="d44">цена</span>
  352. <?php
  353. echo '<span class="d45">';
  354. if ($arResult['PROPERTIES']['OBMEN']['VALUE'] <> '' && $arResult["PRICES"]['STOCK']["VALUE"]<> '' ) {
  355. // если стоит значение "Акционная цена" меняем местами надписи
  356. echo 'в нашем магазине';
  357. } else {
  358. if ($arResult["PRICES"]['OFFLINE']["VALUE"] <> '' && $arResult['PROPERTIES']['LENDING']['VALUE']=='да' ) {
  359. echo 'цена б/н, кредит';
  360. }
  361. if ($arResult["PRICES"]['OFFLINE']["VALUE"] <> '' && $arResult['PROPERTIES']['LENDING']['VALUE']<>'да' ) {
  362. echo 'в обычном магазине';
  363. }
  364. }
  365. echo '</span>';
  366. // нижняя строка
  367. //if ($arResult["PRICES"]['OFFLINE']["VALUE"] <> '' && $arResult['PROPERTIES']['OBMEN']['VALUE']<>'' ) {
  368. if ($arResult['PROPERTIES']['OBMEN']['VALUE']<>'' ) {
  369. echo '<strong>' . $arResult['PROPERTIES']['OBMEN']['VALUE'] . '</strong>';
  370. } else {
  371. echo '<span class="d46">в нашем магазине</span>';
  372. }
  373. // if ($arResult["PRICES"]['LENDING']["VALUE"]<>'') {
  374. // echo '<span class="d49">цена б/н, кредит</span>';
  375. // }
  376. ?>
  377. </div>
  378. </td>-->
  379. <td class="yyy2" colspan="2">
  380. <?php
  381. echo $xHtml44;
  382. echo $xHtml33;
  383. ?>
  384. </td>
  385. <td align="right" class="yyy2">
  386. <?php
  387. //------------------------------------------------------------------------------------------------------------------
  388. $arrMapsModelsnexus7 = array(39978);
  389. $arrMapsModelsnexus72 = array(41530);
  390. $arrMapsModels = array(36216);
  391. $arrMapsModelsHTCX = array(35464,35452);
  392. $arrMapsModelsGalaxyS3 = array(37321,37317);
  393. $arrMapsModelsHTCC = array(35470,35468);
  394. $arrMapsModelsdesirec = array(37557,37555,37550);
  395. $arrMapsModelsdesirev = array(40307);
  396. echo '<ul class="element-cart-btn">';
  397. if($arPrice["VALUE"] < 1 OR $arPrice["VALUE"] > 2 ){
  398. if ($arResult["CAN_BUY"]) {
  399. echo '<li><noindex><a href="' . $arResult["BUY_URL"] . '" class="link-by" rel="nofollow"><span>'
  400. . GetMessage("CATALOG_BUY") . '</span></a></noindex></li>';
  401. } else {
  402. if (in_array($arResult["ID"], $arrMapsModels)) {
  403. echo '<li><noindex><a href="http://www.citrus.ua/order_htc_one_v" class="link-order"><span>оставить предзаказ</span></a></noindex></li>';
  404. } elseif (in_array($arResult["ID"], $arrMapsModelsHTCX )) {
  405. echo '<li><noindex><a href="http://www.citrus.ua/order_htc_one_x" class="link-order"><span>оставить предзаказ</span></a></noindex></li>';
  406. } elseif (in_array($arResult["ID"], $arrMapsModelsGalaxyS3 )) {
  407. echo '<li><noindex><a href="http://www.citrus.ua/order_galaxy_s_3" class="link-order"><span>оставить предзаказ</span></a></noindex></li>';
  408. } elseif (in_array($arResult["ID"], $arrMapsModelsHTCC)) {
  409. echo '<li><noindex><a href="http://www.citrus.ua/madonna_order" class="link-order"><span>оставить предзаказ</span></a></noindex></li>';
  410. } elseif (in_array($arResult["ID"], $arrMapsModelsdesirec)) {
  411. echo '<li><noindex><a href="http://www.citrus.ua/order_desire_c" class="link-order"><span>оставить предзаказ</span></a></noindex></li>';
  412. } elseif (in_array($arResult["ID"], $arrMapsModelsdesirev)) {
  413. echo '<li><noindex><a href="http://www.citrus.ua/order_desire_v" class="link-order"><span>оставить предзаказ</span></a></noindex></li>';
  414. } elseif (in_array($arResult["ID"], $arrMapsModelsnexus7)) {
  415. echo '<li><noindex><a href="http://www.citrus.ua/nexus_7" class="link-order"><span>оставить предзаказ</span></a></noindex></li>';
  416. } elseif (in_array($arResult["ID"], $arrMapsModelsnexus72)) {
  417. echo '<li><noindex><a href="http://www.citrus.ua/nexus_7_16" class="link-order"><span>оставить предзаказ</span></a></noindex></li>';
  418. } else {
  419. echo '<li><noindex><a href="/preorder.php?id=' . $arResult["ID"]
  420. . '" class="link-order iframe" rel="nofollow"><span>оставить предзаказ</span></a></noindex></li>';
  421. }
  422. }
  423. }
  424. else {
  425. if (in_array($arResult["ID"], $arrMapsModelsnexus7)) {
  426. echo '<li><noindex><a href="http://www.citrus.ua/nexus_7" class="link-order"><span>оставить предзаказ</span></a></noindex></li>';
  427. } elseif (in_array($arResult["ID"], $arrMapsModelsnexus7)) {
  428. echo '<li><noindex><a href="http://www.citrus.ua/nexus_7" class="link-order"><span>оставить предзаказ</span></a></noindex></li>';
  429. } else {
  430. echo '<li><noindex><a href="/notice.php?id=' . $arResult["ID"]
  431. . '" class="link-know iframe" rel="nofollow"><span>уведомить о наличии</span></a></noindex></li>';
  432. // . '" class="link-order iframe" rel="nofollow"><span>Заказать</span></a></noindex></li>';
  433. }
  434. }
  435. echo '</ul>';
  436. ?>
  437. <!-- конпка купить -->
  438. </td>
  439. </tr>
  440. <?
  441. $arGroups = CUser::GetUserGroup($USER->GetID());
  442. //print_r($arGroups);
  443. $flgr=0;
  444. for ($i=0; $i < count($arGroups); $i++)
  445. {
  446. if ($arGroups[$i] == 1){$flgr=1;}
  447. //if ($arGroups[$i] == 12){$flgr=1;}
  448. if ($arGroups[$i] == 1){$flgr=1;}
  449. }
  450. //$flgr=1;
  451. if ($arResult["ID"]=="36685" OR $arResult["ID"]=="46628" OR $arResult['ID']=="33869"){$flgr=1;}
  452. if ($flgr==1)
  453. {
  454. ?>
  455. <!-- конпка кредита -->
  456. <tr>
  457. <td class="yyy2">
  458. <span style="color:#FFF" class="text_credit">кредит</span>
  459. </td>
  460. <td class="yyy2">
  461. <script src="/js2/loan-math.js"></script>
  462. <script src="/js2/products.js"></script>
  463. <script type="text/javascript">
  464. function showLoanInfo2(L1) {
  465. var
  466. S =('<div class="text_credit_d">'+Number(Amount2Str(L1.payment)).toFixed(0)+'&nbsp;</div>');
  467. S +=('<div class="text_credit_ccccc"><table class="table_cccc"><tr><td class="table_cccc1">грн</td></tr><tr><td class="table_cccc2">мес</td></tr></table></div>');
  468. document.write(S);
  469. }
  470. var loan = new Loan("15333.001", <?=$price_credit?>, 0, 24);
  471. showLoanInfo2(loan);
  472. </script>
  473. </td>
  474. <td align="right" class="yyy2">
  475. <noindex>
  476. <a rel="nofollow" class="link-credit jqModal" href="#"><span>Кредит</span></a>
  477. </noindex>
  478. </td>
  479. </tr>
  480. <?
  481. }
  482. ?>
  483. <!-- кнопка кредита окончание блока -->
  484. <?php
  485. // цена безналичная
  486. echo $xHtml_bez_nal;
  487. ?>
  488. <tr>
  489. <td colspan="3" style="padding:0px 0 0 0" align="right">
  490. </td>
  491. </tr>
  492. <tr>
  493. </tr>
  494. </table>
  495. <!-- блок с ценами -->
  496. </td>
  497. </tr>
  498. <tr>
  499. <td style="padding:15px 0;font-size: 12pt;">
  500. <?php
  501. //Вывод текста под ценой
  502. //echo $arResult['PROPERTIES']['under_pricing']['VALUE']['TEXT'];
  503. $dwkwa_out = $arResult['PROPERTIES']['under_pricing']['~VALUE']['TEXT'];
  504. $dwkwa_out = str_replace("&lt;","<",$dwkwa_out);
  505. $dwkwa_out = str_replace("&gt;",">",$dwkwa_out);
  506. print_r($dwkwa_out);
  507. ?>
  508. <br />
  509. </td>
  510. </tr>
  511. <tr>
  512. <td class="deliv_tab2">
  513. <!-- город -->
  514. <?php
  515. require_once $_SERVER['DOCUMENT_ROOT'] . '/geo_ip/select_s0.php';
  516. require_once $_SERVER['DOCUMENT_ROOT'] . '/geo_ip/select_s.php';
  517. ?>
  518. <!-- город конец -->
  519. </td>
  520. </tr>
  521. <tr>
  522. <td class="deliv_tab1">
  523. <!-- город -->
  524. <?php
  525. require_once $_SERVER['DOCUMENT_ROOT'] . '/geo_ip/geo_elem.php';
  526. ?>
  527. <!-- город конец -->
  528. </td>
  529. </tr>
  530. <tr>
  531. <td>
  532. <br />
  533. </td>
  534. </tr>
  535. <tr>
  536. <td class="deliv_tab3">
  537. <?php
  538. if ($arResult['PROPERTIES']['warranty']['VALUE']){
  539. echo '<div style="float: left;">';
  540. echo '<span class="deliv2">Гарантия&nbsp;</span><img src="/img/arrow_03.gif" />';
  541. echo '</div>';
  542. echo '<span class="ffreen435">'.$arResult['PROPERTIES']['warranty']['VALUE'].
  543. ' , обмен возврат товара в течении 14 дней</span>';
  544. }
  545. if ($arResult['PROPERTIES']['LOWCOST']['VALUE']=='yes') {
  546. echo '<br><span class="ffreen436">Самая низкая цена</span>';
  547. }
  548. ?>
  549. </td>
  550. </tr>
  551. <tr>
  552. <td>
  553. <div style="display:block;padding: 15px 0;">
  554. <script type="text/javascript" src="http://userapi.com/js/api/openapi.js?32"></script>
  555. <script type="text/javascript">
  556. VK.init({apiId: 2054133, onlyWidgets: true});
  557. </script>
  558. <div id="vk_like" style="float:left;"></div>
  559. <script type="text/javascript">
  560. VK.Widgets.Like("vk_like", {type: "button"});
  561. </script>
  562. <iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'] ?>&layout=button_count&show_faces=false&width=140&action=like&colorscheme=light&height=20" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:150px; float:right; height:22px;" allowTransparency="true"></iframe>
  563. <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="CitrusDiscount" data-lang="ru">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
  564. </div>
  565. </td>
  566. </tr>
  567. <tr>
  568. <td style="height:40px">
  569. <!-- <div class="buttons_10">
  570. <?php
  571. //КРЕДИТ
  572. $exclude_iblock_id = array('54', '55'); //массив ID разделов, в которых не отображается блок
  573. $min_price = 200; //минимальная цена товара, при которой блок отображается
  574. //if (($arPrice["VALUE"]>$min_price)&&(!in_array($arResult["IBLOCK_ID"], $exclude_iblock_id, false))){
  575. if (($arResult["PRICES"]['RETAIL']["VALUE"]>$min_price)&&(!in_array($arResult["IBLOCK_ID"], $exclude_iblock_id, false))){?>
  576. <div class="element-button element-credit">
  577. <a href="/shop/credit?utm_source=product_page&utm_medium=button&utm_campaign=credit">
  578. <img alt="Покупай в кредит" title="Покупай в кредит" src="/img/btn_credit_new.png" />
  579. </a>
  580. </div>
  581. <?php
  582. }
  583. //ЦИТРУС ОБМЕН
  584. if ($arResult["IBLOCK_ID"] == 20) {?>
  585. <div class="element-button element-trade-in" style="border:none;background-color:#fff;">
  586. <a href="//obmen.citrus.ua/?utm_source=product_page&utm_medium=button&utm_campaign=obmen">
  587. <img alt="Цитрус.ua Обмен" src="/img/btn_citrus_obmen.png" border="0" />
  588. </a>
  589. </div>
  590. <?php
  591. }
  592. //МАСТЕР ЦИТРУС
  593. if ($arResult["IBLOCK_ID"] == 20) {?>
  594. <div class="element-button element-master-citrus" style="background-color:#fff;heigth:auto;overflow:hidden;">
  595. <a href="/discount/master_mobile/?utm_source=product_page&utm_medium=button&utm_campaign=master_mobile" rel="nofollow">
  596. <img border="0" src="/img/btn_master_citrus_tel.png" alt="Цитрус-Мастер" align="left" />
  597. </a>
  598. </div>
  599. <?php
  600. }
  601. if ($arResult["IBLOCK_ID"] == 22) {?>
  602. <div class="element-button element-master-citrus" style="background-color:#fff;heigth:auto;overflow:hidden;">
  603. <a href="/discount/master_notebook/?utm_source=product_page&utm_medium=button&utm_campaign=master_notebook" rel="nofollow">
  604. <img border="0" src="/img/btn_master_citrus_tel.png" alt="Цитрус-Мастер" align="left" />
  605. </a>
  606. </div>
  607. <?php
  608. }
  609. ?>
  610. </div> -->
  611. </td>
  612. </tr>
  613. </table>
  614. <!-- ------------------------------- таблица справа конец -------->
  615. </td>
  616. </tr>
  617. <tr>
  618. <td>
  619. <script type="text/javascript" src="/js2/big-photo.js"></script>
  620. <span id="coherent_id_403">
  621. <?php if (count($arResult["MORE_PHOTO"]) > 0) { ?>
  622. <a rel="external" href="/gallery/index.php?id=<?=$id_st?>&current=<?=$arResult["MORE_PHOTO"]["0"]["ID"]?>" class="iframe400">увеличить изображение&nbsp;</a>
  623. <?php } else { ?>
  624. <a rel="external" href="/gallery/index.php?id&current=<?=$arResult["ID"]?>" class="iframe400">увеличить изображение&nbsp;</a>
  625. <?php }
  626. ?>
  627. </span>
  628. </td>
  629. </tr>
  630. <tr>
  631. <td>
  632. </td>
  633. </tr>
  634. <tr>
  635. <td>
  636. <script type='text/javascript'>
  637. var id = '<?=$id_st?>' ;
  638. </script>
  639. <?php
  640. //echo "<pre>";
  641. //print_r ($arResult["MORE_PHOTO"]);
  642. //echo "</pre>";
  643. //------------------------
  644. if (count($arResult["MORE_PHOTO"]) > 0) { // когда выводить картинку в строке, было если нет "1", сейчас всегда
  645. echo '<div class="big-photo-preview-carousel">';
  646. echo '<div class="big-photo-preview">';
  647. echo '<ul>';
  648. foreach ($arResult["MORE_PHOTO"] as $PHOTO) {
  649. echo '<li>';
  650. echo '<a class="img34" id="'. $PHOTO["ID"] .'" href="' . $objImageGd->getImage($PHOTO["SRC"], 200, 400, 0) . '" rel="photothumbs">';
  651. // echo '<a class="zoom2" href="' . $PHOTO["SRC"] . '" rel="photothumbs">';
  652. // echo '<a class="zoom2" href="' . $PHOTO["SRC"] . '">';
  653. echo '<div class="img33">';
  654. echo '<img class="img35" border="0" src="' . $objImageGd->getImage($PHOTO["SRC"], 80, 80, 0) . '" alt="'
  655. . $PHOTO["ALT"] . '" title="' . $arResult["NAME"] . '" />';
  656. echo '</div>';
  657. echo '</a>';
  658. echo '</li>';
  659. }
  660. echo '</ul>';
  661. echo '</div>';
  662. // if (count($arResult["MORE_PHOTO"]) > 0) { // когда показывать стрелки
  663. // echo '<a href="#" class="btn_next"><span>Вперед</span></a>';
  664. // echo '<a href="#" class="btn_prev"><span>Назад</span></a>';
  665. // }
  666. echo '</div>';
  667. }
  668. ?>
  669. </td>
  670. </tr>
  671. <?php
  672. if (is_array($arResult['PROPERTIES']['YOUTUBE']['~VALUE'])) {
  673. foreach ($arResult['PROPERTIES']['YOUTUBE']['~VALUE'] as $video) {
  674. if (substr($video, 0, 7) == 'http://') {
  675. $partsVideoUri = parse_url($video);
  676. $arrVideoQueryString = array();
  677. if ($partsVideoUri['query']) {
  678. parse_str($partsVideoUri['query'], $arrVideoQueryString);
  679. }
  680. ?>
  681. <tr>
  682. <script type="text/javascript">
  683. $(document).ready(function() {
  684. $('a.iframe<?=$arrVideoQueryString['v']?>').fancybox({
  685. 'frameWidth' : 600,
  686. 'frameHeight' : 370,
  687. 'zoomSpeedIn':500,
  688. 'zoomSpeedOut':500,
  689. 'overlayColor':'#fff'
  690. });
  691. });
  692. </script>
  693. <td class="">
  694. <div class="youtube">
  695. <a href="/gallery/video.php?id=<?=$arrVideoQueryString['v']?>" style="padding: 0 0 0 30px;line-height: 23px;padding: 0 0 0 30px;" class="iframe<?=$arrVideoQueryString['v']?>">видео-обзор&nbsp;(<?=$i0+=1?>)</a>
  696. </div>
  697. </td>
  698. </tr>
  699. <?php
  700. }
  701. }
  702. }
  703. ?>
  704. <tr>
  705. <td align="left">
  706. <?php require $_SERVER['DOCUMENT_ROOT'] . '/raiting/_drawrating.php'; ?>
  707. <?php echo rating_bar($arResult["ID"],5); ?>
  708. </td>
  709. </tr>
  710. </table>
  711. <?php if($arResult["PROPERTIES"]["banner_o"]["VALUE"]) { ?>
  712. <table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-color: #BBBBCC; border-style: dashed; border-width: 0 0 1px;">
  713. <tr>
  714. <td align="center" style="padding: 10px 0;">
  715. <?php
  716. echo '<img border="0" src="http://'.$_SERVER['HTTP_HOST'].CFile::GetPath($arResult["PROPERTIES"]["banner_o"]["VALUE"]).'"/>';
  717. //echo $_SERVER['HTTP_HOST'] . CFile::GetPath($arResult["PROPERTIES"]["banner_o"]["VALUE"]);
  718. ?>
  719. </td>
  720. </tr>
  721. </table>
  722. <?php } ?>
  723. <table width="100%" border="0" cellpadding="0" cellspacing="0" class="main_bord">
  724. <?php
  725. echo '<tr><td colspan="2" id="hhh4_1"><div id="top_y_1">Описание ' .$pageN . '</div></td></tr>';
  726. ?>
  727. <tr><td colspan="2" id="ffft">
  728. <div class="description">
  729. <?php echo $arResult['PREVIEW_TEXT'] ?>
  730. <br>
  731. <p>Купить <?php echo $arrIblockNames[$arResult["IBLOCK_ID"]] ?> <?php
  732. echo $arResult["NAME"] ?> вы можете в Интернет-магазине &laquo;Цитрус&raquo;.</p>
  733. <?php
  734. //НАДПИСЬ ГОСКОМ
  735. if ($arResult["IBLOCK_ID"] == 20 //добавляем надпись Госком только для Мобильных телефонов
  736. && $googIblockSection != 258 //но без IPhone Apple
  737. && $googIblockSection != 310 //и Blackberry
  738. && $arResult["ID"] != 9653)
  739. {
  740. echo '<p class="description-subblock" style="border:none;background-color:#fff;">';
  741. echo '<img alt="Сертифицированный товар" src="//img.citrus.com.ua/img/ua_ucrf.jpg" border="0" />';
  742. echo '</p>';
  743. }
  744. if ($arResult["IBLOCK_SECTION_ID"] == 150) {
  745. echo '<noindex><p class="description-subblock"><a href="http://www.ovi.com/" rel="nofollow">';
  746. echo '<img border="0" src="//img.citrus.com.ua/img/ovi2.gif" alt="Nokia - магазин OVI" width="53" height="40" align="left" hspace="10" />';
  747. echo '</a>';
  748. echo 'Расширяйте возможности телефона Nokia с помощью сервисов Nokia на
  749. <a href="http://www.ovi.com/" rel="nofollow">www.ovi.com</a>';
  750. echo '</p></noindex>';
  751. }
  752. $arrMapsModels = array(3317, 3314, 3307, 656, 652, 5255, 5259, 2679, 692, 776, 7276, 736, 742, 740, 6575, 5242, 5238, 6562, 5246, 8260, 8308);
  753. if (in_array($arResult["ID"], $arrMapsModels)) {
  754. echo '<div class="description"><p><noindex><a
  755. href="http://www.nokia.ru/explore-services/ovi-maps/downloads?t=navigation&ca=navq1&lid=navigation_navq1_displayad_ovimapsforfreehomepage_banner_228x96&lpos=row1_position1nokiaovimaps-fw-ilc-hero-con-na-nokiaua-ua-7-ovimapsforfreeservicespage_101#/default/"
  756. rel="nofollow">Установите программу для использования бесплатной навигации по Украине и миру с официального сайта Nokia</a></noindex></p></div>';
  757. }
  758. ?>
  759. <p class="link-back"><a href="<?php echo $arResult["SECTION"]["SECTION_PAGE_URL"] ?>"><span><img width="13" height="11" border="0" src="/img/nnn_08.png"></span>&nbsp;<?php
  760. echo GetMessage("CATALOG_BACK") ?> <?php echo $arrIblock[$arResult["IBLOCK_ID"]] ?></a></p>
  761. </div>
  762. </td></tr>
  763. <!--Функция прокрутки конец -->
  764. <tr>
  765. <td valign="top" class="small23">
  766. </td>
  767. </tr>
  768. <!--Функция прокрутки начало -->
  769. <!--Функция прокрутки-->
  770. <script type="text/javascript">
  771. //jQuery(function(){
  772. //jQuery(".gallery").jCarouselLite({
  773. // btnNext: ".right_btt",
  774. // btnPrev: ".left_btt",
  775. // mouseWheel: "true",
  776. // visible:4,
  777. // circular: false,
  778. // scroll:1
  779. // });});
  780. </script>
  781. <!--Функция прокрутки end-->
  782. <?php
  783. $arrAccessories = array();
  784. if (is_array($arResult['PROPERTIES']['ACCESSORIES']['VALUE'])) {
  785. foreach ($arResult['PROPERTIES']['ACCESSORIES']['VALUE'] as $item) {
  786. $itemId = (int) $item;
  787. if ($itemId > 0) {
  788. $arrAccessories[] = $itemId;
  789. }
  790. }
  791. }
  792. $xHtml = '';
  793. if (count($arrAccessories) > 0) {
  794. $strAccessories = "'" . implode("', '", $arrAccessories) . "'";
  795. $sql = "SELECT bie.`ID`, bie.`IBLOCK_SECTION_ID`, bie.`NAME`,
  796. bi.`DETAIL_PAGE_URL`,
  797. bf.`SUBDIR`, bf.`FILE_NAME`,
  798. bcp.`PRICE`, bcp.`CURRENCY`,
  799. bcpr.`QUANTITY`, bcpr.`QUANTITY_TRACE`
  800. FROM `b_iblock_element` AS bie
  801. JOIN `b_iblock` AS bi ON bi.`ID` = bie.`IBLOCK_ID`
  802. AND bi.`ACTIVE` = 'Y'
  803. JOIN `b_file` AS bf on bf.`ID` = bie.`PREVIEW_PICTURE`
  804. JOIN `b_catalog_price` AS bcp ON bcp.`PRODUCT_ID` = bie.`ID`
  805. AND bcp.`CATALOG_GROUP_ID` = '3'
  806. AND bcp.`EXTRA_ID` IS NULL
  807. LEFT JOIN `b_catalog_product` AS bcpr ON bcpr.`ID` = bie.`ID`
  808. WHERE bie.`ID` IN ({$strAccessories})
  809. AND bie.`ACTIVE` = 'Y'
  810. AND bie.`WF_PARENT_ELEMENT_ID` IS NULL
  811. ORDER BY bie.`NAME`
  812. ";
  813. $result = mysql_query($sql);
  814. //print_r ($arrAccessories);
  815. // Сортировка по тому, как расположены аксессуары в админке
  816. $i=0;
  817. if (mysql_num_rows($result) > 0) {
  818. while ($row = mysql_fetch_assoc($result)) {
  819. $row21[$i]['ID'] = $row['ID'];
  820. $row21[$i]['IBLOCK_SECTION_ID'] = $row['IBLOCK_SECTION_ID'];
  821. $row21[$i]['NAME'] = $row['NAME'];
  822. $row21[$i]['DETAIL_PAGE_URL'] = $row['DETAIL_PAGE_URL'];
  823. $row21[$i]['SUBDIR'] = $row['SUBDIR'];
  824. $row21[$i]['FILE_NAME'] = $row['FILE_NAME'];
  825. $row21[$i]['PRICE'] = $row['PRICE'];
  826. $row21[$i]['CURRENCY'] = $row['CURRENCY'];
  827. $row21[$i]['QUANTITY'] = $row['QUANTITY'];
  828. $row21[$i]['QUANTITY_TRACE'] = $row['QUANTITY_TRACE'];
  829. $i++;
  830. }
  831. }
  832. $i2=0;
  833. if (count($arrAccessories) > 0 ) {
  834. foreach ($arrAccessories as $id5 ) {
  835. for ($row5 = 0; $row5 < count($row21); $row5++ ) {
  836. if ($id5 == $row21[$row5]['ID']) {
  837. $row3[$i2] = $row21[$row5];
  838. $i2++;
  839. }
  840. }
  841. }
  842. }
  843. // Конец сортировки
  844. // echo "<pre>";
  845. // print_r ($row3);
  846. // echo "</pre>";
  847. if (count($row3) > 0) {
  848. //$xHtml .= '<div style="overflow: hidden;" class="scroll_menu"><ul class="alternative-models-list scroll_menu">';
  849. $xHtml .= '<div class="main_access">
  850. <ul class="alternative-models-list">';
  851. foreach ($row3 as $row5) {
  852. $id = $row5['ID'];
  853. $name = stripslashes($row5['NAME']);
  854. $url = str_replace('#SITE_DIR#', '', $row5['DETAIL_PAGE_URL']);
  855. $url = str_replace('#SECTION_ID#', $row5['IBLOCK_SECTION_ID'], $url);
  856. $url = str_replace('#ID#', $row5['ID'], $url);
  857. $img = '/upload/' . $row5['SUBDIR'] . '/' . $row5['FILE_NAME'];
  858. $price = $row5['PRICE'];
  859. $currency = $row5['CURRENCY'];
  860. if ($currency == 'UAH') {
  861. $price = $price . '<span>&nbsp;грн.</span>';
  862. } elseif ($currency == 'USD') {
  863. $price = '$' . $price;
  864. }
  865. $xHtml .= '<li style="float: left;">';
  866. $xHtml .= '<div class="borders2_1" id="rrrt"><div><div><div><div><div><div><div><div id="otsst" class="f555">';
  867. // получаем названия секций товаров
  868. $sql = "SELECT IBLOCK_ID,NAME
  869. FROM b_iblock_section
  870. WHERE ID = '".$row5['IBLOCK_SECTION_ID']."'";
  871. $result1 = mysql_query($sql);
  872. //if (mysql_num_rows($result) > 0) {
  873. //while (
  874. $row2 = mysql_fetch_array($result1);
  875. //) {
  876. $id2 = (int) $row2['IBLOCK_ID'];
  877. //echo $id2;
  878. //$arrSectionsName[$id] = stripslashes($row['NAME']);
  879. //}
  880. //}
  881. //mysql_free_result($result);
  882. $xHtml .= '<a href="' . $url . '"><div class="fon_img"><img border="0" src="' . $objImageGd->getImage($img, 130, 130, 0)
  883. . '" alt="" title="' . $name . '" /></div></a>';
  884. $xHtml .= '<h3><a href="' . $url . '"><span style="color: #666;">' . $arrIblockNames[$id2] . '</span><br />' . $name . '</a></h3>';
  885. if ($price != 1.00 ) {
  886. $price = str_replace(".00", "", $price);
  887. $xHtml .= '<p class="price">' . $price . '</p>';
  888. $xHtml .= '<a class="link-tocart derty dert2" href="'. $url .'"><span>Подробнее</span></a>';
  889. if ($row5['QUANTITY_TRACE'] == 'Y') {
  890. if ($row5['QUANTITY'] > 0) {
  891. $xHtml .= '<p class="price236"><a class="link-by dert2" href="' . $url . '?action=BUY&id=' . $id . '"><strong>Купить</strong></a></p>';
  892. } else {
  893. // $xHtml .= '<p class="price235"><a>Нет в наличии</a></p>';
  894. $xHtml .= '<p class="price236"><a href="/preorder.php?id='.$id.'" class="link-order iframe derty dert2" rel="nofollow">
  895. <span><strong>Заказать</strong></span></a></p>';
  896. }
  897. } else {
  898. $xHtml .= '<p class="price236"><a class="link-by dert2" href="' . $url . '?action=BUY&id=' . $id . '"><strong>Купить</strong></a></p>';
  899. }
  900. } else {
  901. $xHtml .= '<a class="link-tocart derty dert2" href="'. $url .'"><span>Подробнее</span></a>';
  902. $xHtml .= '<p class="price236"><a href="/preorder.php?id='.$id.'" class="link-order iframe derty dert2" rel="nofollow">
  903. <span><strong>Заказать</strong></span></a></p>';
  904. }
  905. $xHtml .= '</div></div></div></div></div></div></div></div></div>';
  906. $xHtml .= '</li>';
  907. }
  908. // Дополнительная секция в слайдере
  909. $xHtml .= '<li>';
  910. $xHtml .= '</li>';
  911. $xHtml .= '</ul>
  912. </div>';
  913. //$xHtml .= '</ul>';
  914. //$xHtml .= '</div>';
  915. }
  916. mysql_free_result($result);
  917. }
  918. if (strlen($xHtml) > 0) {
  919. $echoFlag = true;
  920. echo '<tr><td colspan="2" id="hhh4_1"><div id="top_y_1">Аксессуары</div></td></tr>';
  921. }
  922. echo '<tr><td colspan="2">' . $xHtml . '</td></tr>';
  923. ?>
  924. </table>
  925. <!-------------------------------- Вторая вкладка ----------------------------------------------------------------->
  926. </div>
  927. <div class="tab_all" id="tab2">
  928. <?php
  929. if ($arResult["DETAIL_TEXT"]) {
  930. //echo '<h2 style="color:#000 !important">Характеристики ' . $arResult["NAME"] . '</h2><br />';
  931. //echo $arResult["DETAIL_TEXT"];
  932. //---------- Делит на две части характеристики ------------------------
  933. $input = $arResult["DETAIL_TEXT"];
  934. $pieces = explode("<h2>", $input);
  935. foreach ($pieces as $key => $val) {
  936. $pieces[$key] = $pieces[$key] . "<h2>";
  937. }
  938. array_push($pieces, "</h2>");
  939. $result = count($pieces);
  940. $resul2 = $result / 2;
  941. $resul2 = round($resul2,0);
  942. $resul3 = $result - $resul2;
  943. echo '<table width="100%" border="0" class="ggg5"><tr><td valign="top" class="ggg6">';
  944. for ($row22 =0; $row22 < $resul2; $row22++ ) {
  945. echo $pieces[$row22];
  946. }
  947. echo '</td><td valign="top" class="ggg4"><h2>';
  948. for ($row23 = $row22; $row23 < $result; $row23++ ) {
  949. echo $pieces[$row23];
  950. }
  951. echo '</td></tr></table>';
  952. echo '<br />';
  953. echo '<center><strong>Производитель оставляет за собой право изменять комплектацию без уведомления.</strong></center>';
  954. //-----------------------------------
  955. } else {
  956. echo '<p class="note">Ой, характеристик пока нет, но в ближайшее время они обязательно появятся.</p>';
  957. }
  958. //8ce274e98f1e527fad6e7d384df66bdf - новый
  959. //bbc99bfcbeeef4eb14ac86b25c5c559f - старый
  960. ?>
  961. </div>
  962. <div class="tab_all" id="tab3">
  963. <script type='text/javascript'>
  964. var idcomments_acct = 'bbc99bfcbeeef4eb14ac86b25c5c559f';
  965. var idcomments_post_id = <?= $arResult['ID'] ?>;
  966. var idcomments_post_url = window.location;
  967. </script>
  968. <span id="IDCommentsPostTitle" style="display:none"></span>
  969. <script type='text/javascript' src='http://www.intensedebate.com/js/genericCommentWrapperV2.js'></script>
  970. </div>
  971. <div class="tab_all" id="tab4">
  972. <?php
  973. require_once $_SERVER['DOCUMENT_ROOT'] . '/compare/compare.php';
  974. ?>
  975. </div>
  976. <div class="tab_all" id="tab5">
  977. <table>
  978. <?php
  979. $arrAlternativeProducts = array();
  980. $arrAccessories = array();
  981. $echoFlag = false;
  982. if (is_array($arResult['PROPERTIES']['ALTERNATIVE_PRODUCTS']['VALUE'])) {
  983. foreach ($arResult['PROPERTIES']['ALTERNATIVE_PRODUCTS']['VALUE'] as $item) {
  984. $itemId = (int) $item;
  985. if ($itemId > 0) {
  986. $arrAlternativeProducts[] = $itemId;
  987. }
  988. }
  989. }
  990. if (is_array($arResult['PROPERTIES']['ACCESSORIES']['VALUE'])) {
  991. foreach ($arResult['PROPERTIES']['ACCESSORIES']['VALUE'] as $item) {
  992. $itemId = (int) $item;
  993. if ($itemId > 0) {
  994. $arrAccessories[] = $itemId;
  995. }
  996. }
  997. }
  998. $xHtml = '';
  999. if (count($arrAlternativeProducts) > 0) {
  1000. $strAlternativeProducts = "'" . implode("', '", $arrAlternativeProducts) . "'";
  1001. $sql = "SELECT bie.`ID`, bie.`IBLOCK_SECTION_ID`, bie.`NAME`,
  1002. bi.`DETAIL_PAGE_URL`,
  1003. bf.`SUBDIR`, bf.`FILE_NAME`,
  1004. bcp.`PRICE`, bcp.`CURRENCY`,
  1005. bcpr.`QUANTITY`, bcpr.`QUANTITY_TRACE`
  1006. FROM `b_iblock_element` AS bie
  1007. JOIN `b_iblock` AS bi ON bi.`ID` = bie.`IBLOCK_ID`
  1008. AND bi.`ACTIVE` = 'Y'
  1009. JOIN `b_file` AS bf on bf.`ID` = bie.`PREVIEW_PICTURE`
  1010. JOIN `b_catalog_price` AS bcp ON bcp.`PRODUCT_ID` = bie.`ID`
  1011. AND bcp.`CATALOG_GROUP_ID` = '3'
  1012. AND bcp.`EXTRA_ID` IS NULL
  1013. LEFT JOIN `b_catalog_product` AS bcpr ON bcpr.`ID` = bie.`ID`
  1014. WHERE bie.`ID` IN ({$strAlternativeProducts})
  1015. AND bie.`ACTIVE` = 'Y'
  1016. AND bie.`WF_PARENT_ELEMENT_ID` IS NULL
  1017. ORDER BY bie.`NAME`
  1018. ";
  1019. $result = mysql_query($sql);
  1020. if (mysql_num_rows($result) > 0) {
  1021. $xHtml .= '<ul class="alternative-models-list">';
  1022. while ($row = mysql_fetch_assoc($result)) {
  1023. $id = $row['ID'];
  1024. $name = stripslashes($row['NAME']);
  1025. $url = str_replace('#SITE_DIR#', '', $row['DETAIL_PAGE_URL']);
  1026. $url = str_replace('#SECTION_ID#', $row['IBLOCK_SECTION_ID'], $url);
  1027. $url = str_replace('#ID#', $row['ID'], $url);
  1028. $img = '/upload/' . $row['SUBDIR'] . '/' . $row['FILE_NAME'];
  1029. $price = $row['PRICE'];
  1030. $currency = $row['CURRENCY'];
  1031. if ($currency == 'UAH') {
  1032. $price = $price . '<span>&nbsp;грн.</span>';
  1033. } elseif ($currency == 'USD') {
  1034. $price = '$' . $price;
  1035. }
  1036. $xHtml .= '<li style="float: left;">';
  1037. $xHtml .= '<div class="borders2_1" id="rrrt"><div><div><div><div><div><div><div><div id="otsst" class="f556">';
  1038. $xHtml .= '<a href="' . $url . '"><div class="fon_img"><img border="0" src="' . $objImageGd->getImage($img, 130, 130, 0)
  1039. . '" alt="" title="' . $name . '" /></div></a>';
  1040. $xHtml .= '<h3><a href="' . $url . '">' . $name . '</a></h3>';
  1041. if ($price != 1.00 ) {
  1042. $price = str_replace(".00", "", $price);
  1043. $xHtml .= '<p class="price">' . $price . '</p>';
  1044. $xHtml .= '<a class="link-tocart derty dert2" href="'. $url .'"><span>Подробнее</span></a>';
  1045. if ($row['QUANTITY_TRACE'] == 'Y') {
  1046. if ($row['QUANTITY'] > 0 ) {
  1047. $xHtml .= '<a class="link-by dert2" href="' . $url . '?action=BUY&id=' . $id . '"><strong>Купить</strong></a></p>';
  1048. } else {
  1049. // $xHtml .= '<p><a>Нет в наличии</a></p>';
  1050. $xHtml .= '<a href="/preorder.php?id='.$id.'" class="link-order iframe derty dert2" rel="nofollow">
  1051. <span><strong>Заказать</strong></span></a>';
  1052. }
  1053. } else {
  1054. $xHtml .= '<a class="link-by" href="' . $url . '?action=BUY&id=' . $id . '"><strong>Купить</strong></a>';
  1055. }
  1056. } else {
  1057. $xHtml .= '<a class="link-tocart derty" href="'. $url .'"><span>Подробнее</span></a>';
  1058. $xHtml .= '<a href="/preorder.php?id='.$id.'" class="link-order iframe derty dert2" rel="nofollow">
  1059. <span><strong>Заказать</strong></span></a>';
  1060. }
  1061. $xHtml .= '</div></div></div></div></div></div></div></div></div>';
  1062. $xHtml .= '</li>…

Large files files are truncated, but you can click here to view the full file