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

Количество показов: 46431577

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

(Нет голосов)

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


Страницы: Пред. 1 ... 286 287 288 289 290 291 След.
0  
Robertobjew
Имя Цитировать 0  
0  
Robertobjew
Имя Цитировать 0  
0  
Robertobjew
Имя Цитировать 0  
0  
Markfup
Приветствую. Подскажите, где почитатьразные блоги о недвижимости? Сейчас читаю - https://amkproekb.ru
Имя Цитировать 0  
0  
MarkBes
Всем привет! Может кто знает, где почитатьразные статьи о недвижимости? Пока нашел - https://amkproekb.ru
Имя Цитировать 0  
0  
Edwardamusy
Имя Цитировать 0  
0  
BradleyLed
where buy cheap clomid without dr prescription clomid cost generic clomid without insurance
Имя Цитировать 0  
0  
Markfup
Приветствую. Подскажите, где найтиразные блоги о недвижимости? Сейчас читаю - https://amkproekb.ru
Имя Цитировать 0  
0  
Robertobjew
Имя Цитировать 0  
0  
MarkLow
Всем привет! Подскажите, где найтиполезные статьи о недвижимости? Сейчас читаю - https://amkproekb.ru
Имя Цитировать 0  
0  
DanielRaw
“You get some of me but not tomorrow as they want me in as soon as I can make it happen. This is the one time when they say jump and I ask how high due the financial gains the company could benefit from and it being important enough for the client to appear in person.”

“Well I get an extra night of you at least! I wonder what we could do with that? Meantime, what about food? I am starving and delicious as it was a second breakfast is not quite enough to replenish me!”

“Well get something on and we’ll sort that out first.”

We drove into town and decided that a daytime visit to Charlie’s was going to be the answer. I parked in the bar lot and Elise dashed in to change into something more appropriate, jeans and a t-shirt along with her biker jacket but keeping her Converses on.

Walking down to the restaurant was different from the middle of the night visits as the streets were bustling and all of the shops and outlets were open.

Reaching Charlie’s we entered the front door and sat in a booth near the window. A beautiful young American Chinese girl came,smiled and said hello to Elise and gave us menus and asked if we wanted drinks in the meantime.

"No thanks Lin just a pot of Jasmine tea for us please." Lin went back to the kitchen area. “No booze for me today as I will have to work in the bar so it is just tea for me.”

Not in a drinking mood either, I agreed with her."

https://anotepad.com/notes/msaycpnn
https://www.hentai-foundry.com/user/laugan1966/profile
https://permacultureglobal.org/users/70495-kevin-stokes
https://www.haikudeck.com/presentations/1FalozyMzY
https://hiten1977.diary.ru/
Имя Цитировать 0  
0  
DanielRaw
?You get some of me but not tomorrow as they want me in as soon as I can make it happen. This is the one time when they say jump and I ask how high due the financial gains the company could benefit from and it being important enough for the client to appear in person.?

?Well I get an extra night of you at least! I wonder what we could do with that? Meantime, what about food? I am starving and delicious as it was a second breakfast is not quite enough to replenish me!?

?Well get something on and we?ll sort that out first.?

We drove into town and decided that a daytime visit to Charlie?s was going to be the answer. I parked in the bar lot and Elise dashed in to change into something more appropriate, jeans and a t-shirt along with her biker jacket but keeping her Converses on.

Walking down to the restaurant was different from the middle of the night visits as the streets were bustling and all of the shops and outlets were open.

Reaching Charlie?s we entered the front door and sat in a booth near the window. A beautiful young American Chinese girl came,smiled and said hello to Elise and gave us menus and asked if we wanted drinks in the meantime.

"No thanks Lin just a pot of Jasmine tea for us please." Lin went back to the kitchen area. ?No booze for me today as I will have to work in the bar so it is just tea for me.?

Not in a drinking mood either, I agreed with her."

https://xanyon1977.diary.ru/
https://jerk1968.bandcamp.com/album/my-niece-mary-jane-part-6-a-buggering
https://cannabis.net/user/160078
https://www.metal-archives.com/users/brunys1959
https://anotepad.com/notes/dbm2nib7
Имя Цитировать 0  
0  
RaymondArels
Услуги откачки септиков по Озёрскому району от 750р. за 1 куб. Шланги до 100м. Работаем без выходных.
Оказываем услуги по ремонту локально очестных сооружений на территории Москвы и Московской области подробнее.
редоставляем в краткосрочную арендумобильные туалетные кабинки с доставкой и дальнейшим обслуживанием по всей Московской области. подробнее.
Имя Цитировать 0  
0  
Danielacarp
“You get some of me but not tomorrow as they want me in as soon as I can make it happen. This is the one time when they say jump and I ask how high due the financial gains the company could benefit from and it being important enough for the client to appear in person.”

“Well I get an extra night of you at least! I wonder what we could do with that? Meantime, what about food? I am starving and delicious as it was a second breakfast is not quite enough to replenish me!”

“Well get something on and we’ll sort that out first.”

