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

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

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

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

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


Страницы: Пред. 1 ... 291 292 293 294 295
0  
real estate
Prospective Investments in  apartments in Europe.
Имя Цитировать 0  
0  
HaroldGLYPE
Услуги монтажа ливневок по Раменскому району Работаем без выходных.https://drenaj-mos.ru/
Имя Цитировать 0  
0  
AndrewIdeab
Имя Цитировать 0  
0  
DerekcAuse
buy dapoxetine online: buy priligy max pharm - dapoxetine price
Имя Цитировать 0  
0  
StevenTum
where can i buy clomid without a prescription: clomid purchase online rex pharm - generic clomid pill
Имя Цитировать 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."

http://www.nfomedia.com/profile?uid=rOjWfiI
https://www.metal-archives.com/users/empireo1963
https://permacultureglobal.org/users/70807-trish-moore
https://chyoa.com/user/demarud1992
http://www.babelcube.com/user/crystal-olson
Имя Цитировать 0  
0  
Pin Up ff
Pinup casino, axr vaxtlarda Azri onlayn oyun bazarnda hmiyytli bir yer tutmu kazinolardan biridir. Saysz mtri trfindn oynanlan bu qumar xidmti, geni oyun eidi, gzl hdiyylr v etibarllq baxmndan liderdir. Pin up azerbaycan ad altnda bu qumar sayt, mrc ednlr mxtlif oyunlar tklif etmkl yana, ideal qumar oyunu verir. yerli internet oyun dnyasnda oyunular trfindn seviln pinup kazino , hm yerli v qlobal bazarda populyarlq qazanb.

Azri bazarnda virtual qumar oyunlarna istk artdqca, Pin-up casino online kimi kazino xidmtlri daha ox tannmaa balad. Bununla brabr, "Pin up casino online" brendlri tez-tez yerli istifadilr n tandr. Pin-up kazino online oyunulara mxtlif oyunlar tklif edir.

Pinup kazino, yerli oyunular n geni yaylm bir xidmtdir. Bu platforma istifadilr oxlu oyun tkliflri tmin edir v gzl hdiyylr il mrc ednlri zn clb edir.

Pin-up casino, istifadilr oyun nvlri il zngin xidmtdir. Azrbaycanda geni istifad olunan Pin-up casino, kazino oyunular n frqli oyun seimlri il x edir.

Bununla yana, Pin-up cazino mtrilr yalnz oyun tklif etmir bonus imkan tqdim edir. Bu onlayn kazinoda, qumar hvskarlar zlrini gvnd hiss edir.

Web: http://3dboxing.com/jforum/user/profile/5916.page

Pin-up kazino yalnz oyunlar il kifaytlnmir. Mtrilr burada geni mrc tcrbsindn mxtlif mrc imkan ld ed bilr v oxlu bonuslar istifad ed bilrlr.

Sonda, Pin-up cazino, srfli v thlksiz mrc oyunlar tqdim etmkl oyun snayesind n yax seimlrdn biridir. yerli mrcilr arasnda mhur olmas gz qabandadr.
Имя Цитировать 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/m7vicg4f
https://www.obesityhelp.com/members/kryys1980/about_me/
https://chyoa.com/user/kreta1961
https://rentry.org/d547hdwz
https://rentry.org/vnrshvde
Имя Цитировать 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/vb3wrx6o
https://cannabis.net/user/156534
https://haveagood.holiday/users/356972
https://chyoa.com/user/fdndr1952
https://diman95ru1971.diary.ru/
Имя Цитировать 0  
0  
DerekcAuse
priligy max pharm: buy priligy max pharm - buy dapoxetine online
Имя Цитировать 0  
0  
Markfup
Всем привет! Подскажите, где почитатьполезные статьи о недвижимости? Сейчас читаю - https://cuppro-style.ru
Имя Цитировать 0  
0  
MarkBes
Всем привет! Может кто знает, где почитатьполезные блоги о недвижимости? Пока нашел - https://cuppro-style.ru
Имя Цитировать 0  
0  
Markfup
Приветствую. Подскажите, где почитатьполезные блоги о недвижимости? Сейчас читаю - https://cuppro-style.ru
Имя Цитировать 0  
0  
LiwupelWeire
Legkocenter.ru - надежный портал с доброжелательными отзывами. Мы предоставляем профессиональную помощь в подготовке всех видов учебных работ. Ответственно относимся к требованиям и гордимся своей репутацией. Предлагаем доступные цены и гарантируем высокую оригинальность контента. Ищете сайты научных работ? Legkocenter.ru - здесь представлено больше информации, ознакомиться с ней можно в любое удобное для вас время. Любим свое дело. Фокусируемся на предоставлении услуг в короткие сроки. Нас ценят и рекомендуют друзьям. Всегда рады выполнить ваш заказ!
Имя Цитировать 0  
0  
Randykak
кракен актуальная ссылка - kraken зеркало актуальное, kraken вход
Имя Цитировать 0  
0  
MarkLow
Приветствую. Подскажите, где почитатьразные статьи о недвижимости? Пока нашел - https://cuppro-style.ru
Имя Цитировать 0  
0  
BrandenNeamy
priligy max pharm: priligy max pharm - dapoxetine price
Имя Цитировать 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://permacultureglobal.org/users/73645-william-drake
https://okwave.jp/profile/u3140809.html
https://imageevent.com/garssara1973
https://www.metal-archives.com/users/freeee1989
https://okwave.jp/profile/u3122586.html
Имя Цитировать 0  
Страницы: Пред. 1 ... 291 292 293 294 295
Текст сообщения*
Загрузить файл или картинкуПеретащить с помощью Drag'n'drop
Перетащите файлы
Ничего не найдено
Отправить Отменить
Защита от автоматических сообщений
 
Публикация статей
На данной странице представлены элементы инфоблока статьи, относящиеся к типу Публикации. Статьи опубликованы на странице с помощью комплексного компонента Новостной раздел с указанием параметров инфоблока Статьи. При создании каждой статьи был использован тег <break />, который позволяет осуществить разделение статьи на страницы. В публичном разделе такая статья будет представлена в виде нескольких страниц в зависимости от количества тегов <break />

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