Авторизация
Логин:
Пароль:
Забыли свой пароль?
Войти как пользователь:
Войти как пользователь
Вы можете войти на сайт, если вы зарегистрированы на одном из этих сервисов:
Подписка на рассылку
Реклама
1QH.net - Unique Quality Hosting.network
Расскажи о нас


Пользовательские движки шаблонизации

02.10.2009

Пример подключения движка XML/XSLT:

Сначала регистрируем движок:

global $arCustomTemplateEngines;
$arCustomTemplateEngines = array(
   "xslt" => array(
      "templateExt" => array("xsl"),
      "function" => "XSLTEngine"
   ),
);

Функция инициализации параметров движка:

function CreateXMLFromArray($xDoc, $xNode, $ar)
{
   foreach($ar as $key=>$val)
   {
      if(!is_string($key) || strlen($key)<=0)
         $key = "value";

      $xElement = $xDoc->createElement($key);
      if(is_array($val))
      {
         CreateXMLFromArray($xDoc, $xElement, $val);
      }
      else
      {
         $xElement->appendChild($xDoc->createTextNode(iconv( SITE_CHARSET, "utf-8", $val)));
      }
      $xNode->appendChild($xElement);
   }
   return $xNode;
}

Функция подключения движка:

function XSLTEngine($templateFile, $arResult, $arParams, $arLangMessages, $templateFolder, $parentTemplateFolder, $template)
{
   $arResult["PARAMS"] = array(
      "templateFolder" => $templateFolder,
      "parentTemplateFolder" => $parentTemplateFolder,
      "arParams" => $arParams,
      "arLangMessages" => $arLangMessages
   );

   $xDoc = new DOMDocument("1.0", SITE_CHARSET);
   $xRoot = $xDoc->createElement('result');
   CreateXMLFromArray($xDoc, $xRoot, $arResult);
   $xDoc->appendChild($xRoot);

   $xXsl = new DOMDocument();
   $xXsl->load( $_SERVER["DOCUMENT_ROOT"].$templateFile );

   $xProc = new XSLTProcessor;
   $xProc->importStyleSheet($xXsl);

   echo $xProc->transformToXML($xDoc);
}


Страница 3 - 3 из 3
Начало | Пред. | 1 2 3 | След. | Конец

Количество показов: 82643034
Рейтинг:  3.3

Возврат к списку

(Голосов: 1, Рейтинг: 3.3)

Материалы по теме:


Страницы: Пред. 1 ... 2342 2343 2344 2345 2346 ... 3871 След.
0  
DonDonTyday
dark markets  darknet websites
Имя Цитировать 0  
0  
DonDonTyday
best darknet markets  darknet drug links
Имя Цитировать 0  
0  
Anthonysor
kraken market ? ??? breakthrough in digital security, ??? secrecy ? data protection ?????????? ??????? online life. ???????? "Kraken" is linked ? endless possibilities ? ???????????????? ?????????. ??? platform offers ?????? ? ???? digital freedom, ??? restrictions traditional networks ?????? ???? ????.
?????? ????
Имя Цитировать 0  
0  
AugustBoync
Mega Darknet ???????????? ????? ??????????? ?????????, ??? security ? ??????????? ?????????? ??????? ?????? ????????? ???????????. ????????? "Mega Darknet" ?????????? ????????? tools ? ????????????. ??? ?? ?????? portal; ??? entry into a unique world ?????????, ??? restrictions ????????? ??????.
???? ?? ?? ????????
Имя Цитировать 0  
0  
DonaldRah
darknet markets onion address  dark market onion
Имя Цитировать 0  
0  
RabyHaigo
dark market  dark markets 2025
Имя Цитировать 0  
0  
RabyHaigo
darknet drug links  dark web market list
Имя Цитировать 0  
0  
DonaldRah
dark web market links  darkmarket link
Имя Цитировать 0  
0  
Toliksit
darknet market list  darknet market list
Имя Цитировать 0  
0  
Toliksit
dark market link  darkmarket
Имя Цитировать 0  
0  
DonDonTyday
darknet drug market  darknet drug store
Имя Цитировать 0  
0  
PingPap
darknet drugs  dark market 2025
Имя Цитировать 0  
0  
GeorgeNus
Имя Цитировать 0  
0  
Social Link - flego
Why Online Casinos Remain So Popular

