if ($id && !is_numeric($id)) exit();
$root_path = "../";
require_once('../classes/CNewsTemplate.php');
require_once('../classes/CBinder.php');
include("polaczenie_lewa.php");
$query = "SELECT * FROM elementy_dzialow NATURAL JOIN dzialy WHERE id_item_dzial=$id";
$wykonaj = mysql_query(addslashes($query));
//echo mysql_error();
$wiersz = mysql_fetch_array($wykonaj);
$title = "Press: ".$wiersz['tytul_id'];
$news = new CNewsTemplate("../", null, $wiersz['nazwa_dzial']);
$news->setInformations(''.$wiersz['tytul_id'].'', $wiersz['zajawka_id'], $wiersz['tresc_id'], (($wiersz['pokazuj_daty_dzial'] == 1) ? $wiersz['podpis_id'].' '.$wiersz['data_id'].'' : ''));
$news->setPodpisStyle("font-weight: bold");
$news->setPodpisRight('www.press.pl');
include("../szablony/top_press_print.html");
$bind = new CBinder();
$bind->addItem($news);
echo $bind->printHtml();
?>