<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<!--#include file="fuction.asp"-->
<!--#include file="webtop.asp"-->
<html>
<head>
<base target=Right> 
<title><%=webname%>--<%=anclassname%><%leixing=lcase(trim(request("lx")))
					  select case leixing
					  case "big"
					  	response.write "大类商品"
					  case "small"
					  	response.write "小类商品"
					  case "tejia"
					  	response.write "特价商品"
					  case "news"
					  	response.write "新品上架"
					  case else
					  	response.write "新品上架"					  
					  end select%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> 
<div align="center">
<TABLE id=table1 style="MARGIN: 0px auto; BORDER-BOTTOM: #ffffff 0px solid" 
height="98%" cellSpacing=0 borderColorDark=#FFFFFF cellPadding=0 width=976 
borderColorLight=#CECECE border=1>
  <TBODY>
  <TR><!--sart left-->
    <TD vAlign=top width=234 bgcolor="#F1F1F1">
      <table border="0" width="100%" id="table13">
		<tr>
			<td align="center">
			</td>
		</tr>
		<tr>
			<td align="center"><!--#include file="left.asp"--></td>
		</tr>
		<tr>
			<td align="center">　</td>
		</tr>
		<tr>
			<td align="center">　</td>
		</tr>
		</table>
	</TD><!---end left--><!--start right-->
    <TD vAlign=top align=middle width=736>
            <table width="100%" border="0" cellspacing="0" cellpadding="4" align="center" id="table2">
              <tr> 
                <td> 
				<table width="100%" border="0" cellspacing="0" cellpadding="4" align="center" id="table3">
                    <%leixing=lcase(trim(request("lx")))
  select case leixing
                    case "big"
					  	anclassid=request("anid")
if Not isChkInteger(anclassid) then
	%>
                    <script language=javascript>
		alert("参数错误！");
		window.close();
	</script>
                    <%
	response.end
end if
                        set rs=server.createobject("adodb.recordset")
					  	rs.open "select * from shop_anclass where anclassid="&anclassid,conn,1,1
									if rs.recordcount=0 then 
		%>
                    <script language='javascript'>alert('分类调用错误，请返回！');window.location.href='index.asp';</script>
                    <%
		end if
						anclassname=rs("anclass")
						pic=trim(rs("pic"))
						links=trim(rs("links"))
						sztys=trim(rs("sztys"))
						flsl=trim(rs("spdlh"))
						fll=trim(rs("spdll"))
						rs.close
					  %>
                 
                    <tr> 
                      <td height="15"> 
						<table width="100%" border="0" cellspacing="1" cellpadding="0" id="table4">
                          <tr> 
                            <td height="1" bgcolor="cccccc"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
                          </tr>
                          <tr> 
                            <td height="25" bgcolor="efefef"> <strong>&nbsp;&nbsp;<img src="images/dot_03.gif" width="9" height="9" border="0"> 
                              商品分类：【<a href=class.asp?lx=big&anid=<%=anclassid%>><font color="<%=sztys%>"><%=anclassname%></font></a>】</strong></td>
                          </tr>
                          <tr> 
                            <td height="1" bgcolor="cccccc"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
                          </tr>
                        </table></td>
                    </tr>
                    <%
					  case "small"
					  	anclassid=request("anid")
					  	nclassid=request("nid")
						if Not isChkInteger(anclassid) then
	        %>
                    <script language=javascript>
		        alert("参数错误！");
		        window.close();
	        </script>
                    <%
	         response.end
                 end if
					  	set rs=server.createobject("adodb.recordset")
					  	rs.open "select * from shop_anclass where anclassid="&anclassid,conn,1,1
						anclassname=rs("anclass")
						sztys=trim(rs("sztys"))
						rs.close
						%>
                    <%
						if Not isChkInteger(nclassid) then
							%>
                    <script language=javascript>
								alert("参数错误！");
								window.close();
							</script>
                    <%
							response.end
						end if
						%>
                    <%
						rs.open "select * from shop_nclass where nclassid="&nclassid,conn,1,1
						if rs.recordcount=0 then 
		%>
                    <script language='javascript'>alert('分类调用错误，请返回！');window.location.href='index.asp';</script>
                    <%
		end if
						nclassname=rs("nclass")
						piccc=trim(rs("piccc"))
						links=trim(rs("links"))
						xsztys=trim(rs("xsztys"))
						flsl=trim(rs("spxlh"))
						fll=trim(rs("spxll"))
						rs.close
					  %>
                   
                    <tr> 
                      <td height="15"> 
						<table width="100%" border="0" cellspacing="1" cellpadding="0" id="table5">
                          <tr> 
                            <td height="1" bgcolor="cccccc"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
                          </tr>
                          <tr> 
                            <td height="25" bgcolor="efefef"> <strong>&nbsp;&nbsp;<img src="images/dot_03.gif" width="9" height="9" border="0"> 
                              商品分类</strong>：【<a href=class.asp?lx=big&anid=<%=anclassid%>><font color="<%=sztys%>"><%=anclassname%></font></a>】　【<a href=class.asp?lx=small&anid=<%=anclassid%>&nid=<%=nclassid%>><font color="<%=xsztys%>"><%=nclassname%></font></a>】 
                            </td>
                          </tr>
                          <tr> 
                            <td height="1" bgcolor="cccccc"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
                          </tr>
                        </table></td>
                    </tr>
                    <%
					  case "tejia"
					%>
                    <tr> 
                      <td height="15"> 
						<table width="100%" border="0" cellspacing="1" cellpadding="0" id="table6">
                          <tr> 
                            <td height="1" bgcolor="cccccc"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
                          </tr>
                          <tr> 
                            <td height="25" bgcolor="efefef"> <strong>&nbsp;&nbsp;<img src="images/dot_03.gif" width="9" height="9" border="0"> 
                              特价商品</strong></td>
                          </tr>
                          <tr> 
                            <td height="1" bgcolor="cccccc"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
                          </tr>
                        </table></td>
                    </tr>
                      <%
					  case "cx"
					%> <tr>
                      <td height="15">
						<table width="100%" border="0" cellspacing="1" cellpadding="0" id="table7">
                          <tr> 
                            <td height="1" bgcolor="cccccc"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
                          </tr>
                          <tr> 
                            <td height="25" bgcolor="efefef"> <strong>&nbsp;&nbsp;<img src="images/dot_03.gif" width="9" height="9" border="0"> 
                              促销商品</strong></td>
                          </tr>
                          <tr> 
                            <td height="1" bgcolor="cccccc"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
                          </tr>
                        </table></td>
                    </tr>
                    <%
