<?php
@require("../../class/connect.php");
if(!defined('InEmpireCMS'))
{
	exit();
}
include("../../class/db_sql.php");
include("../../class/config.php");
include("../../class/q_functions.php");
include "../".LoadLang("pub/fun.php");
$link=db_connect();
$empire=new mysqlquery();
$editor=1;
//分类id
$bid=(int)$_GET['bid'];
$gbr=$empire->fetch1("select bid,bname,groupid from {$dbtbpre}enewsgbookclass where bid='$bid'");
if(empty($gbr['bid']))
{
	printerror("EmptyGbook","",1);
}
//权限
if($gbr['groupid'])
{
	include("../../class/user.php");
	$user=islogin();
	include("../../class/MemberLevel.php");
	if($level_r[$gbr[groupid]][level]>$level_r[$user[groupid]][level])
	{
		echo"<script>alert('您的会员级别不足(".$level_r[$gbr[groupid]][groupname].")，没有权限提交信息!');history.go(-1);</script>";
		exit();
	}
}
esetcookie("gbookbid",$bid,0);
$bname=$gbr['bname'];
$search="&bid=$bid";
$page=(int)$_GET['page'];
$start=(int)$_GET['start'];
$line=12;//每页显示条数
$page_line=12;//每页显示链接数
$offset=$start+$page*$line;//总偏移量
$totalnum=(int)$_GET['totalnum'];
if($totalnum)
{
	$num=$totalnum;
}
else
{
	$totalquery="select count(*) as total from {$dbtbpre}enewsgbook where bid='$bid' and checked=0";
	$num=$empire->gettotal($totalquery);//取得总条数
}
$search.="&totalnum=$num";
$query="select lyid,name,email,`call`,lytime,lytext,retext from {$dbtbpre}enewsgbook where bid='$bid' and checked=0";
$query=$query." order by lyid desc limit $offset,$line";
$sql=$empire->query($query);
$listpage=page1($num,$line,$page_line,$start,$page,$search);
$url="<a href=../../../>".$fun_r['index']."</a>&nbsp;>&nbsp;".$fun_r['saygbook'];
?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<META content="留言" name="keywords">
<META content="留言" name="description">
<link rel="stylesheet" type="text/css" href="images/base.css" />
<link rel="stylesheet" type="text/css" href="images/index.css" />

<title>留言</title>
</head>

<body>
<div id="contain">
<h3><a href="/index.html">天骄下载</a></h3>

<div id="menu">
<a href="/index.html">首页</a> | <a href="/class/index.html">软件分类</a> | <a href="http://www.8xdown.com/" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.8xdown.com/');return(false);">设为首页 </a>|<a href="JavaScript:JSAddFavorite();"> 收藏本站</a>
</div>
<div class="clear"></div>

<div id="nav">
<div id="navbg">


<a href="http://www.down88888.cn/wlrj/">网络软件</a>

<a href="http://www.down88888.cn/yyrj/">应用软件</a>

<a href="http://www.down88888.cn/xtgj/">系统工具</a>

<a href="http://www.down88888.cn/ypgj/">硬件工具</a>

<a href="http://www.down88888.cn/dmtl/">多媒体类</a>

<a href="http://www.down88888.cn/txtx/">图形图像</a>

<a href="http://www.down88888.cn/aqxg/">安全相关</a>

<a href="http://www.down88888.cn/yxyl/">游戏娱乐</a>

<a href="http://www.down88888.cn/jyjx/">教育教学</a>

<a href="http://www.down88888.cn/yyrj/">专题软件</a>


</div>
</div>
<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" bgColor=E8F5FB height=24>
<div align="center"><strong><?=$bname?></strong></div></TD>
            </TR>
            <TR> 
              <TD 
          style="BORDER-RIGHT: #1F80CB 1px solid; BORDER-LEFT: #1F80CB 1px solid; BORDER-BOTTOM: #1F80CB 1px solid" 
          vAlign=top><table width="780" border="0" align="center" cellpadding="4" cellspacing="0" bgcolor="ffffff">
                  <tr> 
                    <td height="100%" valign="top"> 
<?
while($r=$empire->fetch($sql))
{
	$r['retext']=nl2br($r[retext]);
	$r['lytext']=nl2br($r[lytext]);
?>
 
                      <table width="600" border="0" align="center" cellpadding="3" cellspacing="1" class=tableborder>
                        <tr class=header> 
                          <td width="55%" height="23">发布者: <?=$r[name]?> </td>
                          <td width="45%">发布时间: <?=$r[lytime]?> </td>
                        </tr>
                        <tr bgcolor="#FFFFFF"> 
                          <td height="23" colspan="2"> <table border=0 width=100% cellspacing=1 cellpadding=10 bgcolor='#cccccc'>
                              <tr> 
                                <td width='100%' bgcolor='#FFFFFF' style='word-break:break-all'> 
                                  <?=$r[lytext]?> </td>
                              </tr>
                            </table>
                            
<?
if($r[retext])
{
?>
 
                            <table width=100% border=0 align=center cellpadding=3 cellspacing=1>
                              <tr> 
                                <td><img src=../../data/images/regb.gif width=18 height=18><strong><font color=#FF0000>回复:</font></strong> 
                                  <?=$r[retext]?> </td>
                              </tr>
                            </table>
                            
<?
}
?> </td>
                        </tr>
                      </table>
                      <br>
                      
<?
}
db_close();
$empire=null;
?>
 
                      <table width="600" border="0" align="center" cellpadding="3" cellspacing="1">
                        <tr> 
                          <td>分页:<?=$listpage?></td>
                        </tr>
                      </table>
                      <form name="form1" method="post" action="../../enews/index.php">
                        <table width="600" border="0" align="center" cellpadding="3" cellspacing="1"class=tableborder>
                          <tr class=header> 
                            <td height="23" colspan="2">请您留言:</td>
                          </tr>
                          <tr bgcolor="#FFFFFF"> 
                            <td width="142" height="23">姓名:</td>
                            <td width="443" height="23"><input name="name" type="text" id="name">
                              *</td>
                          </tr>
                          <tr bgcolor="#FFFFFF"> 
                            <td height="23">联系邮箱:</td>
                            <td height="23"><input name="email" type="text" id="email">
                              *</td>
                          </tr>
                          <tr bgcolor="#FFFFFF"> 
                            <td height="23">联系电话:</td>
                            <td height="23"><input name="call" type="text" id="name3"></td>
                          </tr>
                          <tr bgcolor="#FFFFFF"> 
                            <td height="23">留言内容(*):</td>
                            <td height="23"><textarea name="lytext" cols="60" rows="12" id="name4"></textarea></td>
                          </tr>
                          <tr bgcolor="#FFFFFF"> 
                            <td height="23">&nbsp;</td>
                            <td height="23"><input type="submit" name="Submit" value="提交"> 
                              <input type="reset" name="Submit2" value="重置"> <input name="enews" type="hidden" id="enews" value="AddGbook"></td>
                          </tr>
                        </table>
                      </form></td>
                  </tr>
                </table></TD>
            </TR>
          </TBODY>
        </TABLE></TD>
    </TR>
  </TBODY>
</TABLE>

<div id="footer">
<p>Copyright (C) 2007-2090 <a href="http://www.8xdown.com/">《天骄下载》</a>8xdown.com 本主页保留所有权利 - 本站部分带宽由 <a href="http://www.14du.com" target="_blank">14du中文网</a>  赞助</p>
<p> All Rights Reserved. designed by <a href="http://www.8xdown.com/">8xdown.com</a>. </p>
</div>