Авторизация
Логин:
Пароль:
Забыли свой пароль?
Войти как пользователь:
Войти как пользователь
Вы можете войти на сайт, если вы зарегистрированы на одном из этих сервисов:
Подписка на рассылку
Реклама
11 лет сервису InKey.Biz.ua - Интернет бизнес под ключ.
Расскажи о нас


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

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

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

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

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

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


Страницы: Пред. 1 ... 1953 1954 1955 1956 1957 ... 1959 След.
0  
JacobFoedy
pharmacie en ligne sans ordonnance https://pharmaciemeilleurprix.com/# pharmacie en ligne fiable
Имя Цитировать 0  
0  
RobertKiz
Подробнее rox casino
Имя Цитировать 0  
0  
FrankLen
веб-сайте риобет
Имя Цитировать 0  
0  
RobertLop
выберите ресурсы rox casino
Имя Цитировать 0  
0  
ChrisCoide
Achat mГ©dicament en ligne fiable pharmacie en ligne livraison europe or pharmacie en ligne france livraison belgique
https://maps.google.tn/url?sa=t&url=https://pharmaciemeilleurprix.com п»їpharmacie en ligne france
Pharmacie Internationale en ligne Pharmacie Internationale en ligne and Pharmacie sans ordonnance Achat mГ©dicament en ligne fiable
Имя Цитировать 0  
0  
RobertLop
Продолжение rox casino
Имя Цитировать 0  
0  
RobertLop
выберите ресурсы rox casino
Имя Цитировать 0  
0  
RobertKiz
смотреть здесь rox casino
Имя Цитировать 0  
0  
Brianfew
Имя Цитировать 0  
0  
FrankJaf
подробнее риобет
Имя Цитировать 0  
0  
JacobNuado
Pharmacie en ligne livraison Europe https://viagrameilleurprix.com/# Viagra sans ordonnance livraison 24h
Имя Цитировать 0  
0  
AndrewtuP
Hallo zusammen! https://dasarcchio.de/ bietet die perfekte Kombination aus modernem Design und Technologie mit Beleuchtung, die sowohl zu Hause als auch im Buro den Raum erhellt. Ihre Leuchten sind darauf ausgelegt, nicht nur zu beleuchten, sondern auch den Stil Ihrer Einrichtung zu erganzen und eine gemutliche Atmosphare zu schaffen. Schaut euch das an!
Имя Цитировать 0  
0  
Rickymef
сюда 1xslots
Имя Цитировать 0  
0  
FrankJaf
сюда риобет
Имя Цитировать 0  
0  
Williejak
перейти на сайт вулкан 777
Имя Цитировать 0  
0  
Dragon573
Какой вариант предпочесть в Финансах? billum-zaim.ru
Имя Цитировать 0  
0  
Link - flego
Dragon Tiger is assumed to have developed in Southeast Asia and has since disseminated to betting houses worldwide, particularly in the Asian market. The game's ease and dynamic nature have made it a popular choice among both seasoned players and newcomers. Unlike other card games that require elaborate strategies and skills, Dragon Tiger relies significantly on luck, making it an interesting choice for those looking for a swift gaming experience. At its foundation, Dragon Tiger is similar to traditional baccarat but simplifies the betting system. The game is played with a standard bundle of 52 cards, and the goal is to assess which of the two hands—Dragon or Tiger—will have a more significant value. Players put their bets before the dealer reveals the cards. The hand with the greater card comes out on top, and ties are also feasible, adding an extra layer of engagement.

Direct link: https://90plink.live/truc-tiep-tran-dau-domzale-vs-nk-olimpija-ljubljana-2612057

Players can take several types of options, including betting on the Dragon, the Tiger, or a tie. The returns varies depending on the category of bet placed, with ties typically providing the best payout due to their rarity. This straightforward betting structure makes Dragon Tiger open to a wide audience, further contributing to its popularity in online casinos.
Имя Цитировать 0  
0  
RobertLop
нажмите здесь rox casino
Имя Цитировать 0  
0  
RobertLop
узнать больше rox casino
Имя Цитировать 0  
0  
RobertLop
опубликовано здесь rox casino
Имя Цитировать 0  
0  
WillieTok
посетить веб-сайт вулкан 777
Имя Цитировать 0  
0  
internetekaterinburgPreah
мегафон тарифы на интернет
https://plus-ekb-domasnij-internet-2.ru
мегафон интернет екатеринбург
Имя Цитировать 0  
0  
Robertzot
пояснения rox casino
Имя Цитировать 0  
0  
JacobNuado
pharmacie en ligne france livraison internationale http://viagrameilleurprix.com/# Viagra femme sans ordonnance 24h
Имя Цитировать 0  
0  
RickyGeork
ссылка на сайт 1xslots
Имя Цитировать 0  
Страницы: Пред. 1 ... 1953 1954 1955 1956 1957 ... 1959 След.
Текст сообщения*
Загрузить файл или картинкуПеретащить с помощью Drag'n'drop
Перетащите файлы
Ничего не найдено
Отправить Отменить
Защита от автоматических сообщений
 
Публикация статей
На данной странице представлены элементы инфоблока статьи, относящиеся к типу Публикации. Статьи опубликованы на странице с помощью комплексного компонента Новостной раздел с указанием параметров инфоблока Статьи. При создании каждой статьи был использован тег <break />, который позволяет осуществить разделение статьи на страницы. В публичном разделе такая статья будет представлена в виде нескольких страниц в зависимости от количества тегов <break />

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