<?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 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;>";
?>
<HTML>
<HEAD>
<TITLE>信息评论 - Powered by EmpireCMS</TITLE>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META content="信息评论" name="keywords">
<META content="信息评论" name="description">
<LINK href="/deftempimg/style.css" type=text/css rel=stylesheet>
</HEAD>
<BODY topmargin="0">
<TABLE style="BORDER-RIGHT: #dcdcdc 1px solid; BORDER-TOP: #dcdcdc 1px solid; BORDER-LEFT: #dcdcdc 1px solid; BORDER-BOTTOM: #dcdcdc 1px solid" cellSpacing=0 cellPadding=0 width=780 align=center bgColor=#ededed border=0>
  <TBODY>
  <TR>
      <TD width="384" height=25 align=left> 
        <IFRAME frameBorder=0 name=loginiframe scrolling=no src="//e/member/iframe" style="HEIGHT:100%;VISIBILITY:inherit;WIDTH:100%;Z-INDEX:2"></IFRAME>
	</TD>
      <TD width="394" height=23 align=right> &nbsp;<A 
      style="FONT-SIZE: 12px; COLOR: #000000" 
      href="http://phome.net" target=_blank>官方网站</A>&nbsp;&nbsp;<A 
      style="FONT-SIZE: 12px; COLOR: #000000" 
      href="http://phome.net/product/" target=_blank>帝国产品</A>&nbsp;&nbsp;<A 
      style="FONT-SIZE: 12px; COLOR: #000000" href="http://phome.net/edomain/" 
      target=_blank>域名交易平台</A>&nbsp;&nbsp;<A style="FONT-SIZE: 12px; COLOR: #000000" 
      href="http://bbs.phome.net" target=_blank>官方交流论坛</A>&nbsp;&nbsp;<A style="FONT-SIZE: 12px; COLOR: #000000" 
      href="http://phome.net/site/" target=_blank>网站信息查询</A>&nbsp; </TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=2 width=780 align=center border=0>
  <TBODY>
  <TR>
      <TD width=190><A href="http://PHome.net/"><IMG 
      src="/deftempimg/logo.jpg" alt=帝国软件官方 width="180" height="65" border=0></A></TD>
    <TD align=middle><div align="center">
          <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="468" height="60">
            <param name="movie" value="/deftempimg/ecms.swf">
            <param name="quality" value="high">
            <embed src="/deftempimg/ecms.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="468" height="60"></embed></object>
        </div></TD>
      <TD align=middle> <img src="/deftempimg/li.gif" width="10" height="11"><a href="#" onclick="var strHref=window.location.href;this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.pHome.net');" title="设为首页" style='font-size:12px;color:#000000;'>设为首页</a><br>
        <img src="/deftempimg/li.gif" width="10" height="11"><a href="#" onClick="window.external.addFavorite('http://www.pHome.net','帝国软件')" title="把帝国软件加入收藏夹" style='font-size:12px;color:#000000;'>加入收藏</a><br>
        <img src="/deftempimg/li.gif" width="10" height="11"><a href="http://www.phome.net" title="联系方式" target="_blank" style='font-size:12px;color:#000000;'>关于我们</a></TD>
    </TR></TBODY></TABLE>
<TABLE 
style="BORDER-RIGHT: #4c93bc 1px solid; BORDER-TOP: #4c93bc 1px solid; BORDER-LEFT: #4c93bc 1px solid; BORDER-BOTTOM: #4c93bc 1px solid" 
cellSpacing=0 cellPadding=0 width=780 align=center bgColor=1F80CB>
  <TBODY>
    <TR> 
      <TD style="PADDING-LEFT: 20px" align=left height=24><FONT 
      color="#ffffff"><a href="/ecms/"><FONT color="#ffffff">首页</font></a>&nbsp;|&nbsp;<A style="FONT-SIZE: 12px; COLOR: #ffffff" href="/ecms/news/">新闻系统</A>&nbsp;|&nbsp;<A style="FONT-SIZE: 12px; COLOR: #ffffff" href="/ecms/download/">下载系统</A>&nbsp;|&nbsp;<A style="FONT-SIZE: 12px; COLOR: #ffffff" href="/ecms/movie/">电影系统</A>&nbsp;|&nbsp;<A style="FONT-SIZE: 12px; COLOR: #ffffff" href="/ecms/shop/">商城系统</A>&nbsp;|&nbsp;<A style="FONT-SIZE: 12px; COLOR: #ffffff" href="/ecms/flash/">FLASH系统</A>&nbsp;|&nbsp;<A style="FONT-SIZE: 12px; COLOR: #ffffff" href="/ecms/photo/">图片系统</A>&nbsp;|&nbsp;<A style="FONT-SIZE: 12px; COLOR: #ffffff" href="/ecms/article/">文章系统</A>&nbsp;|&nbsp;<A style="FONT-SIZE: 12px; COLOR: #ffffff" href="/ecms/info/">分类信息</A></FONT></TD>
      <TD align=right></TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=780 align=center border=0>
  <TBODY>
  <TR>
    <TD bgColor=#ffffff height=1></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=780 align=center border=0>
  <TBODY>
  <TR>
    <TD bgColor=#ffffff height=1></TD></TR></TBODY></TABLE>
<TABLE height=8 cellSpacing=0 cellPadding=0 width=780 align=center border=0>
  <TBODY>
    <TR> 
      <TD align=middle></TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=780 align=center border=0>
  <TBODY>
    <TR> 
      <TD vAlign=top width=780> <TABLE 
            style="BORDER-RIGHT: #1F80CB 1px solid; BORDER-TOP: #4c93bc 1px solid; BORDER-LEFT: #1F80CB 1px solid; BORDER-BOTTOM: #1F80CB 1px solid" 
            cellSpacing=0 cellPadding=0 width="100%" bgColor=#E8F5FB border=0>
          <TBODY>
            <TR> 
              <TD> <TABLE cellSpacing=0 cellPadding=6 width="100%" border=0>
                  <TR> 
                    <TD><?=$url?></TD>
                  </TR>
                </TABLE></TD>
            </TR>
          </TBODY>
        </TABLE>
        <TABLE height=8 cellSpacing=0 cellPadding=0 width="90%" align=center 
            border=0>
          <TBODY>
            <TR> 
              <TD align=middle></TD>
            </TR>
          </TBODY>
        </TABLE>
        <TABLE cellSpacing=0 cellPadding=0 width="100%">
          <TBODY>
            <TR> 
              <TD 
          style="BORDER-RIGHT: #1F80CB 1px solid; BORDER-TOP: #1F80CB 1px solid; BORDER-LEFT: #1F80CB 1px solid; BORDER-BOTTOM: #1F80CB 1px solid" 
          vAlign=bottom bgColor=E8F5FB height=24>&nbsp;</TD>
            </TR>
            <TR> 
              <TD 
          style="BORDER-RIGHT: #1F80CB 1px solid; BORDER-LEFT: #1F80CB 1px solid; BORDER-BOTTOM: #1F80CB 1px solid" 
          vAlign=top><table width="98%%" border="0" align="center" cellpadding="3" cellspacing="1">
                  <form name=form1 method=post action=../enews/index.php>
                    <input type=hidden name=enews value=AddPl>
                    <input type=hidden name=newsid value=[!--newsid--]>
                    <tr> 
                      <td> <div align="center"><font color="#663333"><span class="blue14"><a href=<?=$titleurl?>><strong><?=$title?></strong></a></span></font></div></td>
                    </tr>
                    <tr> 
                      <td><div align="center">以下网友留言只代表网友个人观点，不代表本站观点． <a href="#saypl">立即发表评论</a></div></td>
                    </tr>
                  </form>
                </table>
                <table width="98%%" border="0" align="center" cellpadding="3" cellspacing="1">
                  <tr> 
                    <td height="25" bgcolor="E8F5FB"> 
                      <div align="left">&nbsp;<?=$listpage?></div></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="98%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#E1E1E1">
                  <tr> 
                    <td> &nbsp;<img src=../data/images/pls.gif border=0>&nbsp;<b><?=$r[username]?></b>&nbsp;于<strong><?=$r[saytime]?></strong>发表如下评论:(IP:<?=$r[sayip]?>)</td>
                  </tr>
                  <tr> 
                    <td bgcolor="#FFFFFF"><table width="99%" border="0" align="center" cellpadding="3" cellspacing="1">
                        <tr> 
                          <td><?=$r[saytext]?></td>
                        </tr>
                        <tr> 
                          <td><div align="right">[<u><a href="#saypl"<?=$includelink?>>回复本贴</a></u>]&nbsp;&nbsp;&nbsp;&nbsp;</div></td>
                        </tr>
                      </table></td>
                  </tr>
                </table>
                
<?
}
db_close();
$empire=null;
?>
 
                <table width="98%%" border="0" align="center" cellpadding="3" cellspacing="1">
                  <tr> 
                    <td height="25" bgcolor="E8F5FB"> 
                      <div align="left"><font color="#FFFFFF">&nbsp;</font><?=$listpage?></div></td>
                  </tr>
                </table>
                <br> <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#E1E1E1">
                  <tr> 
                    <td width="56%">&nbsp;<img src=../data/images/saypl.gif border=0>书写评论</td>
                    <td width="44%">&nbsp;<img src=../data/images/hotp.gif border=0>热门评论</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="98%" border="0" align="center" cellpadding="3" cellspacing="1" id=saypl>
                        <form name=saypl method=post action=../enews/index.php onsubmit="return CheckPl(document.saypl)">
                          <tr> 
                            <td height="25" bgcolor="#FFFFFF"> <div align="center"> 
                                <table width="100%" border="0" cellspacing="1" cellpadding="3">
                                  <tr> 
                                    <td width="56%">用户名: 
                                      <input name="username" type="text" id="username" size="16" value="<?=$lusername?>"></td>
                                    <td width="44%">密码: 
                                      <input name="password" type="password" id="password" size="16" value="<?=$lpassword?>"></td>
                                  </tr>
                                  <tr> 
                                    <td>验证码: 
                                      <input name="key" type="text" id="username3" size="10"> 
                                      <img src="/e/ShowKey?ecms"> </td>
                                    <td><input name="nomember" type="checkbox" id="nomember" value="1" checked>
                                      匿名发表</td>
                                  </tr>
                                </table>
                              </div></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="98%" border="0" align="center" cellpadding="3" cellspacing="1">
                        <tr> 
                          <td><script src=/d/js/js/hotplnews.js></script></td>
                        </tr>
                      </table></td>
                  </tr>
                </table></TD>
            </TR>
          </TBODY>
        </TABLE></TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE height=8 cellSpacing=0 cellPadding=0 width=780 align=center border=0>
  <TBODY>
  <TR>
    <TD align=middle></TD></TR></TBODY></TABLE>
<HR width=780 SIZE=2>

<TABLE cellSpacing=2 cellPadding=0 width=780 align=center border=0>
  <TBODY>
  <TR>
    <TD align=middle height=24><div align="center"><A style="FONT-SIZE: 12px; COLOR: #000000" 
      href="#">网站留言</A> ｜ <A 
      style="FONT-SIZE: 12px; COLOR: #000000" 
      href="#">关于我们</A> ｜ <A 
      style="FONT-SIZE: 12px; COLOR: #000000" 
      href="#">广告业务</A> ｜ <A 
      style="FONT-SIZE: 12px; COLOR: #000000" 
      href="#">信息反馈</A> ｜ <A 
      style="FONT-SIZE: 12px; COLOR: #000000" 
      href="#">合作伙伴</A> ｜ <A 
      style="FONT-SIZE: 12px; COLOR: #000000" 
      href="#">网站地图</A></div></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=780 align=center bgColor=#ffffff 
border=0>
  <TBODY>
  <TR>
    <TD align=middle><div align="center"><A href="http://phome.net" 
      target=_blank><FONT face=Verdana, sans-serif=""><B><font color="#ff0000">PHome</font><FONT 
      color=#000000>.Net</FONT></B></FONT></A> 版权所有<BR>
          Copyright &copy; 2007 All rights reserved </div></TD>
    </TR></TBODY></TABLE>
</BODY>
</HTML>
