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

📄 products.asp

📁 程序为自主开发ASP+SQL大型购物搜索网站,系统管理、商铺、会员三种会员唯一帐号管理。目前已有数据条商品数据与数万条商铺信息
💻 ASP
字号:
<!--#include File="Conn.asp"-->
<!--#include File="Left.asp"-->
<%
'==================================新闻分类



Dim ProductClass
Dim ProductClassName

ProductClass = Trim(Request.QueryString("C"))

NavigationArr = "<a href=./ class=none1>首页</a> > <a href=./Products.asp class=none1>商品中心</a>"
    IF Not Isnull(ProductClass) and ProductClass <> "" Then
N = len(ProductClass)/3
x = 0
	For i = 1 to N
x = x + 3
IF x > 2 Then
Set Rs = Conn.Execute("Select * From MyClass where ShopNumberID = '"& ShopNumberID &"' and NumberID = '"& Left(ProductClass,x) &"'")
		IF Not (rs.bof and rs.bof) Then
			NavigationArr = NavigationArr &" > <a href=./Products.asp?C="& Left(ProductClass,x) &" class=none1>"& Rs("Class") &"</a>"
		End if
	Rs.Close
End IF
	Next
	End IF
'=======================================================
	
Dim ProductID
Dim ProductName
Dim ProductContent

	ProductID = Trim(Request.QueryString("ProductID"))
	
	IF ProductID <> "" AND Not Isnull(ProductID) Then
	
	Set Rs = Conn.Execute("Select * From Product Where ShopNumberID = '"& ShopNumberID &"' and ProductNumberID = '"& ProductID &"'")
	
		IF Not Rs.eof Then
		
		ProductContent = Rs("Content")
		
		ProductName    = Rs("ProductName")
		

		NavigationArr = NavigationArr &" > "& ProductName &""
		
		End IF
		
		Rs.Close
	Set Rs = Nothing
	
	End IF

'=============================================================

Searchkey    = KeyArr(trim(Request("q"))) '关键词

Searchkeytmp = split(Searchkey," ")

max          = ubound(Searchkeytmp)

if max=0 then

		SQLQ = SQLQ & "(ProductName like '%"&Searchkey&"%' or Goods_Key like '%"&Searchkey&"%' or Brand like '%"&Searchkey&"%' or Spec like '%"&Searchkey&"%' or Content like '%"&Searchkey&"%') "

		   else
		   
			   for i=0 to max
			   
				     if i < max then

		SQLQ = SQLQ & "(ProductName like '%"&searchkeytmp(i)&"%' or Goods_Key like '%"&searchkeytmp(i)&"%' or Brand like '%"&searchkeytmp(i)&"%' or Spec like '%"&searchkeytmp(i)&"%' or Content like '%"&searchkeytmp(i)&"%') and "
				  		
					 else

		SQLQ = SQLQ & "(ProductName like '%"&searchkeytmp(i)&"%' or Goods_Key like '%"&searchkeytmp(i)&"%' or Brand like '%"&searchkeytmp(i)&"%' or Spec like '%"&searchkeytmp(i)&"%' or Content like '%"&searchkeytmp(i)&"%') "

		           	end if
		           	
	           next '循环结束
	           
           	end if

if isNull(SQLQ) or SQLQ = "" then
	SQLQ = "ProductName <> ''"
end if  

	if C <> "" and not isnull(C) then
	
		SQLC = "MyClass like '"& C &"%' and "
		
	end if	
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>商品中心-<%=HTMLEncodeNO(ShopName)%>-<%=HTMLEncodeNO(ShopTitle)%>-互联之光大卖场</title>
<meta name="keywords" content="<%=HTMLEncodeNO(ShopKey)%>">
<meta name="description" content="<%=HTMLEncodeNO(ShopContent)%>">
<link href="CSS.CSS" rel="stylesheet" type="text/css">
<script type="text/javascript">
 //** iframe自动适应页面 **//

 //输入你希望根据页面高度自动调整高度的iframe的名称的列表
 //用逗号把每个iframe的ID分隔. 例如: ["myframe1", "myframe2"],可以只有一个窗体,则不用逗号。
 //定义iframe的ID
 var iframeids=["ask"]

 //如果用户的浏览器不支持iframe是否将iframe隐藏 yes 表示隐藏,no表示不隐藏
 var iframehide="yes"

 function dyniframesize() 
 {
  var dyniframe=new Array()
  for (i=0; i<iframeids.length; i++)
  {
   if (document.getElementById)
   {
    //自动调整iframe高度
    dyniframe[dyniframe.length] = document.getElementById(iframeids[i]);
    if (dyniframe[i] && !window.opera)
    {
     dyniframe[i].style.display="block"
     if (dyniframe[i].contentDocument && dyniframe[i].contentDocument.body.offsetHeight) //如果用户的浏览器是NetScape
      dyniframe[i].height = dyniframe[i].contentDocument.body.offsetHeight; 
     else if (dyniframe[i].Document && dyniframe[i].Document.body.scrollHeight) //如果用户的浏览器是IE
      dyniframe[i].height = dyniframe[i].Document.body.scrollHeight;
    }
   }
   //根据设定的参数来处理不支持iframe的浏览器的显示问题
   if ((document.all || document.getElementById) && iframehide=="no")
   {
    var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
    tempobj.style.display="block"
   }
  }
 }

 if (window.addEventListener)
 window.addEventListener("load", dyniframesize, false)
 else if (window.attachEvent)
 window.attachEvent("onload", dyniframesize)
 else
 window.onload=dyniframesize
</script>

</head>
<body leftmargin="0" topmargin="0">
<!--#include File="Top.asp"-->
<table width="760" height="400" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="ffffff">
  <tr> 
    <td width="182" valign="top" background="images/i_35.gif"> <table width="100%" border="0" cellpadding="0" cellspacing="0" >
        <tr> 
          <td height="4"></td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td> 
            <%
			Call Login()
			
			Call Search()
			
			Call ClassS()
			%>
          </td>
        </tr>
      </table> 
    </td>
    <td width="4" valign="top">&nbsp; </td>
    <td valign="top"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td> <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr> 
                <td height="24" background="images/i_8.gif"><%=NavigationArr%></td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td> 
                  <%
IF ProductID = "" or Isnull(ProductID) Then
%>
                  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td> 
                        <%IF Int(Mould_Setup(14)) = 0 Then%>
                        <!--#include File="Product_B.asp"-->
                        <%Else%>
                        <!--#include File="Product_A.asp"-->
                        <%End IF%>
                      </td>
                    </tr>
                  </table>
                  <%
Else
%>
                  <!--#include File="ProductList.asp"-->
                  <%End IF%>
                </td>
              </tr>
            </table></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<!--#include File="End.asp"-->
</body>
</html>

⌨️ 快捷键说明

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