<?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 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=utf-8" />
<title><?=$bname?>—烙铁咀,批头(咀)厂家,起子,风批(咀),电批,气动套筒,精密螺丝批,内六角扳手—东莞大泽五金</title>
<meta name="keywords" content="<?=$bname?>—烙铁咀,批头(咀)厂家,起子,风批(咀),电批,气动套筒,精密螺丝批,内六角扳手" />
<meta name="description" content="<?=$bname?>—大泽五金有限公司是一家专业生产高品质工业级螺丝起子头的中外合作企业,产品应用于工业领域:电子制造,电器制造,汽车制造,摩托车制造,自行车制造,傢俬等制造业的流水线组装使用,以及航空航天,建筑装潢,机械维修等行业" />
<link href="/skin/inc/css.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="box">
  <div id="top">
    <div id="tp_01">
      <ul>
        <li><a href="/index.html"><img src="/skin/images/index_04.gif" /></a></li>
        <li><a href="#"><img src="/skin/images/index_05.gif" /></a></li>
      </ul>
    </div>
    <div id="tp_02">
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="730" id="tp_02a"><a href="/index.html">网站首页</a> | <a href="/About_Us.html">公司简介</a> | <a href="/honour_certificate/">资质荣誉</a> | <a href="/products/">产品展示</a> | <a href="/Technique_Information/">技术资讯</a> | <a href="/product_agent.html">诚招代理</a> | <a href="/Sales_network.html">销售网络</a> | <a href="http://www.arlpha.cn/e/tool/gbook?bid=1">留言反馈</a> | <a href="/Contact_Us.html">联系方式</a></td>
          <td><form action="/e/search/index.php" method="post" name="searchform">
            <table border="0" cellpadding="1" cellspacing="1">
              <tr>
                <input type="hidden" name="tempid" value="1" />
                <input type="hidden" name="tbname" value="news">
                <input type="hidden" name="show" value="title,newstext,ftitle,smalltext" />
                <td><img src="/skin/images/index_07.gif" /></td>
                <td><input name="keyboard" id="sousuo" type="text" class="sousuo" onclick="javascript:this.value=''" value="请输入关键字"/></td>
                <td><input type="image" name="Submit" value="登陆" src="/skin/images/index_08.gif" /></td>
              </tr>
            </table>
          </form></td>
        </tr>
      </table>
    </div>
    <div id="tp_03">

  <div class="swiper-container" id="banner">
    <div class="swiper-wrapper">
      [e:loop={164,10,0,1}]
<div class="swiper-slide"><a href="<?=$bqsr['titleurl']?>"><img src="<?=$bqr['titlepic']?>" width="100%"></a></div>
[/e:loop]
    </div>
    <!-- Add Pagination -->
    <div class="swiper-pagination"></div>
    <!-- 需要箭头取消下面注释 -->
    <!--  <div class="swiper-button-next"></div>
    <div class="swiper-button-prev"></div> -->
  </div>
  
  <link rel="stylesheet" href="/package/swiper-bundle.min.css">
  <script src="/package/swiper-bundle.min.js"></script>
  <!-- Demo styles -->
  <style>
  #banner {width: 100%;}
  </style>
  <!-- Initialize Swiper -->
  <script>
    var swiper = new Swiper('#banner', {
      centeredSlides: true,
      loop: true,
      autoplay: {
        delay: 2500,
        disableOnInteraction: false,
      },
      pagination: {
        el: '#banner .swiper-pagination',
        clickable: true,
      },
      // 需要箭头取消下面注释
       navigation: {
       nextEl: '#banner .swiper-button-next',
      prevEl: '#banner .swiper-button-prev',
      },
    });
  </script>



