<?php
/**
 * 金戈企业建站系统：新闻显示页面
 *
 *
 * @name 
 * @author 烟鬼 QQ:460874 Email:460874@qq.com
 * @version 0.1  $id  new.php
 * @copyright Copyright (c) 2007 - 2008 烟鬼
 */
require('header.php');

$id = $_GET['id'];
$id = my_yz($id);
if (!is_numeric($id)) 
{
	er(nonr);
	exit;
}

//根据新闻ID取出新闻
$news_new = root_alli(new_news,n_n_id,$id);
if ($news_new) 
{
     $news_new = setarray($news_new);
}
else 
{
	$notnews = NONW;
}
//取出所有分类
$news_class = root_all(new_class);
if ($news_class) 
{
     $news_class = setarray($news_class);
}

//向模板传递需要显示内容的变量
$smarty->assign('notnews',$notnews);
$smarty->assign('news_new',$news_new);
$smarty->assign('news_class',$news_class);
$smarty->display('news.html');

require('footer.php');

?>