
<!--#include file="top.asp"-->

<head>
</head>

<body background="moban/3/images/bg.gif" topmargin="0">
<div align="center">
  <center>
  <table border="0" width="875" cellspacing="0" cellpadding="0" background="moban/3/images/body_bg1.gif" height="373">
  <tr><td width="100%" height="15"></td></tr>
    <tr>
      <td width="875" height="401" valign="top">
        <div align="center">
          <center>
          <table border="0" width="873" height="400" cellspacing="0" cellpadding="0">
            <tr>
              <td width="181" valign="top">
                <table border="0" width="179" height="1" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="100%" valign="top" height="1"><img border="0" src="moban/3/images/class.gif"></td>
                  </tr>
                  <tr>
                    <td width="100%" valign="top" height="1" background="moban/3/images/class_mid.gif" align="right">
                      <div align="right">
                        <table border="0" width="98%" height="1">
                          <tr>
                            <td width="100%" height="1">
<table width="100%" cellpadding="0" cellspacing="0" height="1">
  <%set rs=server.CreateObject("adodb.recordset")
rs.open "select top 10 * from shop_shjclass where shjname='"&shjianame&"' order by shjclassidorder",conn,1,1
if rs.bof and rs.eof then
response.write"&nbsp;&nbsp;<font color=red>!</font>该商家暂时没有分类！"
else
do while not rs.eof
%>
<tr>
<td width="100%" valgin="top" height=1>
&nbsp;&nbsp;<img src=moban/3/images/sanjiao.gif width=5 height=5>&nbsp;<a href=guidelist.asp?shjclassid=<%=rs("shjclassid")%>&id=<%=id%>><font color="#ffffff"><%=left(rs("shjclass"),10)%></font></a></td>
</tr>
<tr>
<td align="center" valgin="top" height=5><img border="0" src="moban/3/images/class_line.gif" width="148" height="1">
</td>
</tr>
<%rs.movenext
loop	
rs.close
set rs=nothing
end if
%>
</table>
                            
                            </td>
                          </tr>
                        </table>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td width="100%" valign="top" height="1"><img border="0" src="moban/3/images/class_di.gif"></td>
                  </tr>
                </table>
              </td>
              <td width="510" height="174" valign="top" align="center">
                <div align="center">
                  <center>
                  <table border="0" width="510" cellspacing="0" cellpadding="0" height="172">
                    <tr>
                      <td width="510" background="moban/3/images/top_top.gif" height="61">
                        <table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="100%" colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
                          </tr>
                          <tr>
                            <td width="26%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                                              
                              <font color="#666666"><b>产品展示</b></font></td>
                            <td width="74%" align="center">
                     <form method="post" action="search.asp?id=<%=rs_shjia("shjiaid")%>">      
                      <table border="0" width="251" cellspacing="0" cellpadding="0">
                        <tr>
                          <td width="97">&nbsp;<img border="0" src="moban/2/images/so.gif">  产品搜索</td>                                                                                                 
                          <td width="113"><input type="text"  class=wenbenkuang  name="searchkey" size="15" value="请输入搜索关键字！"></td>  
                          <td width="35"><INPUT  name="submit" border="0" src="moban/2/images/search.gif" type="image" align="absmiddle" ></td>
                        </tr></form>
                      </table>
                      </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                    <tr>
                      <td width="100%" background="moban/3/images/linemid.gif" height="400" valign="top" align="center">
                        <div align="center">
                          <center>
                          <table border="0" width="100%">
                            <tr>
                              <td width="100%" valign="top">
                         

       <%
       shjclassid=request.querystring("shjclassid")
       set rs_shp=server.createobject("adodb.recordset")
		rs_shp.open "select * from shop_books where shjclassid="&shjclassid&" and info=0 order by adddate desc",conn,1,1
		if rs_shp.recordcount=0 then 
		%>
<table width="90%" border="0" cellspacing="0" cellpadding="5" align="center">
<tr>
<td align=center>暂无分类产品</td>
</tr>
</table>
            <%
		else
	  		rs_shp.PageSize =4 '每页记录条数
			iCount=rs_shp.RecordCount '记录总数
			iPageSize=rs_shp.PageSize
    		maxpage=rs_shp.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_shp.AbsolutePage=Page

	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if
	
			For i=1 To x
		%>
