Авторизация
Логин:
Пароль:
Забыли свой пароль?
Войти как пользователь:
Войти как пользователь
Вы можете войти на сайт, если вы зарегистрированы на одном из этих сервисов:
Подписка на рассылку
Реклама
1QH.net - Unique Quality Hosting.network
Расскажи о нас


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

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

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

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

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

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


Страницы: Пред. 1 ... 2628 2629 2630 2631 2632 ... 3922 След.
0  
DonDonPally
darknet markets links  dark market
Имя Цитировать 0  
0  
MatthewImart
Русские сериалы становятся все популярнее за рубежом Сериалы онлайн смотреть бесплатно, новинки сериалов в HD » Страница 453
Имя Цитировать 0  
0  
DavidKindy
farmaci senza ricetta elenco п»їFarmacia online migliore Top Max Farma
Имя Цитировать 0  
0  
Volodyasit
dark web market  darknet drug links
Имя Цитировать 0  
0  
Pingunisp
darkmarket  darknet drug links
Имя Цитировать 0  
0  
Link - flego
Online casinos have transformed the casino gaming industry, offering an exceptional degree of accessibility and range that brick-and-mortar casinos struggle to rival. Throughout the last ten years, a growing community internationally have turned to the adventure of digital casino play because of its availability, thrilling aspects, and widening range of offerings.

If you’re just starting with the world of digital casinos or want to learn about safe services, why not join our active interactive platform? It’s a place where gaming aficionados discuss insights, making it easier for you to maximize your virtual play. Join the experience and start your journey now: https://opensourcebridge.science/wiki/User:AlbertinaWorthy

One of the main appeals of online gaming options is the vast selection of choices at your disposal. Whether you like playing on vintage slot machines, exploring engaging modern slot games, or mastering skills in traditional table offerings like Blackjack, casino websites deliver endless choices. Plenty of operators even include live dealer games, giving you the chance you to engage with human game hosts and gaming peers, all while enjoying the realistic vibes of a physical gaming house in your own space.

In addition to diversity, digital casino services shine accessibility.
Имя Цитировать 0  
0  
JerryTum
his explanation  
smartwallit
Имя Цитировать 0  
0  
RabyHaigo
darknet drugs  dark web marketplaces
Имя Цитировать 0  
0  
RabyHaigo
darknet site  darknet drugs
Имя Цитировать 0  
0  
ThomasRax
find more information investasi smart wallet
Имя Цитировать 0  
0  
WilliamIRunisp
dark web link  best darknet markets
Имя Цитировать 0  
0  
WilliamIRunisp
dark markets  darknet drug store
Имя Цитировать 0  
0  
Georgeruisy
Имя Цитировать 0  
0  
MatthewSpova
Имя Цитировать 0  
0  
KxyuTyday
dark market url  darknet drug market
Имя Цитировать 0  
0  
KxyuTyday
darknet drug links  dark market
Имя Цитировать 0  
0  
DonaldNow
darknet websites  dark market link
Имя Цитировать 0  
0  
RichardBleks
http://topmaxfarma.com/# comprare farmaci online con ricetta
Farmacia online piГ№ conveniente
Имя Цитировать 0  
0  
MatthewImart
Какие русские сериалы можно назвать лучшими за последние 10 лет? Ящик Пандоры (сериал 2011, Россия) смотреть онлайн все серии подряд бесплатно в хорошем качестве
Имя Цитировать 0  
0  
DominicHef
Get Steam Desktop Authenticator

Steam Desktop Authenticator is an app that provides an extra layer of security for your Steam logins by means of two-factor authentication. this tool helps protect your account from unauthorized access by requiring a code that is generated specifically on your computer. This post we will look at how to download and install Steam Desktop Authenticator.

Steps to download and install

1. Go to the official website
First, you need to go to the site of the add Steam Desktop Authenticator. Ensure that you download software from trusted sources to avoid harmful programs.

2. Download the app
On the site, find the download section. As usual it is highlighted on the main website. Click on the link to download the latest version of the application compatible with your operating system.

3. Install the program
Once it is finished, open the setup file. Follow the on-screen instructions to complete the installation process. As usual the installation is simple and takes a short period of time скачать steam desktop authenticator github

4. Configure the application
Once installed, launch Steam Desktop Authenticator. For you will need to enter your your Steam account details so that the addition can access your account and generate authentication codes.

5. Make a spare copy
It is important to create a backup copy of your authentication codes. The application will prompt you to do this so that you always have access to the codes even if you reinstall the application or change devices.

Conclusion

Steam Desktop Authenticator is a useful tool to enhance the security of your Steam accounts. With its support you will be able to protect your data and warn login theft. Download and set up Steam Desktop Authenticator to ensure the safety of your game assets. Remember to regularly update the app to receive the final improvements and security fixes.
Имя Цитировать 0  
0  
FNDavidVag
dark market onion  darkmarket url
Имя Цитировать 0  
0  
JerryTum
Имя Цитировать 0  
0  
Toliksit
dark market list  dark market
Имя Цитировать 0  
0  
Matthewutich
Люблю пересматривать старые русские сериалы – в них есть особая атмосфера На перекрёстке радости и горя (сериал 2016, Россия) смотреть онлайн все серии подряд бесплатно в хорошем качестве
Имя Цитировать 0  
0  
Thomassnose
visit this site smart wallet
Имя Цитировать 0  
Страницы: Пред. 1 ... 2628 2629 2630 2631 2632 ... 3922 След.
Текст сообщения*
Загрузить файл или картинкуПеретащить с помощью Drag'n'drop
Перетащите файлы
Ничего не найдено
Отправить Отменить
Защита от автоматических сообщений
 
Публикация статей
На данной странице представлены элементы инфоблока статьи, относящиеся к типу Публикации. Статьи опубликованы на странице с помощью комплексного компонента Новостной раздел с указанием параметров инфоблока Статьи. При создании каждой статьи был использован тег <break />, который позволяет осуществить разделение статьи на страницы. В публичном разделе такая статья будет представлена в виде нескольких страниц в зависимости от количества тегов <break />

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