Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <? if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die(); ?>
- <?$curPage = $APPLICATION->GetCurPage(false);?>
- <ul class="lang">
- <? foreach ($arResult["SITES"] as $key => $arSite): ?>
- <?
- switch (LANGUAGE_ID){
- case "ru":
- $rest = substr($curPage, 3);
- break;
- case "en":
- $rest = substr($curPage, 3);
- break;
- case "ua":
- $rest = "mirfactory.com/" . $curPage;
- break;
- }
- if(LANGUAGE_ID == "en" || LANGUAGE_ID == "ru"){
- $cPage = "=";
- }
- ?>
- <?//echo "<pre>";?>
- <?//var_dump($arSite);?>
- <?//echo "</pre>";?>
- <? if ($arSite["CURRENT"] == "Y"): ?>
- <li class="active"><a><span title="<?= $arSite["NAME"] ?>"><?= $arSite["NAME"] ?></span></a></li>
- <? else: ?>
- <li><a href="<? if (is_array($arSite['DOMAINS']) && strlen($arSite['DOMAINS'][0]) > 0 || strlen($arSite['DOMAINS']) > 0): ?>https://<? endif ?><?= (is_array($arSite["DOMAINS"]) ? $arSite["DOMAINS"][0] : $arSite["DOMAINS"]) ?><?= $arSite["DIR"] ?><?//= $rest?>" title="<?= $arSite["NAME"] ?>"><?= $arSite["NAME"] ?></a></li>
- <? endif ?>
- <? endforeach; ?>
- </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement