<?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();
//用户名
$lusername=getcvar('mlusername');
if($lusername)
{$lpassword=md5($lusername);}
$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);
}
$n_r=$empire->fetch1("select id,title,newspath,filename,classid,groupid,plnum from {$dbtbpre}ecms_".$class_r[$classid][tbname]." where id='$id' and classid='$classid'");
if(empty($n_r[id]))
{printerror("ErrorUrl","history.go(-1)",1);}
$page=(int)$_GET['page'];
$start=(int)$_GET['start'];
$search="&classid=$classid&id=".$id;
$page_line=12;//每页显示链接数
$line=20;//每页显示记录数
$offset=$start+$page*$line;//总偏移量
$query="select plid,saytext,saytime,sayip,username,zcnum,fdnum from {$dbtbpre}enewspl where id='$id' and classid='$classid' and checked=0";
//需审核
if($class_r[$classid][checkpl])
{
	$totalquery="select count(*) as total from {$dbtbpre}enewspl where id='$id' and classid='$classid' and checked=0";
	$num=$empire->gettotal($totalquery);
}
else
{
	$num=$n_r['plnum'];
}
$query.=" order by plid desc limit $offset,$line";
$sql=$empire->query($query);
$listpage=page1($num,$line,$page_line,$start,$page,$search);
//标题链接
$titleurl=sys_ReturnBqTitleLink($n_r);
$title=$n_r[title];
$url=ReturnClassLink($n_r[classid])."&nbsp;<a href=".$titleurl.">".$n_r[title]."</a>&nbsp;>&nbsp;".$fun_r[pl]."&nbsp;>";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>信息评论 - Powered by EmpireCMS</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta content="信息评论" name="keywords" />
<meta content="信息评论" name="description" />
<link href="/ecms47/skin/default/css/style.css" rel="stylesheet" type="text/css" />
</head>
<body topmargin="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="top">
 <tr>
  <td>www.phome.net 帝国CMS万能建站工具</td>
  <td align="right"><a href="/ecms47/e/member/cp/">会员中心</a> | <a onclick="window.external.addFavorite('/ecms47/',document.title)" href="#ecms">加入收藏</a> | <a onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('/ecms47/')" href="#ecms">设为首页</a></td>
 </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="8" id="header">
 <tr>
  <td valign="middle" id="logo"><a href="/ecms47/"><img src="/ecms47/skin/default/images/logo.gif" alt="帝国软件" /></a></td>
  <td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="480" height="65">
    <param name="movie" value="/ecms47/skin/default/images/empirecms.swf" />
    <param name="quality" value="high" />
    <embed src="/ecms47/skin/default/images/empirecms.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="480" height="65"></embed>
   </object></td>
 </tr>
</table>
<div id="menu">
 <div id="nav">
  <ul>
     <li class="menu"><a href="/ecms47/">网站首页</a></li>
     <li class="menu2"><a href="/ecms47/news/">新闻系统</a></li>
     <li class="menu3"><a href="/ecms47/download/">下载系统</a></li>
     <li class="menu4"><a href="/ecms47/movie/">电影系统</a></li>
     <li class="menu5"><a href="/ecms47/shop/">商城系统</a></li>
     <li class="menu6"><a href="/ecms47/flash/">FLASH系统</a></li>
     <li class="menu7"><a href="/ecms47/photo/">图片系统</a></li>
     <li class="menu8"><a href="/ecms47/article/">文章系统</a></li>
     <li class="menu9"><a href="/ecms47/info/">分类信息</a></li>
  </ul>
 </div>
 <div id="sNav">
  <ul>
     <li class="no">分类信息：</li>
     <li><a href="/ecms47/e/action/ListInfo/?classid=9&ph=1&myarea=东城区">东城区</a></li>
     <li><a href="/ecms47/e/action/ListInfo/?classid=9&ph=1&myarea=西城区">西城区</a></li>
     <li><a href="/ecms47/e/action/ListInfo/?classid=9&ph=1&myarea=崇文区">崇文区</a></li>
     <li><a href="/ecms47/e/action/ListInfo/?classid=9&ph=1&myarea=宣武区">宣武区</a></li>
     <li><a href="/ecms47/e/action/ListInfo/?classid=9&ph=1&myarea=朝阳区">朝阳区</a></li>
     <li><a href="/ecms47/e/action/ListInfo/?classid=9&ph=1&myarea=海淀区">海淀区</a></li>
     <li><a href="/ecms47/e/action/ListInfo/?classid=9&ph=1&myarea=丰台区">丰台区</a></li>
     <li><a href="/ecms47/e/action/ListInfo/?classid=9&ph=1&myarea=石景山区">石景山区</a></li>
     <li><a href="/ecms47/e/action/ListInfo/?classid=9&ph=1&myarea=通州区">通州区</a></li>
     <li><a href="/ecms47/e/action/ListInfo/?classid=9&ph=1&myarea=昌平区">昌平区</a></li>
     <li><a href="/ecms47/e/action/ListInfo/?classid=9&ph=1&myarea=大兴区">大兴区</a></li>
     <li><a href="/ecms47/e/action/ListInfo/?classid=9&ph=1&myarea=其它">其它</a></li>
  </ul>
 </div>
</div>
<table width="100%" border="0" cellpadding="0" cellspacing="6" class="location">
 <tr>
  <td>现在的位置：<?=$url?></td>
 </tr>
