<?php
/*
* @package LabCMS
* @copyright (c) 2006 Alexander Levin aka Loki (loki_angel@mail.ru)
* @support http://labcms.ru
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/
	$mod_template="show.tpl";
	//if (LabCMS::i()->is_cached($mod_template, -1, $_GET['var1'])) return;

	$new=Db::i()->selectRow("-- CACHE:1d
                                   SELECT news_date, news_title, news_text, news_id FROM ?_news WHERE news_id=? AND lang_id=?", $_GET['var1'], LabCMS::i()->lang['id']);
								   
	if (!$new)
	{
		$mod_template="";
		return LabCMS::i()->error("Запись не найдена");
	}
	
	$new['news_text']=str_ireplace('[more]', '', $new['news_text']);
	
	Tpl::i()->assign("new", $new);

	if (LabConfig::$mcfg['use_comments'])
	{
		$comments=CommentTools::getComments($new['news_id'], _url($new['news_id'], 'item'));
		Tpl::i()->assign('comments', $comments);
	}
