<!--#include file="../Start.asp"-->
<!--#include file="Channel_Config.asp"-->
<!--#include file="../Include/PowerEasy.Cache.asp"-->
<!--#include file="../Include/PowerEasy.Common.Front.asp"-->
<!--#include file="../Include/PowerEasy.Channel.asp"-->
<!--#include file="../Include/PowerEasy.Class.asp"-->
<%
Dim tProductID, ProductID, ProductBer, ProductThumb, ProductType, sProductType, sChkParameters, sFormatDate, UploadFolder
Dim Sql, rs, Strs, i, j, u, Url, arrTempID, strLabel, ProductUrl, LimitNum, TableWidth

tProductID = Replace(Request("ProductID")," ","")
For i = 0 To UBound(Split(tProductID,","))        '过滤URL传递的商品ID中无效的ID，包括SQL注入过滤
	ProductID = ZeroToEmpty(PE_Clng(Split(tProductID,",")(i))) & "," & ProductID
Next

ProductID = FilterArrNull(ProductID, ",")
Const ThumbWidth = 126           '商品缩略图的款
Const ThumbHeight = 88           '商品缩略图的搞
Const MaxCompare = 5             '最多一起比较的商品数量
If UBound(Split(ProductID,",")) < 1 or UBound(Split(ProductID,",")) > MaxCompare Then
	Call WriteErrMsg("<br /><li>对比的商品不能少于2个或多于" & MaxCompare & "个</li>", ComeUrl)
	Call CloseConn()
	Response.End
End If
Call GetChannel(ChannelID)
Call ShowCompare()


