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

📄 classhotel.asp

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

	  HTML = Label_ArrHotelRoom(HTML, HotelID)	  
 
	  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_SearchHotel")
	  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("@HotelName", 200, 1, 255, "")
		 .Parameters.Append .CreateParameter("@MinPrice", 6, 1, 8, 0)
		 .Parameters.Append .CreateParameter("@MaxPrice", 6, 1, 8, 0)
		 .Parameters.Append .CreateParameter("@HotelLevel", 3, 1, 4, 0)
		 .Parameters.Append .CreateParameter("@SymbolObject", 200, 1, 255, "")
		 .Parameters.Append .CreateParameter("@AroundHotel", 200, 1, 255, "")
		 .Parameters.Append .CreateParameter("@AroundSight", 200, 1, 255, "")
		 .Parameters.Append .CreateParameter("@CheckInDate", 135, 1, 8, Hotel_CheckInDate)
		 .Parameters.Append .CreateParameter("@CheckOutDate", 135, 1, 8, Hotel_CheckOutDate)
		 .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)
		 .Parameters.Append .CreateParameter("@ArrHotelMinPrice", 200, 2, 8000)		 
		 Set rsArea = .Execute()
	  End With	  
	  rsArea.Close()	  
	  PageSizes = AreaCmd(15)
	  TotalRowCount = AreaCmd(16)
	  PageCounts = AreaCmd(17)
	  RowCount = AreaCmd(18)
	  ArrHotelMinPrice = AreaCmd(19)
	  
	  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", "")
	  CommonRegExp.Pattern = "\[ArrHotelList\][\w\W]*\[\/ArrHotelList\]"        
      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, "\[ArrHotelList\]", "")
			MatchString = EL_Common.ReplaceText(MatchString, "\[\/ArrHotelList\]", "")
			ReturnString = ""
			Dim ItemHTML
		    For i = 1 To RowCount
			   ItemHTML = MatchString
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_HotelID}", rsArea("HotelID"))
			   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_HotelName}", EL_Common.HTMLEncode(rsArea("HotelName")))
			   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_MinPrice}", Search_GetHotelMinPrice(rsArea("HotelID"), ArrHotelMinPrice))
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_LevelPictrue}", "<img src='"& rsArea("LevelPictrue") &"' border=0 alt='"& EL_Common.ServerHTMLEncode(rsArea("LevelName")) &"'>")
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_LevelName}", EL_Common.ServerHTMLEncode(rsArea("LevelName")))
			   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_Content}", EL_Common.GetTopic(EL_Common.RemoveHTML(rsArea("Content")), EL_Common.Lang("Hotel.ContentLen", 250)))
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_AroundSight}", AroundInfoURL(rsArea("AroundSight")))
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_AroundHotel}", AroundInfoURL(rsArea("AroundHotel")))
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_RoomList}", Search_RoomList(rsArea("HotelID")))
			   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_GetHotelList(HTML)
	  HTML = Label_GetHotelPhoto(HTML)
	  
	  Set Matches = Nothing   
	  Set rsArea = Nothing
	  Set AreaCmd = Nothing
	  
	  Response.Write HTML
   End Sub
   
   Public Sub Search()
      Dim SearchCmd, rsSearch, RowCount, i, StrPath
      Dim CheckInDate, CheckOutDate, Rooms, Person
	  Dim Search_HotelName, Search_Price, Search_HotelLevel, Search_SymbolObject, Search_AroundHotel, Search_AroundSight
	  Dim PriceArea, MinPrice, MaxPrice
	  Dim PageSizes, PageCounts, TotalRowCount, ArrHotelMinPrice
	  
	  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
	  
	  Hotel_CheckInDate = EL_Common.ELRequest("CheckInDate", 1)
	  Hotel_CheckOutDate = EL_Common.ELRequest("CheckOutDate", 1)
	  Hotel_Rooms = EL_Common.ELRequest("Rooms", 2)
	  Hotel_Person = EL_Common.ELRequest("Person", 2)
	  Hotel_Province = EL_Common.ELRequest("sProvince", 3)
	  Hotel_City = EL_Common.ELRequest("sCity", 3)
	  Hotel_Area = EL_Common.ELRequest("sArea", 3)
	  
	  Search_HotelName = EL_Common.ELRequest("HotelName", 3)
	  Search_Price = EL_Common.ELRequest("Price", 2)
	  Search_HotelLevel = EL_Common.ELRequest("HotelLevel", 2)
	  Search_SymbolObject = EL_Common.ELRequest("SymbolObject", 3)
	  Search_AroundHotel = EL_Common.ELRequest("AroundHotel", 3)
	  Search_AroundSight = EL_Common.ELRequest("AroundSight", 3) 
		 
	  If Not IsDate(Hotel_CheckInDate) Then Hotel_CheckInDate = Date()
	  If DateDiff("d", Date(), Hotel_CheckInDate)<1 Then Hotel_CheckInDate = Date()
		 
	  If Not IsDate(Hotel_CheckOutDate) Then Hotel_CheckOutDate = DateAdd("d", 1, Hotel_CheckInDate)
	  If DateDiff("d", Hotel_CheckInDate, Hotel_CheckOutDate)<1 Then Hotel_CheckOutDate = DateAdd("d", 1, Hotel_CheckInDate)
	  
	  If Hotel_Rooms < 1 Then Hotel_Rooms = 1
	  If Hotel_Person < 1 Then Hotel_Person = 1
	  
	  Hotel_CheckInDate = EL_Common.FormatDate(Hotel_CheckInDate)
	  Hotel_CheckOutDate = EL_Common.FormatDate(Hotel_CheckOutDate)
		 
	  
	  Call EL_Common.SetCookie(EL_Sn, "Hotel_CheckInDate", Hotel_CheckInDate, 7)
	  Call EL_Common.SetCookie(EL_Sn, "Hotel_CheckOutDate", Hotel_CheckOutDate, 7)
	  Call EL_Common.SetCookie(EL_Sn, "Hotel_Rooms", Hotel_Rooms, 7)
	  Call EL_Common.SetCookie(EL_Sn, "Hotel_Person", Hotel_Person, 7)
	  Call EL_Common.SetCookie(EL_Sn, "Hotel_Province", Hotel_Province, 7)
	  Call EL_Common.SetCookie(EL_Sn, "Hotel_City", Hotel_City, 7)
	  Call EL_Common.SetCookie(EL_Sn, "Hotel_Area", Hotel_Area, 7)
	  
	  PriceArea = EL_Common.Lang("Hotel.SearchField.PriceArea.a"& Search_Price &".value", "0-1000")
	  If PriceArea = "" Then PriceArea = "0-1000"
	  PriceArea = Split(PriceArea, "-")
	  If UBound(PriceArea)=1 Then
	     MinPrice =EL_Common.ELClng(PriceArea(0))
		 MaxPrice = EL_Common.ELClng(PriceArea(1))
	  Else
	     MinPrice = 0
		 MaxPrice = 1000
	  End If
	  If MinPrice<0 Then MinPrice = 0
	  If MaxPrice<=0 Then MaxPrice = 1000
	  
	  
	  Call EL_Common.InitCommand(SearchCmd, "EL_SP_SearchHotel")
	  With SearchCmd
	     .Parameters.Append .CreateParameter("RETURN", 2, 4)
		 .Parameters.Append .CreateParameter("@ChannelID", 3, 1, 4, ChannelID)
		 .Parameters.Append .CreateParameter("@Province", 200, 1, 30, Hotel_Province) 
		 .Parameters.Append .CreateParameter("@City", 200, 1, 30, Hotel_City) 
		 .Parameters.Append .CreateParameter("@Area", 200, 1, 30, Hotel_Area) 
		 .Parameters.Append .CreateParameter("@HotelName", 200, 1, 255, Search_HotelName)
		 .Parameters.Append .CreateParameter("@MinPrice", 6, 1, 8, MinPrice)
		 .Parameters.Append .CreateParameter("@MaxPrice", 6, 1, 8, MaxPrice)
		 .Parameters.Append .CreateParameter("@HotelLevel", 3, 1, 4, Search_HotelLevel)
		 .Parameters.Append .CreateParameter("@SymbolObject", 200, 1, 255, Search_SymbolObject)
		 .Parameters.Append .CreateParameter("@AroundHotel", 200, 1, 255, Search_AroundHotel)
		 .Parameters.Append .CreateParameter("@AroundSight", 200, 1, 255, Search_AroundSight)
		 .Parameters.Append .CreateParameter("@CheckInDate", 135, 1, 8, Hotel_CheckInDate)
		 .Parameters.Append .CreateParameter("@CheckOutDate", 135, 1, 8, Hotel_CheckOutDate)
		 .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)
		 .Parameters.Append .CreateParameter("@ArrHotelMinPrice", 200, 2, 8000)		 
		 Set rsSearch = .Execute()
	  End With	  
	  rsSearch.Close()	  
	  PageSizes = SearchCmd(15)
	  TotalRowCount = SearchCmd(16)
	  PageCounts = SearchCmd(17)
	  RowCount = SearchCmd(18)
	  ArrHotelMinPrice = SearchCmd(19)
	  
	  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_HotelName}", Search_HotelName)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Search_Price}", Search_Price)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Search_SymbolObject}", Search_SymbolObject)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Search_HotelLevel}", Search_HotelLevel)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Search_AroundHotel}", Search_AroundHotel)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Search_AroundSight}", Search_AroundSight)
	  	  
	  Dim Match, Matches, ReturnString
	  Dim TempString, MatchString, NoList, PriceIcon
	  
	  PriceIcon = EL_Common.Lang("BaseConfig.PriceIcon", "")
	  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\]", "")

⌨️ 快捷键说明

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