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

<head>
</head>

<body topmargin="0">
<table border="0" width="1024" cellspacing="0" cellpadding="0" height="986">
  <tr>
    <td width="100" height="503"></td>
    <td width="168" height="503" valign="top">
    <table border="0" width="100%" cellspacing="0" cellpadding="0" height="169">
      <tr>
        <td width="100%" height="115" valign="top">
          <table border="0" width="100%" cellspacing="0" cellpadding="0">
            <tr>
              <td width="100%"><img border="0" src="moban/2/images/class.gif"></td>
            </tr>
            <tr>
              <td width="170" valign="top" align="center">
                <div align="center">
                  <center>
                  <table border="0" width="167" cellspacing="0" cellpadding="0" >
                    <tr>
                      <td width="167" height="6" background="moban/2/images/class_top.gif"></td>
                    </tr>
                    <tr>
                      <td width="167" height="285" background="moban/2/images/class_mid.gif" valign="top" align="center">
                      <table width="100%" cellpadding="0" cellspacing="0">
  <%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=20>
&nbsp;&nbsp;<img src=moban/2/images/class_c.gif width=5 height=5>&nbsp;<a href=guidelist.asp?shjclassid=<%=rs("shjclassid")%>&id=<%=id%>><%=left(rs("shjclass"),10)%></a></td>
</tr>
<tr>
<td align="center" valgin="top" height=1><img border="0" src="moban/2/images/class_line.gif" width="148" height="1">
</td>
</tr>
<%rs.movenext
loop	
rs.close
set rs=nothing
end if
%>
</table>

                      </td>
                    </tr>
                    <tr>
                      <td width="167" height="8" background="moban/2/images/class_d.gif"></td>
                    </tr>
                  </table>
                  </center>
                </div>
              </td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td width="100%" height="18">
          <table border="0" width="100%" cellspacing="0" cellpadding="0" height="114">
            <tr>
              <td width="100%" height="53"><img border="0" src="moban/2/images/youhui.gif"></td>
            </tr>
            <tr>
              <td width="100%" height="61" valign="top" align="center">
                <div align="center">
                  <center>
                  <table border="0" width="167" cellspacing="0" cellpadding="0" >
                    <tr>
                      <td width="167" background="moban/2/images/youhui_T.gif" height="8"></td>
                    </tr>
                    <tr>
                      <td width="167" background="moban/2/images/youhui_m.gif"  align="center" height="200" valign="top">
                      <table width="100%" cellpadding="0" cellspacing="0">
<%
shjiaid=rs_shjia("shjiaid")
set rsy=server.CreateObject("adodb.recordset")
rsy.open "select top 10 * from youhui where shjiaid="&shjiaid,conn,1,1
if rsy.bof and rsy.eof then
response.write"&nbsp;&nbsp;<font color=red>!</font>该商家暂时没有发布优惠信息！"
else
do while not rsy.eof
%>
<tr>
<td  valign="top"> 
&nbsp;&nbsp;<a href=youhuishow.asp?youhuiid=<%=rsy("id")%>&id=<%=id%>><%=rsy("yhname")%></a>
</td>
</tr>
<tr>
<td align="center">
<img border="0" src="moban/2/images/youhui_line.gif" >
</td>
</tr>
<%rsy.movenext
loop	
rsy.close
set rsy=nothing
end if
%>
</table>
                      </td>
                    </tr>
                    <tr>
                      <td width="167" background="moban/2/images/youhui_D.gif" height="10"></td>
                    </tr>
                  </table>
                  </center>
                </div>
              </td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td width="100%" height="18" valign="top" align="center">
          <table border="0" width="100%">
            <tr>
              <td width="100%"><img border="0" src="moban/2/images/lianxi.gif"></td>
            </tr>
            <tr>
              <td width="100%" align="center">&nbsp;&nbsp;<img border="0" src="moban/2/images/lc.gif">&nbsp;<%=rs_shjia("tel")%><br>
              &nbsp;&nbsp;<img border="0" src="moban/2/images/lc.gif">&nbsp;<%=rs_shjia("dz")%>
              </td>
            </tr>
            <tr>
              <td width="100%"></td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td width="100%" height="18" valign="top" align="center">
          <div align="center">
            <center>
            <table border="0" width="167" background="moban/2/images/renzheng.gif" height="140">
              <tr>
                <td width="100%" valign="top" align="center">
                  <table border="0" width="100%" height="127">
                    <tr>
                      <td width="100%" height="123" valign="top">                <table border="0" width="100%">
                  <tr>
                    <td width="100%"><img src="../images/ring01.gif" broder="0">   
                      认证状态</td>                                                           
                  </tr>
                  <tr>
                    <td width="100%">商家认证：                                                                   
