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

📄 classproduct.asp

📁 依蓝旅游网站管理系统Elan2008.SP2
💻 ASP
📖 第 1 页 / 共 5 页
字号:
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$ShowDiscount}", DiscountHTML)	
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$ShowConfirmType}", EL_Common.GetConfirmType())

	  Response.Write HTML
   End Sub        
   
   Public Sub Search()
      Dim SearchCmd, rsSearch, RowCount, i, StrPath
	  Dim PageSizes, PageCounts, TotalRowCount
	  Dim Search_SightInfo, Search_Days, Search_Keyword
	  
	  If IsDate(Session("EL_LastSearchDateTime")) Then
	     If DateDiff("s", Session("EL_LastSearchDateTime"), Now()) < SearchInterval Then
		    EL_Common.ShowErrorMsg(EL_Common.RegExpStaticLabel(EL_Common.Lang("Search.Error1", "为节省系统资源,请在{$SearchInterval}秒后再执行搜索……"), "{$SearchInterval}", SearchInterval))
			Exit Sub
		 End If
	  End If
	  
	  ClassID = EL_Common.ELRequest("ClassID", 2)
	  Search_SightInfo = EL_Common.ELRequest("SightInfo", 3)
	  Search_Days = EL_Common.ELRequest("Days", 2)
	  Search_Keyword = EL_Common.ELRequest("Keyword", 3)
	  
	  Call EL_Common.InitCommand(SearchCmd, "EL_SP_SearchProduct")
	  With SearchCmd
	     .Parameters.Append .CreateParameter("RETURN", 2, 4)
		 .Parameters.Append .CreateParameter("@ChannelID", 3, 1, 4, ChannelID)
		 .Parameters.Append .CreateParameter("@ClassID", 3, 1, 4, ClassID)
		 .Parameters.Append .CreateParameter("@SightInfo", 200, 1, 255, Search_SightInfo)
		 .Parameters.Append .CreateParameter("@Days", 3, 1, 4, Search_Days)
		 .Parameters.Append .CreateParameter("@Keyword", 200, 1, 255, Search_Keyword)
		 .Parameters.Append .CreateParameter("@OrderType", 3, 1, 4, 9)
		 .Parameters.Append .CreateParameter("@CurrentPage", 3, 1, 4, CurrentPage)
		 .Parameters.Append .CreateParameter("@PageSizes", 3, 2, 4)
		 .Parameters.Append .CreateParameter("@TotalRowCount", 3, 2, 4)
		 .Parameters.Append .CreateParameter("@PageCount", 3, 2, 4)
		 .Parameters.Append .CreateParameter("@RowCount", 3, 2, 4)
		 Set rsSearch = .Execute()
	  End With
	  rsSearch.Close()
	  PageSizes = SearchCmd(8)
	  TotalRowCount = SearchCmd(9)
	  PageCounts = SearchCmd(10)
	  RowCount = SearchCmd(11)  
	  
	  HTML = EL_Common.Template(ChannelID, 5, 0)
	  
	  HTML = EL_Common.ReplaceCommonLabels(HTML)  
	  
	  Dim SearchTitle
	  SearchTitle = EL_Common.RegExpStaticLabel(EL_Common.Lang("Search.Title", "{$ItemName}搜索"), "{$ItemName}", EL_Channel.ItemName)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$PageTitle}", EL_Common.Join2String(SearchTitle, SiteTitle, EL_Common.TitleDivide))
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$DefaultSkin}", EL_Common.Skin(ChannelID, 0, 0))
	  
	  StrPath = EL_Common.Lang("BaseConfig.Path", "&nbsp;&gt;&gt;&nbsp;")
	  EL_Common.ShowPath = EL_Common.ShowPath & StrPath &"<a href='"& InstallDir & EL_Channel.ChannelDir &"/Index.asp'>"& EL_Channel.ChannelName &"</a>"& StrPath & SearchTitle
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$ShowPath}", EL_Common.ShowPath)
	  
	  HTML = ChannelCommonLabels(HTML)
	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Search_SightInfo}", Search_SightInfo)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Search_Days}", Search_Days)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Search_Keyword}", Search_Keyword)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Search_ClassID}", ClassID)
	  
	  
	  Dim Match, Matches, ReturnString
	  Dim TempString, MatchString, NoList, PriceIcon
	  
	  PriceIcon = EL_Common.Lang("Product.Price.Icon", "")
	  CommonRegExp.Pattern = "\[ArrSearchResult\][\w\W]*\[\/ArrSearchResult\]"        
      Set Matches = CommonRegExp.Execute(HTML)
	  
	  NoList = EL_Common.RegExpStaticLabel(EL_Common.Lang("Search.NoList", "<p>&nbsp;</p>搜索不到任何{$ItemName}<p>&nbsp;</p>"), "{$ItemName}", EL_Channel.ItemName)
	  If RowCount = 0 Then
	     For Each Match in Matches	
		    HTML = Replace(HTML, Match.Value, NoList)
         Next
		 HTML = EL_Common.RegExpStaticLabel(HTML, "{$ShowPage}", "")
	  Else
		 rsSearch.Open()
		 For Each Match in Matches
			rsSearch.MoveFirst
			MatchString = Match.Value
			MatchString = EL_Common.ReplaceText(MatchString, "\[ArrSearchResult\]", "")
			MatchString = EL_Common.ReplaceText(MatchString, "\[\/ArrSearchResult\]", "")
			ReturnString = ""
			Dim ItemHTML
		    For i = 1 To RowCount
			   ItemHTML = MatchString
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_ProductID}", rsSearch("ProductID"))
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_ProductName}", EL_Common.HTMLEncode(rsSearch("ProductName")))
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_Days}", EL_Common.HTMLEncode(rsSearch("Days")))
			   If rsSearch("Commended") Then
			      ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_Commend}", "<img src='"& InstallDir & EL_Channel.ChannelDir &"/Images/Commend.gif' border=0>")
			   Else
			      ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_Commend}", "")
			   End If
			   
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_BookPrice}", PriceIcon & rsSearch("Price"))
			   
			   If Trim(rsSearch("DefaultPictrue")) = "" Then
			      ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_DefaultPictrue}", "")
			   Else
			      ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_DefaultPictrue}", "<img src='"& EL_Common.PictrueURL(rsSearch("DefaultPictrue"), EL_Channel.FilePath) &"' width=110 height=80 border=0>")
			   End If
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_Content}", EL_Common.GetTopic(EL_Common.RemoveHTML(rsSearch("Intro")),  EL_Common.Lang("Product.ContentLen", 250)))
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_SightInfo}", AroundInfoURL(rsSearch("ArrSightInfo")))
			   ReturnString = ReturnString & ItemHTML
			   If i<RowCount Then rsSearch.MoveNext
		    Next
			HTML = Replace(HTML, Match.Value, ReturnString)	    
		 Next		 
		 rsSearch.Close()
		 
		 Dim PageHTML
		 PageHTML = EL_Common.Lang("BaseConfig.ShowPage", "")
		 PageHTML = EL_Common.ReplaceText(PageHTML, "\{\$PageList\}", EL_Common.ShowPage(URLParameters, CurrentPage, PageSizes, PageCounts, TotalRowCount, EL_Channel.ItemName, EL_Channel.ItemUnit))
		 HTML = EL_Common.RegExpStaticLabel(HTML, "{$ShowPage}", PageHTML)
	  End If
	  
	  Set rsSearch = Nothing
	  Set SearchCmd = Nothing
	  
	  HTML = Label_GetProductList(HTML)
	  HTML = Label_GetProductPhoto(HTML)
	  Session("EL_LastSearchDateTime") = Now()
	  Response.Write HTML	  
   End Sub
   
   Public Sub ShowCommend()
      Dim StrCommend
	  ClassID = 0
	  StrCommend = EL_Common.Lang("BaseConfig.Commend", "推荐{$ItemName}")
	  StrCommend = EL_Common.RegExpStaticLabel(StrCommend, "{$ItemName}", EL_Channel.ItemName)
      HTML = EL_Common.Template(ChannelID, 4, 0)
	  HTML = EL_Common.ReplaceCommonLabels(HTML)	
	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$PageTitle}", EL_Common.Join2String(EL_Common.Join2String(StrCommend, EL_Channel.ChannelName, EL_Common.TitleDivide), SiteTitle, EL_Common.TitleDivide))
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$DefaultSkin}", EL_Common.Skin(ChannelID, 0, 0))
	  
	  EL_Common.ShowPath = EL_Common.ShowPath & EL_Common.Lang("BaseConfig.Path", "&nbsp;&gt;&gt;&nbsp;") &"<a href='"& InstallDir & EL_Channel.ChannelDir &"/'>"& EL_Channel.ChannelName &"</a>"& EL_Common.Lang("BaseConfig.Path", "&nbsp;&gt;&gt;&nbsp;") & StrCommend
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$ShowPath}", EL_Common.ShowPath)
	  
	  HTML = ChannelCommonLabels(HTML)
	  
	  HTML = Label_GetProductList(HTML)
	  HTML = Label_GetProductPhoto(HTML)
	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$ShowCommendList}", ProductList(ChannelID, 0, 10, 28, True, 0, False, False, True, 4, 0, 1, 1, 5, True, True, "", "", ""))
	  	  
	  Response.Write HTML
   End Sub      
   
   Public Sub ShowProduct()
      Dim ProductCmd, rsProduct, i, EnableWeek, StrTravelDate
	  Dim ProductID, ProductName, Days, TravelDate, LeastPerson, EndSellDate, ArrSightInfo
	  Dim Intro, PriceIncluded, JoinNotice, SkinID, TemplateID, Content, Price
	  
	  ProductID = EL_Common.ELRequest("ProductID", 2)
	  
	  Call EL_Common.InitCommand(ProductCmd, "EL_SP_GetProductInfo")
	  With ProductCmd
	     .Parameters.Append .CreateParameter("RETURN", 2, 4)
		 .Parameters.Append .CreateParameter("@ProductID", 3, 1, 4, ProductID)
		 .Parameters.Append .CreateParameter("@ChannelID", 3, 1, 4, ChannelID)
		 .Execute()
	  End With
	  If ProductCmd(0) <> 1 Then
	     EL_Common.ShowErrorMsg(EL_Common.RegExpStaticLabel(EL_Common.Lang("BaseConfig.InfoError", "指定{$ItemName}不存在"), "{$ItemName}", EL_Channel.ItemName))
		 Set rsProduct = Nothing
		 Set ProductCmd = Nothing
		 Exit Sub
	  End If
	  Set rsProduct = ProductCmd.Execute()
	  ClassID = rsProduct("ClassID")
	  ProductName = rsProduct("ProductName")
	  Days = rsProduct("Days")
	  TravelDate = rsProduct("TravelDate")
	  LeastPerson = rsProduct("LeastPerson")	  
	  Price = rsProduct("Price")
	  ArrSightInfo = rsProduct("ArrSightInfo")
	  Intro = rsProduct("Intro")
	  Content = rsProduct("Content")
	  PriceIncluded = rsProduct("PriceIncluded")
	  JoinNotice = rsProduct("JoinNotice")
	  SkinID = rsProduct("SkinID")
	  TemplateID = rsProduct("TemplateID")
	  
	  HTML = EL_Common.Template(ChannelID, 3, TemplateID)	
	  
	  HTML = EL_Common.ReplaceCommonLabels(HTML)  
	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$PageTitle}", EL_Common.Join2String(ProductName, SiteTitle, EL_Common.TitleDivide))
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$DefaultSkin}", EL_Common.Skin(ChannelID, ClassID, SkinID))
	  
	  Dim StrPath
	  StrPath = EL_Common.Lang("BaseConfig.Path", "&nbsp;&gt;&gt;&nbsp;")
	  EL_Common.ShowPath = EL_Common.ShowPath & StrPath &"<a href='"& InstallDir & EL_Channel.ChannelDir &"/Index.asp'>"& EL_Channel.ChannelName &"</a>"& EL_Common.GetParentPath(ChannelID, EL_Channel.ChannelDir, ClassID) & StrPath & EL_Common.RegExpStaticLabel(EL_Common.Lang("BaseConfig.Content", "{$ItemName}内容"), "{$ItemName}", EL_Channel.ItemName)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$ShowPath}", EL_Common.ShowPath)
	  
	  HTML = ChannelCommonLabels(HTML)
	  
	  '自定义字段标签
	  Dim FieldCmd, rsField, FieldCount
	  Call EL_Common.InitCommonCmd(FieldCmd, rsField, "EL_Field", "FieldName", "ChannelID="& ChannelID)
	  rsField.Close()
	  FieldCount = FieldCmd(0)
	  If FieldCount = 0 Then
	     Set rsField = Nothing
		 Set FieldCmd = Nothing
	  Else
	     rsField.Open()
		 For i = 1 To FieldCount
		    HTML = EL_Common.RegExpStaticLabel(HTML, "{$"& rsField(0) &"}", rsProduct(rsField(0).value))
			If i<FieldCount Then rsField.MoveNext
		 Next
		 rsField.Close()
		 Set rsField = Nothing
		 Set FieldCmd = Nothing
	  End If	
	  
	  rsProduct.Close()
	  Set rsProduct = Nothing
	  Set ProductCmd = Nothing
	  	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$ProductID}", ProductID)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$ProductName}", ProductName)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Days}", Days)	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$LeastPerson}", LeastPerson)
	  
	  If TravelDate = "-1" Then
	     EnableWeek = ""
		 StrTravelDate = EL_Common.Lang("Product.Week.w0", "天天出发")
	  Else
	     EnableWeek = Replace(TravelDate, "7", "0")
		 Dim ArrTemp
		 ArrTemp = Split(TravelDate, ",")
		 For i = 0 To Ubound(ArrTemp)
		    StrTravelDate = StrTravelDate &" "& EL_Common.Lang("Product.Week.w"& Trim(ArrTemp(i)), ArrTemp(i))
		 Next
	  End If
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$EnableWeek}", EnableWeek)	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$TravelDate}", StrTravelDate)

	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Price}", Price)	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$ArrSightInfo}", AroundInfoURL(ArrSightInfo))
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Intro}", Intro)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Content}", Content) 
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$PriceIncluded}", PriceIncluded)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$JoinNotice}", JoinNotice)
	  	  
	  Dim ProductAction
	  ProductAction = EL_Common.Lang("Product.ProductAction", "")
	  If ProductAction<>"" Then
	     ProductAction = EL_Common.ReplaceText(ProductAction, "\{\$SendCommentURL\}", InstallDir & EL_Channel.ChannelDir &"/Comment.asp?InfoID="& ProductID &"#Add")
		 ProductAction = EL_Common.ReplaceText(ProductAction, "\{\$ShowCommentURL\}", InstallDir & EL_Channel.ChannelDir &"/Comment.asp?InfoID="& ProductID)
		 ProductAction = EL_Common.ReplaceText(ProductAction, "\{\$AddFavoriteURL\}", InstallDir & "User/User_Favorite.asp?ChannelID="& ChannelID &"&InfoID="& ProductID &"&Action=Add")
		 ProductAction = EL_Common.ReplaceText(ProductAction, "\{\$SendToFriendURL\}", InstallDir & EL_Channel.ChannelDir &"/SendToFriend.asp?InfoID="& ProductID )
		 ProductAction = EL_Common.ReplaceText(ProductAction, "\{\$PintURL\}", InstallDir & EL_Channel.ChannelDir &"/Print.asp?InfoID="& ProductID)

⌨️ 快捷键说明

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