<!--#include file="conn.asp" -->
<%
if GetVariable("mnid")="" then 
	ShowMsg "Can't accessing the filel！"
end if
	
if GetKey("seeguest",WebUserID,"guestbook_" & GetVariable("mnid") )="none" then
	ShowMsg "Can't accessing content！"
end if
%>
<%
'读取留言本的属性，以确定显示那个字段
strCurrMenu=GetVariable("mnid")
isDW=GetKey("g_dw",WebUserID,"guestbook_" & strCurrMenu )
isTel=GetKey("g_tel",WebUserID,"guestbook_" & strCurrMenu )
isEmail=GetKey("g_email",WebUserID,"guestbook_" & strCurrMenu )
isAdrr=GetKey("g_adrr",WebUserID,"guestbook_" & strCurrMenu )
isOICQ=GetKey("g_oicq",WebUserID,"guestbook_" & strCurrMenu )
isIP=GetKey("g_ip",WebUserID,"guestbook_" & strCurrMenu )							
%>
<html>
<head>
<title>会员注册</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="common/style.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="common/JS_CheckForm.js"></script>
<script language="JavaScript">
function checkform(theform){
	if(!CheckEmpty(theform.txtName, "姓名")) return false;
	if(!CheckEmpty(theform.txtMsg, "留言")) return false;
}
</script>

</head>
<body bgcolor="#D4D0C8" leftmargin="0" topmargin="0" BodyBegin>
<!--#include file="top.asp" -->
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td colspan="5" rowspan="3"><table width="760" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="183" valign="top" background="images/index_r4_c1.gif"><table width="100%" height="421" border="0" cellpadding="0" cellspacing="0" background="images/index_r3_c1.gif" style="background-repeat:No-repeat";>
              <tr> 
                <td height="58" valign="top"><img src="images/dl.gif" width="183" height="49"></td>
              </tr>
              <tr> 
                <td height="59" align=center>
				<!--#include file="login.asp" -->
				</td>
              </tr>
              <tr> 
                <td height="158" align="center">&nbsp; </td>
              </tr>
              <tr> 
                <td>&nbsp;</td>
              </tr>
            </table></td>
          <td width="577" colspan="4" valign="top" bgcolor="#FFFFFF">
<TABLE cellSpacing=0 cellPadding=0 width=98% align=center border=0>
              <TBODY>
                <TR> 
                  <TD width="509"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td width="44%"><strong><a href="love.asp"><font color="#FF6600">我要写留言</font></a></strong></td>
                        <td width="54%" align="right"><a href="javascript:;" onClick="window.open('shopping.asp?mnid=<%=strCurrMenu%>','','width=580,height=250,scrollbars=yes,resizable=yes');"><img src="images/buycar.gif" width="101" height="22" border="0"></a></td>
                        <td width="2%">&nbsp;</td>
                      </tr>
                    </table></TD>
                </TR>
                <TR> 
                  <TD bgColor=#ffffff><table width="520" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr> 
                        <td width="16">&nbsp;</td>
                        <td width="490" height="300" valign="top"> 
                          <!--GuestBook Begin-->
                          <%
					strSQL="Select * From web_guestbook Where mn_id=" & GetVariable("mnid") & " And Not(g_hfmsg is null) Order by ID Desc"
					rs.open strSQL,conn,1,1
					'分页显示初始化
					page=GetVariable("page")
					if page="" then
						page=1
					else
						page=Cint(page)
					end if
					
					Section=GetVariable("section")
					if Section="" then
						Section=1
					else
						Section=Cint(Section)
					end if
					'变量赋值
					intPageSize=10		'每页显示记录数
					intSectionSize=5		'多少页为一段，像GOOGLE一样
					PrevSectionText="<FONT face=webdings>7</FONT>"		'上一段的链接文字
					NextSectionText="<FONT face=webdings>8</FONT>"		'下一段的链接文字
					PrevPageText="<FONT face=webdings>3</FONT>"			'上页的链接文字	
					NextPageText="<FONT face=webdings>4</FONT>"			'下页的链接文字
					
					strPageUrl="?mnid=" & strCurrMenu & "&uppage=" & request.QueryString("uppage")
					
					rs.pagesize=intPageSize
					intCount=rs.RecordCount 
					intPageCount=rs.pagecount
					intSectionCount=(intPageCount - 1) \ intSectionSize + 1
					if intCount>0 then
						rs.AbsolutePage=page  
					else
						response.Write("没有可查看的内容！")
					end if
					 '循环输出
					 for i=1 to intPageSize
						if rs.eof then exit for
					%>
                          <table width="490" border="0" cellspacing="0" cellpadding="0">
                            <tr class="11"> 
                              <td width="465" colspan="4"><table width="482" border="0" cellpadding="0" cellspacing="0">
                                  <%if isDW<>"none" then%>
                                  <tr> 
                                    <td width="69" height="25" align="right" bgcolor="F9F9F9">单　位：</td>
                                    <td height="25" colspan="3" bgcolor="F9F9F9"><%=trim(rs("g_dw"))%></td>
                                  </tr>
                                  <%end if%>
                                  <tr> 
                                    <td width="69" height="25" align="right">姓　名：</td>
                                    <td height="25"><%=trim(rs("g_Name"))%></td>
                                    <%if isOICQ<>"none" And isOICQ<>"Null"  then%>
                                    <td height="25" align="right">OICQ：</td>
                                    <td height="25"><%=trim(rs("g_ip"))%></td>
                                    <%end if%>
                                  </tr>
                                  <%if isTel<>"none" Or isEmail<>"none" then %>
                                  <tr> 
                                    <%if isTel<>"none" then%>
                                    <td width="69" height="25" align="right" bgcolor="F9F9F9">电　话：</td>
                                    <td width="224" height="25" bgcolor="F9F9F9"><%=trim(rs("g_Tel"))%></td>
                                    <%end if%>
                                    <%if isEmail<>"none" then%>
                                    <td width="81" height="25" align="right" bgcolor="F9F9F9">&nbsp;Email：</td>
                                    <td width="108" height="25" bgcolor="F9F9F9"><%=trim(rs("g_email"))%></td>
                                    <%end if%>
                                  </tr>
                                  <%end if%>
                                  <%if isAdrr<>"none" And isAdrr<>"Null" then%>
                                  <tr> 
                                    <td width="69" height="25" align="right">地　址：</td>
                                    <td height="25" colspan="3"><%=trim(rs("g_addr"))%></td>
                                  </tr>
                                  <%end if%>
                                  <tr> 
                                    <td width="69" height="14" align="right"><strong>留　言：</strong></td>
                                    <td colspan="3" valign="top"><%=trim(rs("g_msg"))%> 
                                      <font color="#666666">[<%=trim(rs("g_time"))%>] 
                                      </font></td>
                                  </tr>
                                  <% if trim(rs("g_hfmsg")) <> "" then %>
                                  <tr bgcolor="F9F9F9"> 
                                    <td width="69" height="13" align="right">回　复：</td>
                                    <td colspan="3" valign="top"><%=trim(rs("g_hfmsg"))%></td>
                                  </tr>
                                  <%end if%>
                                </table>
                                <hr></td>
                            </tr>
                          </table>
                          <%
	rs.movenext
