<table width="99%" height="0" border="0" align="center" cellpadding="10" cellspacing="0" class="table-xia">
<tr>
<td width="19%" rowspan="4" class="table-you" align="center"> 
<%if rs("bookpic")="" then 
response.write "<div align=center><a href=list.asp?id="&rs("bookid")&" ><img src=images/emptybook.gif width=90 height=90 border=0></a></div>"
else%>

<a href=list.asp?id=<%=rs("bookid")%> ><img src="<%=trim(rs("bookpic"))%>"  width=75 border=0 height=75></a> 

<%end if%></td>
<td width="81%"><span class="style1"><a href=list.asp?id=<%=rs("bookid")%> >
  <u>
  <%
response.write trim(rs("bookname"))%>
  </u></a>
      <%set rs_shjia=server.createobject("adodb.recordset")
rs_shjia.open "select * from shjia where username='"&rs("shjianame")&"'",conn,1,1
if rs_shjia.recordcount<>"0" then
response.write "[ <a href=user/index.asp?id="&rs_shjia("shjiaid")&" ><font color=blue>"
response.write trim(rs_shjia("name"))
response.write "</font></a> ]"
end if
rs_shjia.close
set rs_shjia=nothing
%>
</span></td>
</tr>
<tr> 
<td valign="top"> 
  <span class="style2">
<%if len(trim(rs("bookcontent")))>150 then
	response.write left(trim(rs("bookcontent")),120)&"..."
	else
	response.write trim(rs("bookcontent"))
	end if%>
  </span><font color="#666666"><br>
</font>  <span class="style3"><strong>市场价：￥<%=trim(rs("shichangjia"))%>元会员价：<FONT color=#ff3333>￥</FONT><%=trim(rs("huiyuanjia"))%> 元</strong></span></td>
</tr>
</table>
<table width="99%" height="0" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><div align="center">        <%rs.movenext
		next
		call PageControl(iCount,maxpage,page,"border=0 align=center","<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 width=100% border=0 cellpadding=0 cellspacing=0 bgcolor=#f1f1f1>" & vbCrLf )        
    Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><TR bgcolor=#f1f1f1>" & 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
%></div></td>
  </tr>
</table>