Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. <? if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die(); ?>
  2. <?$curPage = $APPLICATION->GetCurPage(false);?>
  3. <ul class="lang">
  4. <? foreach ($arResult["SITES"] as $key => $arSite): ?>
  5. <?
  6.  
  7. switch (LANGUAGE_ID){
  8. case "ru":
  9. $rest = substr($curPage, 3);
  10. break;
  11. case "en":
  12. $rest = substr($curPage, 3);
  13. break;
  14. case "ua":
  15. $rest = "mirfactory.com/" . $curPage;
  16. break;
  17. }
  18. if(LANGUAGE_ID == "en" || LANGUAGE_ID == "ru"){
  19. $cPage = "=";
  20. }
  21. ?>
  22. <?//echo "<pre>";?>
  23. <?//var_dump($arSite);?>
  24. <?//echo "</pre>";?>
  25. <? if ($arSite["CURRENT"] == "Y"): ?>
  26. <li class="active"><a><span title="<?= $arSite["NAME"] ?>"><?= $arSite["NAME"] ?></span></a></li>
  27. <? else: ?>
  28. <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>
  29. <? endif ?>
  30. <? endforeach; ?>
  31. </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement