<?php
@require("../class/connect.php");
if(!defined('InEmpireCMS'))
{
	exit();
}
include("../class/db_sql.php");
include("../class/config.php");
include("../class/q_functions.php");
include("../class/class.php");
include LoadLang("pub/fun.php");
$link=db_connect();
$empire=new mysqlquery();
$id=(int)$_GET['id'];
$classid=(int)$_GET['classid'];
if(empty($id)||empty($classid))
{printerror("ErrorUrl","history.go(-1)",1);}
if(empty($class_r[$classid][tbname]))
{printerror("ErrorUrl","history.go(-1)",1);}
$r=$empire->fetch1("select * from {$dbtbpre}ecms_".$class_r[$classid][tbname]." where id='$id' and classid='$classid'");
if(empty($r[id]))
{printerror("ErrorUrl","history.go(-1)",1);}
//权限
if($r[groupid])
{
	$check_groupid=$r[groupid];
	$check_fh=$r[fh];
	$check_newsid=$r[id];
	$check_userfen=$r[userfen];
	$check_path="../../";
	@include("../class/CheckLevel.php");
}
//存放
if(strstr($public_r['savetxtf'],",".$class_r[$classid][tbname].".newstext,"))
{
	$r[newstext]=GetTxtFieldText($r[newstext]);
}
$r[newstext]=stripSlashes($r[newstext]);
//替换掉分页符
$r[newstext]=str_replace("[!--empirenews.page--]","",$r[newstext]);
$r[newstext]=str_replace("[/!--empirenews.page--]","",$r[newstext]);
$url=ReturnClassLink($r[classid])."&nbsp;".$fun_r['zw']."&nbsp;>";
//标题链接
$titlelink=sys_ReturnBqTitleLink($r);
db_close();
$empire=null;
?>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<style>
body{font-family:宋体}td,.f12{font-size:12px}.f24 {font-size:24px;}.f14 {font-size:14px;}.title14 {font-size:14px;line-height:130%}.l17 {line-height:170%;}
</style>
<title><?=$r[title]?></title>
</head>
<body bgcolor="#ffffff" topmargin=5 leftmargin=5 marginheight=5 marginwidth=5 onLoad='window.print()'>
<center>
<table width=650 border=0 cellspacing=0 cellpadding=0>
<tr>
<td height=65 width=180><A href="http://www.phome.net/"><IMG src="../../skin/default/images/elogo.jpg" alt="帝国软件" width="180" height="65" border=0></A></td> 
<td valign="bottom"><?=$url?></td>
<td width="83" align="right" valign="bottom"><a href='javascript:history.back()'>返回</a>　<a href='javascript:window.print()'>打印</a></td>
</tr>
</table>
<table width=650 border=0 cellpadding=0 cellspacing=20 bgcolor="#EDF0F5">
<tr>
<td>
<BR>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TH class="f24"><FONT color=#05006c><?=$r[title]?></FONT></TH></TR>
<TR>
<TD>
<HR SIZE=1 bgcolor="#d9d9d9">
</TD>
</TR>
<TR>
<TD align="middle" height=20><div align="center"><?=$r[writer]?>&nbsp;&nbsp;<?=$r[newstime]?>&nbsp;&nbsp;<?=$r[befrom]?></div></TD>
</TR>
<TR>
<TD height=15></TD>
</TR>
<TR>
<TD class="l17">
<FONT class="f14" id="zoom"> 
<P><?=$r[newstext]?><br>
<BR clear=all>
</P>
</FONT>
</TD>
</TR>
<TR height=10>
<TD></TD>
</TR>
</TBODY>
</TABLE>
<?=$titlelink?>
</td>
</tr>
</table>
</center>
</body>
</html>
