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

📄 productlist.asp

📁 程序为自主开发ASP+SQL大型购物搜索网站,系统管理、商铺、会员三种会员唯一帐号管理。目前已有数据条商品数据与数万条商铺信息
💻 ASP
字号:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%

function HTMLEncodeStr(fString)
    'fString = Replace(fString, CHR(32), "&nbsp;")
	if fString <> "" and isnull(fString) Then
    fString = Replace(fString, CHR(13), "")
    fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
    fString = Replace(fString, CHR(10), "<BR>")
	fString = Replace(fString,"<IMG","<BR><IMG onload=""javascript:if(this.width>screen.width-300)this.width=screen.width-300""")
	end if 
    HTMLEncodeStr = fString
end function


Dim ProductNumberID
    ProductNumberID = Trim(Request.QueryString("ProductID"))

'======================================================商品
Set rs=server.CreateObject("adodb.recordset")
	SQL = "Select * From Product where ProductNumberID = '"& ProductNumberID &"' and ShopNumberID = '"& ShopNumberID &"'"
	rs.open SQL,Conn,1,3
	IF rs.bof and rs.bof Then
	Else
	Rs("LookCount") = Rs("LookCount")+1
	Rs.UpDate
	ProductName         = Rs("ProductName")
	Goods_Key           = Rs("Goods_Key")
	Brand               = Rs("Brand")
	Unit                = Rs("Unit")
	Spec                = Rs("Spec")
	Content             = Rs("Content")
	Market_Price        = Rs("Market_Price")
	Price               = Rs("Price")
	Trade_Price         = Rs("Trade_Price")
	Surrogate_Price     = Rs("Surrogate_Price")
	Stock               = Rs("Stock")
	LookCount           = Rs("LookCount")
	ClassStr            = Rs("Class")
	ProductPic          = Rs("ProductPic")
	DateTime            = Rs("DateTime")
	Delivered           = Rs("Delivered")
	Fork_out            = Rs("Fork_out")
	NeworOld            = Rs("NeworOld")
	invoice             = Rs("invoice")
	Repair              = Rs("Repair")
	Freight             = Rs("Freight")
	Fashion             = Rs("Fashion")
	In_effect           = Rs("In_effect")
	ShopNumberID        = Rs("ShopNumberID")
	Parameter_depict    = Rs("Parameter_depict")
	EditTime            = Rs("EditTime")
	IF Rs("Commonly")<>"" and Not Isnull(Rs("Commonly")) Then 
	Commonly            = FormatCurrency(Rs("Commonly"))
	Else
	Commonly            = "无"
	End IF

	IF Rs("Express")<>"" and Not Isnull(Rs("Express")) Then 
	Express             = FormatCurrency(Rs("Express"))
	Else
	Express             = "无"
	End IF

	IF Rs("Visits")<>"" and Not Isnull(Rs("Visits")) Then 
	Visits             = FormatCurrency(Rs("Visits"))
	Else
	Visits             = "无"
	End IF
	End IF
	Rs.Close

'===============================================关键词
IF Goods_Key<>"" and not isnull(Goods_Key) then

	Goods_Key = replace(Goods_Key,"	、",",")
	Goods_Key = replace(Goods_Key,"|",",")
	Goods_Key_1 = Split(Trim(Goods_Key), ",")
		For a = 0 to ubound(Goods_Key_1)
			Goods_KeyStr = Goods_KeyStr & "<a href=../../../Search/Search.asp?q="& Goods_Key_1(a) &" target=_blank class=link1>"& Goods_Key_1(a) &"</a>&nbsp;"
		Next

End IF

'=================================================型号
IF Spec<>"" and not isnull(Spec) then

	Spec = replace(Spec,"、",",")
	Spec = replace(Spec,"|",",")
	Spec_1 = Split(Trim(Spec), ",")
		For a = 0 to ubound(Spec_1)
			SpecStr = SpecStr & "<a href=../../../Search/Search.asp?q="& Spec_1(a) &" target=_blank class=link1>"& Spec_1(a) &"</a>&nbsp;"
		Next

End IF

'=================================================销售方式
IF Fashion<>"" and not isnull(Fashion) then

	Fashion_1 = Split(Trim(Fashion), ",")
		For a = 0 to ubound(Fashion_1)
			FashionStr = FashionStr &"<a href=../../../Search/Search.asp?q="& ProductName &"&F="& Trim(Fashion_1(a)) &" target=_blank class=link1>"& Trim(Fashion_1(a)) &"</a>&nbsp;"
		Next

End IF

'=================================================支付方式
IF Fork_out<>"" and not isnull(Fork_out) then

	Fork_out_1 = Split(Trim(Fork_out), ",")
		For a = 0 to ubound(Fork_out_1)
			Fork_outStr = Fork_outStr &"<a href=../../../Search/Search.asp?q="& ProductName &"&FO="& Trim(Fork_out_1(a)) &" target=_blank class=link1>"& Trim(Fork_out_1(a)) &"</a>&nbsp;"
		Next

