Авторизация
Логин:
Пароль:
Забыли свой пароль?
Войти как пользователь:
Войти как пользователь
Вы можете войти на сайт, если вы зарегистрированы на одном из этих сервисов:
Подписка на рассылку
Реклама
11 лет сервису WMe.in.ua - WebMoney Exchange in Ukraine
Расскажи о нас


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

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

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

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

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

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


Страницы: Пред. 1 ... 237 238 239 240 241 ... 280 След.
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://shoggy19761964.bandcamp.com/album/how-my-neighbor-became-my-submissive-sex-slave-1
https://www.hentai-foundry.com/user/relaxpro1980/profile
https://cannabis.net/user/160156
http://www.babelcube.com/user/antonio-watkins
http://www.babelcube.com/user/chris-goldammer
Имя Цитировать 0  
0  
CurtisBes
best ed pills online best ed pills online ere pharm
Имя Цитировать 0  
0  
Donaldroago
скрипты хайпов - скрипты хайпов, шаблоны хайп проектов
Имя Цитировать 0  
0  
BrandonNap
Имя Цитировать 0  
0  
GeorgeBrosy
Услуги откачки септиков по Талдомскому району от 750р. за 1 куб. Шланги до 100м. Работаем без выходных.
Оказываем услуги по ремонту септиков на территории Москвы и Московской области подробнее.
редоставляем в арендуМТК с доставкой и дальнейшим обслуживанием по всей Московской области. подробнее.
Имя Цитировать 0  
0  
LloydhiX
http://erepharm.com/# ED meds online
Имя Цитировать 0  
0  
Jamesref
Имя Цитировать 0  
0  
Williammon
canadian pharmacy no prescription cialis without prescription
Имя Цитировать 0  
0  
Stephenalite
Hei! I'm Stephen from Norway. I work in customer support, but my true passion lies in the world of SEO and digital marketing. I'm constantly striving to expand my knowledge and stay updated with the latest trends and algorithms. When I'm not helping customers or optimizing websites, you can find me exploring the great outdoors or binge-watching Netflix. Let's connect and grow together!

Areas of Expertise:

On-page SEO
Keyword analysis
Website optimization
Geotargeting strategies
SEO tools and analytics

Looking Forward To:

Sharing insights and strategies
Gaining knowledge from the SEO community
Networking and collaborating with like-minded professionals

catchall email account
Имя Цитировать 0  
0  
real estate
Search properties for sale on  DAMAC Islands by DAMAC Properties DAMAC Islands by DAMAC Properties| DAMAC Islands
Имя Цитировать 0  
0  
Williammon
Имя Цитировать 0  
0  
LloydhiX
Имя Цитировать 0  
0  
k8casinostoks
いみそーれ(红花)
stake入金
定期的に新しいイベントがあり、飽きずに楽しめます。新しい体験が待っています。

CRモンスターハンタ
https://www.onlinepachinko.net/tags/%E6%A5%BD%E3%81%97%E3%82%80
キャラクターの個性が際立っており、ストーリーに引き込まれます。

CR蒼天の拳2
k8 カジノ パチンコ CR牙狼FINALパチスロ スロット 機械割 解析 天井 初打ち 打ち方 スペック ゾーン 設定判別 ヤメ時・演出・プレミアムまとめ
鬼武者3 時空天翔
CR北斗の拳7 転生 Ver.319
パチスロあの日見た花の名前を僕達はまだ知らない。
Имя Цитировать 0  
0  
k8casinostoks
北斗の拳 ラオウ
チェインクロニクル
戦略的な要素もあり、運だけでなく技術が試されるのが面白いです。

CRミリオンゴッドライジング~ゼウス再び~
https://bakislot.jahromblog.com/tags/%e9%ad%85%e5%8a%9b%e7%9a%84%e3%81%aa%e6%bc%94%e5%87­%ba%e3%81%a8%e3%82%b9%e3%83%88%e3%83%bc%e3%83%aa%e3%83%bc/
友人と一緒にプレイすることで、楽しさが倍増します。共に喜ぶ瞬間が嬉しい。