next
%>
                          <table width="490" border="0" cellspacing="0" cellpadding="0">
                            <tr> 
                              <td height="20" bgcolor="#F9F9F9"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                  <tr> 
                                    <td height="32" align="right"> 共有<font color=ff6600><%=intCount%></font>条记录，分<%=intPageCount%>页，当前页<%=Page%>，每页显示<%=intPageSize%>条记录 
                                      <%
			'计算每一段的开始页
			intStarPage=(Section-2) * intSectionSize + 1
			'前一段
			if Section<=1 then
				response.Write(PrevSectionText & " ")
			else
				response.Write("<a href='" & strPageUrl & "&page=" & intStarPage & "&section=" & Section-1 & "'>" & PrevSectionText & "</a> ")
			end if 
			
			'显示页码列表
			response.Write("第")
			intStarPage=(Section-1) * intSectionSize + 1
		    for p=intStarPage to intStarPage + intSectionSize - 1
				if p > intPageCount then exit for
				if p=page then
		    		response.Write("<strong>[" & p & "]</strong> ")
				else
		    		response.Write("<a href='" & strPageUrl & "&page=" & p & "&section=" & Section & "'>[" & p & "]</a> ")
				end if	
		    next
			response.Write("页")
			'后一段
			intStarPage=(Section) * intSectionSize + 1
			if Section>=intSectionCount then
				response.Write(" " & NextSectionText)
			else
				response.Write(" <a href='" & strPageUrl & "&page=" & intStarPage & "&section=" & Section+1 & "'>" & NextSectionText & "</a> ")
			end if 
		  %>
                                      　 </td>
                                  </tr>
                                </table></td>
                            </tr>
                          </table>
                          <br> <br> 
                          <!--GuestBook End-->
                        </td>
                      </tr>
                    </table>
                    <br> <p></p>
                    <p>&nbsp;</p>
                    </TD>
                </TR>
              </TBODY>
            </TABLE>
            
          </td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td><img src="images/spacer.gif" width="1" height="15" border="0" alt=""></td>
  </tr>
  <tr> 
    <td><img src="images/spacer.gif" width="1" height="210" border="0" alt=""></td>
  </tr>
  <tr> 
    <td colspan="5"><img name="index_r6_c1" src="images/index_r10_c1.gif" width="760" height="30" border="0" alt=""></td>
    <td><img src="images/spacer.gif" width="1" height="30" border="0" alt=""></td>
  </tr>
  <tr> 
    <td colspan="5" valign="top" bgcolor="#EF3A75"> <div align="center"> 
        <TABLE width=98% height="41" 
border=0 cellPadding=4 cellSpacing=5>
          <TBODY>
            <TR> 
              <TD height=19 align=center background="images/bg.gif"><FONT 
      color=#ffffff> &nbsp;购物流程:</FONT><FONT 
      color=#ffffff>选购-&gt;加入购物车-&gt;去收银台-&gt;确认收货人信息-&gt;选配送方式-&gt;确定下订单-&gt;下单后汇款-&gt;汇款确认-&gt;发货-&gt;完成</FONT></TD>
            </TR>
          </TBODY>
        </TABLE>
        公司地址：未知电话： <BR>E-Mail:test@test.com<BR>Copyright&copy;2004-2005 test All Rights Reserved.<br>ICP<br>
        <font color="#FFFFFF">您是本站第 
        <script language="JavaScript" src="admin/count/counter.asp"></script>
        位访问者</font></div></td>
    <td><img src="images/spacer.gif" width="1" height="135" border="0" alt=""></td>
  </tr>
</table>
<script language="JavaScript" src="common/init.js"></script>

</body>
</html>

