<!--#include file="conn.asp" -->
<%
strCurrMenu=FirstMenu()
ThisPage=request.ServerVariables("URL")
%>
<%
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
%>
<%
'读取留言本的属性，以确定显示那个字段
strLYMenu=GetVariable("mnid")
isDW=GetKey("g_dw",WebUserID,"guestbook_" & strLYMenu )
isTel=GetKey("g_tel",WebUserID,"guestbook_" & strLYMenu )
isEmail=GetKey("g_email",WebUserID,"guestbook_" & strLYMenu )
isAdrr=GetKey("g_adrr",WebUserID,"guestbook_" & strLYMenu )
isOICQ=GetKey("g_oicq",WebUserID,"guestbook_" & strLYMenu )
isIP=GetKey("g_ip",WebUserID,"guestbook_" & strLYMenu )							
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link href="common/style.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="admin/common/JS_CheckForm.js"></script>
<script language="JavaScript">
function checkform(theform){
	if(!CheckEmpty(theform.key, "关键字")) return false;
}

</script>

</head>

<body leftmargin="0" topmargin="0" BodyBegin>
<!--#include file="top.asp"-->
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="190" valign="top" background="images/left.gif"> <table width="180" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="26" align="center" background="images/index_01.gif">::会员登陆::</td>
              </tr>
              <tr> 
                  <td align="center"> 
				  <!--#include file="login.asp"-->
				  </td>
              </tr>
            </table>
            <table width="180" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="26" align="center" background="images/index_01.gif">::产品搜索::</td>
              </tr>
              <tr> 
                <td align="center"><table width="156" border="0" align="center" cellpadding="0" cellspacing="0">
                    <form name="form1" method="post" action="search.asp">
                      <tr> 
                        <td width="58" height="8" align="right"></td>
                        <td width="98" height="8"></td>
                      </tr>
                      <tr> 
                        <td width="58" height="26" align="right">分　类：</td>
                        <td width="98" height="26"> <select name="class" id="select2" style="width:80px">
                            <%
								'开始输出分类
								strSQL="Select * From web_product_class Where mn_id=" & strCurrMenu & " Order by c_index"
								Set rs=Server.CreateObject("ADODB.RecordSet")
								rs.open strSQL,conn,1,1
								for i=1 to rs.recordcount
								%>
                            
                            <option value="<%=rs("id")%>"><%=trim(rs("c_name"))%></option>
                            <%
									rs.movenext
								next
								%>
                            
                          </select> </td>
                      </tr>
                      <tr> 
                        <td height="26" align="right">关键字：</td>
                        <td height="26"> <input name="key" type="text" id="key4" size="14" maxlength="50" style="width:80px"> 
                        </td>
                      </tr>
                      <% if showPrice<>"none" then %>
                      
                      <tr> 
                        <td height="26" align="right">价　格：</td>
                        <td height="26"> <input name="price1" type="text" id="price1" size="2" maxlength="5" style="width:30px">
                          到 
                          <input name="price2" type="text" id="price2" size="2" style="width:30px"> 
                        </td>
                      </tr>
                      <%end if%>
                      
                      <tr align="left"> 
                        <td height="30" colspan="2"> <table width="156" height="40" border="0" cellpadding="0" cellspacing="0">
                            <tr> 
                              <td width="117" height="40" align="right"> <input type="submit" name="Submit" value="开始搜索"></td>
                              <td width="39" height="40" valign="bottom">&nbsp;&nbsp;</td>
                            </tr>
                          </table></td>
                      </tr>
                    </form>
                  </table></td>
              </tr>
            </table>
            <table width="180" height="239" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td height="26" align="center" background="images/index_01.gif">::热销产品::</td>
              </tr>
              <tr> 
                <td height="180" align="center"> <p><img src="images/cp.gif" width="110" height="83" border="1"></p>
                  <p><img src="images/cp.gif" width="110" height="83" border="1"></p></td>
              </tr>
            </table></td>
          <td align="center" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
              
              <tr> 
                <td align="center"><img src=IMAGES/banner.gif ></td>
              </tr>
            </table>
             
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr> 
                <td><img src="images/go.gif" width="22" height="19" hspace="10" align="absmiddle"><strong>查看留言</strong></td>
              </tr>
            </table>
            <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr> 
                <td height="10" align="center"><font color="#666666" style="font-size:13px">&nbsp;</font></td>
              </tr>
              <tr> 
                <td height="103" valign="top"><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"
					Set rs=Server.CreateObject("ADODB.RecordSet")
					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=" & GetVariable("mnid") & "&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></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="3" bgcolor="#0D9DE3"></td>
  </tr>
</table>
<table width="760" border="0" align="center" cellpadding="8" cellspacing="0">
  <tr> 
    <td align="center" bgcolor="F3F3F3">公司地址：未知<br>电话： E-Mail:zfadshu@cn9sky.com<br>Copyright&copy;2005-2006 dddddd All Rights Reserved.<br><br>
      您是本站第 
      <script language="JavaScript" src="admin/count/counter.asp"></script>
      位访问者&nbsp;</td>
  </tr>
</table>
<script language="JavaScript" src="common/init.js"></script><br><script language=Javascript src="common/tranbig5.Js"></script>
</body>
</html>


