/bitrix_personal/templates/beta2.citrus.ua/header-menu22.php
PHP | 1093 lines | 929 code | 115 blank | 49 comment | 52 complexity | 0446e1ddd5317bd7226257f66acc5179 MD5 | raw file
Possible License(s): BSD-3-Clause
- <?php
-
- require $_SERVER['DOCUMENT_ROOT'] . '/../application/config/application.php';
- mysql_connect($dbHost, $dbUser, $dbPass);
- mysql_select_db($dbName);
- mysql_query("SET NAMES cp1251");
- mysql_query("set character_set_results='cp1251'");
- mysql_query("set collation_connection='cp1251_general_ci'");
-
- $ico_home_path = "//img.citrus.com.ua/img/menu/icons/";
- //include_once $_SERVER['DOCUMENT_ROOT'] . '/../library/Vi/Image/Gd.php';
- //include_once $_SERVER['DOCUMENT_ROOT'] . '/../library/May/iblock_names.php';
- //include_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/templates/main-template/catalog-functions.php';
-
- // ffrrds2 - ширина 1000 на 4 колонки
- // ffrrds5 - ширина 500 на 2 колонки
-
- ?>
-
- <div id="myslidemenu3" class="jqueryslidemenu3">
- <ul id="main-nav3">
- <li id="navshop3"><a href="#"><span class="tw">телефоны и смартфоны</span></a>
- <ul id="r55">
-
- <div class="catalog-top2-element_x borders3">
- <div>
- <div>
- <div>
- <div>
- <div>
- <div>
- <div>
- <div id="otsst_x">
-
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr><td>
- <table cellpadding="0" cellspacing="0" id="ffrrds5" border="0">
- <tr>
- <td valign="top" width="180px">
- <li id="fr4"><a class="b40 a150" style="color:#676767; font-size:16px;" href="/shop/goods/mobile/189/">Все смартфоны</a></li>
- <li id="fr4"><a class="b40 a150" href="/shop/goods/mobile/258/"> Apple iPhone</a></li>
- <li id="fr4"><a class="b40 a150" href="/shop/goods/mobile/239/"> HTC</a></li>
- <li id="fr4"><a class="b40 a150" href="/shop/goods/mobile/149/"> Samsung</a></li>
- <li id="fr4"><a class="a150" href="/shop/goods/mobile/566/"> Sony</a></li>
- <li id="fr4"><a class="a150" href="/shop/goods/mobile/150/"> Nokia</a></li>
- <li id="fr4"><a class="a150" href="/shop/goods/mobile/151/"> LG</a></li>
- <li id="fr4"><a class="a150" href="/shop/goods/mobile/626/"> Huawei</a></li>
- <li id="fr5"></li>
-
- </td>
-
- <td width="3px"><img src="/bitrix_personal/templates/beta2.citrus.ua/v_dot_200.gif" /></td>
-
- <td valign="top" width="240px">
- <li id="fr4"><a class="b40 a200" style="color:#676767; font-size:16px;" href="">Самые популярные</a></li>
- <?
- $db = mysql_connect('localhost', 'citrus_store', 'vSpYAxRujDfNtneX11a');
- mysql_select_db('citrus_store', $db);
- mysql_query ("set character_set_client='cp1251'");
- mysql_query ("set character_set_results='cp1251'");
- mysql_query ("set collation_connection='cp1251_general_ci'");
-
- //$sql="Select * FROM b_iblock_element WHERE (ID=37650)";
- $cc=1;
- $sql="Select bie.ID, bie.NAME, bipe.VALUE
- FROM b_iblock_element as bie,
- b_iblock_element_property as biep,
- b_iblock_property as bip,
- b_iblock_property_enum as bipe
- WHERE (bie.ID=biep.IBLOCK_ELEMENT_ID
- AND biep.IBLOCK_PROPERTY_ID=bip.ID
- AND biep.VALUE_ENUM=bipe.ID
- AND bip.CODE='top_menu_fl'
- AND bipe.VALUE='да'
- AND bie.ACTIVE='Y'
- AND bie.WF_PARENT_ELEMENT_ID IS NULL
- AND bie.IBLOCK_ID=20)";
- $result = mysql_query($sql, $db);
- while ($r = mysql_fetch_array($result))
- {
- $sql2="Select bie.ID, biep.VALUE
- FROM b_iblock_element as bie,
- b_iblock_element_property as biep,
- b_iblock_property as bip
- WHERE (bie.ID=biep.IBLOCK_ELEMENT_ID
- AND biep.IBLOCK_PROPERTY_ID=bip.ID
- AND bip.CODE='top_menu_name'
- AND bie.ACTIVE='Y'
- AND bie.WF_PARENT_ELEMENT_ID IS NULL
- AND bie.ID=".$r['ID'].")";
- $result2 = mysql_query($sql2, $db);
- while ($r2 = mysql_fetch_array($result2))
- {
- if ($cc<=3){echo "<li id=\"fr4\"><a class=\"b40 a200\" href=\"/shop/goods/mobile/189/".$r['ID']."\"> ".$r2['VALUE']."</a></li>";}
- else {echo "<li id=\"fr4\"><a class=\"a200\" href=\"/shop/goods/mobile/189/".$r['ID']."\"> ".$r2['VALUE']."</a></li>";}
- $cc++;
- }
- }
- ?>
- <li id="fr5"></li>
- </td>
- <td width="3px"><img src="/bitrix_personal/templates/beta2.citrus.ua/v_dot_200.gif" /></td>
- <td valign="top" width="160px">
- <li id="fr4"><a class="b40 a130" style="color:#676767; font-size:16px;" href="#">По цене</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/mobile/189/index.php?price1=1&price2=1000"> 1..1000</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/mobile/189/index.php?price1=1001&price2=2000"> 1001..2000</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/mobile/189/index.php?price1=2001&price2=3000"> 2001..3000</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/mobile/189/index.php?price1=3001&price2=4500"> 3001..4500</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/mobile/189/index.php?price1=4501&price2=6000"> 4501..6000</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/mobile/189/index.php?price1=6001&price2=8000"> 6001..8000</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/mobile/189/index.php?price1=8001&price2=100000"> 8001..</a></li>
- <li id="fr5"></li>
- </td>
- <td width="3px"><img src="/bitrix_personal/templates/beta2.citrus.ua/v_dot_200.gif" /></td>
- <td valign="top" width="240px">
- <li id="fr4"><a class="b40 a200" style="color:#676767; font-size:16px;" href="">Аксессуары</a></li>
- <li id="fr4"><a class="b40 a200" style="color:#676767;" href="/shop/goods/display_labels/249/"> защитные пленки</a></li>
- <li id="fr4"><a class="b40 a200" style="color:#676767;" href="/shop/goods/chargers/191/"> зарядные устройства</a></li>
- <li id="fr4"><a class="b40 a200" style="color:#676767;" href="/shop/goods/mobile_handbags/247/"> чехлы</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/bluetooth/196/"> bluetooth гарнитуры</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/soundphones/194/"> наушники</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/wiredheadsets/197/"> проводные гарнитуры</a></li>
- <!--Беспроводные наушники-->
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/memorycards/192/"> карты памяти</a></li>
- <!--Мобильные зарядные устройства-->
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/speakers/244/"> акустика</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/clock/608/"> Часы</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/data_cables/270/"> дата-кабели</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/adapters/326/"> переходники</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/stylus/561/"> Стилусы</a></li>
-
-
-
-
-
-
-
-
- <li id="fr5"></li>
- </td>
- </tr>
- </table>
- </td></tr>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </ul>
- </li>
-
-
-
- <!-- Вторая секция меню Ноутбуки -->
- <li id="navshop3"><img style="float: left;" src="/img/separ_07.png" width="3" height="39" /><a href="#"><span>ноутбуки</span></a>
- <ul id="r55" style="margin-left: -130px !important;">
- <div class="catalog-top2-element_x borders3">
- <div>
- <div>
- <div>
- <div>
- <div>
- <div>
- <div>
- <div id="otsst_x">
-
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
-
- <tr><td>
- <table width="100%" cellpadding="0" cellspacing="0" id="ffrrds2" border="0">
- <tr>
- <td valign="top" width="180">
- <li id="fr4"><a class="b40 a150" style="color:#676767; font-size:16px;" href="/shop/goods/notebooks/188/">Все ноутбуки</a></li>
- <li id="fr4"><a class="b40 a150" href="/shop/goods/notebooks/153/"> Acer</a></li>
- <li id="fr4"><a class="b40 a150" href="/shop/goods/notebooks/154/"> Apple</a></li>
- <li id="fr4"><a class="b40 a150" href="/shop/goods/notebooks/155/"> Asus</a></li>
- <li id="fr4"><a class="a150" href="/shop/goods/notebooks/515/"> Dell</a></li>
- <li id="fr4"><a class="a150" href="/shop/goods/notebooks/158/"> HP</a></li>
- <li id="fr4"><a class="a150" href="/shop/goods/notebooks/220/"> Lenovo</a></li>
- <li id="fr4"><a class="a150" href="/shop/goods/notebooks/159/"> Samsung</a></li>
- <li id="fr4"><a class="a150" href="/shop/goods/notebooks/219/"> Sony</a></li>
- <li id="fr5"></li>
- </td>
- <td width="3px"><img src="/bitrix_personal/templates/beta2.citrus.ua/v_dot_200.gif" /></td>
- <td valign="top" width="240">
- <li id="fr4"><a class="b40 a200" style="color:#676767; font-size:16px;" href="">Самые популярные</a></li>
- <?
- $cc=1;
- $sql="Select bie.ID, bie.NAME, bipe.VALUE
- FROM b_iblock_element as bie,
- b_iblock_element_property as biep,
- b_iblock_property as bip,
- b_iblock_property_enum as bipe
- WHERE (bie.ID=biep.IBLOCK_ELEMENT_ID
- AND biep.IBLOCK_PROPERTY_ID=bip.ID
- AND biep.VALUE_ENUM=bipe.ID
- AND bip.CODE='top_menu_fl'
- AND bipe.VALUE='да'
- AND bie.ACTIVE='Y'
- AND bie.WF_PARENT_ELEMENT_ID IS NULL
- AND bie.IBLOCK_ID=22)";
- $result = mysql_query($sql, $db);
- while ($r = mysql_fetch_array($result))
- {
- $sql2="Select bie.ID, biep.VALUE
- FROM b_iblock_element as bie,
- b_iblock_element_property as biep,
- b_iblock_property as bip
- WHERE (bie.ID=biep.IBLOCK_ELEMENT_ID
- AND biep.IBLOCK_PROPERTY_ID=bip.ID
- AND bip.CODE='top_menu_name'
- AND bie.ACTIVE='Y'
- AND bie.WF_PARENT_ELEMENT_ID IS NULL
- AND bie.ID=".$r['ID'].")";
- $result2 = mysql_query($sql2, $db);
- while ($r2 = mysql_fetch_array($result2))
- {
-
- if ($cc<=3){echo "<li id=\"fr4\"><a class=\"b40 a200\" href=\"/shop/goods/mobile/189/".$r['ID']."\"> ".$r2['VALUE']."</a></li>";}
- else {echo "<li id=\"fr4\"><a class=\"a200\" href=\"/shop/goods/mobile/189/".$r['ID']."\"> ".$r2['VALUE']."</a></li>";}
- $cc++;
-
- }
- }
- mysql_close($db);
- ?>
- </td>
- <td width="3px"><img src="/bitrix_personal/templates/beta2.citrus.ua/v_dot_200.gif" /></td>
- <td valign="top" width="160">
- <li id="fr4"><a class="b40 a130" style="color:#676767; font-size:16px;" href="#">По цене</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/notebooks/188/index.php?price1=1001&price2=2000"> 1001..2000</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/notebooks/188/index.php?price1=2001&price2=3000"> 2001..3000</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/notebooks/188/index.php?price1=3001&price2=4500"> 3001..4500</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/notebooks/188/index.php?price1=4501&price2=6000"> 4501..6000</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/notebooks/188/index.php?price1=6001&price2=8000"> 6001..8000</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/notebooks/188/index.php?price1=8001&price2=100000"> 8001..</a></li>
-
- <li id="fr5"></li>
- </td>
- <td width="3px"><img src="/bitrix_personal/templates/beta2.citrus.ua/v_dot_200.gif" /></td>
- <td valign="top" width="240">
- <li id="fr4"><a class="b40 a200" style="color:#676767; font-size:16px;" href="">Аксессуары</a></li>
- <li id="fr4"><a class="b40 a200" style="color:#676767;" href="/shop/goods/laptop_bags/248/"> сумки для ноутбуков</a></li>
- <li id="fr4"><a class="b40 a200" style="color:#676767;" href="/shop/goods/flashdrives/193/"> флешки</a></li>
- <li id="fr4"><a class="b40 a200" style="color:#676767;" href="/shop/goods/mouse/242/"> мыши</a></li>
- <li id="fr4"><a class="b40 a200" style="color:#676767;" href="/shop/goods/soundphones/194/"> наушники</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/bluetooth/196/"> bluetooth гарнитуры</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/speakers/244/"> акустика</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/network_equipment/243/"> сетевое оборудование</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/hdd/241/"> Внешние жесткие диски</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/labels/378/"> Декоративные наклейки</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/laptop_stands/360/"> Подставки</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/chargers/191/"> Зарядные устройства</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/cleaners/328/"> Чистящие средства</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/clock/608/"> Часы</a></li>
- <li id="fr5"></li>
- </td>
- </tr>
- </table>
- </td></tr>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </ul>
- </li>
-
- <!-- ------------------------------------------------- -->
-
- <li id="navshop3"><img style="float: left;" src="/img/separ_07.png" width="3" height="39" /><a href="#"><span>планшеты</span></a>
- <ul id="r55" style="margin-left: -260px !important;">
- <div class="catalog-top2-element_x borders3">
- <div>
- <div>
- <div>
- <div>
- <div>
- <div>
- <div>
- <div id="otsst_x">
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr><td>
- <table width="100%" cellpadding="0" cellspacing="0" id="ffrrds5" border="0">
- <tr>
- <td valign="top" width="180">
- <li id="fr4"><a class="b40 a150" style="color:#676767; font-size:16px;" href="/shop/goods/tabletpc/262/">Все планшеты</a></li>
- <li id="fr4"><a class="b40 a150" href="/shop/goods/tabletpc/263/"> Apple</a></li>
- <li id="fr4"><a class="b40 a150" href="/shop/goods/tabletpc/448/"> Acer</a></li>
- <li id="fr4"><a class="b40 a150" href="/shop/goods/tabletpc/552/"> Amazon Kindle</a></li>
- <li id="fr4"><a class="a150" href="/shop/goods/tabletpc/318/"> Samsung</a></li>
- <li id="fr4"><a class="a150" href="/shop/goods/tabletpc/467/"> Asus</a></li>
- <li id="fr4"><a class="a150" href="/shop/goods/tabletpc/513/"> PocketBook</a></li>
- <li id="fr4"><a class="a150" href="/shop/goods/tabletpc/615/"> Prestigio</a></li>
- <li id="fr5"></li>
- </td>
-
- <td width="3px"><img src="/bitrix_personal/templates/beta2.citrus.ua/v_dot_200.gif" /></td>
- <td valign="top" width="240">
- <li id="fr4"><a class="b40 a200" style="color:#676767; font-size:16px;" href="">Самые популярные</a></li>
- <?
- $cc=1;
- $sql="Select bie.ID, bie.NAME, bipe.VALUE
- FROM b_iblock_element as bie,
- b_iblock_element_property as biep,
- b_iblock_property as bip,
- b_iblock_property_enum as bipe
- WHERE (bie.ID=biep.IBLOCK_ELEMENT_ID
- AND biep.IBLOCK_PROPERTY_ID=bip.ID
- AND biep.VALUE_ENUM=bipe.ID
- AND bip.CODE='top_menu_fl'
- AND bipe.VALUE='да'
- AND bie.ACTIVE='Y'
- AND bie.WF_PARENT_ELEMENT_ID IS NULL
- AND bie.IBLOCK_ID=43)";
- $result = mysql_query($sql, $db);
- while ($r = mysql_fetch_array($result))
- {
- $sql2="Select bie.ID, biep.VALUE
- FROM b_iblock_element as bie,
- b_iblock_element_property as biep,
- b_iblock_property as bip
- WHERE (bie.ID=biep.IBLOCK_ELEMENT_ID
- AND biep.IBLOCK_PROPERTY_ID=bip.ID
- AND bip.CODE='top_menu_name'
- AND bie.ACTIVE='Y'
- AND bie.WF_PARENT_ELEMENT_ID IS NULL
- AND bie.ID=".$r['ID'].")";
- $result2 = mysql_query($sql2, $db);
- while ($r2 = mysql_fetch_array($result2))
- {
-
- if ($cc<=3){echo "<li id=\"fr4\"><a class=\"b40 a200\" href=\"/shop/goods/tabletpc/262/".$r['ID']."\"> ".$r2['VALUE']."</a></li>";}
- else {echo "<li id=\"fr4\"><a class=\"a200\" href=\"/shop/goods/tabletpc/262/".$r['ID']."\"> ".$r2['VALUE']."</a></li>";}
- $cc++;
-
- }
- }
- ?>
- </td>
- <td width="3px"><img src="/bitrix_personal/templates/beta2.citrus.ua/v_dot_200.gif" /></td>
- <td valign="top" width="160">
-
- <li id="fr4"><a class="b40 a130" style="color:#676767; font-size:16px;" href="#">По цене</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/tabletpc/262/index.php?price1=1&price2=1000"> 1..1000</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/tabletpc/262/index.php?price1=1001&price2=2000"> 1001..2000</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/tabletpc/262/index.php?price1=2001&price2=3000"> 2001..3000</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/tabletpc/262/index.php?price1=3001&price2=4500"> 3001..4500</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/tabletpc/262/index.php?price1=4501&price2=6000"> 4501..6000</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/tabletpc/262/index.php?price1=6001&price2=8000"> 6001..8000</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/tabletpc/262/index.php?price1=8001&price2=100000"> 8001..</a></li>
-
- <li id="fr5"></li>
-
- </td>
- <td width="3px"><img src="/bitrix_personal/templates/beta2.citrus.ua/v_dot_200.gif" /></td>
- <td valign="top" width="240">
-
- <li id="fr4"><a class="b40 a200" style="color:#676767; font-size:16px;" href="">Аксессуары</a></li>
-
- <li id="fr4"><a class="b40 a200" style="color:#676767;" href="/shop/goods/display_labels/249/"> Защитные пленки</a></li>
- <li id="fr4"><a class="b40 a200" style="color:#676767;" href="/shop/goods/chargers/191/"> Зарядные устройства</a></li>
- <!--<li id="fr4"><a class="b40 a200" style="color:#676767;" href="/shop/goods///"> Чехлы для планшетов</a></li> -->
- <li id="fr4"><a class="b40 a200" style="color:#676767;" href="/shop/goods/bluetooth/196/"> Bluetooth гарнитуры</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/soundphones/194/"> Наушники</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/memorycards/192/"> Карты памяти</a></li>
- <!--<li id="fr4"><a class="b40 a200" style="color:#676767;" href="/shop/goods///"> Мобильные зарядные устройства</a></li> -->
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/speakers/244/"> Акустика</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/clock/608/"> Часы</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/data_cables/270/"> Кабели</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/adapters/326/"> Переходники</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/stylus/561/"> Стилусы</a></li>
- <li id="fr5"></li>
- </td>
-
-
-
- </tr></table>
- </td></tr>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </ul>
- </li>
-
- <!-- ------------------------------------------------------------------ -->
-
-
- <li id="navshop3"><img style="float: left;" src="/img/separ_07.png" width="3" height="39" /><a href="#"><span class="tw">электронные книги</span></a>
- <ul id="r55" style="margin-left: -390px !important;">
- <div class="catalog-top2-element_x borders3">
- <div>
- <div>
- <div>
- <div>
- <div>
- <div>
- <div>
- <div id="otsst_x">
-
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr><td>
- <table width="100%" cellpadding="0" cellspacing="0" id="ffrrds5" border="0">
- <tr>
- <td valign="top" width="180">
- <li id="fr4"><a class="b40 a150" style="color:#676767; font-size:16px;" href="/shop/goods/ebook/284/">Все эл. книги</a></li>
- <li id="fr4"><a class="b40 a150" href="/shop/goods/ebook/526/"> Amazon</a></li>
- <li id="fr4"><a class="b40 a150" href="/shop/goods/ebook/625/"> Barnes&Noble</a></li>
- <li id="fr4"><a class="b40 a150" href="/shop/goods/ebook/290/"> PocketBook</a></li>
- <li id="fr4"><a class="a150" href="/shop/goods/ebook/587/"> Фонарики</a></li>
-
- <li id="fr5"></li>
- </td>
- <td width="3px"><img src="/bitrix_personal/templates/beta2.citrus.ua/v_dot_200.gif" /></td>
- <td valign="top" width="240">
- <li id="fr4"><a class="b40 a200" style="color:#676767; font-size:16px;" href="">Самые популярные</a></li>
- <?
- $cc=1;
- $sql="Select bie.ID, bie.NAME, bipe.VALUE
- FROM b_iblock_element as bie,
- b_iblock_element_property as biep,
- b_iblock_property as bip,
- b_iblock_property_enum as bipe
- WHERE (bie.ID=biep.IBLOCK_ELEMENT_ID
- AND biep.IBLOCK_PROPERTY_ID=bip.ID
- AND biep.VALUE_ENUM=bipe.ID
- AND bip.CODE='top_menu_fl'
- AND bipe.VALUE='да'
- AND bie.ACTIVE='Y'
- AND bie.WF_PARENT_ELEMENT_ID IS NULL
- AND bie.IBLOCK_ID=34)";
- $result = mysql_query($sql, $db);
- while ($r = mysql_fetch_array($result))
- {
- $sql2="Select bie.ID, biep.VALUE
- FROM b_iblock_element as bie,
- b_iblock_element_property as biep,
- b_iblock_property as bip
- WHERE (bie.ID=biep.IBLOCK_ELEMENT_ID
- AND biep.IBLOCK_PROPERTY_ID=bip.ID
- AND bip.CODE='top_menu_name'
- AND bie.ACTIVE='Y'
- AND bie.WF_PARENT_ELEMENT_ID IS NULL
- AND bie.ID=".$r['ID'].")";
- $result2 = mysql_query($sql2, $db);
- while ($r2 = mysql_fetch_array($result2))
- {
-
- if ($cc<=3){echo "<li id=\"fr4\"><a class=\"b40 a200\" href=\"/shop/goods/ebook/284/".$r['ID']."\"> ".$r2['VALUE']."</a></li>";}
- else {echo "<li id=\"fr4\"><a class=\"a200\" href=\"/shop/goods/ebook/284/".$r['ID']."\"> ".$r2['VALUE']."</a></li>";}
- $cc++;
-
- }
- }
-
- ?>
-
-
- </td>
- <td width="3px"><img src="/bitrix_personal/templates/beta2.citrus.ua/v_dot_200.gif" /></td>
- <td valign="top" width="160">
-
- <li id="fr4"><a class="b40 a130" style="color:#676767; font-size:16px;" href="#">По цене</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/ebook/284/index.php?price1=1&price2=1000"> 1..1000</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/ebook/284/index.php?price1=1001&price2=2000"> 1001..2000</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/ebook/284/index.php?price1=2001&price2=3000"> 2001..3000</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/ebook/284/index.php?price1=3001&price2=4500"> 3001..4500</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/ebook/284/index.php?price1=4501&price2=6000"> 4501..6000</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/ebook/284/index.php?price1=6001&price2=8000"> 6001..8000</a></li>
- <li id="fr4"><a class="a130" href="/shop/goods/ebook/284/index.php?price1=8001&price2=100000"> 8001..</a></li>
-
- <li id="fr5"></li>
-
- </td>
- <td width="3px"><img src="/bitrix_personal/templates/beta2.citrus.ua/v_dot_200.gif" /></td>
- <td valign="top" width="240">
-
- <li id="fr4"><a class="b40 a200" style="color:#676767; font-size:16px;" href="">Аксессуары</a></li>
- <li id="fr4"><a class="b40 a200" style="color:#676767;" href="/shop/goods/display_labels/249/"> Защитные пленки</a></li>
- <li id="fr4"><a class="b40 a200" style="color:#676767;" href="/shop/goods/chargers/191/"> Зарядные устройства</a></li>
- <!--<li id="fr4"><a class="b40 a200" style="color:#676767;" href="/shop/goods///"> Чехлы для эл.книг</a></li> -->
- <!--<li id="fr4"><a class="b40 a200" style="color:#676767;" href="/shop/goods///"> Мобильные зарядные устройства</a></li> -->
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/memorycards/192/"> Карты памяти</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/soundphones/194/"> Наушники</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/clock/608/"> Часы</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/data_cables/270/"> Кабели</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/adapters/326/"> Переходники</a></li>
- <li id="fr5"></li>
- </td>
-
-
- </tr></table>
- </td></tr>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </ul>
- </li>
-
-
-
- <!-- ------------------------------------------------------------------------ -->
-
-
- <li id="navshop3"><img style="float: left;" src="/img/separ_07.png" width="3" height="39" /><a href="#"><span>техника Apple</span></a>
- <ul id="r55" style="margin-left: -520px !important;">
- <div class="catalog-top2-element_x borders3">
- <!--
- <ul>
- <div class="catalog-top2-element_x borders3">
- -->
- <div>
- <div>
- <div>
- <div>
- <div>
- <div>
- <div>
- <div id="otsst_x">
-
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr><td>
- <table width="100%" cellpadding="0" cellspacing="0" id="ffrrds5" border="0">
- <tr>
- <td valign="top" width="180">
- <li id="fr4"><a class="b40 a216" href="/shop/goods/tabletpc/263/">iPad</a></li>
- <li id="fr4"><a class="b40 a216" href="/shop/goods/mobile/258/?model=4">iPhone 4/4s</a></li>
- <li id="fr4"><a class="b40 a216" href="/shop/goods/mobile/258/?model=5">iPhone 5</a></li>
- <li id="fr4"><a class="a216" href="/color_iphone/">iPhone color edition</a></li>
- <li id="fr4"><a class="a216" href="/shop/goods/mp3/152/">iPod</a></li>
- <li id="fr4"><a class="a216" href="/shop/goods/notebooks/154/">MacBook</a></li>
- <li id="fr4"><a class="a216" href="/shop/goods/notebooks/154/">iMac</a></li>
- <li id="fr4"><a class="a216" href="/iphone_luxury/">iPhone luvury edition</a></li>
-
- <li id="fr5"></li>
- </td>
- <td width="3px"><img src="/bitrix_personal/templates/beta2.citrus.ua/v_dot_200.gif" /></td>
- <td valign="top" width="240">
- <li id="fr4"><a class="b40 a200" style="color:#676767; font-size:16px;" href="">Самые популярные</a></li>
- <?
- $cc=1;
- //----------------------------------- iPhone
- $sql="Select bie.ID, bie.NAME, bipe.VALUE
- FROM b_iblock_element as bie,
- b_iblock_element_property as biep,
- b_iblock_property as bip,
- b_iblock_property_enum as bipe
- WHERE (bie.ID=biep.IBLOCK_ELEMENT_ID
- AND biep.IBLOCK_PROPERTY_ID=bip.ID
- AND biep.VALUE_ENUM=bipe.ID
- AND bip.CODE='top_menu_fl'
- AND bipe.VALUE='да'
- AND bie.ACTIVE='Y'
- AND bie.WF_PARENT_ELEMENT_ID IS NULL
- AND bie.IBLOCK_ID=20)";
- $result = mysql_query($sql, $db);
- while ($r = mysql_fetch_array($result))
- {
- $devel=0;
- $sql2="Select bie.ID, bipe.VALUE
- FROM b_iblock_element as bie,
- b_iblock_element_property as biep,
- b_iblock_property as bip,
- b_iblock_property_enum as bipe
- WHERE (bie.ID=biep.IBLOCK_ELEMENT_ID
- AND biep.IBLOCK_PROPERTY_ID=bip.ID
- AND biep.VALUE_ENUM=bipe.ID
- AND bip.CODE='developer'
- AND bipe.VALUE='Apple'
- AND bie.ACTIVE='Y'
- AND bie.WF_PARENT_ELEMENT_ID IS NULL
- AND bie.IBLOCK_ID=20
- AND bie.ID=".$r['ID'].")";
- $result2 = mysql_query($sql2, $db);
- while ($r2 = mysql_fetch_array($result2))
- {
- $devel=1;
- }
-
- if ($devel==1){
- $sql2="Select bie.ID, biep.VALUE
- FROM b_iblock_element as bie,
- b_iblock_element_property as biep,
- b_iblock_property as bip
- WHERE (bie.ID=biep.IBLOCK_ELEMENT_ID
- AND biep.IBLOCK_PROPERTY_ID=bip.ID
- AND bip.CODE='top_menu_name'
- AND bie.ACTIVE='Y'
- AND bie.WF_PARENT_ELEMENT_ID IS NULL
- AND bie.ID=".$r['ID'].")";
- $result2 = mysql_query($sql2, $db);
- while ($r2 = mysql_fetch_array($result2))
- {
- if ($cc<=3){echo "<li id=\"fr4\"><a class=\"b40 a200\" href=\"/shop/goods/mobile/258/".$r['ID']."\"> ".$r2['VALUE']."</a></li>";}
- else {echo "<li id=\"fr4\"><a class=\"a200\" href=\"/shop/goods/mobile/258/".$r['ID']."\"> ".$r2['VALUE']."</a></li>";}
- $cc++;
- }
- }
- }
- //--------------------------------- MacBook
- $sql="Select bie.ID, bie.NAME, bipe.VALUE
- FROM b_iblock_element as bie,
- b_iblock_element_property as biep,
- b_iblock_property as bip,
- b_iblock_property_enum as bipe
- WHERE (bie.ID=biep.IBLOCK_ELEMENT_ID
- AND biep.IBLOCK_PROPERTY_ID=bip.ID
- AND biep.VALUE_ENUM=bipe.ID
- AND bip.CODE='top_menu_fl'
- AND bipe.VALUE='да'
- AND bie.ACTIVE='Y'
- AND bie.WF_PARENT_ELEMENT_ID IS NULL
- AND bie.IBLOCK_ID=22)";
- $result = mysql_query($sql, $db);
- while ($r = mysql_fetch_array($result))
- {
- $devel=0;
- $sql2="Select bie.ID, bipe.VALUE
- FROM b_iblock_element as bie,
- b_iblock_element_property as biep,
- b_iblock_property as bip,
- b_iblock_property_enum as bipe
- WHERE (bie.ID=biep.IBLOCK_ELEMENT_ID
- AND biep.IBLOCK_PROPERTY_ID=bip.ID
- AND biep.VALUE_ENUM=bipe.ID
- AND bip.CODE='developer'
- AND bipe.VALUE='Apple'
- AND bie.ACTIVE='Y'
- AND bie.WF_PARENT_ELEMENT_ID IS NULL
- AND bie.IBLOCK_ID=22
- AND bie.ID=".$r['ID'].")";
- $result2 = mysql_query($sql2, $db);
- while ($r2 = mysql_fetch_array($result2))
- {
- $devel=1;
- }
-
- if ($devel==1){
- $sql2="Select bie.ID, biep.VALUE
- FROM b_iblock_element as bie,
- b_iblock_element_property as biep,
- b_iblock_property as bip
- WHERE (bie.ID=biep.IBLOCK_ELEMENT_ID
- AND biep.IBLOCK_PROPERTY_ID=bip.ID
- AND bip.CODE='top_menu_name'
- AND bie.ACTIVE='Y'
- AND bie.WF_PARENT_ELEMENT_ID IS NULL
- AND bie.ID=".$r['ID'].")";
- $result2 = mysql_query($sql2, $db);
- while ($r2 = mysql_fetch_array($result2))
- {
- if ($cc<=3){echo "<li id=\"fr4\"><a class=\"b40 a200\" href=\"/shop/goods/notebooks/154/".$r['ID']."\"> ".$r2['VALUE']."</a></li>";}
- else {echo "<li id=\"fr4\"><a class=\"a200\" href=\"/shop/goods/notebooks/154/".$r['ID']."\"> ".$r2['VALUE']."</a></li>";}
- $cc++;
- }
- }
- }
- //------------------------------------ ipad
- $sql="Select bie.ID, bie.NAME, bipe.VALUE
- FROM b_iblock_element as bie,
- b_iblock_element_property as biep,
- b_iblock_property as bip,
- b_iblock_property_enum as bipe
- WHERE (bie.ID=biep.IBLOCK_ELEMENT_ID
- AND biep.IBLOCK_PROPERTY_ID=bip.ID
- AND biep.VALUE_ENUM=bipe.ID
- AND bip.CODE='top_menu_fl'
- AND bipe.VALUE='да'
- AND bie.ACTIVE='Y'
- AND bie.WF_PARENT_ELEMENT_ID IS NULL
- AND bie.IBLOCK_ID=43)";
- $result = mysql_query($sql, $db);
- while ($r = mysql_fetch_array($result))
- {
- $devel=0;
- $sql2="Select bie.ID, bipe.VALUE
- FROM b_iblock_element as bie,
- b_iblock_element_property as biep,
- b_iblock_property as bip,
- b_iblock_property_enum as bipe
- WHERE (bie.ID=biep.IBLOCK_ELEMENT_ID
- AND biep.IBLOCK_PROPERTY_ID=bip.ID
- AND biep.VALUE_ENUM=bipe.ID
- AND bip.CODE='developer'
- AND bipe.VALUE='Apple'
- AND bie.ACTIVE='Y'
- AND bie.WF_PARENT_ELEMENT_ID IS NULL
- AND bie.IBLOCK_ID=43
- AND bie.ID=".$r['ID'].")";
- $result2 = mysql_query($sql2, $db);
- while ($r2 = mysql_fetch_array($result2))
- {
- $devel=1;
- }
-
- if ($devel==1){
- $sql2="Select bie.ID, biep.VALUE
- FROM b_iblock_element as bie,
- b_iblock_element_property as biep,
- b_iblock_property as bip
- WHERE (bie.ID=biep.IBLOCK_ELEMENT_ID
- AND biep.IBLOCK_PROPERTY_ID=bip.ID
- AND bip.CODE='top_menu_name'
- AND bie.ACTIVE='Y'
- AND bie.WF_PARENT_ELEMENT_ID IS NULL
- AND bie.ID=".$r['ID'].")";
- $result2 = mysql_query($sql2, $db);
- while ($r2 = mysql_fetch_array($result2))
- {
- if ($cc<=3){echo "<li id=\"fr4\"><a class=\"b40 a200\" href=\"/shop/goods/tabletpc/263/".$r['ID']."\"> ".$r2['VALUE']."</a></li>";}
- else {echo "<li id=\"fr4\"><a class=\"a200\" href=\"/shop/goods/tabletpc/263/".$r['ID']."\"> ".$r2['VALUE']."</a></li>";}
- $cc++;
- }
- }
- }
- //----------------------------------------------------- ipod
- $sql="Select bie.ID, bie.NAME, bipe.VALUE
- FROM b_iblock_element as bie,
- b_iblock_element_property as biep,
- b_iblock_property as bip,
- b_iblock_property_enum as bipe
- WHERE (bie.ID=biep.IBLOCK_ELEMENT_ID
- AND biep.IBLOCK_PROPERTY_ID=bip.ID
- AND biep.VALUE_ENUM=bipe.ID
- AND bip.CODE='top_menu_fl'
- AND bipe.VALUE='да'
- AND bie.ACTIVE='Y'
- AND bie.WF_PARENT_ELEMENT_ID IS NULL
- AND bie.IBLOCK_ID=23)";
- $result = mysql_query($sql, $db);
- while ($r = mysql_fetch_array($result))
- {
- $devel=0;
- $sql2="Select bie.ID, bipe.VALUE
- FROM b_iblock_element as bie,
- b_iblock_element_property as biep,
- b_iblock_property as bip,
- b_iblock_property_enum as bipe
- WHERE (bie.ID=biep.IBLOCK_ELEMENT_ID
- AND biep.IBLOCK_PROPERTY_ID=bip.ID
- AND biep.VALUE_ENUM=bipe.ID
- AND bip.CODE='developer'
- AND bipe.VALUE='Apple'
- AND bie.ACTIVE='Y'
- AND bie.WF_PARENT_ELEMENT_ID IS NULL
- AND bie.IBLOCK_ID=23
- AND bie.ID=".$r['ID'].")";
- $result2 = mysql_query($sql2, $db);
- while ($r2 = mysql_fetch_array($result2))
- {
- $devel=1;
- }
-
- if ($devel==1){
- $sql2="Select bie.ID, biep.VALUE
- FROM b_iblock_element as bie,
- b_iblock_element_property as biep,
- b_iblock_property as bip
- WHERE (bie.ID=biep.IBLOCK_ELEMENT_ID
- AND biep.IBLOCK_PROPERTY_ID=bip.ID
- AND bip.CODE='top_menu_name'
- AND bie.ACTIVE='Y'
- AND bie.WF_PARENT_ELEMENT_ID IS NULL
- AND bie.ID=".$r['ID'].")";
- $result2 = mysql_query($sql2, $db);
- while ($r2 = mysql_fetch_array($result2))
- {
- if ($cc<=3){echo "<li id=\"fr4\"><a class=\"b40 a200\" href=\"/shop/goods/mp3/152/".$r['ID']."\"> ".$r2['VALUE']."</a></li>";}
- else {echo "<li id=\"fr4\"><a class=\"a200\" href=\"/shop/goods/mp3/152/".$r['ID']."\"> ".$r2['VALUE']."</a></li>";}
- $cc++;
- }
- }
- }
-
-
- ?>
-
-
-
-
-
-
-
-
-
- <li id="fr5"></li>
- </td>
- <td width="3px"><img src="/bitrix_personal/templates/beta2.citrus.ua/v_dot_200.gif" /></td>
- <td valign="top" width="240">
-
- <li id="fr4"><a class="b40 a200" style="color:#676767; font-size:16px;" href="">Аксессуары</a></li>
- <li id="fr4"><a class="b40 a200" style="color:#676767;" href="/shop/goods/chargers/191/"> Зарядные устройства</a></li>
- <li id="fr4"><a class="b40 a200" style="color:#676767;" href="/shop/goods/apple_products/533/"> Акустические док станции</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/wiredheadsets/197/"> проводные гарнитуры</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/soundphones/194/"> Наушники</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/autocomp/525/"> Автокомплекты</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/display_labels/249/"> пленки на дисплей</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/mobile_handbags/247/"> чехлы</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/apple_products/338/"> Аксессуары Mac</a></li>
- <li id="fr4"><a class="a200" style="color:#676767;" href="/shop/goods/apple_products/558/"> Аксессуары Air/Macbook</a></li>
- <li id="fr5"></li>
- </td>
- </tr>
- </table>
- </td></tr>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- </ul>
- </li>
-
-
- <!--
- <div id="yahaa">
- <a title="Yahoo doo - more content" href="http://yahoo.com">Link to yahoo</a>
- <a title="Yahoo doo2 - wohooo" href="http://yahoo.com">Link to yahoo1</a>
- <a title="Yahoo doo3" href="http://yahoo.com">Link to yahoo2</a>
- <a title="Yahoo doo4 - buga!" href="http://yahoo.com">Link to yahoo3</a>
- </div>
-
- -->
-
- <li id="navshop3"><img style="float: left;" src="/img/separ_07.png" width="3" height="39" /><div id="yahaa"><a title="кликните мышкой" href="http://www.citrus.ua/shop/accessories/"><span>аксессуары</span></div></a>
- <!-- <ul>
- <li id="up-menu"></li> -->
- <?php
- // Меню с выпадающими подменю
- //echo getMenuXhtml('sim.png', 'start_packages', 'Стартовые пакеты', 31);
- //echo getMenuXhtml('adapters.png', 'adapters', 'Переходники', 50); // Меню с выпадающими подменю со стрелкой
- //echo getMenuXhtml('zar.png', 'chargers', 'Зарядные устройства', 23);
- //echo getMenuXhtml('bat.png', 'batteries', 'Элементы питания', 27);
- ?>
- <!-- <li id="down-menu"></li>
- </ul> -->
- </li>
-
-
-
- </li><img id="ggghhh" style="float:left;" src="/img/end_07.jpg" width="3" height="39" />
- </ul>
- </div>
-
- <?php
-
-
- // -----------------------------------------------------------------------------------------------
-
- function getSubMenuXhtml22($iblockId, $baseUri, $ulClass, $addItemArr = null)
- {
- $xHtml = '';
- $ulStyle = '';
- // вытаскиваем секции, которые входят в иблок с ID = $iblockId
- $sql = "SELECT `ID`, `NAME`
- FROM `b_iblock_section`
- WHERE `IBLOCK_ID` = '{$iblockId}'
- AND `IBLOCK_SECTION_ID` IS NULL
- AND `ACTIVE` = 'Y'
- ORDER BY `SORT`, `NAME`";
- $result = mysql_query($sql);
- //var_dump($addItemArr);
- if (mysql_num_rows($result) > 0) {
- while ($row = mysql_fetch_assoc($result)) {
- $id = intval($row['ID']);
- $name = stripslashes($row['NAME']);
- $link = $baseUri . '/' . $id . '/';
- $xHtml .= '<li id="fr4"><a href="' . $link . '"> ' . $name . '</a></li>';
-
- }
- }
- return $xHtml;
- }
-
- /**
- * @param $ico_name - название файла картинки
- * @param $dir_name - название директории раздела на сайте
- * @param $caption - текст в меню
- * @param $iblock_id - идентификатор раздела на сайте
- */
- function getMenuXhtml3($ico_name, $dir_name, $caption, $iblock_id, $addItemArr = null, $specialStyle='')
- {
- $sql = "SELECT `ID`
- FROM `b_iblock_section`
- WHERE `IBLOCK_ID` = '{$iblock_id}'
- AND `IBLOCK_SECTION_ID` IS NULL
- AND `NAME` LIKE 'Все товары'
- AND `ACTIVE` = 'Y'
- LIMIT 1";
- $allGoodsIdSection = '';
- $result = mysql_query($sql);
- if (mysql_num_rows($result) > 0) {
- $row = mysql_fetch_assoc($result);
- $allGoodsIdSection = intval($row['ID']);
- }
-
- $ico_home_path = "//img.citrus.com.ua/img/menu/icons/";
- $dir_home_path = "/shop/goods/";
-
- $xhtml = '<li id="fr4">';
- //$xhtml .= '<img src="'.$ico_home_path.$ico_name.'" style="position:absolute;" />';
- //$xhtml .= '<a class="last_t" style="'.$specialStyle.'" href="'.$dir_home_path.$dir_name.'/'.$allGoodsIdSection.'/" name="shop-'.$dir_name.'">';
- $xhtml .= '<a style="'.$specialStyle.'" class="last_t" href="'.$dir_home_path.$dir_name.'/'.$allGoodsIdSection.'/">';
- $xhtml .= '<strong>' . $caption;
- $xhtml .= '</strong></a>';
- $xhtml .= "</li>";
- $xhtml .= getSubMenuXhtml22($iblock_id, $dir_home_path.$dir_name, 'shop-'.$dir_name, $addItemArr);
- return $xhtml;
- }
-
- // -----------------------------------------------------------------------------------------------
-
-
-
- function getMenuXhtmlX($ico_name, $dir_name, $caption, $iblock_id, $addItemArr = null, $specialStyle='')
- {
- $sql = "SELECT `ID`
- FROM `b_iblock_section`
- WHERE `IBLOCK_ID` = '{$iblock_id}'
- AND `IBLOCK_SECTION_ID` IS NULL
- AND `NAME` LIKE 'Все товары'
- AND `ACTIVE` = 'Y'
- LIMIT 1";
- $allGoodsIdSection = '';
- $result = mysql_query($sql);
- if (mysql_num_rows($result) > 0) {
- $row = mysql_fetch_assoc($result);
- $allGoodsIdSection = intval($row['ID']);
- }
-
- $ico_home_path = "//img.citrus.com.ua/img/menu/icons/";
- $dir_home_path = "/shop/goods/";
-
- $xhtml = '<li>';
- //$xhtml .= '<img src="'.$ico_home_path.$ico_name.'" style="position:absolute;" />';
- $xhtml .= '<a class="menu-h2 menu-main" style=" padding-left:33px;'.$specialStyle.'" href="'.$dir_home_path.$dir_name.'/'.$allGoodsIdSection.'/" name="shop-'.$dir_name.'">';
- $xhtml .= '<strong>'.$caption.'</strong>';
- $xhtml .= '</a>';
- $xhtml .= getSubMenuXhtml($iblock_id, $dir_home_path.$dir_name, 'shop-'.$dir_name, $addItemArr);
- $xhtml .= "</li>";
- return $xhtml;
- }
-
-
-
- // -----------------------------------------------------------------------------------------------
- /**
- * @param $ico_name - название файла картинки
- * @param $dir_name - название директории раздела на сайте
- * @param $caption - текст в меню
- * @param $iblock_id - идентификатор раздела на сайте
- */
- function getMenuXhtml2($ico_name, $dir_name, $caption, $iblock_id, $addItemArr = null, $specialStyle='')
- {
- $sql = "SELECT `ID`
- FROM `b_iblock_section`
- WHERE `IBLOCK_ID` = '{$iblock_id}'
- AND `IBLOCK_SECTION_ID` IS NULL
- AND `NAME` LIKE 'Все товары'
- AND `ACTIVE` = 'Y'
- LIMIT 1";
- $allGoodsIdSection = '';
- $result = mysql_query($sql);
- if (mysql_num_rows($result) > 0) {
- $row = mysql_fetch_assoc($result);
- $allGoodsIdSection = intval($row['ID']);
- }
-
- $ico_home_path = "//img.citrus.com.ua/img/menu/icons/";
- $dir_home_path = "/shop/goods/";
-
- $xhtml = '<li id="fr4">';
- //$xhtml .= '<img src="'.$ico_home_path.$ico_name.'" style="position:absolute;" />';
- $xhtml .= '<a class="menu-h2 menu-main" style="'.$specialStyle.'" href="'.$dir_home_path.$dir_name.'/'.$allGoodsIdSection.'/" name="shop-'.$dir_name.'">';
- $xhtml .= $caption;
- $xhtml .= '</a>';
- $xhtml .= getSubMenuXhtml($iblock_id, $dir_home_path.$dir_name, 'shop-'.$dir_name, $addItemArr);
- $xhtml .= "</li>";
- return $xhtml;
- }
-
- // -----------------------------------------------------------------------------------------------
- /**
- * @param $ico_name - название файла картинки
- * @param $dir_name - название директории раздела на сайте
- * @param $caption - текст в меню
- * @param $iblock_id - идентификатор раздела на сайте
- */
- function getMenuXhtml($ico_name, $dir_name, $caption, $iblock_id, $addItemArr = null, $specialStyle='')
- {
- $sql = "SELECT `ID`
- FROM `b_iblock_section`
- WHERE `IBLOCK_ID` = '{$iblock_id}'
- AND `IBLOCK_SECTION_ID` IS NULL
- AND `NAME` LIKE 'Все товары'
- AND `ACTIVE` = 'Y'
- LIMIT 1";
- $allGoodsIdSection = '';
- $result = mysql_query($sql);
- if (mysql_num_rows($result) > 0) {
- $row = mysql_fetch_assoc($result);
- $allGoodsIdSection = intval($row['ID']);
- }
-
- $ico_home_path = "//img.citrus.com.ua/img/menu/icons/";
- $dir_home_path = "/shop/goods/";
-
- $xhtml = '<li>';
- //$xhtml .= '<img src="'.$ico_home_path.$ico_name.'" style="position:absolute;" />';
- $xhtml .= '<a class="menu-h2 menu-main" style="'.$specialStyle.'" href="'.$dir_home_path.$dir_name.'/'.$allGoodsIdSection.'/" name="shop-'.$dir_name.'">';
- //$xhtml .= '<strong>'.$caption.'</strong>';
- $xhtml .= $caption;
- $xhtml .= '</a>';
- $xhtml .= getSubMenuXhtml($iblock_id, $dir_home_path.$dir_name, 'shop-'.$dir_name, $addItemArr);
- $xhtml .= "</li>";
- return $xhtml;
- }
-
- // -------------------------------------------------------------------------------------------
- function getSubMenuXhtml($iblockId, $baseUri, $ulClass, $addItemArr = null)
- {
- $xHtml = '';
- $ulStyle = '';
- // вытаскиваем секции, которые входят в иблок с ID = $iblockId
- $sql = "SELECT `ID`, `NAME`
- FROM `b_iblock_section`
- WHERE `IBLOCK_ID` = '{$iblockId}'
- AND `IBLOCK_SECTION_ID` IS NULL
- AND `ACTIVE` = 'Y'
- ORDER BY `SORT`, `NAME`";
- $result = mysql_query($sql);
- //var_dump($addItemArr);
- if (mysql_num_rows($result) > 0) {
- while ($row = mysql_fetch_assoc($result)) {
- $id = intval($row['ID']);
- $name = stripslashes($row['NAME']);
- $link = $baseUri . '/' . $id . '/';
- $xHtml .= '<li class="menu-item" ><a href="' . $link . '"><span id="last_p">' . $name . '</span></a></li>';
-
- if(!is_null($addItemArr) && !is_null($addItemArr[$id])){
- $ins_link = $addItemArr[$id]['link'];
- $ins_caption = $addItemArr[$id]['caption'];
- $ins_class = $addItemArr[$id]['class'];
- $xHtml .= '<li class="menu-item '.$ins_class.'" ><a href="'.$ins_link.'"><span>'.$ins_caption.'</span></a></li>';
-
- }
- }
- }
- if (substr_count($_SERVER['REQUEST_URI'], str_replace('http://www.citrus.ua', '', $baseUri))) {
- $ulStyle .= ' style="display: block;"';
- }
- if (strlen($xHtml) > 0) {
- $xHtml = '<ul class="submenu ' . $ulClass . '"' . $ulStyle . '><li id="up-menu"></li>'
- . $xHtml .
-
- '<li id="down-menu"></li></ul>';
- }
- return $xHtml;
- }
-
- // -------------------------------------------------------------------------------------------
-
- ?>