예제 #1
0
<?php

$news_lang = isset($GLOBALS['xox_language_id']) ? $GLOBALS['xox_language_id'] : 'de';
#echo XOX_APP_BASE.'/'.$news_lang.'/news/news.xml : '.XOX_APP_BASE.'/xox/bin/news/news.xsl';
$tmp = new xoxXMLTemplate(XOX_APP_BASE . '/' . $news_lang . '/news/news.xml', XOX_APP_BASE . '/xox/bin/news/news.xsl');
// set replacement variables
$tmp->setVar('page_title', htmlspecialchars($GLOBALS['nav']->page->title));
if (!empty($news_admin)) {
    $tmp->setVar('news_admin');
}
if (!empty($max_news_viewed)) {
    $tmp->setVar('max_news_viewed', $max_news_viewed);
}
if (!empty($news_id)) {
    $tmp->setVar('news_id');
}
// show the news template
$tmp->show();
<?php

$prod_lang = isset($GLOBALS['xox_language_id']) ? $GLOBALS['xox_language_id'] : 'de';
$prod_source = !empty($GLOBALS['prod_source']) ? $GLOBALS['prod_source'] : 'default';
$style_file = "{$prod_lang}/products/{$prod_source}/products.xsl";
if (!file_exists($style_file)) {
    $style_file = "{$prod_lang}/products/products.xsl";
}
$tmp = new xoxXMLTemplate("{$prod_lang}/products/{$prod_source}/products.xml", $style_file);
// set replacement variables
$tmp->setVar('page_title', htmlspecialchars($nav->page->title));
$tmp->setVar('prod_source');
if (!empty($prod_admin)) {
    $tmp->setVar('prod_admin');
}
if (!empty($max_prod_viewed)) {
    $tmp->setVar('max_prod_viewed');
}
if (!empty($prod_id)) {
    $tmp->setVar('prod_id');
}
// show the news template
$tmp->show();
/*require_once("inc.products.php");

	$products_content = " ";

	$products = getProduct($_POST['t'],$_POST['c']);
	foreach($products as $p) {
		$products_content.=formatProduct($n['name'],$n['headline'],$n['teaser']);
	}