End IF
%>
<table width="96%" border="0" align="left" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="40" align="center"><font size="3"><strong><%=ProductName%></strong></font></td>
  </tr>
  <tr> 
    <td align="center"> <hr width="96%" size="1" color="#cccccc" noshade></td>
  </tr>
  <tr> 
    <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="50%" align="center"> <table width="200" height="200" border="0" cellpadding="0" cellspacing="1" bgcolor="eeeeee">
              <tr> 
                <td align="center" valign="middle" bgcolor="ffffff"> 
                  <%

if ProductPic <> "" then

	set fso = CreateObject("Scripting.FileSystemObject")

	ProductPicFile   = Server.MapPath("../../../") &"\"& Trim(ProductPic)

		If not Fso.FileExists(ProductPicFile) then
		
		ProductPic = false
		
		end if
		
    Set fso = Nothing

else

	ProductPic = false

end if

if ProductPic = false then
%>
                  <font color="#999999">没有图片</font> 
                  <%
else
%>
                  <A href="<%=WebURL%>/<%=ProductPic%>" target="_blank"><img src="<%=ViewImageFile%>?w=200&h=200&picUrl=<%=ThenURLName%><%=ProductPic%>" alt="<%=ProductName%>的商品图片" name="ProductPic" border="0"></a> 
                  <%end if%>
                </td>
              </tr>
            </table></td>
          <td width="50%"><table width="250" border="0" cellspacing="0" cellpadding="3">
              <%IF Market_Price > 0 Then%>
              <tr> 
                <td width="31%" height="25" align="right">市 场 价:</td>
                <td width="69%" height="25"><a title="商品:<%=ProductName%>的价格"><s><strong><%=FormatCurrency(Market_Price)%></strong></s></a></td>
              </tr>
              <%End IF%>
              <%IF Price > 0 Then%>
              <tr> 
                <td height="25" align="right">零 售 价:</td>
                <td width="69%" height="25"><a title="商品:<%=ProductName%>的价格" class="TEXT_11"><strong><%=FormatCurrency(Price)%></strong></a></td>
              </tr>
              <%End IF%>
              <%IF Trade_Price > 0 Then%>
              <tr> 
                <td height="25" align="right">批 发 价:</td>
                <td width="69%" height="25"><a title="商品:<%=ProductName%>的价格" class="TEXT_11"><strong><%=FormatCurrency(Trade_Price)%></strong></a></td>
              </tr>
              <%End IF%>
              <%IF Surrogate_Price > 0 Then%>
              <tr> 
                <td height="25" align="right">代 理 价:</td>
                <td width="69%" height="25"><a title="商品:<%=ProductName%>的价格" class="TEXT_11"><strong><%=FormatCurrency(Surrogate_Price)%></strong></a></td>
              </tr>
              <%End IF%>
              <tr> 
                <td height="25" rowspan="2" align="right"> 配送费用:</td>
                <td height="25"><%=Freight%></td>
              </tr>
              <tr> 
                <td height="25">平邮:<a title="商品:<%=ProductName%>的普通平邮配送费用"></a><a title="商品:<%=ProductName%>的快递配送费用"><font color="ff6600"><%=Commonly%></font></a>&nbsp;快递:<a title="商品:<%=ProductName%>的快递配送费用"></a><a title="商品:<%=ProductName%>的普通平邮配送费用"><font color="ff6600"><%=Express%></font></a><br>送货上门:<a title="商品:<%=ProductName%>的普通平邮配送费用"><font color="ff6600"><%=Visits%></font></a>
                </td>
              </tr>
              <tr> 
                <td height="25" align="right">销售方式:</td>
                <td height="25"><%=FashionStr%></td>
              </tr>
              <tr> 
                <td height="25" align="right">付款方式:</td>
                <td height="25"><%=Fork_outStr%></td>
              </tr>
              <tr> 
                <td height="25" align="right">新旧程度:</td>
                <td height="25"><a href="../../../Search/sSearch.asp?q=<%=NeworOld%>" target="_blank" class="none1" title="搜索互联之光消费引擎上与[<%=NeworOld%>]的相关商品"><%=NeworOld%></a></td>
              </tr>
              <tr> 
                <td height="25" align="right">商品数量:</td>
                <td height="25"><%=Stock%></td>
              </tr>
              <tr> 
                <td height="25" align="right">浏 览 量:</td>
                <td height="25"><%=LookCount%> </td>
              </tr>
              <tr> 
                <td height="25" align="right">有 效 期:</td>
                <td height="25"><%=Year(In_effect)%>年<%=Month(In_effect)%>月<%=Day(In_effect)%>日</td>
              </tr>
            </table></td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="50%" height="40" align="center"> 
            <%if ProductPic <> false then%>
            <a href="<%=WebURL%>/<%=ProductPic%>" target="_blank"><img src="images/i_31.gif" width="52" height="22" border="0"></a> 
            <%end if%>
          </td>
          <td width="50%" align="center"><a href="javascript:;" onClick="javascript:window.open('../../../OrderForm/Order.asp?Makking=add&ProductNumberID=<%=ProductNumberID%>&ShopNumberID=<%=ShopNumberID%>','Order','width=660,height=500,toolbar=yes, status=no, menubar=no, resizable=no, scrollbars=yes');"><img src="images/i_34.gif" width="52" height="22" border="0"></a>&nbsp;&nbsp;<a href="javascript:;" onClick="javascript:window.open('../../../LeaveWord/Asking.asp?ProductNumberID=<%=ProductNumberID%>','Asking','width=660,height=500,toolbar=yes, status=no, menubar=no, resizable=no, scrollbars=yes');"><img src="images/i_36.gif" width="52" height="22" border="0"></a>&nbsp;&nbsp;<a href="javascript:;" onClick="javascript:window.open('../../../OrderForm/House.asp?Makking=add&ProductNumberID=<%=ProductNumberID%>','House','width=660,height=500,toolbar=yes, status=no, menubar=no, resizable=no, scrollbars=yes');"><img src="images/i_37.gif" width="52" height="22" border="0"></a></td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="4" bgcolor="#E7E7E7"></td>
        </tr>
      </table>
	        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="25"><Span class="text_Title"><strong>商品描述:</strong></Span></td>
          <td align="right"><a href="#">top</a></td>
        </tr>
      </table>
      <table width="100%" border="0" cellpadding="5" cellspacing="0">
        <tr> 
          <td valign="top" style="word-break:break-all"> <%=HTMLEncodeStr(Content)%></td>
        </tr>
      </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="4" bgcolor="#E7E7E7"></td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="25"><Span class="text_Title"><strong>相关参数:</strong></Span></td>
          <td align="right"><a href="#">top</a></td>
        </tr>
      </table>
      <table width="100%" border="0" cellpadding="5" cellspacing="0">
        <tr> 
          <td valign="top" style="word-break:break-all"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="50%" height="25">关 键 词:<%=Goods_KeyStr%></td>
                <td width="50%" height="25">更 新:<%=Year(EditTime)%>年<%=Month(EditTime)%>月<%=Day(EditTime)%>日<%=Hour(EditTime)%>时<%=Minute(EditTime)%>分<%=Second(EditTime)%>秒</td>
              </tr>
              <tr> 
                <td height="25">商品品牌:<a href=../../../Search/Search.asp?q=<%=Brand%> target=_blank class=none1><%=Brand%></a></td>
                <td width="50%" height="25">保 修:<a href="../../../Search/sSearch.asp?q=<%=Repair%>" target="_blank" class="none1" title="搜索互联之光消费引擎上与[<%=Repair%>]的相关商品"><%=Repair%></a></td>
              </tr>
              <tr> 
                <td height="25">商品单位:<a href="../../../Search/sSearch.asp?q=<%=Unit%>" target="_blank" class="none1" title="搜索互联之光消费引擎上与[<%=Unit%>]的相关商品"><%=Unit%></a></td>
                <td width="50%" height="25">发 票:<a href="../../../Search/sSearch.asp?q=<%=invoice%>" target="_blank" class="none1" title="搜索互联之光消费引擎上与[<%=invoice%>]的相关商品"><%=invoice%></a></td>
              </tr>
              <tr> 
                <td height="25">商品规格:<%=SpecStr%></td>
                <td width="50%" height="25">编 号:<%=ProductNumberID%></td>
              </tr>
              <tr> 
                <td height="25" colspan="2">相关描述:<%=HTMLEncodeStr(Parameter_depict)%></td>
              </tr>
            </table></td>
        </tr>
      </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="4" bgcolor="#E7E7E7"></td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="25"><Span class="text_Title"><strong>买卖交流:&nbsp;&nbsp;<a href="javascript:;" onClick="javascript:window.open('<%=WebURL%>/LeaveWord/Asking.asp?ProductNumberID=<%=ProductNumberID%>','Asking','width=660,height=500,toolbar=yes, status=no, menubar=no, resizable=no, scrollbars=yes');" Class="link1">向卖家提问</a></strong></Span></td>
          <td align="right"><a href="#">top</a></td>
        </tr>
      </table>
      <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td align="center" valign="middle" style="word-break:break-all"> <IFRAME frameBorder=0 id=ask name=ask src="../../../LeaveWord/Ask.asp?ID=<%=ProductNumberID%>" style="VISIBILITY: inherit; WIDTH: 100%; Z-INDEX: 0"></IFRAME>	
          </td>
        </tr>
      </table></td>
  </tr>
</table>

⌨️ 快捷键说明

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