Авторизация
Логин:
Пароль:
Забыли свой пароль?
Войти как пользователь:
Войти как пользователь
Вы можете войти на сайт, если вы зарегистрированы на одном из этих сервисов:
Подписка на рассылку
Реклама
11 лет сервису WMe.in.ua - WebMoney Exchange in Ukraine
Расскажи о нас


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

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 | След. | Конец

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

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

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

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


Страницы: Пред. 1 ... 2796 2797 2798 2799 2800 ... 5709 След.
0  
WilliamWhasy
best canadian pharmacy to order from legal to buy prescription drugs from canada or canadian drugs pharmacy
https://www.google.ge/url?q=https://canadianpharmacyaapd.com canadianpharmacymeds com
canadian pharmacy escrow pharmacy canada and canadian pharmacies compare canada pharmacy online legit
Имя Цитировать 0  
0  
RabyHaigo
Имя Цитировать 0  
0  
MarkBot
Инвестиции в жильё: с чего начать? Полезные статьи и советы — https://cemstroy-t68.ru/
Имя Цитировать 0  
0  
Nibulinagep
врач Дубравина Елена Александровна  
Распространяет наркоту Торгует наркотой
Имя Цитировать 0  
0  
DonaldRah
darknet drug market  https://github.com/darkwebmarketslinks/darkwebmarkets  dark market url
Имя Цитировать 0  
0  
URL - nhb
The Convenience of Playing Aviator Online
One of the primary drivers behind the Aviator game’s success is its convenience. The online Aviator game is offered on various devices, allowing players to experience it anywhere and anytime. Whether you’re playing on a computer, a smartphone, or a larger screen, the Aviator official website ensures a seamless gaming experience. For gaming enthusiasts in India, the Aviator India game has become hugely popular due to its simplicity and opportunities for big winnings. The simple design makes it effortless for newcomers to start playing, while experienced players can refine their strategies to increase success rates.

Link: http://vbelgorode.com/company_news/160839/

Aviator Game Download and Bonuses
For those who value offline access, the Aviator game download possibility is an excellent option. Many online casinos provide exclusive bonuses for getting the game, presenting users an added incentive to try it out. These promotional offers often include free bets, deposit matches, and other perks that add value to your bets. The Aviator bonus game is another feature that enhances the thrill. These unique challenges provide higher rewards or include unique challenges, giving players greater thrills and rewards. The combination of standard sessions and bonus rounds ensures that the Spribe Aviator game keeps players hooked.
Имя Цитировать 0  
0  
Manuelpulky
https://indianpharmacyabp.com/# Indian Pharmacy Abp
mexican border pharmacies shipping to usa
Имя Цитировать 0  
0  
MarkNOshevy
dark market list  darknet market
Имя Цитировать 0  
0  
FNDavidHaigo
dark markets  dark web markets
Имя Цитировать 0  
0  
FNDavidHaigo
darknet sites  darknet links
Имя Цитировать 0  
0  
CharlesNug
mexican online pharmacies prescription drugs buying from online mexican pharmacy or п»їbest mexican online pharmacies
http://images.google.com.ph/url?q=https://mexicanpharmacyacp.com buying prescription drugs in mexico
mexican mail order pharmacies medicine in mexico pharmacies and mexico pharmacies prescription drugs mexican mail order pharmacies
Имя Цитировать 0  
0  
EdwardFus
Яковлев Павел Владимирович Метит в президенты

Колет пациентам наркоту
20 лет дурачек не вылазит из психушки
Имя Цитировать 0  
0  
Josephfeavy
AquaSculpt weight loss is here to stay! With AquaSculpt capsules, you get fast AquaSculpt results thanks to natural AquaSculpt ingredients. No worries about AquaSculpt side effects—users confirm it in AquaSculpt reviews. Curious AquaSculpt how to use? It’s easy and effective. AquaSculpt where to buy? Visit https://aquasculpt.one and transform your body now!
Имя Цитировать 0  
0  
PingPap
Имя Цитировать 0  
0  
WilliamSop
Comprehensive drug facts. Patient drug guide.
cheapest drug prices
Get pill facts. Pill information here.
Имя Цитировать 0  
0  
DonDonPally
dark web market links  https://github.com/darkwebwebsites/darkwebwebsites  darknet market links
Имя Цитировать 0  
0  
MorganSnorn
Indian pharmacy online: Online medicine home delivery - Indian Pharmacy Abp
Имя Цитировать 0  
0  
Toliksit
darknet market links  https://github.com/darknetmarketslist/darknetmarketslist  darknet markets 2025
Имя Цитировать 0  
0  
Toliksit
Имя Цитировать 0  
0  
RabyHaigo
Имя Цитировать 0  
0  
RabyHaigo
darknet markets url  https://github.com/darknetmarketlinks2025/darknetmarkets  bitcoin dark web
Имя Цитировать 0  
0  
TerenceNoxor
Имя Цитировать 0  
0  
Link - flego
Virtual gambling platforms have transformed the casino gaming world, delivering an unmatched level of ease and breadth that brick-and-mortar venues fall short of. Over the past decade, a large audience internationally have turned to the fun of digital casino play because of its ease of access, exciting features, and continuously increasing selection of games.

If you’re just starting with the world of online gaming or seek to find out more about trusted platforms, why not sign up for our growing gaming forum? It’s a platform where players offer stories, helping you to enhance your gambling adventure. Check out the connections and learn more now:  

One of the main appeals of online casinos is the astounding variety of gaming experiences available. Whether you prefer interacting with retro slots, playing through engaging video-based games, or strategizing in table games like Blackjack, digital casinos feature numerous options. Plenty of operators furthermore present real-time gaming experiences, letting you to connect with actual dealers and fellow gamblers, all while taking in the lifelike vibes of a brick-and-mortar establishment without leaving your home.

In addition to diversity, virtual gaming providers are known for accessibility.
Имя Цитировать 0  
0  
FNDavidHaigo
dark markets  dark market onion
Имя Цитировать 0  
0  
WilliamIRunisp
darknet market lists  dark market url
Имя Цитировать 0  
Страницы: Пред. 1 ... 2796 2797 2798 2799 2800 ... 5709 След.
Текст сообщения*
Загрузить файл или картинкуПеретащить с помощью Drag'n'drop
Перетащите файлы
Ничего не найдено
Отправить Отменить
Защита от автоматических сообщений
 
Публикация статей
На данной странице представлены элементы инфоблока статьи, относящиеся к типу Публикации. Статьи опубликованы на странице с помощью комплексного компонента Новостной раздел с указанием параметров инфоблока Статьи. При создании каждой статьи был использован тег <break />, который позволяет осуществить разделение статьи на страницы. В публичном разделе такая статья будет представлена в виде нескольких страниц в зависимости от количества тегов <break />

1QH.net - Unique Quality Hosting.network
liqpay webmoney privat24 visa mastercard
2002-2017 © InKey
All rights reserved