Virtual gambling platforms have revolutionized the betting world, providing an unmatched level of accessibility and selection that physical establishments fall short of. Over the past decade, a large audience across the globe have welcomed the excitement of virtual gambling as a result of its anytime, anywhere convenience, exciting features, and constantly growing range of offerings.

If you’re just starting with the world of online gaming or hope to learn about reliable sites, why not join our lively interactive platform? It’s a destination where gamblers discuss experiences, guiding you to maximize your online casino experience. Check out the connections and check it out now: https://x.com/Dragon_Tiger_BR

One of the key draws of digital gambling sites is the incredible selection of gaming experiences ready to play. Whether you are a fan of engaging with retro slot machines, immersing yourself in story-driven video-based games, or mastering skills in table games like Roulette, online platforms deliver infinite options. Many casinos additionally introduce live dealer games, making it possible for you to engage with live hosts and other players, all while experiencing the realistic atmosphere of a real casino without leaving your home.

Social URL: https://x.com/Dragon_Tiger_BR

Beyond variety, virtual gambling platforms excel availability.
Имя Цитировать 0  
0  
TolikItamp
Имя Цитировать 0  
0  
MarkJulge
Хотите сдать квартиру в аренду? Читайте проверенные советы https://new-fstore.ru/
Имя Цитировать 0  
0  
DonDonTyday
darknet markets onion address  darknet links
Имя Цитировать 0  
0  
DonDonTyday
dark web sites  darknet drug store
Имя Цитировать 0  
0  
MarkVar
Хотите сдать квартиру в аренду? Полезные статьи и советы — https://new-fstore.ru/
Имя Цитировать 0  
0  
GeorgeCaw
Hello there! Experience the thrill of surfing the air with the https://theswurfer.com/ Stand-Up Tree Swing. This innovative swing allows you to stand, sit, or kneel while soaring through the air, providing a unique adventure for both kids and adults. Made from sturdy materials, it’s perfect for outdoor fun!
Имя Цитировать 0  
0  
DonDonpen
dark market  darkmarket url
Имя Цитировать 0  
0  
WalterTraub
They always have the newest products on the market.
https://clomidpharm24.top/
Everything about medicine.
Имя Цитировать 0  
0  
Social Link - flego
How Online Casinos Have Become a Worldwide Trend

Virtual gambling platforms have reshaped the gaming landscape, providing an exceptional degree of ease and breadth that land-based venues don’t provide. In recent years, millions of players across the globe have turned to the thrill of virtual casinos because of its accessibility, exciting features, and widening catalogs of games.

If you’re a beginner with the world of online gaming or hope to find out more about safe services, why not sign up for our growing gaming forum? It’s a place where gaming aficionados share insights, guiding you to improve your gaming journey. Discover the experience and start your journey now: 5win com

One of the key draws of virtual gambling hubs is the astounding range of choices available. Whether you love playing on vintage one-armed bandits, trying out engaging video slots, or playing smart in table games like Baccarat, casino websites provide endless entertainment avenues. A large number of platforms moreover feature live casino options, letting you to connect with professional croupiers and opponents, all while experiencing the engaging feel of a land-based casino from the comfort of your home.

Social URL: https://x.com/5wins_br

Apart from the game range, virtual gambling platforms thrive in accessibility.
Имя Цитировать 0  
0  
Tolikovemo
dark web market list  dark markets 2025
Имя Цитировать 0  
0  
Victorcot
Long-Term Effects.
buying generic cytotec price
A trusted name in international pharmacy circles.
Имя Цитировать 0  
Страницы: Пред. 1 ... 2342 2343 2344 2345 2346 ... 3871 След.
Текст сообщения*
Загрузить файл или картинкуПеретащить с помощью Drag'n'drop
Перетащите файлы
Ничего не найдено
Отправить Отменить
Защита от автоматических сообщений
 
Публикация статей
На данной странице представлены элементы инфоблока статьи, относящиеся к типу Публикации. Статьи опубликованы на странице с помощью комплексного компонента Новостной раздел с указанием параметров инфоблока Статьи. При создании каждой статьи был использован тег <break />, который позволяет осуществить разделение статьи на страницы. В публичном разделе такая статья будет представлена в виде нескольких страниц в зависимости от количества тегов <break />

liqpay webmoney privat24 visa mastercard
2002-2017 © InKey
All rights reserved