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

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

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

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

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


Страницы: Пред. 1 ... 2593 2594 2595 2596 2597
0  
Lawyer - flego
Looking for the Top Auto Accident Attorney Near You

If you've been in a vehicle crash, having the right auto accident attorney can make all the difference. A experienced attorney can help you navigate claims with insurers, negotiate settlements, and even represent you in court if needed.

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

- Check Their Experience – Choose a lawyer with a proven history in handling auto injury claims.
- Look at Client Feedback – Online feedback can show you a lawyer’s success rate.
- Initial Case Reviews – Many attorneys offer a no-cost first meeting, so take advantage of this to discuss your case.
- Local Expertise – Searching for a local auto injury attorney ensures that they are well-versed in regional legal procedures.
- Contingency-Based Payment – Many personal injury lawyers work on a no-win, no-fee structure, meaning there are no legal fees unless your claim is successful.

Direct link: http://webloza.nnov.org/common/redir.php?https://car-accident-lawyer.me/

The Importance of Legal Representation

Even if your case looks easy, adjusters often try to offer less than you deserve. A experienced accident lawyer can ensure you receive what you deserve, including treatment costs, lost wages, and pain and suffering.

If you're looking for legal help, don’t wait—contact a local attorney today and protect your rights!
Имя Цитировать 0  
0  
Lawyer - flego
Looking for the Best Auto Accident Attorney Near You

If you are in a car accident, having the right auto accident attorney can make all the difference. A skilled lawyer can help you manage claims with insurers, negotiate settlements, and even represent you in court if necessary.

Ways to Choose the Best car accident claim lawyer Close to You

- Check Their Experience – Choose a attorney with a proven history in handling auto injury claims.
- Read Testimonials – Online feedback can help you understand a lawyer’s professionalism.
- Initial Case Reviews – Many lawyers offer a free first meeting, so don’t miss out to discuss your case.
- Knowledge of Local Laws – Searching for a nearby vehicle crash lawyer ensures that they are familiar with local traffic laws.
- Pay Only If You Win – Many personal injury lawyers work on a no-win, no-fee structure, meaning they only get paid unless your claim is successful.

Direct link: http://umn.x0.com/search/rank.cgi?mode=link&id=518&url=https%3A%2F%2Fmotorcycleaccidentlawyer-toronto.com

The Importance of Legal Representation

Even if the crash appears simple, insurance companies often try to minimize payouts. A best car accident lawyer near me can ensure you receive what you deserve, including treatment costs, income loss, and pain and suffering.

If you want professional guidance, don’t wait—find a car accident lawyer near me today and protect your rights!
Имя Цитировать 0  
0  
KxyuPally
dark web sites  dark market list
Имя Цитировать 0  
0  
MarkNORah
dark market  dark web marketplaces
Имя Цитировать 0  
0  
MarkNORah
darknet sites  darkmarkets
Имя Цитировать 0  
0  
MatthewImart
Лучшие зарубежные сериалы – это настоящее удовольствие для киномана Смотреть Сериалы 2015 онлайн бесплатно в HD качестве » Страница 3
Имя Цитировать 0  
0  
Victordurdy
п»їfarmacia online espaГ±a: Farmacia Medic - farmacia online envГ­o gratis
Имя Цитировать 0  
0  
JasperAcuri
Farmacia Medic Farmacia Medic farmacia online barcelona
Имя Цитировать 0  
0  
Volodyaovemo
darknet drug links  darkmarkets
Имя Цитировать 0  
0  
MarkNONow
dark web drug marketplace  darknet drugs
Имя Цитировать 0  
0  
KxyuTyday
darkmarket 2025  darkmarket 2025
Имя Цитировать 0  
0  
Robertduh
Имя Цитировать 0  
0  
KxyuTyday
darknet markets  darknet market links
Имя Цитировать 0  
0  
MatthewSpova
Имя Цитировать 0  
0  
Matthewutich
Имя Цитировать 0  
0  
Robertjof
Имя Цитировать 0  
0  
Volodyasit
bitcoin dark web  darknet drug store
Имя Цитировать 0  
0  
Volodyasit
darkmarket url  darknet marketplace
Имя Цитировать 0  
0  
FNDavidHaigo
darknet drug market  darknet site
Имя Цитировать 0  
Страницы: Пред. 1 ... 2593 2594 2595 2596 2597
Текст сообщения*
Загрузить файл или картинкуПеретащить с помощью Drag'n'drop
Перетащите файлы
Ничего не найдено
Отправить Отменить
Защита от автоматических сообщений
 
Публикация статей
На данной странице представлены элементы инфоблока статьи, относящиеся к типу Публикации. Статьи опубликованы на странице с помощью комплексного компонента Новостной раздел с указанием параметров инфоблока Статьи. При создании каждой статьи был использован тег <break />, который позволяет осуществить разделение статьи на страницы. В публичном разделе такая статья будет представлена в виде нескольких страниц в зависимости от количества тегов <break />

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