Авторизация
Логин:
Пароль:
Забыли свой пароль?
Войти как пользователь:
Войти как пользователь
Вы можете войти на сайт, если вы зарегистрированы на одном из этих сервисов:
Подписка на рассылку
Реклама
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 | След. | Конец

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

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

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

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


Страницы: Пред. 1 ... 2017 2018 2019 2020 2021 ... 2027 След.
0  
GreggFat
888старс промокод - Мостбет промокод, Мелбет промокод
Имя Цитировать 0  
0  
CurtisMep
Имя Цитировать 0  
0  
CurtisMep
read this article  
Lookup
Имя Цитировать 0  
0  
VirgilCot
Имя Цитировать 0  
0  
BoyceColla
Имя Цитировать 0  
0  
CurtisMep
Имя Цитировать 0  
0  
Scottcug
like it  
galaxyswapper
Имя Цитировать 0  
0  
GreggPem
Casino Booi промокод при регистрации - БК Зенит промокод при регистрации, Betwinner промокод при регистрации
Имя Цитировать 0  
0  
Frankpam
Имя Цитировать 0  
0  
Frankpar
Имя Цитировать 0  
0  
SilverStriker
Конкретные шаги для работы с Финансами: avtolombard-13.ru
Имя Цитировать 0  
0  
CurtisThuts
my latest blog post  
Openup
Имя Цитировать 0  
0  
Bet on Red - flego
Casino Bet on Red – Une Immersion Totale dans le Monde des Jeux

Dans l'univers des milieu des paris numeriques, Bet on Red s'affirme comme une reference incontournable. Que vous soyez un stratege experimente, bet on red casino avis offre une interface fluide et intuitive. Ce site ne se limite pas seulement aux jeux traditionnels comme les machines a sous, mais propose egalement des recompenses spectaculaires.

Les avis des utilisateurs revelent des experiences authentiques et variees. Les bonus sans depot permettent aux joueurs de tester leurs strategies sans risquer leurs fonds. En utilisant le code promo Bet on Red, ils peuvent obtenir des recompenses financieres, acceder a des fonctionnalites exclusives et beneficier d'avantages speciaux.

URL: https://otel.alansuites.com/better-credit-gets-your-business-up-to-20-times-the-loan-money-report-says/

Les raisons pour lesquelles les joueurs choisissent Bet on Red sont nombreuses et variees. Cela inclut sa force des recompenses exclusives. Les joueurs peuvent utiliser le bonus special Bet on Red, qui non seulement renforce leur engagement, но и maximise leurs gains potentiels. Les commentaires des utilisateurs mettent en lumiere des elements essentiels : la qualite des outils proposes, les promotions regulieres, et la transparence des transactions financieres. Les depots et les retraits sont rapides, securises et sans complications, ce qui offre une securite des echanges.
Имя Цитировать 0  
0  
Boycepaish
Имя Цитировать 0  
0  
Michaelusest
plinko game: PlinkoDeutsch - plinko wahrscheinlichkeit
Имя Цитировать 0  
0  
Frankpar
pinco.legal pinco or pinco casino
http://images.google.co.ug/url?q=https://pinco.legal pinco.legal
pinco casino pinco casino and pinco pinco slot
Имя Цитировать 0  
0  
Scottdyday
click for info galaxyswapper
Имя Цитировать 0  
0  
Social Link - flego
What Makes Online Casinos Have Become So Popular

Online casinos have modernized the betting landscape, offering an unmatched level of accessibility and diversity that land-based gambling houses are unable to replicate. Recently, a large audience globally have embraced the fun of internet-based gaming as a result of its always-open nature, appealing qualities, and constantly growing game libraries.

If you’re just starting with the world of internet-based gaming or hope to learn about trusted platforms, why not join our lively social network? It’s a place where fans post experiences, helping you to enjoy more of your casino activities. Discover the community and learn more now: https://t.me/vinci_spin

One of the most compelling reasons of online gaming options is the astounding variety of titles provided. Whether you prefer interacting with classic fruit machine slots, playing through story-driven visual slot games, or strategizing in classic casino games like Roulette, casino websites feature endless possibilities. Several sites moreover feature live dealer games, giving you the chance you to communicate with actual dealers and fellow gamblers, all while soaking in the engaging environment of a land-based casino in your own space.

Social URL: https://t.me/vinci_spin

Beyond variety, online casinos thrive in availability.
Имя Цитировать 0  
0  
Michaelartib
pinco slot: pinco slot - pinco.legal
Имя Цитировать 0  
0  
MatthewEvima
mega dark - megaweb16 at, m3ga.sb
Имя Цитировать 0  
0  
LarryRak
pinco.legal: pinco.legal - pinco casino
Имя Цитировать 0  
0  
Lawyer - flego
Searching for the Most Reliable Vehicle Crash Lawyer Close to You

If you are in a car accident, having the best car accident lawyer can be crucial. A experienced attorney can help you manage claims with insurers, negotiate settlements, and even represent you in court if needed.

Ways to Choose the Right car accident lawyer greenville Close to You

- Consider Expertise – Choose a attorney with a proven history in handling auto injury claims.
- Look at Client Feedback – Reviews from past clients can give you insight into a legal expert’s competence.
- Initial Case Reviews – Many lawyers offer a complimentary initial consultation, so use this opportunity to discuss your case.
- Local Expertise – Searching for a nearby vehicle crash lawyer ensures that they are experienced with state-specific regulations.
- Pay Only If You Win – Many personal injury lawyers work on a no-win, no-fee structure, meaning you don’t pay unless you receive compensation.

Direct link: http://www.samo-lepky.sk/?linkout=https://bestcaraccidentlawyersintoronto.ca/

The Importance of Legal Representation

Even if your accident seems straightforward, insurance companies often try to reduce compensation. A top-rated local attorney can fight for the compensation, including treatment costs, missed work pay, and long-term trauma.

If you want professional guidance, don’t wait—find a car accident lawyer near me today and fight for your claim!
Имя Цитировать 0  
0  
Matthewgig
megaweb - m3ga.sb, mega sb
Имя Цитировать 0  
0  
CurtisPinia
click site CR
Имя Цитировать 0  
0  
CurtisMep
click here now  
WHITEPAGES
Имя Цитировать 0  
Страницы: Пред. 1 ... 2017 2018 2019 2020 2021 ... 2027 След.
Текст сообщения*
Загрузить файл или картинкуПеретащить с помощью Drag'n'drop
Перетащите файлы
Ничего не найдено
Отправить Отменить
Защита от автоматических сообщений
 
Публикация статей
На данной странице представлены элементы инфоблока статьи, относящиеся к типу Публикации. Статьи опубликованы на странице с помощью комплексного компонента Новостной раздел с указанием параметров инфоблока Статьи. При создании каждой статьи был использован тег <break />, который позволяет осуществить разделение статьи на страницы. В публичном разделе такая статья будет представлена в виде нескольких страниц в зависимости от количества тегов <break />

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