We drove into town and decided that a daytime visit to Charlie’s was going to be the answer. I parked in the bar lot and Elise dashed in to change into something more appropriate, jeans and a t-shirt along with her biker jacket but keeping her Converses on.

Walking down to the restaurant was different from the middle of the night visits as the streets were bustling and all of the shops and outlets were open.

Reaching Charlie’s we entered the front door and sat in a booth near the window. A beautiful young American Chinese girl came,smiled and said hello to Elise and gave us menus and asked if we wanted drinks in the meantime.

"No thanks Lin just a pot of Jasmine tea for us please." Lin went back to the kitchen area. “No booze for me today as I will have to work in the bar so it is just tea for me.”

Not in a drinking mood either, I agreed with her."

https://rentry.org/iygedgre
https://www.metal-archives.com/users/gahik1986
https://www.metal-archives.com/users/ak47cs1956
https://www.hentai-foundry.com/user/molion1970/profile
http://www.nfomedia.com/profile?uid=rOjWaeH
Имя Цитировать 0  
0  
Danielacarp
?You get some of me but not tomorrow as they want me in as soon as I can make it happen. This is the one time when they say jump and I ask how high due the financial gains the company could benefit from and it being important enough for the client to appear in person.?

?Well I get an extra night of you at least! I wonder what we could do with that? Meantime, what about food? I am starving and delicious as it was a second breakfast is not quite enough to replenish me!?

?Well get something on and we?ll sort that out first.?

We drove into town and decided that a daytime visit to Charlie?s was going to be the answer. I parked in the bar lot and Elise dashed in to change into something more appropriate, jeans and a t-shirt along with her biker jacket but keeping her Converses on.

Walking down to the restaurant was different from the middle of the night visits as the streets were bustling and all of the shops and outlets were open.

Reaching Charlie?s we entered the front door and sat in a booth near the window. A beautiful young American Chinese girl came,smiled and said hello to Elise and gave us menus and asked if we wanted drinks in the meantime.

"No thanks Lin just a pot of Jasmine tea for us please." Lin went back to the kitchen area. ?No booze for me today as I will have to work in the bar so it is just tea for me.?

Not in a drinking mood either, I agreed with her."

https://satttklgf1971.bandcamp.com/album/catfishing-chapter-1
https://tubeteencam.com/user/gedeom1974/profile
https://cannabis.net/user/160838
https://www.haikudeck.com/presentations/2y6FzwCcl2
https://anotepad.com/notes/hcwbnd7g
Имя Цитировать 0  
0  
Danielgaf
“You get some of me but not tomorrow as they want me in as soon as I can make it happen. This is the one time when they say jump and I ask how high due the financial gains the company could benefit from and it being important enough for the client to appear in person.”

“Well I get an extra night of you at least! I wonder what we could do with that? Meantime, what about food? I am starving and delicious as it was a second breakfast is not quite enough to replenish me!”

“Well get something on and we’ll sort that out first.”

We drove into town and decided that a daytime visit to Charlie’s was going to be the answer. I parked in the bar lot and Elise dashed in to change into something more appropriate, jeans and a t-shirt along with her biker jacket but keeping her Converses on.

Walking down to the restaurant was different from the middle of the night visits as the streets were bustling and all of the shops and outlets were open.

Reaching Charlie’s we entered the front door and sat in a booth near the window. A beautiful young American Chinese girl came,smiled and said hello to Elise and gave us menus and asked if we wanted drinks in the meantime.

"No thanks Lin just a pot of Jasmine tea for us please." Lin went back to the kitchen area. “No booze for me today as I will have to work in the bar so it is just tea for me.”

Not in a drinking mood either, I agreed with her."

https://antifaust1956.diary.ru/
https://bigixsmol1974.diary.ru/
https://www.hentai-foundry.com/user/ownerz1993/profile
https://imageevent.com/darthdan1976
https://chyoa.com/user/groznyy1995
Имя Цитировать 0  
0  
Danielgaf
“You get some of me but not tomorrow as they want me in as soon as I can make it happen. This is the one time when they say jump and I ask how high due the financial gains the company could benefit from and it being important enough for the client to appear in person.”

“Well I get an extra night of you at least! I wonder what we could do with that? Meantime, what about food? I am starving and delicious as it was a second breakfast is not quite enough to replenish me!”

“Well get something on and we’ll sort that out first.”

We drove into town and decided that a daytime visit to Charlie’s was going to be the answer. I parked in the bar lot and Elise dashed in to change into something more appropriate, jeans and a t-shirt along with her biker jacket but keeping her Converses on.

Walking down to the restaurant was different from the middle of the night visits as the streets were bustling and all of the shops and outlets were open.

Reaching Charlie’s we entered the front door and sat in a booth near the window. A beautiful young American Chinese girl came,smiled and said hello to Elise and gave us menus and asked if we wanted drinks in the meantime.

"No thanks Lin just a pot of Jasmine tea for us please." Lin went back to the kitchen area. “No booze for me today as I will have to work in the bar so it is just tea for me.”

Not in a drinking mood either, I agreed with her."

