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

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

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

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

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


Страницы: Пред. 1 ... 2963 2964 2965 2966 2967 ... 3006 След.
0  
AlvinLiect
Имя Цитировать 0  
0  
KxyuTyday
dark market onion  darkmarket 2025
Имя Цитировать 0  
0  
KxyuTyday
darknet markets url  darknet markets
Имя Цитировать 0  
0  
DonaldRah
dark markets  https://github.com/darkwebmarketslinks/darkwebmarkets  darknet marketplace
Имя Цитировать 0  
0  
DonaldRah
Имя Цитировать 0  
0  
Chriscaund
Имя Цитировать 0  
0  
RabyHaigo
Имя Цитировать 0  
0  
WilliamIRrar
dark web market urls  darknet site
Имя Цитировать 0  
0  
RabyHaigo
Имя Цитировать 0  
0  
KxyuTyday
dark web market  darknet market
Имя Цитировать 0  
0  
DonaldRah
Имя Цитировать 0  
0  
Lawyer - flego
Looking for the Most Reliable Car Accident Lawyer Close to You

If you've been in a auto collision, having the best car accident lawyer can be crucial. A qualified attorney can help you navigate claims with insurers, negotiate settlements, and even fight for you in trial if required.

How to Find the Right car accident lawyer greenville Close to You

- Check Their Experience – Choose a lawyer with a proven history in handling auto injury claims.
- Check Reviews – Client testimonials can give you insight into a legal expert’s professionalism.
- Free Consultations – Many lawyers offer a free first meeting, so use this opportunity to understand your options.
- Local Expertise – Searching for a local auto injury attorney ensures that they are familiar with state-specific regulations.
- Contingency-Based Payment – Many legal professionals work on a no-win, no-fee structure, meaning there are no legal fees unless your claim is successful.

Direct link: https://pilotmusic.ru/udata/emarket/basket/put/element/41624/?redirect-uri=http%3a%2f%2fmotorcycleaccidentlawyer-toronto.com

The Importance of Legal Representation

Even if your case looks easy, insurance companies often try to offer less than you deserve. A top-rated local attorney can ensure you receive what you deserve, including hospital expenses, lost wages, and long-term trauma.

If you want professional guidance, don’t wait—get the legal support you need today and secure your future!
Имя Цитировать 0  
0  
Lawyer - flego
Finding the Best Vehicle Crash Lawyer Near You

If you've been in a vehicle crash, having the best auto accident attorney can greatly impact your case. A qualified lawyer can help you navigate claims with insurers, negotiate settlements, and even represent you in court if needed.

How to Find the Right car accident lawyer toronto Close to You

- Check Their Experience – Choose a lawyer with a proven history in handling car accident cases.
- Look at Client Feedback – Reviews from past clients can help you understand a lawyer’s competence.
- Initial Case Reviews – Many lawyers offer a no-cost initial consultation, so don’t miss out to understand your options.
- Local Expertise – Searching for a car accident lawyer near me ensures that they are well-versed in regional legal procedures.
- Contingency-Based Payment – Many car accident attorneys work on a performance-based agreement, meaning they only get paid unless your claim is successful.

Direct link: https://forum.chemodan.com.ua/go.php?to=https://toronto-auto-accident-lawyer.ca/

The Importance of Legal Representation

Even if the crash appears simple, insurance companies often try to reduce compensation. A best car accident lawyer near me can fight for the compensation, including medical bills, lost wages, and emotional distress.

If you want professional guidance, don’t wait—contact a local attorney today and protect your rights!
Имя Цитировать 0  
0  
DragonV1
Где брать актуальные данные о финансах? https://kreditiunas.ru
Имя Цитировать 0  
0  
FNDavidchirl
darknet market links  darkmarket url
Имя Цитировать 0  
0  
Alpha209
https://www.auto-russia.com/ Мифы и правда о бизнесе.
Имя Цитировать 0  
0  
JosephPRozy
Баллон — это автомат для настоящих любителей.: balloon казино - balloon игра
Имя Цитировать 0  
0  
TerencePap
Имя Цитировать 0  
0  
Stephynsoibe
Truly loads of beneficial advice.
Casino royale online slots real money online mbl betting  four winds online casino real money.
Pinnacle online casino https://casinosonlinenew.com/washington-online-casino/  online casino real money book of ra!
Online casino free spins no deposit canada https://mapcasino.info/florida-online-casinos/  online casinos jackpots!
Vegas x org casino online https://linkscasino.info/online-slots/  online casinos that accept us credit cards!
Casino game online roulette poker online real money  online casino app iphone!

http://primeos.ru/node/5?page=273#comment-28337
http://bobba.mannlist.com/viewtopic.php?t=55119445
https://www.mitsubishi-owners-club.nl/forum/index.php?topic=112253.new#new
https://nauc.info/forums/viewtopic.php?t=20781295
https://mypets.by/dekeyseria-pulchra?unapproved=205909&moderation-hash=1e71486a0abf089f3efcd963f33ce3b1#comment-205909
Имя Цитировать 0  
0  
DavidGlork
find out this here  
Lumi crypto wallet
Имя Цитировать 0  
0  
DonDonPally
dark websites  https://github.com/darkwebwebsites/darkwebwebsites  darknet markets 2025
Имя Цитировать 0  
0  
JosephPRozy
Казино предлагает множество игровых автоматов.: balloon казино официальный сайт - balloon казино официальный сайт
Имя Цитировать 0  
0  
Chrisalarl
Имя Цитировать 0  
0  
AlvinBax
Имя Цитировать 0  
0  
Jessefromb
Соревнуйтесь СЃ РґСЂСѓР·СЊСЏРјРё РЅР° игровых автоматах.: balloon казино официальный сайт - balloon казино
Имя Цитировать 0  
Страницы: Пред. 1 ... 2963 2964 2965 2966 2967 ... 3006 След.
Текст сообщения*
Загрузить файл или картинкуПеретащить с помощью Drag'n'drop
Перетащите файлы
Ничего не найдено
Отправить Отменить
Защита от автоматических сообщений
 
Публикация статей
На данной странице представлены элементы инфоблока статьи, относящиеся к типу Публикации. Статьи опубликованы на странице с помощью комплексного компонента Новостной раздел с указанием параметров инфоблока Статьи. При создании каждой статьи был использован тег <break />, который позволяет осуществить разделение статьи на страницы. В публичном разделе такая статья будет представлена в виде нескольких страниц в зависимости от количества тегов <break />

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