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

📄 class_view.asp

📁 易和阳光购物商城 v1.3 | 功能简介 增加了防注入文件
💻 ASP
字号:
<!--#include file="Include/Iheeo_Conn.asp"-->
<!--#include file="Include/Iheeo_config.asp"-->
<html><head>
<title><%=webname%>--<%
					  leixing=lcase(trim(request("lx")))
					  leixing=replace(leixing,"'","")
					  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">
<link href="images/css.css" rel="stylesheet" type="text/css">
<style>
<!--
.style1 {color: #FF0000}
-->
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="Include/Iheeo_head.asp"-->
<TABLE cellSpacing=0 cellPadding=0 width="970" align=center border=0 id="table4">
  <TBODY>
    <TR>
      <TD class=b vAlign=top align=left>
		<table width="970" align="center" border="0" cellspacing="5" cellpadding="3" bordercolor="#CCCCCC">
        <tr>
          <td width="200" valign="top"><!--#include file="Include/Iheeo_fenleiclass.asp"--><TABLE cellSpacing=0 cellPadding=0 border=0><TR><TD height=5></TD></TR></TABLE><!--#include file="Include/Iheeo_gouwucheinfo.asp"--></td>
          <td>
        <table width="100%" border="0" cellspacing="5" cellpadding="3" class="wenbenkuang" bgcolor="#D9D9D9">
          <tr>
            <td class="table-shang" bgcolor="#FFFFFF"><%set rs=server.createobject("adodb.recordset")
		if leixing="big" then
			rs.open "select * from BJX_goods where anclassid="&anclassid&" order by adddate desc",conn,1,1
		elseif leixing="small" then
			rs.open "select * from BJX_goods where anclassid="&anclassid&" and nclassid="&nclassid&" order by adddate desc",conn,1,1
		elseif leixing="hot" then
			rs.open "select * from BJX_goods order by chengjiaocount desc",conn,1,1
		elseif leixing="tejia" then
			rs.open "select * from BJX_goods where tejiabook=1 order by adddate desc",conn,1,1
		elseif leixing="news" then
			rs.open "select * from BJX_goods where newsbook=1 order by adddate desc",conn,1,1
		else
			rs.open "select * from BJX_goods order by adddate desc",conn,1,1
		end if
		if rs.recordcount=0 then 
		%><table width="370" border="0" cellspacing="0" cellpadding="3" align="center">
                <tr>
                  <td align=center>暂无产品</td>
                </tr>
              </table>
              <%
		else
	  		rs.PageSize =20 '每页记录条数
			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 width="100%" class="table-xia" border="0" cellspacing="3" cellpadding="2" align="center">
                <tr><%
				ii=0
				
				For i=1 To x
		%>
                  <td width="25%">
					<table border="0" width="170" cellpadding="3" cellspacing="3"><tr><td>
<TABLE onMouseOver="this.style.backgroundColor='#FF4FAE'" onMouseOut="this.style.backgroundColor=''" width=165 height=165 cellSpacing=1 cellPadding=2 bgColor=#e1e1e1 border=0 id="table1"><TBODY>
<TR><TD width=165 height=165 bgColor=#ffffff align=center><%if rs("bookpic")="" then 
response.write "<div align=center><a href=product.asp?Iheeoid="&rs("bookid")&" ><img src=images/emptybook.gif width=145 height=145 border=0></a></div>"
else%><a target="_blank" href="product.asp?Iheeoid=<%=rs("bookid")%>"><img src="<%=trim(rs("bookpic"))%>"  width=160 border=0 height=160></a><%end if%></td></tr></tbody></table></td></tr>
<tr><td align="center"><%if len(trim(rs("bookname")))>12 then
response.write "<a href=""product.asp?Iheeoid="&rs("bookid")&""" target=""_blank""><font color=#FF3300>"&left(trim(rs("bookname")),10)&"..."&"</font></a>"
else
response.write "<a href=""product.asp?Iheeoid="&rs("bookid")&""" target=""_blank""><font color=#FF3300>"&trim(rs("bookname"))&"</font></a>"
end if%><br>市场价:<s><%=trim(rs("shichangjia"))%> 元</s><br>会员价:<font color=#FF3300><%=trim(rs("huiyuanjia"))%> 元</font><br><a href="buy.asp?id=<%=rs("bookid")%>&action=add" target="_blank"><img src="images/goumai.gif" border=0></a> <a href="shoucang.asp?id=<%=rs("bookid")%>&action=add" target="_blank"><img src="images/shoucang1.gif" border=0></a></td></tr></table></td>
				  <%rs.movenext
		     ii=ii+1%>
			 <%if ii mod 4 = 0 then%></tr><tr><%end if%>
			<% next%>
                  <td width="25%" > </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 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
%></td>
          </tr>
      </table></td>
        </tr>
      </table></TD>
    </TR>
  </TBODY>
</TABLE>
<!--#include file="Include/Iheeo_service.asp"-->
<!--#include file="Include/Iheeo_foot.asp"-->
</body>
</html>

⌨️ 快捷键说明

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