Advertisement
toorr2p

Untitled

Feb 18th, 2024
713
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.06 KB | None | 0 0
  1. <?php
  2. global $USER;
  3. if($USER->isAdmin()){
  4.     if (SITE_ID == 's1') {
  5.         $db_props = CIBlockElement::GetProperty($arParams["IBLOCK_ID"], $ElementID, array("sort" => "asc"), Array("CODE"=>"NAME_RU"));
  6.         if($ar_props = $db_props->Fetch()) {
  7.             if ($ar_props["VALUE"]!="") {
  8.                 $name_transl = $ar_props["VALUE"];
  9.                 $APPLICATION->SetTitle($name_transl);
  10.             }
  11.         }
  12.     }
  13.     if (SITE_ID == 'sl') {
  14.         $db_props = CIBlockElement::GetProperty($arParams["IBLOCK_ID"], $ElementID, array("sort" => "asc"), Array("CODE"=>"NAME_SL"));
  15.         if($ar_props = $db_props->Fetch()) {
  16.             if ($ar_props["VALUE"]!="") {
  17.                 $name_transl = $ar_props["VALUE"];
  18.                 $APPLICATION->SetTitle($name_transl);
  19.             }
  20.         }
  21.     }
  22.     if (SITE_ID == 'de') {
  23.         $db_props = CIBlockElement::GetProperty($arParams["IBLOCK_ID"], $ElementID, array("sort" => "asc"), Array("CODE"=>"NAME_DE"));
  24.         if($ar_props = $db_props->Fetch()) {
  25.             if ($ar_props["VALUE"]!="") {
  26.                 $name_transl = $ar_props["VALUE"];
  27.                 $APPLICATION->SetTitle($name_transl);
  28.             }
  29.         }
  30.     }
  31.     //$APPLICATION->SetPageProperty('title', $name_transl);
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement