<?php
require("../../class/connect.php");
if(!defined('InEmpireCMS'))
{
	exit();
}
require("../../class/db_sql.php");
require("../../class/q_functions.php");
require "../".LoadLang("pub/fun.php");
$link=db_connect();
$empire=new mysqlquery();
$editor=1;
eCheckCloseMods('gb');//关闭模块
//分类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("../../member/class/user.php");
	$user=islogin();
	include("../../data/dbcache/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'];
$page=RepPIntvar($page);
$start=0;
$line=$public_r['gb_num'];//每页显示条数
$page_line=10;//每页显示链接数
$offset=$start+$page*$line;//总偏移量
$totalnum=(int)$_GET['totalnum'];
if(!$public_r['usetotalnum'])
{
	$totalnum=0;
}
if($totalnum>0)
{
	$num=$totalnum;
}
else
{
	$totalquery="select count(*) as total from {$dbtbpre}enewsgbook where bid='$bid' and checked=0";
	$num=$empire->gettotal($totalquery);//取得总条数
}
if($public_r['usetotalnum'])
{
	$search.="&totalnum=$num";
}
//checkpageno
eCheckListPageNo($page,$line,$num);
$query="select lyid,name,email,`mycall`,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='".ReturnSiteIndexUrl()."'>".$fun_r['index']."</a>&nbsp;>&nbsp;".$fun_r['saygbook'];
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no" />
<title><?=$bname?></title>
<meta name="keywords" content="<?=$bname?>-" />
<meta name="description" content="<?=$bname?>-" /> 
<link href="/skin/inc/index.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="box">
  <div id="top">
    <div id="nav">
      <ul>
          <li id="nav_1">&nbsp;</li>
          <li><a href="/home.html">网站首页</a></li>
          <li><a href="/gywm/1041.html">关于我们</a></li>
          <li><a href="/xwzx/">新闻资讯</a></li>
          <li><a href="/cpzs/">产品展示</a></li>
          <li><a href="/gywm/1042.html">合作伙伴</a></li>
          <li><a href="/e/tool/gbook?bid=1">客户留言</a></li>
          <li><a href="/gywm/1043.html">联系我们</a></li>
          <li><a href="/">English</a></li>
        <li id="nav_2"></li>
      </ul>
    </div><img src="/skin/images/etop.gif" align="left" />
  </div>
  <div id="flash"></embed>
  </div>
  <div id="mail">
    <div id="left">
<div class="left_1">产品导航</div>
<div class="left_3">
<script src="/cpdh.js"></script>
</div>
<div class="left_1">联系方式</div>
<div class="left_3">电话：+86 20 3999 3956<br>
传真：+86-20 3106 1896<br>
手机：+86-20 3999 3956<br>
Skype：james_xwt <br>
MSN：jx702@hotmail.com<br>
网址 ： www.japfoods.org <br>
　　　  www.japfoods.net<br>
地址：中国广东省广州市番禺区<br>
　　　市桥镇市广路491号宗天<br>
　　　市场二楼B46室</div></div>
    <div id="wznrong">
      <div class="nr_nav"><div class="zxcv">客户留言</div></div>
      <div id="nr_xx">
        <table width="100%" border="0" cellpadding="4" cellspacing="0" bgcolor="#FFFFFF">
          <tr>
            <td height="100%" valign="top" bgcolor="#FFFFFF"> 
<?
while($r=$empire->fetch($sql))
{
	$r['retext']=nl2br(stripSlashes($r[retext]));
	$r['lytext']=nl2br(stripSlashes($r[lytext]));
?>

              <table width="98%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#CCCCCC" class="tableborder">
                  <tr class="header">
                    <td width="55%" height="23" bgcolor="#F4F4F4">发布者: <?=stripSlashes($r[name])?> </td>
                    <td width="45%" bgcolor="#F4F4F4">发布时间: <?=$r[lytime]?> </td>
                  </tr>
                  <tr bgcolor="#FFFFFF">
                    <td height="23" colspan="2"><table border="0" width="100%" cellspacing="1" cellpadding="8" 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>
              
<?
}
?>

              <table width="92%" border="0" align="center" cellpadding="4" cellspacing="1" class="tableborder">
                <tr>
                  <td>分页:<?=$listpage?></td>
                </tr>
              </table>
              <form action="../../enews/index.php" method="post" name="form1" id="form1">
                <table width="98%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#CCCCCC"class="tableborder">
                  <tr class="header">
                    <td colspan="2" bgcolor="#F4F4F4"><strong>请您留言:</strong></td>
                  </tr>
                  <tr bgcolor="#FFFFFF">
                    <td width="20%">姓名:</td>
                    <td width="722" height="23"><input name="name" type="text" id="name" />
                      *</td>
                  </tr>
                  <tr bgcolor="#FFFFFF">
                    <td>联系邮箱:</td>
                    <td height="23"><input name="email" type="text" id="email" />
                      *</td>
                  </tr>
                  <tr bgcolor="#FFFFFF">
                    <td>联系电话:</td>
                    <td height="23"><input name="call" type="text" id="call" /></td>
                  </tr>
                  <tr bgcolor="#FFFFFF">
                    <td>留言内容(*):</td>
                    <td height="23"><textarea name="lytext" cols="60" rows="12" id="lytext"></textarea></td>
                  </tr>
                        <tr bgcolor="#FFFFFF">
                          <td height="23">验证码：</td>
                          <td height="23"><input name="key" type="text" id="username3" size="10">
                          <img src="/e/ShowKey?ecms" /></td>
                        </tr>
                  <tr bgcolor="#FFFFFF">
                    <td height="23">&nbsp;</td>
                    <td height="23"><input type="submit" name="Submit3" value="提交" />
                <input type="reset" name="Submit22" value="重置" />
                <input name="enews" type="hidden" id="enews" value="AddGbook" /></td>
                  </tr>
                </table>
              </form></td>
          </tr>
        </table>
      </div>
    </div>
    <div class="cleft"></div>
  </div>
<div id="foot">
<p>Copy right ®&nbsp;嘉鹏食品有限公司.&nbsp;All Rights Reserved<br />
  电话：+86-20 3999 3956  传真：+86-20 3106 1896<br />
 &nbsp;&nbsp;<a href="http://www.miibeian.gov.cn/" target="_blank">粤ICP备10018748号</a></p>
</div>
</div>
</body>
</html>
<?php
db_close();
$empire=null;
?>