<%if rs_shjia("tj")=5 then
response.write "<img src=../images/icon1.gif alt=超级商家>"
end if%>&nbsp;                                                                   
<%if rs_shjia("renzheng")=1 then
response.write "<img src=../images/yingyezhizhao.gif alt=营业执照认证商家>"
end if%>
<%if rs_shjia("renzheng2")=1 then                                                                   
response.write "&nbsp;<img src=../images/mobile.gif alt=电话认证商家>"
end if%>
<%if rs_shjia("renzheng3")=1 then                                                                   
response.write "&nbsp;<img src=../images/estrella_6.gif alt=钻石认证商家>"
end if%>
<%if rs_shjia("renzheng4")=1 then                                                                   
response.write "&nbsp;<img src=../images/vip_renzheng.gif alt=ＶＩＰ认证商家>"
end if%>
<br>
商家星级：&nbsp;<img src=../images/estrella_<%=rs_shjia("tj")%>.gif alt=<%=rs_shjia("tj")%>星级商家 ></td>
                  </tr>
                </table></td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
            </center>
          </div>
        </td>
      </tr>
    </table>
    </td>
    <td width="642" height="503" valign="top">
    <table border="0" width="640" cellspacing="0" cellpadding="0" height="986">
      <tr>
        <td width="640" colspan="3" height="9" background="moban/2/images/body_top.gif"></td>
      </tr>
      <tr>
        <td width="2" height="986" background="moban/2/images/body_left.gif"><img src=moban/2/images/body_left.gif border=0></td>
        <td width="636" height="986" background="moban/2/images/body_mid.gif" valign="top">
          <table border="0" width="577" cellspacing="0" cellpadding="0" height="92">
            <tr><form name="userlogin" method="post" action="../checkuserlogin.asp"></form>
            </tr>
            <tr>
              <td width="634" height="1">
                <table border="0" width="633" cellspacing="1" cellpadding="2">
                  <tr>
                    <td width="382" height="32">
                      <table border="0" width="92%">
                        <tr>
                          <td width="100%"><marquee direction="left" width="376" height="20" scrollamount="1" id=info onMouseOver=info.stop() onMouseOut=info.start()><font color="red"><%=rs_shjia("content")%></font></marquee></td>
                        </tr>
                      </table>
                    </td>
                    <td width="235" height="32" background="moban/2/images/sobg.gif">
                     <form method="post" action="search.asp?id=<%=rs_shjia("shjiaid")%>">      
                      <table border="0" width="231" cellspacing="0" cellpadding="0">
                        <tr>
                          <td width="72">&nbsp;<img border="0" src="moban/2/images/so.gif">   
                            搜索</td>                                                                                
                          <td width="105"><input type="text"  class=wenbenkuang  name="searchkey" size="15" value="请输入搜索关键字！"></td>  
                          <td width="48"><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="634" height="2" valign="top" align="center">
                                          <div align="center">
                              <center>
                              <table border="0" width="634" height="138" cellspacing="0" cellpadding="0">
                                <tr>
                                  <td width="634" background="moban/2/images/adbg.gif" height="138" valign="top">
                                    <table border="0" width="100%" height="100%">
                                      <tr>
                                        <td width="28%"></td>
                                        <td width="72%" valign="middle" align="center">
                                        <%if rs_shjia("textbanner")<>"" then%>
                                        <a href="<%=rs_shjia("texturl")%>" targrt=_top><strong><font size="6" color="#ffffff" face="华文行楷"><%=left(rs_shjia("textbanner"),16)%></font></strong></a>
                                        <%else%>
                                        <strong><font size="6" color="#ffffff" face="华文行楷"><%=rs_shjia("name")%>欢迎您！</font></strong>
                                        <%end if%>
                                        </td>
                                      </tr>
                                    </table>
                                  </td>
                                </tr>
                              </table>
                              </center>
                            </div>
              </td>
            </tr>
            <tr>
              <td width="634" height="1" valign="top" align="center">
                                <div align="center">
                              <center>
                              <table border="0" width="625" height="34" cellspacing="2" cellpadding="2">
                                <tr>
                                  <td width="100%" width="625" height="34" background="moban/2/images/center.gif">
                                    <table border="0" width="100%">
                                      <tr>
                                        <td width="4%"></td>
                                        <td width="96%"><a href="index.asp?id=<%=rs_shjia("shjiaid")%>"><font color="#106DA0"><b>首页</b></font></a>&nbsp;&gt;&nbsp;<font color="#CC6600"><b>商品中心</b></font></td>
                                      </tr>
                                    </table>
                                  </td>
                                </tr>
                              </table>
                              </center>
                            </div>
              </td>
            </tr>
            <tr>
              <td width="634" height="1" valign="middle" align="center">
              </td>
            </tr>
            <tr>
              <td width="634" height="0" valign="top" align="center">
              
              <%set rs_shp=server.createobject("adodb.recordset")
		rs_shp.open "select * from shop_books where shjiaid="&id&" 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 =10 '每页记录条数
			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="100%" border="0" cellspacing="0" cellpadding="2" align="center" height="33">
<tr> 
<td width="110" 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="426">
<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")))>152 then
	response.write left(trim(rs_shp("bookcontent")),150)&"..."
	else
	response.write trim(rs_shp("bookcontent"))
	end if%>
</font>
</td>
<td width="100" 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"><img border="0" src="moban/1/images/line2.gif"></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>
        </td>
        <td width="2" height="986" background="moban/2/images/body_right.gif"><img src=moban/2/images/body_right.gif border=0></td>
      </tr>
      <tr>
        <td width="640" colspan="3" height="15" background="moban/2/images/body_down.gif"></td>
      </tr>
    </table>
    </td>
    <td width="100" height="503"></td>
  </tr>
</table>
<!--#include file="copyright.asp"-->