<table width="500" border="0" cellspacing="0" cellpadding="2" align="center" height="33">
<tr> 
<td width="104" height="94" align="center" rowspan="2" > 
<TABLE  width=103 height=84 cellSpacing=1 cellPadding=2  border=0>
<TR> 
<TD width=103 height=84 align=center background="moban/1/images/picbg.gif" valign="middle" > 
<%if rs_shp("bookpic")="" then 
response.write "<a href=list1.asp?id="&id&"&bookid="&rs_shp("bookid")&" ><img src=../images/emptybook.gif width=72 height=60 border=0></a>"
else%>
<a href=list1.asp?id=<%=id%>&bookid=<%=rs_shp("bookid")%> ><img src="../<%=trim(rs_shp("bookpic"))%>"  width=72 border=0 height=60></a> 
<%end if%>  
</TD>
</TR>
</TABLE>
</td>
<td width="265">
<img src="../images/ring01.gif" > <a href=list1.asp?id=<%=id%>&bookid=<%=rs_shp("bookid")%> ><font color="#ff3300"><%=trim(rs_shp("bookname"))%></font></a><br> 
<font color="#666666">
	<%if len(trim(rs_shp("bookcontent")))>100 then
	response.write left(trim(rs_shp("bookcontent")),100)&"..."
	else
	response.write trim(rs_shp("bookcontent"))
	end if%>
</font>
</td>
<td width="113" align="center">
市场价：<s><%=trim(rs_shp("shichangjia"))%></s> 元<br>  
会员价：<font color=red><%=trim(rs_shp("huiyuanjia"))%></font> 元<br>  
<a href="../gouwu.asp?id=<%=rs_shp("bookid")%>&action=add" target="_blank"><img src="moban/1/images/goumai.gif"  border=0>
</a><br>
<a href="../shoucang.asp?id=<%=rs_shp("bookid")%>&action=add" target="_blank"><img src="moban/1/images/shoucang.gif" border=0></a>
</td>
</tr>
<tr> 
<td height="1" colspan="2" width="384"><img border="0" src="moban/1/images/line2.gif" width="360" height="1"></td>
</tr>
</table>
<%rs_shp.movenext
		next
		call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
		end if
		rs_shp.close
		set rs_shp=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 width=100% border=0 cellpadding=0 cellspacing=0 >" & vbCrLf )        
    Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><TR>" & vbCrLf )
    Response.Write("<TD align=center height=35>" & 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 CLASS=wenbenkuang TYEP=TEXT NAME=page SIZE=2 Maxlength=5 VALUE=" & page & ">" & "页"  & vbCrLf & "<INPUT CLASS=go-wenbenkuang type=submit value=GO>")
    Response.Write("</TD>" & vbCrLf )                
    Response.Write("</TR></form>" & vbCrLf )        
    Response.Write("</table>" & vbCrLf )        
End Sub
%>
                                

                           </td>
                            </tr>
                          </table>
                          </center>
                        </div>
                      </td>
                    </tr>
                    <tr>
                      <td width="100%" height="12" background="moban/3/images/linedi.gif"><img border="0" src="moban/3/images/linedi.gif"></td>
                    </tr>
                  </table>
                  </center>
                </div>
              </td>
              <td width="185" valign="top" align="center">
                <div align="center">
                  <center>
                  <table border="0" width="163" background="moban/3/images/right.gif" height="334" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="100%" valign="top">
                        <table border="0" width="100%" cellspacing="0" cellpadding="0" height="230">
                          <tr>
                            <td width="100%" height="56">&nbsp; 
                            </td>
                          </tr>
                          <tr>
                            <td width="100%" height="9" align="center"><%=rs_shjia("tel")%> 
                            </td>
                          </tr>
                          <tr>
                            <td width="100%" height="27">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                            </td>
                          </tr>
                          <tr>
                            <td width="100%" height="19" valign="top" align="center"><a href=mailto:<%=rs_shjia("UserEmail")%>><%=right(rs_shjia("UserEmail"),18)%> </a> 
                            </td>
                          </tr>
                          <tr>
                            <td width="100%" height="31">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
                          </tr>
                          <tr>
                            <td width="100%" height="38" valign="top">
                              <table border="0" width="100%" height="43">
                                <tr>
                                  <td width="28%" height="39"></td>
                                  <td width="67%" valign="top" height="39"> <%=rs_shjia("dz")%></td>
                                  <td width="6%" height="39"></td>
                                </tr>
                              </table>
 
                            </td>
                          </tr>
                          <tr>
                            <td width="100%" height="49" valign="top">
                              <table border="0" width="100%" height="37">
                                <tr>
                                  <td width="100%" height="25">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                                  </td>
                                </tr>
                                <tr>
                                  <td width="100%" height="21">
                                    <table border="0" width="100%">
                                      <tr>
                                        <td width="36%"></td>
                                        <td width="64%" valign="bottom"><b><a href="gbook.asp?id=<%=rs_shjia("shjiaid")%>"><font color="#636363">在线留言</font></a></b></td>
                                      </tr>
                                    </table>
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                          <tr>
                            <td width="100%" height="18"></td>
                          </tr>
                          <tr>
                            <td width="100%" height="18"></td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                  </center>
                </div>
              </td>
            </tr>
          </table>
          </center>
        </div>
      </td>
    </tr>
  </table>
  </center>
</div>
<!--#include file="copyright.asp"-->
</body>