Sub ShowCompare()
	Sql = "Select ProductID,ProductThumb,ProductName,ProductNum,Price_Market,Price,Price_Member,ProductType,UpdateTime,ProductModel,ProductStandard,ProducerName,TrademarkName,BeginDate,EndDate,Stocks,LimitNum,ProductIntro,SalePromotionType,MinNumber,PresentNumber,PresentID,PresentExp,PresentPoint,PresentMoney,ProductExplain,Unit,ClassID from PE_Product where ProductID in (" &  ProductID & ") and EnableSale=" & PE_True & " and Deleted=" & PE_False
	Set rs = Server.CreateObject("ADODB.Recordset")
	rs.open Sql,Conn,1,1
	ProductBer = rs.Recordcount
		For j = 1 To ProductBer
			If rs("ProductThumb") <> "" Then ProductThumb = StrInstallDir & "shop/" & UploadDir & "/" & rs("ProductThumb") Else ProductThumb = StrInstallDir & "images/nopic.gif"
			ClassID = rs("ClassID")
			Call GetClass
			ProductUrl = GetProductUrl(ParentDir,ClassDir, rs("UpdateTime"), rs("ProductID"))
			Session("Compare_Product_" & j) = rs("ProductID") & "," & ProductThumb & "," & rs("ProductName") & "," & rs("ProductNum") & "," & rs("Price_Market") & "," & rs("Price") & "," & rs("Price_Member") & "," & rs("ProductType") & "," & rs("UpdateTime") & "," & rs("ProductModel") & "," & rs("ProductStandard") & "," & rs("ProducerName") & "," & rs("TrademarkName") & "," & rs("BeginDate") & "," & rs("EndDate") & "," & rs("Stocks") & "," & rs("LimitNum") & "," & nohtml(rs("ProductIntro")) & "," & nohtml(rs("SalePromotionType")) & "," & rs("MinNumber") & "," & rs("PresentNumber") & "," & rs("PresentID") & "," & rs("PresentExp") & "," & rs("PresentPoint") & "," & rs("PresentMoney") & "," & nohtml(rs("ProductExplain")) & "," & nohtml(rs("Unit")) & "," & ProductUrl
			rs.MoveNext
		Next
	rs.Close
	Set rs = Nothing

	TableWidth = 80 / ProductBer
	strHtml = strHtml & "<html>" & vbCrLf
	strHtml = strHtml & "<head>" & vbCrLf
	strHtml = strHtml & "<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"" />" & vbCrLf
	strHtml = strHtml & "<title>{$ChannelShortName}对比_{$SiteName}</title>" & vbCrLf
	strHtml = strHtml & "{$Skin_CSS} {$MenuJS}" & vbCrLf
	strHtml = strHtml & "<style type=""text/css"">" & vbCrLf
	strHtml = strHtml & "<!--" & vbCrLf
	strHtml = strHtml & ".inps,.inp{height:12px;width:12px;line-height:14px;overflow:hidden;border:#075BA3 solid 1px;background:#D1E6F7;color:#075BA3; cursor:pointer}" & vbCrLf
	strHtml = strHtml & ".inp{float:left;margin:2px 5px 0 0}" & vbCrLf
	strHtml = strHtml & ".showall a,.showall a:visited{color:#075BA3; text-decoration:underline;font-size:13px}" & vbCrLf
	strHtml = strHtml & ".showall a:hover{text-decoration:none}" & vbCrLf
	strHtml = strHtml & "td{word-break:break-all}" & vbCrLf
	strHtml = strHtml & ".c_title{font-size:14px}" & vbCrLf
	strHtml = strHtml & ".bg1{background:#fff}" & vbCrLf
	strHtml = strHtml & ".bg2{background:#f5f5f5}" & vbCrLf
	strHtml = strHtml & "img{border:0}" & vbCrLf
	strHtml = strHtml & "-->" & vbCrLf
	strHtml = strHtml & "</style>" & vbCrLf
	strHtml = strHtml & "<script type=""text/javascript"">" & vbCrLf
	strHtml = strHtml & "function hiddenGROUP(id){" & vbCrLf
	strHtml = strHtml & "    document.getElementById(id).style.display=""none"";" & vbCrLf
	strHtml = strHtml & "}" & vbCrLf
	strHtml = strHtml & "function showAll(){" & vbCrLf
	strHtml = strHtml & "   var trs=document.getElementsByTagName(""tr"");" & vbCrLf
	strHtml = strHtml & "   for (var i=0;i<trs.length;i++) {" & vbCrLf
	strHtml = strHtml & "         trs[i].style.display="""";" & vbCrLf
	strHtml = strHtml & "   }" & vbCrLf
	strHtml = strHtml & "   document.getElementById(""jiben"").style.display="""";" & vbCrLf
	strHtml = strHtml & "   document.getElementById(""cuxiao"").style.display="""";" & vbCrLf
	strHtml = strHtml & "}" & vbCrLf
	strHtml = strHtml & "</script>" & vbCrLf
	strHtml = strHtml & "</head>" & vbCrLf
	strHtml = strHtml & "<body>" & vbCrLf
	strHtml = strHtml & "{$MY_动易2006海蓝用户顶}" & vbCrLf
	strHtml = strHtml & "<table width=""775"" border=""0"" cellpadding=""5"" align=""center"" cellspacing=""1"" bgcolor=""#D1E6F7"">" & vbCrLf
	strHtml = strHtml & "  <tr>" & vbCrLf
	strHtml = strHtml & "    <td width=""15%"" bgcolor=""#FFFFFF"" align=""center"" class=""showall""><a href=""javascript:showAll();"">显示所有参数</a></td>" & vbCrLf
	For i = 1 To ProductBer
		strHtml = strHtml & "    <td align=""center"" bgcolor=""#FFFFFF""><a href=""" & Split(Session("Compare_Product_" & i),",")(27) & """ target=""_blank""><img src=""" & Split(Session("Compare_Product_" & i),",")(1) & """ width=""" & ThumbWidth & """ height=""" & ThumbHeight & """ /></a></td>" & vbCrLf
	Next
	strHtml = strHtml & "  </tr>" & vbCrLf
	strHtml = strHtml & "  <tr>" & vbCrLf
	strHtml = strHtml & "    <td bgcolor=""#f0f0f0"" align=""center""><strong>" & ChannelShortName & "名称：</strong></td>" & vbCrLf
	For i = 1 To ProductBer
		strHtml = strHtml & "    <td align=""center"" bgcolor=""#FFFFFF"" width=""" & TableWidth & "%""><a href=""" & Split(Session("Compare_Product_" & i),",")(27) & """ target=""_blank"">" & Split(Session("Compare_Product_" & i),",")(2) & "</a></td>" & vbCrLf
	Next
	strHtml = strHtml & "  </tr>" & vbCrLf
	strHtml = strHtml & "  <tr bgcolor=""#f8f8f8"">" & vbCrLf
	strHtml = strHtml & "    <td bgcolor=""#f0f0f0"" align=""center""><strong>编　　号：</strong></td>" & vbCrLf
	For i = 1 To ProductBer
		strHtml = strHtml & "    <td align=""center"" width=""" & TableWidth & "%"">" & Split(Session("Compare_Product_" & i),",")(3) & "</td>" & vbCrLf
	Next
	strHtml = strHtml & "  </tr>" & vbCrLf
	strHtml = strHtml & "  <tr>" & vbCrLf
	strHtml = strHtml & "    <td bgcolor=""#f0f0f0"" align=""center""><strong>" & ChannelShortName & "价格：</strong></td>" & vbCrLf
	For i = 1 To ProductBer
		strHtml = strHtml & "    <td align=""center"" bgcolor=""#FFFFFF"" width=""" & TableWidth & "%"">市场价：<strike>" & FormatNumber(Split(Session("Compare_Product_" & i),",")(4), 2, vbTrue, vbFalse, vbTrue) & "元/" & Split(Session("Compare_Product_" & i),",")(26) & "</strike><br />" & vbCrLf
		strHtml = strHtml & "<font color=""blue"">商城价：" & FormatNumber(Split(Session("Compare_Product_" & i),",")(5), 2, vbTrue, vbFalse, vbTrue) & "元/" & Split(Session("Compare_Product_" & i),",")(26) & "</font><br />" & vbCrLf
		strHtml = strHtml & "会员价：" & FormatNumber(Split(Session("Compare_Product_" & i),",")(6), 2, vbTrue, vbFalse, vbTrue) & "元/" & Split(Session("Compare_Product_" & i),",")(26) & "<br />" & vbCrLf
		strHtml = strHtml & "优惠价：" & FormatNumber(Split(Session("Compare_Product_" & i),",")(4), 2, vbTrue, vbFalse, vbTrue) & "元/" & Split(Session("Compare_Product_" & i),",")(26) & "</td>" & vbCrLf
	Next
	strHtml = strHtml & "  </tr>" & vbCrLf
	strHtml = strHtml & "  <tr bgcolor=""#f8f8f8"">" & vbCrLf
	strHtml = strHtml & "    <td bgcolor=""#f0f0f0"" align=""center""><strong>移除" & ChannelShortName & "：</strong></td>" & vbCrLf
	For i = 1 To ProductBer
		strHtml = strHtml & "    <td align=""center"" width=""" & TableWidth & "%""><div class=""inps"" onClick=""window.location.href='" & GetUrl(Split(Session("Compare_Product_" & i),",")(0)) & "';"">×</div></td>" & vbCrLf
	Next
	strHtml = strHtml & "  </tr>" & vbCrLf
	strHtml = strHtml & "  <tr>" & vbCrLf
	strHtml = strHtml & "    <td bgcolor=""#f0f0f0"">&nbsp;</td>" & vbCrLf
	For i = 1 To ProductBer
		strHtml = strHtml & "    <td align=""center"" bgcolor=""#FFFFFF"" width=""" & TableWidth & "%""><a href=""" & StrInstallDir & "Shop/ShoppingCart.asp?Action=Add&ProductID=" & Split(Session("Compare_Product_" & i),",")(0) & """ target=""_blank""><img src=""" & StrInstallDir & "Shop/images/buy.gif"" /></a></td>" & vbCrLf
	Next
	strHtml = strHtml & "  </tr>" & vbCrLf
	strHtml = strHtml & "  <tbody id=""jiben""><tr>" & vbCrLf
	strHtml = strHtml & "    <td colspan=""" & ProductBer + 1 & """ bgcolor=""#ffffff""><div class=""inp"" onclick=""javascript:hiddenGROUP('jiben');"">×</div><strong><div class=""c_title"">基本信息</div></strong></td>" & vbCrLf
	strHtml = strHtml & "  </tr>" & vbCrLf
	strHtml = strHtml & "  <tr id=""s001"" bgcolor=""#f8f8f8"">" & vbCrLf
	strHtml = strHtml & "    <td bgcolor=""#f0f0f0""><div class=""inp"" onclick=""javascript:hiddenGROUP('s001');"">×</div><strong>" & ChannelShortName & "属性：</strong></td>" & vbCrLf
	For i = 1 To ProductBer
		ProductType = Split(Session("Compare_Product_" & i),",")(7)
		If ProductType = 1 Then sProductType = "正常"
		If ProductType = 2 Then sProductType = "涨价"
		If ProductType = 3 Then sProductType = "降价"
		If ProductType = 3 Then sProductType = "礼品"
		strHtml = strHtml & "    <td align=""center"" width=""" & TableWidth & "%"">" & sProductType & ChannelShortName & "</td>" & vbCrLf
	Next
	strHtml = strHtml & "  </tr>" & vbCrLf
	strHtml = strHtml & "  <tr id=""s002"">" & vbCrLf
	strHtml = strHtml & "    <td bgcolor=""#f0f0f0""><div class=""inp"" onclick=""javascript:hiddenGROUP('s002');"">×</div><strong>上架时间：</strong></td>" & vbCrLf
	For i = 1 To ProductBer
		strHtml = strHtml & "    <td align=""center"" bgcolor=""#FFFFFF"" width=""" & TableWidth & "%"">" & FormatDate(Split(Session("Compare_Product_" & i),",")(8), "年", "月", "日") & "</td>" & vbCrLf
	Next
	strHtml = strHtml & "  </tr>" & vbCrLf
	strHtml = strHtml & "  <tr id=""s003"" bgcolor=""#f8f8f8"">" & vbCrLf
	strHtml = strHtml & "    <td bgcolor=""#f0f0f0""><div class=""inp"" onclick=""javascript:hiddenGROUP('s003');"">×</div><strong>" & ChannelShortName & "型号：</strong></td>" & vbCrLf
	For i = 1 To ProductBer
		strHtml = strHtml & "    <td align=""center"" width=""" & TableWidth & "%"">" & ChkParameters(Split(Session("Compare_Product_" & i),",")(9)) & "</td>" & vbCrLf
	Next
	strHtml = strHtml & "  </tr>" & vbCrLf
	strHtml = strHtml & "  <tr id=""s004"">" & vbCrLf
	strHtml = strHtml & "    <td bgcolor=""#f0f0f0""><div class=""inp"" onclick=""javascript:hiddenGROUP('s004');"">×</div><strong>" & ChannelShortName & "规格：</strong></td>" & vbCrLf
	For i = 1 To ProductBer
		strHtml = strHtml & "    <td align=""center"" bgcolor=""#FFFFFF"" width=""" & TableWidth & "%"">" & ChkParameters(Split(Session("Compare_Product_" & i),",")(10)) & "</td>" & vbCrLf
	Next
	strHtml = strHtml & "  </tr>" & vbCrLf
	strHtml = strHtml & "  <tr id=""s005"" bgcolor=""#f8f8f8"">" & vbCrLf
	strHtml = strHtml & "    <td bgcolor=""#f0f0f0""><div class=""inp"" onclick=""javascript:hiddenGROUP('s005');"">×</div><strong>生 产 商：</strong></td>" & vbCrLf
	For i = 1 To ProductBer
		strHtml = strHtml & "    <td align=""center"" width=""" & TableWidth & "%"">" & ChkParameters(Split(Session("Compare_Product_" & i),",")(11)) & "</td>" & vbCrLf
	Next
	strHtml = strHtml & "  </tr>" & vbCrLf
	strHtml = strHtml & "  <tr id=""s006"">" & vbCrLf
	strHtml = strHtml & "    <td bgcolor=""#f0f0f0""><div class=""inp"" onclick=""javascript:hiddenGROUP('s006');"">×</div><strong>品牌/商标：</strong></td>" & vbCrLf
	For i = 1 To ProductBer
		strHtml = strHtml & "    <td align=""center"" bgcolor=""#FFFFFF"" width=""" & TableWidth & "%"">" & ChkParameters(Split(Session("Compare_Product_" & i),",")(12)) & "</td>" & vbCrLf
	Next
	strHtml = strHtml & "  </tr>" & vbCrLf
	strHtml = strHtml & "  <tr id=""s007"" bgcolor=""#f8f8f8"">" & vbCrLf
	strHtml = strHtml & "    <td bgcolor=""#f0f0f0""><div class=""inp"" onclick=""javascript:hiddenGROUP('s007');"">×</div><strong>服务期限：</strong></td>" & vbCrLf
	For i = 1 To ProductBer
		strHtml = strHtml & "    <td align=""center"" width=""" & TableWidth & "%"">" & FormatDate(Split(Session("Compare_Product_" & i),",")(13), "年", "月", "日") & " - " & FormatDate(Split(Session("Compare_Product_" & i),",")(14), "年", "月", "日") & "</td>" & vbCrLf
	Next
	strHtml = strHtml & "  </tr>" & vbCrLf
	strHtml = strHtml & "  <tr id=""s008"">" & vbCrLf
	strHtml = strHtml & "    <td bgcolor=""#f0f0f0""><div class=""inp"" onclick=""javascript:hiddenGROUP('s008');"">×</div><strong>库存数量</strong>：</td>" & vbCrLf
	For i = 1 To ProductBer
		strHtml = strHtml & "    <td align=""center"" bgcolor=""#FFFFFF"" width=""" & TableWidth & "%"">" & ChkParameters(Split(Session("Compare_Product_" & i),",")(15)) & "</td>" & vbCrLf
	Next
	strHtml = strHtml & "  </tr>" & vbCrLf
	strHtml = strHtml & "  <tr id=""s009"" bgcolor=""#f8f8f8"">" & vbCrLf
	strHtml = strHtml & "    <td bgcolor=""#f0f0f0""><div class=""inp"" onclick=""javascript:hiddenGROUP('s009');"">×</div><strong>限购数量</strong>：</td>" & vbCrLf
	For i = 1 To ProductBer
	LimitNum = ChkParameters(Split(Session("Compare_Product_" & i),",")(16))
	If LimitNum = 0 Then LimitNum = "不限"
		strHtml = strHtml & "    <td align=""center"" width=""" & TableWidth & "%"">" & LimitNum & "</td>" & vbCrLf
	Next
	strHtml = strHtml & "  </tr>" & vbCrLf
	strHtml = strHtml & "  <tr id=""s010"">" & vbCrLf
	strHtml = strHtml & "    <td bgcolor=""#f0f0f0""><div class=""inp"" onclick=""javascript:hiddenGROUP('s010');"">×</div><strong>" & ChannelShortName & "简介</strong>：</td>" & vbCrLf
	For i = 1 To ProductBer
		strHtml = strHtml & "    <td align=""center"" bgcolor=""#FFFFFF"" width=""" & TableWidth & "%"">" & ChkParameters(Split(Session("Compare_Product_" & i),",")(17)) & "</td>" & vbCrLf
	Next
	strHtml = strHtml & "  </tr>" & vbCrLf
	strHtml = strHtml & "  <tr id=""s015"" bgcolor=""#f8f8f8"">" & vbCrLf
	strHtml = strHtml & "    <td bgcolor=""#f0f0f0""><div class=""inp"" onclick=""javascript:hiddenGROUP('s015');"">×</div><strong>" & ChannelShortName & "说明：</strong></td>" & vbCrLf
	For i = 1 To ProductBer
		strHtml = strHtml & "    <td align=""center"" width=""" & TableWidth & "%"">" & ChkParameters(Split(Session("Compare_Product_" & i),",")(25)) & "</td>" & vbCrLf
	Next
	strHtml = strHtml & "  </tr></tbody>" & vbCrLf
	strHtml = strHtml & "  <tbody id=""cuxiao""><tr>" & vbCrLf
	strHtml = strHtml & "    <td colspan=""" & ProductBer + 1 & """ bgcolor=""#ffffff""><div class=""inp"" onclick=""javascript:hiddenGROUP('cuxiao');"">×</div><strong><div class=""c_title"">" & ChannelShortName & "促销</div></strong></td>" & vbCrLf
	strHtml = strHtml & "  </tr>" & vbCrLf
	strHtml = strHtml & "  <tr id=""s011"" bgcolor=""#f8f8f8"">" & vbCrLf
	strHtml = strHtml & "    <td bgcolor=""#f0f0f0""><div class=""inp"" onclick=""javascript:hiddenGROUP('s011');"">×</div><strong>促销方案：</strong></td>" & vbCrLf
	For i = 1 To ProductBer
		strHtml = strHtml & "    <td align=""center"" width=""" & TableWidth & "%"">" & Marketing(Split(Session("Compare_Product_" & i),",")(18),Split(Session("Compare_Product_" & i),",")(19), Split(Session("Compare_Product_" & i),",")(20), Split(Session("Compare_Product_" & i),",")(21)) & "</td>" & vbCrLf
	Next
	strHtml = strHtml & "  </tr>" & vbCrLf
	strHtml = strHtml & "  <tr id=""s012"">" & vbCrLf
	strHtml = strHtml & "    <td bgcolor=""#f0f0f0""><div class=""inp"" onclick=""javascript:hiddenGROUP('s012');"">×</div><strong>购物积分</strong>：</td>" & vbCrLf
	For i = 1 To ProductBer
		strHtml = strHtml & "    <td align=""center"" bgcolor=""#FFFFFF"" width=""" & TableWidth & "%"">" & ChkParameters(Split(Session("Compare_Product_" & i),",")(22)) & "分</td>" & vbCrLf
	Next
	strHtml = strHtml & "  </tr>" & vbCrLf
	strHtml = strHtml & "  <tr id=""s013"" bgcolor=""#f8f8f8"">" & vbCrLf
	strHtml = strHtml & "    <td bgcolor=""#f0f0f0""><div class=""inp"" onclick=""javascript:hiddenGROUP('s013');"">×</div><strong>赠送" & PointName & "</strong>：</td>" & vbCrLf
	For i = 1 To ProductBer
		strHtml = strHtml & "    <td align=""center"" width=""" & TableWidth & "%"">" & ChkParameters(Split(Session("Compare_Product_" & i),",")(23)) & PointUnit & "</td>" & vbCrLf
	Next
	strHtml = strHtml & "  </tr>" & vbCrLf
	strHtml = strHtml & "  <tr id=""s014"">" & vbCrLf
	strHtml = strHtml & "    <td bgcolor=""#f0f0f0""><div class=""inp"" onclick=""javascript:hiddenGROUP('s014');"">×</div><strong>返还现金券</strong>：</td>" & vbCrLf
	For i = 1 To ProductBer
		strHtml = strHtml & "    <td align=""center"" bgcolor=""#FFFFFF"" width=""" & TableWidth & "%"">" & ChkParameters(Split(Session("Compare_Product_" & i),",")(24)) & "</td>" & vbCrLf
	Next
	strHtml = strHtml & "  </tr>" & vbCrLf
	strHtml = strHtml & "</table>" & vbCrLf
	strHtml = strHtml & "{$MY_动易2006海蓝网页底}"
	Call ReplaceCommonLabel
	strHtml = Replace(strHtml, "{$ShowPath}", "您现在的位置： <a href=""" & SiteUrl & """>" & SiteName & "</a> >> <a href=""" & ChannelUrl & """>" & ChannelName & "</a> >> " & ChannelShortName & "对比")
	Response.Write strHtml
End Sub


Function ChkParameters(Str)    '检测传入的字符是否为空
	sChkParameters = Str
	If Str = "" Then sChkParameters = "<font color=""red"">/</font>"
	ChkParameters = sChkParameters
End Function


Function FormatDate(Str, sYear, sMonth, sDay)    '格式化日期
	sFormatDate = Str
	If IsDate(Str) Then
		sFormatDate = Year(Str) & sYear & Month(Str) & sMonth & Day(Str) & sDay
	End If
	FormatDate = sFormatDate
End Function


Function Marketing(Str, MinNumber, PresentNumber, sPresentID)    '得到商品的促销方式（不赠送产品）
	If PE_Clng(Str) = 0 Then Marketing = "不促销"
	If PE_Clng(Str) = 1 Then Marketing = "买 " & MinNumber & " 件送 " & PresentNumber & " 件同样的" & ChannelShortName
	If PE_Clng(Str) = 2 Then Marketing = GetPresent(sPresentID, MinNumber, PresentNumber, 1)
	If PE_Clng(Str) = 3 Then Marketing = "买就送" & PresentNumber & "件同样的" & ChannelShortName
	If PE_Clng(Str) = 4 Then Marketing = GetPresent(sPresentID, MinNumber, PresentNumber, 2)
End Function


Function GetPresent(iPresentID, sMinNumber, sPresentNumber, ShowType)    '得到商品的促销方式（赠送产品）
	Set Strs = Conn.Execute("Select ProductName from PE_Product where ProductID=" & iPresentID & " and EnableSale=" & PE_True & " and Deleted=" & PE_False)
		If Not Strs.Eof and Strs.Bof Then
			If ShowType = 1 Then
				GetPresent = "买 " & sMinNumber & " 件送 " & sPresentNumber & " 件" & Strs("ProductName")
			Else
				GetPresent = "买就送 " & sPresentNumber & " 件" & Strs("ProductName")
			End If
		Else
			GetPresent = "不促销"
		End If
	Set Strs = Nothing
End Function


Function GetUrl(noID)    '得到移除商品的URL
	Url = Request.ServerVariables("URL") & "?"
	arrTempID = Split(ProductID,",")
	For u = 0 To UBound(arrTempID)
		If arrTempID(u) <> noID	Then Url = Url & "ProductID=" & arrTempID(u) & "&"
	Next
	If Right(Url, 1) = "&" Then
        Url = Left(Url, Len(Url) - 1)
    End If
	GetUrl = Url
End Function

Call CloseConn()
%>
</body>
</html>