⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 class.asp

📁 网页源码,是最好的网店代码。可以支持批量上传产品等功能。
💻 ASP
📖 第 1 页 / 共 2 页
字号:
            </tr>
            <tr>
              <td colspan="2" height=10></td>
            </tr>
            <%case "hot"%>
            <tr>
              <td  height=28 colspan="2" background="images/body/pdbg01.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href=index.asp><%=webname%></a> >> 热销商品</td>
              </tr>
            <tr>
              <td height="8" colspan="2"  ></td>
            </tr>
            <tr>
              <td colspan="2" background="" height=25><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="5"></td>
                      <td><a href="<%=ad8url%>" target="_blank"><img src="<%=ad8%>" border="0" width="99%" height="160" ></a></td>
                  </tr>
              </table></td>
            </tr>
            <tr>
              <td colspan="2"  height=10></td>
            </tr>
            <%case "news"%>
            <tr>
              <td height=28 colspan="2" background="images/body/pdbg01.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href=index.asp><%=webname%></a> >> 最新上架</td>
              </tr>
            <tr>
              <td height="8" colspan="2"  ></td>
            </tr>
            <tr>
              <td colspan="2" background="" height=50><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="5"></td>
                      <td><a href="<%=ad8url%>" target="_blank"><img src="<%=ad8%>" border="0" width="99%" height="160" ></a></td>
                  </tr>
              </table></td>
            </tr>
            <tr>
              <td colspan="2"  height=10></td>
            </tr>
            <%case else%>
            <tr>
              <td height=28 colspan="2" background="images/body/pdbg01.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href=index.asp><%=webname%></a> >> 最新上架</td>
              </tr>
            <tr>
              <td height="8" colspan="2"  ></td>
            </tr>
            <tr>
              <td colspan="2" background="" height=50><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="5"></td>
                      <td><a href="<%=ad8url%>" target="_blank"><img src="<%=ad8%>" border="0" width="99%" height="160" ></a></td>
                  </tr>
              </table></td>
            </tr>
            <tr>
              <td colspan="2"  height=10></td>
            </tr>
            <%end select%>
          </table>
            <%set rs=server.createobject("adodb.recordset")
			
		if leixing="big" then
			rs.open "select * from products where anclassid="&anclassid&" order by adddate desc",conn,1,1
		elseif leixing="small" then
		rs.open "select * from products where anclassid="&anclassid&" and nclassid="&nclassid&" order by adddate desc",conn,1,1
		elseif leixing="hot" then
			rs.open "select * from products order by chengjiaocount desc",conn,1,1
		elseif leixing="tejia" then
			rs.open "select * from products where tejiabook=1 order by adddate desc",conn,1,1
		elseif leixing="news" then
			rs.open "select * from products where newsbook=1 order by adddate desc",conn,1,1
		else
			rs.open "select * from products where newsbook=1 order by adddate desc",conn,1,1
		
		end if
		if rs.recordcount=0 then 
		%>
            <table width="370" border="0" cellspacing="0" cellpadding="5" align="center">
              <tr>
                <td align=center>暂无商品</td>
              </tr>
            </table>
          <%
		else
	  		rs.PageSize =28 '每页记录条数
			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
	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if
		%>
            <table  class="sideleft"  width="100%"  border="0" cellspacing="0" cellpadding="0" align="center">
              <tr>
                <%
				ii=0
				For i=1 To x
		%>
                <td width="27%"><table width="175" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td height="10"  ></td>
                    </tr>
                    <tr>
                      <td><table width="175" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td height="1" background="images/lineDotGray.gif"></td>
                          </tr>
                          <tr>
                            <td height="10" ></td>
                          </tr>
                          <tr>
                            <td><div align="center">
                                <table  width="140" height="142" cellspacing="1" cellpadding="2"  border="0">
                                  <tbody>
                                    <TR> 
                                      <TD align=middle 
                      background="./images/136.jpg"
                        height=140> 
                                        <%if rs("bookpic")="" then 
	response.write "<div align=center><a href=products.asp?id="&rs("bookid")&" ><img src=images/emptybook.gif width=90 height=90 border=0></a></div>"
	else%>
                                        <a href="products.asp?id=<%=rs("bookid")%>" ><img src="<%=trim(rs("bookpic"))%>" alt="<%=rs("bookname")%>" width="100" height="100" border="0" align="absmiddle" /></a> 
                                        <%end if%>
                                      </TD>
                                    </TR>
                                  </tbody>
                                </table>
                              </div></td>
                          </tr>
                          <tr>
                            <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                  <td align=center><%response.write "<a class=a4 href=products.asp?id="&rs("bookid")&" ><font color=#FF0000>"
			if len(trim(rs("bookname")))>7 then
			response.write left(trim(rs("bookname")),7)&".."
			else
			response.write trim(rs("bookname"))
			end if
			response.write "</font></a>"
			%>
                                 </td>
                                </tr>
                                <tr>
                                  <td height="35" align=center>市场价:<s><%=trim(rs("shichangjia"))%> 元</s><br>
                                    会员价:<font color=#ff0000><%=trim(rs("huiyuanjia"))%> </font>元</td>
                                </tr>
                            </table></td>
                          </tr>
                      </table></td>
                    </tr>
                </table></td>
                <%rs.movenext
		     ii=ii+1%>
                <%if ii mod 4 =0 then%>
              </tr>
              <tr>
                <%end if%>
                <% next%>
                <td colspan="2" ></td>
              </tr>
            </table>
          <%
		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 >" & 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=40>" & 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="68"  style="BORDER-left:#FF67A0 1px solid;" >&nbsp;</td>
  </tr>
</table>
<!--#include file="include/foot.asp"-->
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -