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

📄 classsight.asp

📁 依蓝旅游网站管理系统Elan2008.SP2
💻 ASP
📖 第 1 页 / 共 5 页
字号:
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$City}", City)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Area}", Area)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$SightName}", SightName)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$TravelDate}", Sight_TravelDate)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Person}", Sight_Person)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$MarketPrice}", MarketPrice)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$BookPrice}", Price)  	  
	  
	  
	  Dim PriceIcon
	  PriceIcon = EL_Common.Lang("BaseConfig.PriceIcon", "¥")
	  
	  TotalPrice = Price * Sight_Person
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$PriceList}", PriceIcon & Price &" x "& Sight_Person )
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$TotalPrice}", TotalPrice)
	  
	  Dim DiscountHTML, TempDiscount
	  If IsDiscount Then
	     If EL_User.DiscountOfSight = 0 Then
	        DiscountHTML = EL_Common.Lang("Sight.Discount.d0", "您不可以享受折扣")
	     Else
	        DiscountHTML = EL_Common.Lang("Sight.Discount.d1", "您可享受{$Discount}折优惠,折后价")
		    TempDiscount = EL_User.DiscountOfSight / 10
		    DiscountHTML = EL_Common.RegExpStaticLabel(DiscountHTML, "{$Discount}", EL_User.DiscountOfSight)
		    DiscountHTML = EL_Common.RegExpStaticLabel(DiscountHTML, "{$PriceOfDiscount}", TotalPrice &" x "& EL_Common.FormatDecimal(TempDiscount) &" = "& EL_Common.Lang("BaseConfig.PriceIcon", "¥") & EL_Common.ELRound(TempDiscount * TotalPrice))
	     End If
		 HTML = EL_Common.RegExpStaticLabel(HTML, "{$Points}", EL_Common.ELClng(TotalPrice * TempDiscount / ConsumeProportion))
	  Else
	     DiscountHTML = EL_Common.Lang("Sight.NoDiscount", "此酒店房型不允许打折")
		 HTML = EL_Common.RegExpStaticLabel(HTML, "{$Points}", EL_Common.ELClng(TotalPrice / ConsumeProportion))
	  End If
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$ShowDiscount}", DiscountHTML)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$ShowConfirmType}", EL_Common.GetConfirmType())
	  
	  Response.Write HTML	  
   End Sub
   
   Public Sub ShowArea()
      Dim AreaCmd, rsArea, RowCount, i, StrPath
	  Dim Province, City, Area
	  Dim PageSizes, PageCounts, TotalRowCount, ArrHotelMinPrice
	  
	  Province = EL_Common.ELRequest("Province", 3)
	  City = EL_Common.ELRequest("City", 3)
	  Area = EL_Common.ELRequest("Area", 3)
	  
	  Call EL_Common.InitCommand(AreaCmd, "EL_SP_SearchSight")
	  With AreaCmd
	     .Parameters.Append .CreateParameter("RETURN", 2, 4)
		 .Parameters.Append .CreateParameter("@ChannelID", 3, 1, 4, ChannelID)
		 .Parameters.Append .CreateParameter("@Province", 200, 1, 30, Province) 
		 .Parameters.Append .CreateParameter("@City", 200, 1, 30, City) 
		 .Parameters.Append .CreateParameter("@Area", 200, 1, 30, Area) 
		 .Parameters.Append .CreateParameter("@SightName", 200, 1, 255, "")
		 .Parameters.Append .CreateParameter("@AroundHotel", 200, 1, 255, "")
		 .Parameters.Append .CreateParameter("@AroundSight", 200, 1, 255, "")
		 .Parameters.Append .CreateParameter("@Address", 200, 1, 255, "")
		 .Parameters.Append .CreateParameter("@MinPrice", 6, 1, 8, 0)
		 .Parameters.Append .CreateParameter("@MaxPrice", 6, 1, 8, 0)
		 .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 rsArea = .Execute()
	  End With
	  rsArea.Close()
	  PageSizes = AreaCmd(13)
	  TotalRowCount = AreaCmd(14)
	  PageCounts = AreaCmd(15)
	  RowCount = AreaCmd(16)
	  
	  HTML = EL_Common.Template(ChannelID, 16, 0)
	  
	  HTML = EL_Common.ReplaceCommonLabels(HTML)  
	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$PageTitle}", Province &" "& City & EL_Channel.ClassItemName & EL_Channel.ItemName & EL_Common.TitleDivide & SiteTitle)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$DefaultSkin}", EL_Common.Skin(ChannelID, 0, 0))
	  
	  StrPath = EL_Common.Lang("BaseConfig.Path", " >> ")
	  EL_Common.ShowPath = EL_Common.ShowPath & StrPath &"<a href='"& InstallDir & EL_Channel.ChannelDir &"/Index.asp'>"& EL_Channel.ChannelName &"</a>"& StrPath & Province &" "& City
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$ShowPath}", EL_Common.ShowPath)
	  
	  HTML = ChannelCommonLabels(HTML)
	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Province}", Province)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$City}", City)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Area}", Area)	  
	  
	  Dim Match, Matches, ReturnString
	  Dim TempString, MatchString, NoList, PriceIcon
	  
	  PriceIcon = EL_Common.Lang("BaseConfig.PriceIcon", "&#xFFE5;")
	  CommonRegExp.Pattern = "\[ArrSightList\][\w\W]*\[\/ArrSightList\]"        
      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
	     rsArea.Open()
		 For Each Match in Matches
			rsArea.MoveFirst
			MatchString = Match.Value
			MatchString = EL_Common.ReplaceText(MatchString, "\[ArrSightList\]", "")
			MatchString = EL_Common.ReplaceText(MatchString, "\[\/ArrSightList\]", "")
			ReturnString = ""
			Dim ItemHTML
		    For i = 1 To RowCount
			   ItemHTML = MatchString
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_SightID}", rsArea("SightID"))
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_Province}", EL_Common.HTMLEncode(rsArea("Province")))
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_City}", EL_Common.HTMLEncode(rsArea("City")))
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_Area}", EL_Common.HTMLEncode(rsArea("Area")))
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_SightName}", EL_Common.HTMLEncode(rsArea("SightName")))
			   If rsArea("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 & rsArea("BookPrice"))
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_OpenTime}", rsArea("OpenTime"))
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_Address}", rsArea("Address"))
			   If Trim(rsArea("DefaultPictrue")) = "" Then
			      ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_DefaultPictrue}", "")
			   Else
			      ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_DefaultPictrue}", "<img src='"& EL_Common.PictrueURL(rsArea("DefaultPictrue"), EL_Channel.FilePath) &"' width=110 height=80 border=0>")
			   End If
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_TravelHint}", EL_Common.GetTopic(EL_Common.RemoveHTML(rsArea("TravelHint")), EL_Common.Lang("Sight.ContentLen", 250)))
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_Content}", EL_Common.GetTopic(EL_Common.RemoveHTML(rsArea("Content")),  EL_Common.Lang("Sight.ContentLen", 250)))
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_AroundSight}", AroundInfoURL(rsArea("AroundSight")))
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_AroundHotel}", AroundInfoURL(rsArea("AroundHotel")))
			   ReturnString = ReturnString & ItemHTML
			   If i<RowCount Then rsArea.MoveNext
		    Next
			HTML = Replace(HTML, Match.Value, ReturnString)	    
		 Next
		 rsArea.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
	  
	  HTML = Label_GetSightList(HTML)
	  HTML = Label_GetSightPhoto(HTML)
	  
	  Set Matches = Nothing   
	  Set rsArea = Nothing
	  Set AreaCmd = Nothing

	  Response.Write HTML
   End Sub
   
   Public Sub ShowSight()
      Dim SightCmd, rsSight, i
	  Dim SightID, SightName, MarketPrice, BookPrice, OpenTime, Address, AroundHotel, AroundSight
	  Dim TravelHint, Content, SkinID, TemplateID
	  Dim Province, City, Area
	  
	  SightID = EL_Common.ELRequest("SightID", 2)
	  
	  Call EL_Common.InitCommand(SightCmd, "EL_SP_GetSightInfo")
	  With SightCmd
	     .Parameters.Append .CreateParameter("RETURN", 2, 4)
		 .Parameters.Append .CreateParameter("@SightID", 3, 1, 4, SightID)
		 .Parameters.Append .CreateParameter("@ChannelID", 3, 1, 4, ChannelID)
		 Set rsSight = .Execute()
	  End With
	  rsSight.Close()
	  If SightCmd(0) <> 1 Then
	     EL_Common.ShowErrorMsg(EL_Common.RegExpStaticLabel(EL_Common.Lang("BaseConfig.InfoError", "指定{$ItemName}不存在"), "{$ItemName}", EL_Channel.ItemName))
		 Set rsSight = Nothing
		 Set SightCmd = Nothing
		 Exit Sub
	  End If
	  rsSight.Open()
	  Province = rsSight("Province")
	  City = rsSight("City")
	  Area = rsSight("Area")
	  SightName = rsSight("SightName")
	  MarketPrice = rsSight("MarketPrice")
	  BookPrice = rsSight("BookPrice")
	  OpenTime = rsSight("OpenTime")
	  Address = rsSight("Address")
	  AroundHotel = rsSight("AroundHotel")
	  AroundSight = rsSight("AroundSight")
	  TravelHint = rsSight("TravelHint")
	  Content = rsSight("Content")
	  SkinID = rsSight("SkinID")
	  TemplateID = rsSight("TemplateID")
	  
	  HTML = EL_Common.Template(ChannelID, 3, TemplateID)	
	  
	  HTML = EL_Common.ReplaceCommonLabels(HTML)  
	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$PageTitle}", EL_Common.Join2String(SightName, SiteTitle, EL_Common.TitleDivide))
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$DefaultSkin}", EL_Common.Skin(ChannelID, 0, 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.ShowPath = EL_Common.ShowPath & 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) &"}", rsSight(rsField(0).value))
			If i<FieldCount Then rsField.MoveNext
		 Next
		 rsField.Close()
		 Set rsField = Nothing
		 Set FieldCmd = Nothing
	  End If
	  
	  rsSight.Close()
	  Set rsSight = Nothing
	  Set SightCmd = Nothing	  	  
	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$SightID}", SightID)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Province}", Province)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$City}", City)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Area}", Area)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$SightName}", SightName)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$MarketPrice}", MarketPrice)	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$BookPrice}", BookPrice)	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$OpenTime}", OpenTime)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Address}", Address)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$AroundHotel}", AroundInfoURL(AroundHotel))
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$AroundSight}", AroundInfoURL(AroundSight))
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$TravelHint}", TravelHint)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Content}", Content)
	  
	  Dim SightAction
	  SightAction = EL_Common.Lang("Sight.SightAction", "")
	  If SightAction<>"" Then
	     SightAction = EL_Common.ReplaceText(SightAction, "\{\$SendCommentURL\}", InstallDir & EL_Channel.ChannelDir &"/Comment.asp?InfoID="& SightID &"#Add")
		 SightAction = EL_Common.ReplaceText(SightAction, "\{\$ShowCommentURL\}", InstallDir & EL_Channel.ChannelDir &"/Comment.asp?InfoID="& SightID)
		 SightAction = EL_Common.ReplaceText(SightAction, "\{\$AddFavoriteURL\}", InstallDir & "User/User_Favorite.asp?ChannelID="& ChannelID &"&InfoID="& SightID &"&Action=Add")
		 SightAction = EL_Common.ReplaceText(SightAction, "\{\$SendToFriendURL\}", InstallDir & EL_Channel.ChannelDir &"/SendToFriend.asp?InfoID="& SightID )
		 SightAction = EL_Common.ReplaceText(SightAction, "\{\$PintURL\}", InstallDir & EL_Channel.ChannelDir &"/Print.asp?InfoID="& SightID)
	  End If
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$SightAction}", SightAction)

⌨️ 快捷键说明

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