<% '************************************************************** ' Software name: PowerEasy SiteWeaver ' Web: http://www.powereasy.net ' Copyright (C) 2005-2008 佛山市动易网络科技有限公司 版权所有 '************************************************************** PageTitle = "品牌信息" Dim strtmp, strList, aValue Dim TrademarkName, i Dim rsTrademark, sqlTrademark, ProducerID Dim TimeData strFileName = "ShowTrademark.asp?ChannelID=" & ChannelID TimeData = Trim(Request("Data")) If TimeData = "" Or Not (IsDate(TimeData)) Then TimeData = "0" Else TimeData = FormatDateTime(TimeData, 2) strFileName = strFileName & "&Data=" & TimeData End If MaxPerPage = 20 strNavPath = strNavPath & strNavLink & " " & PageTitle TrademarkName = Trim(Request("TrademarkName")) If TrademarkName = "" Then Call WriteErrMsg("请指定要查看的品牌名称", ComeUrl) Response.End End If TrademarkName = ReplaceBadChar(TrademarkName) strFileName = strFileName & "&TrademarkName=" & TrademarkName '取频道参数 Call GetChannel(ChannelID) sqlTrademark = "select * from PE_Trademark where TrademarkName='" & TrademarkName & "' and ChannelID=" & ChannelID & " and Passed=" & PE_True Set rsTrademark = Server.CreateObject("ADODB.Recordset") rsTrademark.Open sqlTrademark, Conn, 1, 1 If rsTrademark.BOF And rsTrademark.EOF Then rsTrademark.Close Set rsTrademark = Nothing Call WriteErrMsg("找不到指定的厂商", ComeUrl) Response.End End If strHtml = GetTemplate(0, 16, 0) strHtml = Replace(strHtml, "{$ShowName}", TrademarkName) Call ReplaceCommonLabel strHtml = Replace(strHtml, "{$PageTitle}", SiteTitle & " >> " & PageTitle) strHtml = Replace(strHtml, "{$ShowPath}", strNavPath) strHtml = Replace(strHtml, "{$MenuJS}", GetMenuJS("", False)) strHtml = Replace(strHtml, "{$Skin_CSS}", GetSkin_CSS(0)) If ChannelID > 0 Then strHtml = Replace(strHtml, "{$ShowList}", "ShowTrademark.asp?Action=List&ChannelID=" & ChannelID) Else strHtml = Replace(strHtml, "{$ShowList}", "ShowTrademark.asp?Action=List") End If ProducerID = rsTrademark("ProducerID") If rsTrademark("TrademarkPhoto") = "" Or IsNull(rsTrademark("TrademarkPhoto")) Then strHtml = Replace(strHtml, "{$ShowPhoto}", "") Else strHtml = Replace(strHtml, "{$ShowPhoto}", "") End If If rsTrademark("TrademarkType") = 1 Then strHtml = Replace(strHtml, "{$ShowType}", XmlText("ShowSource", "ShowTrademark/TrademarkType1", "大陆品牌")) ElseIf rsTrademark("TrademarkType") = 2 Then strHtml = Replace(strHtml, "{$ShowType}", XmlText("ShowSource", "ShowTrademark/TrademarkType2", "港台品牌")) ElseIf rsTrademark("TrademarkType") = 3 Then strHtml = Replace(strHtml, "{$ShowType}", XmlText("ShowSource", "ShowTrademark/TrademarkType3", "日韩品牌")) ElseIf rsTrademark("TrademarkType") = 4 Then strHtml = Replace(strHtml, "{$ShowType}", XmlText("ShowSource", "ShowTrademark/TrademarkType4", "欧美品牌")) Else strHtml = Replace(strHtml, "{$ShowType}", XmlText("ShowSource", "ShowTrademark/TrademarkType5", "其他品牌")) End If strHtml = PE_Replace(strHtml, "{$ShowIntro}", rsTrademark("TrademarkIntro") & "") regEx.Pattern = "\{\$ShowProductList\((.*?)\)\}" Set Matches = regEx.Execute(strHtml) For Each Match In Matches aValue = TrademarkName & "," & ChannelID & "," & ChannelDir & "," & UploadDir & "," & Replace(Match.SubMatches(0), Chr(34), "") strList = GetProductList(aValue, 2) strHtml = Replace(strHtml, Match.value, strList) Next If InStr(strHtml, "{$ShowPage}") > 0 Then strHtml = Replace(strHtml, "{$ShowPage}", ShowPage(strFileName, totalPut, MaxPerPage, CurrentPage, True, True, XmlText("ShowSource", "ShowTrademark/TrademarkItem", "个商品"), False)) If InStr(strHtml, "{$ShowPage_en}") > 0 Then strHtml = Replace(strHtml, "{$ShowPage_en}", ShowPage_en(strFileName, totalPut, MaxPerPage, CurrentPage, True, True, XmlText("ShowSource", "ShowTrademark/TrademarkItem", "个商品"), False)) '取该品牌所属厂商名称 Set rsTrademark = Conn.Execute("select ProducerID,ProducerName from PE_Producer Where ProducerID= " & ProducerID) If rsTrademark.BOF And rsTrademark.EOF Then strtmp = "" Else strtmp = ("" & rsTrademark("ProducerName") & "") End If strHtml = Replace(strHtml, "{$ShowProducerName}", strtmp) Response.Write strHtml rsTrademark.Close Set rsTrademark = Nothing Set PE_Content = Nothing Call CloseConn %>