e Re:ゼロから始める異世界生活 season2M13
オンラインカジノ
L ゴジラ対エヴァンゲリオン
パチスロ 機動警察パトレイバー
聖闘士星矢海皇覚醒
Имя Цитировать 0  
0  
k8casinostoks
CR花の慶次X~雲のかなたに~
金ドキモードとは
ホラー要素満載のパチスロで、ドキドキ感がたまりません。サプライズ演出が面白いです。

スーパービンゴネオ
https://www.k8.contact/tags/%e3%83%91%e3%83%81%e3%83%b3%e3%82%b3-%e5%a4%9c%e8%9d%b6%e9%a3%9b%e7%bf%94
リーチ演出が多彩で、どのタイミングで大当たりが来るかワクワクします。

バイオハザード6
k8 カジノ パチンコ
Pフィーバー戦姫絶唱シンフォギア2
CR北斗の拳5 百裂 Ver.229(2:1)
鬼武者3
Имя Цитировать 0  
0  
k8casinostoks
P とある魔術の禁書目録 2
北斗dd 199
定期的に新しい台が出るので、飽きずに楽しめます。ファンにはたまらないですね。

P結城友奈は勇者であるALLRUSH RFa Ver.119
https://www.verajohncasino.net/tags/%E9%AB%98%E5%93%81%E8%B3%AA%E3%81%AA%E3%82%B5%E3%83­%BC%E3%83%93%E3%82%B9
パチンコは、日常のストレスを忘れさせてくれる最高の娯楽です。リラックスできます。

CRルパン三世I'm a super hero~
パチスロあの日見た花の名前を僕達はまだ知らない。
CRぱちんこ押忍!番長
黃金琉球の守護神
沖ドキ! 30LL
Имя Цитировать 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://www.haikudeck.com/presentations/Pv8irLNV58
https://imageevent.com/extasy1974
https://tubeteencam.com/user/spuki1964/profile
https://cannabis.net/user/159597
https://www.obesityhelp.com/members/topjiec1953/about_me/
Имя Цитировать 0  
0  
RobertRox
Имя Цитировать 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://sdxsd1998.diary.ru/
https://rentry.org/diy8bysm
https://www.obesityhelp.com/members/fhjer1969/about_me/
https://chyoa.com/user/levs1952
http://www.babelcube.com/user/christopher-armendariz
Имя Цитировать 0  
0  
JamesSlefe
Имя Цитировать 0  
0  
GregoryMup
слуги маркетингового агентства в Самаре Оказываем услуги: Разработка интернет магазинов, Натройка РСЯ, Настрйока таргетированной рекламы , Ведение ВК
С нашими кейсами можно ознакомиться https://честная-реклама.рф/kejsy/
Имя Цитировать 0  
0  
MatthewFrene
her latest blog smmpanel.net
Имя Цитировать 0  
0  
JamesSlefe
Имя Цитировать 0  
0  
JamesSlefe
Имя Цитировать 0  
0  
Jamesref
Имя Цитировать 0  
Страницы: Пред. 1 ... 237 238 239 240 241 ... 280 След.
Текст сообщения*
Загрузить файл или картинкуПеретащить с помощью Drag'n'drop
Перетащите файлы
Ничего не найдено
Отправить Отменить
Защита от автоматических сообщений
 
Публикация статей
На данной странице представлены элементы инфоблока статьи, относящиеся к типу Публикации. Статьи опубликованы на странице с помощью комплексного компонента Новостной раздел с указанием параметров инфоблока Статьи. При создании каждой статьи был использован тег <break />, который позволяет осуществить разделение статьи на страницы. В публичном разделе такая статья будет представлена в виде нескольких страниц в зависимости от количества тегов <break />

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