<?php
/*
  www.oscGold.com (C) Kamelia-Net Jacek Krysiak
  modul oscGold wer 4.0
*/

require('includes/application_top.php');

$infopageid = (int)$HTTP_GET_VARS['pages_id'];

$page_query = tep_db_query("select 
                              p.pages_id, 
                              p.status,
                              s.pages_title, 
                              s.pages_html_text                               
                            from 
                              " . TABLE_PAGES . " p LEFT JOIN " .TABLE_PAGES_DESCRIPTION . " s on p.pages_id = s.pages_id
                            where 
                              s.language_id = '" . (int)$languages_id . "'
                            and
                              p.pages_id = $infopageid");


$page_check = tep_db_fetch_array($page_query);
$page_tresc = stripslashes($page_check['pages_html_text']);;

if (strpos($page_tresc,'<***>') > 0) {
	$pagetext = substr($page_tresc,0,strpos($page_tresc,'<***>'));
	$pagetext_more = substr($page_tresc,strpos($page_tresc,'<***>')+5,strlen($page_tresc));
  } else {
	$pagetext = $page_tresc;
	$pagetext_more = '';
}	

$breadcrumb->add($page_check[pages_title], tep_href_link('info_pages.php?pages_id=' . $infopageid));

$content = 'info_pages';

include (bts_select('main', $content_template)); // BTSv1.5

require(DIR_WS_INCLUDES . 'application_bottom.php');

?>