</div>
    <div class="cleft"></div>
  </div>
  <div id="mail">
    <div id="left">
      <div class="lt_01">在线留言</div>
      <div class="le_2">
          <form action="../../enews/index.php" method="post" name="form1" id="form1" onSubmit="MM_popupMsg('感谢留言我们会尽快回复您，你可在你邮箱内查看回复，也可以在网站上查看回复')">
          <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" >
            <tr>
              <td width="36%">　您的姓名：</td>
              <td width="64%" height="23"><input name="name" type="text" class="ly_88" id="name"  size="14" />
              <font color="#FF0000"><b>*</b></font></td>
            </tr>
            <tr>
              <td>　您的邮箱：</td>
              <td height="23"><input name="email" type="text" id="email" size="14" class="ly_88" />
              <font color="#FF0000"><b>*</b></font></td>
            </tr>
            <tr>
              <td>　所在地区：</td>
              <td height="23"><input name="call" type="text" id="call" size="14" class="ly_88" /></td>
            </tr>
            <tr>
              <td height="23" colspan="2">　留言内容：</td>
            </tr>
            <tr>
              <td height="23" colspan="2">　
                <textarea name="lytext" cols="20" rows="5" id="lytext2"></textarea>
              <font color="#FF0000"><b>*</b></font></td>
            </tr>
            <tr>
              <td height="23" colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="51%">　验证码
              <input name="key" type="text" id="username3" size="3" class="ly_88" /></td>
                  <td width="49%"><img src="/e/ShowKey?ecms" /></td>
                </tr>
              </table></td>
            </tr>
            <tr>
              <td height="23" colspan="2" align="center">&nbsp;
                <input type="submit" name="Submit3" value="提交" />
                <input type="reset" name="Submit" value="重置" id="Submit" />
                <input name="enews" type="hidden" id="enews" value="AddGbook" /></td>
            </tr>
          </table>
        </form>
      </div>
    </div>
    <div id="right">
      <div id="rt_01">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td class="rt_02">留言信息</td>
          </tr>
        </table>
      </div>
      <div class="nr">
        
<?
while($r=$empire->fetch($sql))
{
	$r['retext']=nl2br(stripSlashes($r[retext]));
	$r['lytext']=nl2br(stripSlashes($r[lytext]));
?>
 
            <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC" class="lybge">
              <tr>
                <td width="100" rowspan="2" align="center" bgcolor="#EEEEEE"><ul>
                  <li><strong><?=stripSlashes($r[name])?></strong></li>
                  <li><strong><img src="/skin/images/index_30.gif" ></strong></li>
                  <li>[!--call--]</li>
                </ul></td>
                <td bgcolor="#F5F5F5">留言时间： <?=$r[lytime]?> </td>
              </tr>
              <tr>
                <td bgcolor="#EEEEEE"><ul class="ly_1"><li><span style="word-break:break-all"><?=$r[lytext]?> </span></li>
                    <li>
<?
if($r[retext])
{
?>
 
                      <div class="ly_2"><font color="#FF0000"><b>回复：</b></font><?=$r[retext]?> </div>
<?
}
?></li>
                </ul></td>
              </tr>
            </table>

<?
}
?>

        <div class="xial">分页:<?=$listpage?></div>
      </div>
    </div>
    <div class="cleft"></div>
  </div>
  <div id="foot">
    <div id="fo_1"><a href="/index.html">网站首页</a> | <a href="/About_Us.html">公司简介</a> | <a href="/honour_certificate/">资质荣誉</a> | <a href="/products/">产品展示</a> | <a href="/Technique_Information/">技术资讯</a> | <a href="/product_agent.html">诚招代理</a> | <a href="/Sales_network.html">销售网络</a> | <a href="http://www.arlpha.cn/e/tool/gbook?bid=1">留言反馈</a> | <a href="/Contact_Us.html">联系方式</a></div>
    <div id="fo_2">Copyright &copy; 大泽五金有限公司 All Rights Reserved. <br />
      公司地址：东莞市东城区岗贝赛格电子市场1B122号　<!--邮编：523000　-->电话：0769－22335773<br />
      <a href="http://www.miibeian.gov.cn/" target="_blank">粤ICP备11014598号</a> <a href="http://www.py001.com/" target="_blank">网站建设：001网络</a><br /><script src="http://s21.cnzz.com/stat.php?id=2942373&web_id=2942373&show=pic" language="JavaScript"></script></div>
  </div>
</div>
</body>
</html>
<?php
db_close();
$empire=null;
?>