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

📄 class.asp

📁 加入了反SQL注入插件
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<%if IsNumeric(request.QueryString("anid"))=False or IsNumeric(request.QueryString("anid"))="" then
		response.write"<SCRIPT language=JavaScript>alert('参数错误');"
		response.write"javascript:history.go(-1)</SCRIPT>"
        response.end
		end if
		if IsNumeric(request.QueryString("nid"))=False or IsNumeric(request.QueryString("anid"))="" then
		response.write"<SCRIPT language=JavaScript>alert('参数错误');"
		response.write"javascript:history.go(-1)</SCRIPT>"
        response.end
		end if
%>
<html>
<head>
<title><%=webname%>--<%leixing=lcase(trim(request("id")))
					  select case leixing
					  case "big"
					  	response.write "大类商品"
					  case "small"
					  	response.write "小类商品"
					  case "sale"
					  	response.write "特价商品"
					  case "news"
					  	response.write "新品上架"
					  case else
					  	response.write "新品上架"					  
					  end select%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="mouse.asp"-->
<!--#include file="webtop.asp"-->
<table width="770" border="1" cellspacing="0" cellpadding="0" align="center" bordercolor="#EDECEC">
  <tr> 
    <td width="178" valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF">
      <!--#include file="info_class.asp" -->
	  <!--include file="info_good.asp" -->
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td background="images/bj_x.gif" height="1"></td>
        </tr>
        <tr> 
          <td height="22"><img src="images/main/yqgg.gif" width="178" height="34"> 
          </td>
        </tr>
        <tr> 
          <td height="1" background="images/bj_x.gif"></td>
        </tr>
        <tr> 
          <td> <br>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" >
              <tr> 
                <td height="65" width="181"> 
                  <table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
                    <tr> 
                      <td> 
                        <div align="right"><a href=<%=gg1url%>><img src=<%=gg1%> border="0" width="166" height="55"></a></div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr> 
                <td height="65" width="181"> 
                  <table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
                    <tr> 
                      <td> 
                        <div align="right"><a href=<%=gg2url%>><img src=<%=gg2%>  border="0" width="166" height="55"></a></div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td>&nbsp;</td>
        </tr>
      </table>
    </td>
    <td width="1" valign="top" background="images/bj_x.gif"></td>
    <td width="410" valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> 
      <div align="center"> 
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td background="images/bj_x.gif" height="1"></td>
          </tr>
          <tr> 
            <td height="34" background="images/main/th_bg.gif"> 
              <div align="center"> 
                <!--#include file="info.asp"-->
              </div>
            </td>
          </tr>
          <tr> 
            <td background="images/bj_x.gif" height="1"></td>
          </tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="4" align="center">
          <%leixing=lcase(trim(request("id")))
					  select case leixing
					  case "big"
					  	anclassid=request("anid")
					  	set rs=server.createobject("adodb.recordset")
					  	rs.open "select * from sh_sort where anclassid="&anclassid,conn,1,1
						if rs.bof and rs.eof then
						response.write"<SCRIPT language=JavaScript>alert('参数错误!');"
						response.write"javascript:history.go(-1)</SCRIPT>"
						response.end
						end if
						anclassname=rs("anclass")
						rs.close
					  %>
          <tr> 
            <td colspan="4"><font color="#FF0000"><font color="#333399">商品分类:</font></font>【<a href=class.asp?id=big&anid=<%=anclassid%>><%=anclassname%></a>】</td>
          </tr>
          <%
					  case "small"
					  	anclassid=request("anid")
					  	nclassid=request("nid")
					  	set rs=server.createobject("adodb.recordset")
					  	rs.open "select * from sh_sort where anclassid="&anclassid,conn,1,1
						if rs.bof and rs.eof then
						response.write"<SCRIPT language=JavaScript>alert('参数错误!');"
						response.write"javascript:history.go(-1)</SCRIPT>"
						response.end
						end if
						anclassname=rs("anclass")
						rs.close
					  	rs.open "select * from sh_sort2 where nclassid="&nclassid,conn,1,1
						if rs.bof and rs.eof then
						response.write"<SCRIPT language=JavaScript>alert('参数错误!');"
						response.write"javascript:history.go(-1)</SCRIPT>"
						response.end
						end if
						nclassname=rs("nclass")
						rs.close
					  %>
          <tr> 
            <td colspan="4"><font color="#FF0000"><font color="#333399">商品分类:</font></font>【<a href=class.asp?id=big&anid=<%=anclassid%>><%=anclassname%></a>】 【<a href=class.asp?id=small&anid=<%=anclassid%>&nid=<%=nclassid%>><%=nclassname%></a>】</td>
          </tr>
          <%
					  case "sale"
					  %>
          <tr> 
            <td colspan="4"><font color="#FF0000"><font color="#333399">特价商品</font></font></td>
          </tr>
          <%
					  case "news"
					  %>
          <tr> 
            <td colspan="4"><font color="#FF0000"><font color="#333399">新品上架</font></font></td>
          </tr>
          <%
					  case else
					  %>
          <tr> 
            <td colspan="4"><font color="#FF0000"><font color="#333399">新品上架</font></font></td>
          </tr>
          <%					  
					  end select%>
          <tr> 
            <td colspan="4" height=1 background="images/bj_x.gif"></td>
          </tr>
        </table>
        <%set rs=server.createobject("adodb.recordset")
		if leixing="big" then
			rs.open "select * from sh_books where anclassid="&anclassid&" order by adddate desc",conn,1,1
		elseif leixing="small" then
			rs.open "select * from sh_books where anclassid="&anclassid&" and nclassid="&nclassid&" order by adddate desc",conn,1,1
		elseif leixing="sale" then
			rs.open "select * from sh_books where tejiabook=1 order by adddate desc",conn,1,1
		elseif leixing="news" then
			rs.open "select * from sh_books where newsbook=1 order by adddate desc",conn,1,1
		else
			rs.open "select * from sh_books 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 =6 '每页记录条数
			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
	
			For i=1 To x
		%>
        <!--#include file="info_prime2.asp"-->
        <%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 " & Table_style & ">" & vbCrLf )        
    Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><TR>" & vbCrLf )
    Response.Write("<TD align=right>" & 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 TYEP=TEXT NAME=page SIZE=1 Maxlength=5 VALUE=" & page & ">" & "页"  & vbCrLf & "<INPUT type=submit style=""font-size: 9pt"" value=GO class=b2>")
    Response.Write("</TD>" & vbCrLf )                
    Response.Write("</TR></form>" & vbCrLf )        
    Response.Write("</table>" & vbCrLf )        
End Sub
%>
      </div>
    </td>
    <td width="1" valign="top" background="images/bj_x.gif"></td>
    <td width="178" valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> 	
	 <%'--会员登陆--%>
	 <%if request.cookies("web767")("username")="" and request.cookies("web767")("shjianame")="" then%>
      <!--#include file="info_user.asp"-->
	  <%elseif request.cookies("web767")("username")<>"" then%>	  <!--#include file="info_history.asp"-->
      <%end if%>
	  <%'--登陆结束--%>
      
      <!--#include file="info_brand.asp" -->
      <!--#include file="info_market.asp"-->
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td background="images/bj_x.gif" height="1"></td>
        </tr>
        <tr> 
          <td height="22"><img src="images/main/yqgg.gif" width="178" height="34"> 
          </td>
        </tr>
        <tr> 
          <td height="1" background="images/bj_x.gif"></td>
        </tr>
        <tr> 
          <td> 
            <table width="178" border="0" cellspacing="0" cellpadding="0" height="68">
              <tr> 
                <td height="65" width="181"> 
                  <table width="96%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td> 
                        <div align="right"><a href=<%=gg3url%> target="_blank"><img src=<%=gg3%>  border="0" width="166" height="55"></a></div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr> 
                <td height="65"> 
                  <table width="96%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td> 
                        <div align="right"><a href="<%=gg4url%>" target=_blank><img src="<%=gg4%>" border="0" width="166" height="55"></a></div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
      <!--#include file="info_vote.asp"-->
    </td>
  </tr>
</table>
<!--#include file="webfoot.asp"-->
</body>
</html>

⌨️ 快捷键说明

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