case "news"  %>
                    <tr> 
                      <td height="30"> 
						<table width="100%" border="0" cellspacing="1" cellpadding="0" id="table8">
                          <tr> 
                            <td height="1" bgcolor="cccccc"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
                          </tr>
                          <tr> 
                            <td height="25" bgcolor="efefef"> <strong>&nbsp;&nbsp;<img src="images/dot_03.gif" width="9" height="9" border="0"> 
                              新品上架</strong></td>
                          </tr>
                          <tr> 
                            <td height="1" bgcolor="cccccc"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
                          </tr>
                        </table></td>
                    </tr>
                    <%
					  case else
					  %>
                    <tr> 
                      <td height="30" class="table-shangxia"> 
						<table width="100%" border="0" cellspacing="1" cellpadding="0" id="table9">
                          <tr> 
                            <td height="1" bgcolor="cccccc"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
                          </tr>
                          <tr> 
                            <td height="25" bgcolor="efefef"> <strong>&nbsp;&nbsp;<img src="images/dot_03.gif" width="9" height="9" border="0"> 
                              新品上架</strong></td>
                          </tr>
                          <tr> 
                            <td height="1" bgcolor="cccccc"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
                          </tr>
                        </table></td>
                    </tr>
                    <%					  
					  end select%>
                  </table>
                  <table width="99%" border="0" align="center" cellpadding="2" cellspacing="2" id="table10">
                    <tr> 
                      <td> <div align="right">选择查看方式 
                          <select name="select" class="wenbenkuang" onChange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}" ><base target=Right> 
                            <option selected>选择排序方式</option>
                            <option value="class.asp?px=0" >按推荐</option>
                            <option value="class.asp?px=1" >按上架时间（从早到晚）</option>
                            <option value="class.asp?px=2" >按上架时间（从晚到早）</option>
                            <option value="class.asp?px=3" >按价格（从高到低）</option>
                            <option value="class.asp?px=4" >按价格（从低到高）</option>
                          </select>
                        </div></td>
                    </tr>
                  </table>
                  <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" id="table11">
                    <tr> 
                      <td height="1" bgcolor="#CCCCCC"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
                    </tr>
                  </table>
                  <%set rs=server.createobject("adodb.recordset")
		if leixing="big" then
		%>
                  <%
if Not isChkInteger(anclassid) then
	%>
                  <script language=javascript>
		alert("参数错误！");
		window.close();
	</script> 
                  <%
	response.end
end if
%>
                  <%rs.open "select * from shop_snsn where anclassid="&anclassid&" order by adddate desc",conn,1,1
		elseif leixing="small" then%>
                  <%
if Not isChkInteger(anclassid) then
	%>
                  <script language=javascript>
		alert("参数错误！");
		window.close();
	</script> 
                  <%
	response.end
end if
%>
                  <%
if Not isChkInteger(nclassid) then
	%>
                  <script language=javascript>
		alert("参数错误！");
		window.close();
	</script> 
                  <%
	response.end
end if
%>
                  <%

				  rs.open "select * from shop_snsn where anclassid="&anclassid&" and nclassid="&nclassid&" order by adddate desc",conn,1,1
		elseif leixing="tejia" then
		    rs.open "select * from shop_snsn where tejiashop=1 order by adddate desc",conn,1,1
		
		elseif leixing="news" then
			rs.open "select * from shop_snsn where newsshop=1 order by adddate desc",conn,1,1
		elseif leixing="cx" then
			rs.open "select * from shop_snsn where cxiaoshop=1 order by adddate desc",conn,1,1
		else			
			dim px
	        px=request.QueryString("px")
			if px="" then
			rs.open "select * from shop_snsn where newsshop=1 order by adddate desc",conn,1,1
		else
			select case px
			case "0" 
rs.open "select * from shop_snsn where  bestshop=1 ",conn,1,1
case "1" 
rs.open "select * from shop_snsn order by adddate asc",conn,1,1
case "2" 
rs.open "select * from shop_snsn  order by adddate desc",conn,1,1
case "3" 
rs.open "select * from shop_snsn  order by shichangjia desc",conn,1,1
case "4" 
rs.open "select * from shop_snsn  order by shichangjia asc",conn,1,1
end select
	 end if
	  end if
		if rs.recordcount=0 then 
		%>
                  <table width="700" border="0" cellspacing="0" cellpadding="5" align="center" id="table12">
                    <tr> 
                      <td align=center>暂无商品</td>
                    </tr>
                  </table>
                  <%
		else
			hang=1			'显示的行数
			l=1			'显示的列数
	  		rs.PageSize =hang*l '每页记录条数,必须是3的倍数
			iCount=rs.RecordCount '记录总数
			iPageSize=rs.PageSize
    		maxpage=rs.PageCount 
    		page=request("page")
    
    if Not IsNumeric(page) or page="" then
        page=1
    else
        page=cint(page)
    end if
    
    if page<1 then
        page=1
    elseif  page>maxpage then
        page=maxpage
    end if
    
    rs.AbsolutePage=Page
			response.write "<table width=700>"
		for ii=1 to hang
			response.write "<tr>"
			for jj=1 to l
				response.write "<td>"
				if not rs.eof then
					%>
                  <!--#include file="shangping_j.asp"-->
                  <%rs.movenext
				else
					response.write "&nbsp;"
				end if
				response.write "</td>"
			next
			response.write "</tr>"
		next
			response.write "</table>"
			
		call PageControl(iCount,maxpage,page,"border=0 align=center widtj=100% ","<p align=center>")
		end if
		rs.close
		set rs=nothing
Sub PageControl(iCount,pagecount,page,table_style,font_style)
'生成上一页下一页链接
    Dim query, a, x, temp
    action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")

    query = Split(Request.ServerVariables("QUERY_STRING"), "&")
    For Each x In query
        a = Split(x, "=")
        If StrComp(a(0), "page", vbTextCompare) <> 0 Then
            temp = temp & a(0) & "=" & a(1) & "&"
        End If
    Next

    Response.Write("<table " & Table_style & ">" & vbCrLf )        
    Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><TR>" & vbCrLf )
    Response.Write("<TD align=right>" & vbCrLf )
    Response.Write(font_style & vbCrLf )    
        
    if page<=1 then
        Response.Write ("首页 " & vbCrLf)        
        Response.Write ("上页 " & vbCrLf)
    else        
        Response.Write("<A HREF=" & action & "?" & temp & "Page=1>首页</A> " & vbCrLf)
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page-1) & ">上页</A> " & vbCrLf)
    end if

    if page>=pagecount then
        Response.Write ("下页 " & vbCrLf)
        Response.Write ("尾页 " & vbCrLf)            
    else
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page+1) & ">下页</A> " & vbCrLf)
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & pagecount & ">尾页</A> " & vbCrLf)            
    end if

    Response.Write(" 页次：" & page & "/" & pageCount & "页" &  vbCrLf)
    Response.Write(" 共有" & iCount & "种商品" &  vbCrLf)
    Response.Write(" 转到" & "<INPUT TYEP=TEXT NAME=page SIZE=3 Maxlength=10 VALUE=" & page & ">" & "页"  & vbCrLf & "<INPUT type=submit style=""font-size: 9pt"" value=GO class=b2>")
    Response.Write("</TD>" & vbCrLf )                
    Response.Write("</TR></form>" & vbCrLf )        
    Response.Write("</table>" & vbCrLf )        
End Sub
%>
                </td>
              </tr>
            </table>
            </TD><!--end right--></TR></TBODY></TABLE></div>
<!--#include file="copyright.asp"-->
<script language=javascript src="floater.js"></script>
</body>
</html>