https://rentry.org/hv6x2sn2
https://rentry.org/myztmgke
https://www.haikudeck.com/presentations/fX4Y2kkHpw
https://haveagood.holiday/users/356757
https://rentry.org/o35iemkq
Имя Цитировать 0  
0  
Danielgaf
?You get some of me but not tomorrow as they want me in as soon as I can make it happen. This is the one time when they say jump and I ask how high due the financial gains the company could benefit from and it being important enough for the client to appear in person.?

?Well I get an extra night of you at least! I wonder what we could do with that? Meantime, what about food? I am starving and delicious as it was a second breakfast is not quite enough to replenish me!?

?Well get something on and we?ll sort that out first.?

We drove into town and decided that a daytime visit to Charlie?s was going to be the answer. I parked in the bar lot and Elise dashed in to change into something more appropriate, jeans and a t-shirt along with her biker jacket but keeping her Converses on.

Walking down to the restaurant was different from the middle of the night visits as the streets were bustling and all of the shops and outlets were open.

Reaching Charlie?s we entered the front door and sat in a booth near the window. A beautiful young American Chinese girl came,smiled and said hello to Elise and gave us menus and asked if we wanted drinks in the meantime.

"No thanks Lin just a pot of Jasmine tea for us please." Lin went back to the kitchen area. ?No booze for me today as I will have to work in the bar so it is just tea for me.?

Not in a drinking mood either, I agreed with her."

https://www.metal-archives.com/users/amigo2661952
https://tubeteencam.com/user/vsegnev1967/profile
http://www.babelcube.com/user/marcus-tuten
https://www.obesityhelp.com/members/jug1988/about_me/
https://anotepad.com/notes/krk4qme6
Имя Цитировать 0  
0  
As interpretacoes dos sonhos mais populares dos li
Имя Цитировать 0  
0  
RobertSworp
can you buy generic clomid pills how to get cheap clomid or can you get cheap clomid no prescription
https://clients1.google.com.bd/url?q=https://clomidrexpharm.com can i get cheap clomid tablets
can you get clomid tablets where can i get generic clomid now and clomid generics can you get cheap clomid online
Имя Цитировать 0  
0  
Danielacarp
“You get some of me but not tomorrow as they want me in as soon as I can make it happen. This is the one time when they say jump and I ask how high due the financial gains the company could benefit from and it being important enough for the client to appear in person.”

“Well I get an extra night of you at least! I wonder what we could do with that? Meantime, what about food? I am starving and delicious as it was a second breakfast is not quite enough to replenish me!”

“Well get something on and we’ll sort that out first.”

We drove into town and decided that a daytime visit to Charlie’s was going to be the answer. I parked in the bar lot and Elise dashed in to change into something more appropriate, jeans and a t-shirt along with her biker jacket but keeping her Converses on.

Walking down to the restaurant was different from the middle of the night visits as the streets were bustling and all of the shops and outlets were open.

Reaching Charlie’s we entered the front door and sat in a booth near the window. A beautiful young American Chinese girl came,smiled and said hello to Elise and gave us menus and asked if we wanted drinks in the meantime.

"No thanks Lin just a pot of Jasmine tea for us please." Lin went back to the kitchen area. “No booze for me today as I will have to work in the bar so it is just tea for me.”

Not in a drinking mood either, I agreed with her."

https://www.metal-archives.com/users/seimei1984
https://www.obesityhelp.com/members/djeddy1995/about_me/
https://www.quia.com/profiles/kristineen
https://rentry.org/k4o8p7ts
https://tubeteencam.com/user/deatmaus19921960/profile
Имя Цитировать 0  
0  
Markfup
Приветствую. Может кто знает, где почитатьполезные блоги о недвижимости? Сейчас читаю - https://artpronn.ru
Имя Цитировать 0  
0  
MarkBes
Всем привет! Может кто знает, где найтиразные статьи о недвижимости? Сейчас читаю - https://artpronn.ru
Имя Цитировать 0  
0  
Markfup
Приветствую. Подскажите, где найтиполезные блоги о недвижимости? Пока нашел - https://artpronn.ru
Имя Цитировать 0  
0  
Robertmuh
Перед тем как отправиться на строительную площадку, важно купить летнюю спецодежду, которая обеспечит комфорт и защиту в жаркие дни.
Имя Цитировать 0  
Страницы: Пред. 1 ... 286 287 288 289 290 291 След.
Текст сообщения*
Загрузить файл или картинкуПеретащить с помощью Drag'n'drop
Перетащите файлы
Ничего не найдено
Отправить Отменить
Защита от автоматических сообщений
 
Публикация статей
На данной странице представлены элементы инфоблока статьи, относящиеся к типу Публикации. Статьи опубликованы на странице с помощью комплексного компонента Новостной раздел с указанием параметров инфоблока Статьи. При создании каждой статьи был использован тег <break />, который позволяет осуществить разделение статьи на страницы. В публичном разделе такая статья будет представлена в виде нескольких страниц в зависимости от количества тегов <break />

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