</table>
<table cellspacing="0" cellpadding="0" width="100%" id="content">
 <tr>
  <td><table width="100%" border="0" cellpadding="4" cellspacing="0">
    <form action="../enews/index.php" method="post" name="form1" id="form1">
     <input type="hidden" name="enews" value="AddPl" />
     <input type="hidden" name="newsid" value="[!--newsid--]" />
     <tr>
      <td align="center"><h1><a href="<?=$titleurl?>"><strong><?=$title?></strong></a></h1></td>
     </tr>
     <tr>
      <td><div align="center">以下网友留言只代表网友个人观点，不代表本站观点． <a href="#saypl">立即发表评论</a></div></td>
     </tr>
    </form>
   </table>
   <table width="100%" border="0" cellpadding="4" cellspacing="0" bgcolor="#F4F9FD">
    <tr>
     <td>&nbsp;<?=$listpage?></td>
    </tr>
   </table>
   
<?
while($r=$empire->fetch($sql))
{
	if(empty($r[username]))
	{$r[username]=$fun_r['nomember'];}
	$r['saytext']=stripSlashes($r['saytext']);
	//ip
	$ipr=explode(".",$r[sayip]);
	$r[sayip]="";
	$ipnum=count($ipr);
	for($i=0;$i<$ipnum;$i++)
	{
		if($i!=0)
		{$d=".";}
		if($i==$ipnum-1)
		{
			$ipr[$i]="*";
		}
		$r[sayip].=$d.$ipr[$i];
	}
	$includelink=" onclick=\"javascript:document.saypl.saytext.value+='[quote]".$r[plid]."[/quote]';document.saypl.repid.value='".$r[plid]."';document.saypl.saytext.focus();\"";
?>

   <table width="100%" border="0" cellpadding="4" cellspacing="0" bgcolor="#E1EFFB" class="marTop">
    <tr>
     <td>&nbsp;<img src="../data/images/pls.gif" border="0" align="absmiddle" />&nbsp;<b><?=$r[username]?></b>&nbsp;于<strong><?=$r[saytime]?></strong>发表如下评论:(IP:<?=$r[sayip]?>)</td>
    </tr>
   </table>
   <table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#F8F8F8">
    <tr>
     <td><?=$r[saytext]?></td>
    </tr>
    <tr>
     <td align="right" bgcolor="#f3f3f3">[<u><a href="#saypl"<?=$includelink?>>回复本贴</a></u>]&nbsp;&nbsp;&nbsp;&nbsp;</td>
    </tr>
   </table>
   
<?
}
db_close();
$empire=null;
?>

   <table width="100%" border="0" cellpadding="4" cellspacing="0" bgcolor="#F4F9FD" class="marTop">
    <tr>
     <td><font color="#FFFFFF">&nbsp;</font><?=$listpage?></td>
    </tr>
   </table>
   <br />
   <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
     <td width="56%" bgcolor="#E1EFFB"><img src="../data/images/saypl.gif" border="0" align="absmiddle" /> 书写评论</td>
     <td width="44%" bgcolor="#E1EFFB"><img src="../data/images/hotp.gif" border="0" align="absmiddle" /> 热门评论</td>
    </tr>
    <tr bgcolor="#FFFFFF">
     <td><script>
		  function CheckPl(obj)
		  {
		  if(obj.saytext.value=="")
		  {
		  alert("您没什么话要说吗？");
		  obj.saytext.focus();
		  return false;
		  }
		  return true;
		  }
		  </script>
      <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" id="saypl">
       <form action="../enews/index.php" method="post" name="saypl" id="saypl" onsubmit="return CheckPl(document.saypl)">
        <tr>
         <td height="25" bgcolor="#FFFFFF"><table width="92%" border="0" align="center" cellpadding="4" cellspacing="0">
           <tr>
            <td width="56%" align="left">用户名:
             <input name="username" type="text" id="username" size="16" value="<?=$lusername?>" /></td>
            <td width="44%" align="left">密码:
             <input name="password" type="password" id="password" size="16" value="<?=$lpassword?>" /></td>
           </tr>
           <tr>
            <td align="left">验证码:
             <input name="key" type="text" id="username3" size="10" />
             <img src="/ecms47/e/ShowKey?ecms" /> </td>
            <td align="left"><input name="nomember" type="checkbox" id="nomember" value="1" checked="checked" />
             匿名发表</td>
           </tr>
          </table></td>
        </tr>
        <tr>
         <td height="25" bgcolor="#FFFFFF"><div align="center">
           <textarea name="saytext" cols="58" rows="6" id="saytext"></textarea>
          </div></td>
        </tr>
        <tr>
         <td height="25" bgcolor="#FFFFFF"><div align="center">
           <input name="imageField" type="image" src="../data/images/postpl.gif" border="0" />
           <input name="id" type="hidden" id="id" value="<?=$id?>" />
           <input name="classid" type="hidden" id="classid" value="<?=$classid?>" />
           <input name="enews" type="hidden" id="enews" value="AddPl" />
           <input name="repid" type="hidden" id="repid" value="0" />
          </div></td>
        </tr>
       </form>
      </table></td>
     <td valign="top"><table width="100%" border="0" cellpadding="4" cellspacing="0">
       <tr>
        <td><ul><script src=/ecms47/d/js/js/hotplnews.js></script></ul></td>
       </tr>
      </table></td>
    </tr>
   </table></td>
 </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="2" class="marTop" id="footer">
  <tr> 
    <td id="botNav"><a href="#">关于我们</a> | <a href="#">服务条款</a> | <a href="#">广告服务</a> 
      | <a href="#">联系我们</a> | <a href="#">网站地图</a> | <a href="#">免责声明</a></td>
  </tr>
  <tr> 
    <td>Powered by <a href="http://www.phome.net" target="_blank"><strong>EmpireCMS</strong></a> 
        <font color="#FF9900"><strong>4.7</strong></font> &copy; 2007-2008 EmpireSoft 
        Inc.</td>
  </tr>
  <tr> 
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>
