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

📄 classsight.asp

📁 依蓝旅游网站管理系统Elan2008.SP2
💻 ASP
📖 第 1 页 / 共 5 页
字号:
		    Set rsSight = .Execute()
		 End With
		 rsSight.Close()
		 RowCount = SightCmd(0)
		 TotalRowCount = SightCmd(9)
		 PageCounts = SightCmd(10)
	  Else
	     If SightNum < 1 Then SightNum = EL_Common.Lang("Sight.TopNum", 5)
		 Call EL_Common.InitCommonCmd(SightCmd, rsSight, SQLTables, " TOP "& SightNum &" "& SQLFields, SQLCondition &" ORDER BY "& SQLOrder)
		 rsSight.Close()
		 RowCount = SightCmd(0)
	  End If
	  
		 If RowCount = 0 Then
		    Set rsSight = Nothing
			Set SightCmd = Nothing
			SightList = EL_Common.RegExpStaticLabel(EL_Common.Lang("BaseConfig.NoList", "·没有任何{$ItemName}"), "{$ItemName}", ItemName)
			Exit Function
		 Else
		    Dim Title_Name, Title_MarketPrice, Title_BookPrice, PriceIcon
			Dim ArrClass(2), vMarketPrice, vBookPrice
			If ShowHint = True Then
			   Title_Name = EL_Common.RegExpStaticLabel(EL_Common.Lang("Sight.Name", "{$ItemName}标题"), "{$ItemName}", ItemName)
			   Title_MarketPrice = EL_Common.Lang("BaseConfig.MarketPrice", "门市价")
			   Title_BookPrice = EL_Common.Lang("BaseConfig.BookPrice", "预订价")
			End If
			PriceIcon = EL_Common.Lang("BaseConfig.PriceIcon", "&#xFFE5;")
		    rsSight.Open()	
			Select Case ListType
			   Case 2:    ReturnString = "<div class='list'>"
			   Case 3:    ReturnString = "<ul class='list'>"
			   Case 4:    ReturnString = "<ol class='list'>"
			   Case Else: ReturnString = "<table width='100%' border='0' cellspacing='0' cellpadding='0' class='list'><tr>"
		    End Select	
		    If ClassA = "" Then ClassA = "lista"
		    If Class1 = "" Then Class1 = "list1"
		    If Class2 = "" Then Class2 = "list2"		 
		    ArrClass(1) = Class1
		    ArrClass(2) = Class2
			For i = 1 To RowCount
			   vMarketPrice = rsSight("MarketPrice")
			   vBookPrice = rsSight("BookPrice")
			   Select Case ListType
			      Case 2:
				      ReturnString = ReturnString &"<div class='"& ArrClass(2-((i+2) Mod 2)) &"'>"
				      ReturnString = ReturnString &"<span class='listn'>"
				      If ShowIcon > 0 Then ReturnString = ReturnString &"<img border='0' src='"& InstallDir & ChannelDir &"/Images/icon"& ShowIcon &".gif' />&nbsp;"
				      If ShowCityName Then ReturnString = ReturnString &"[<a href='"& InstallDir & ChannelDir &"/ShowArea.asp?City="& EL_Common.ServerURLEncode(rsSight("City")) &"' class='"& ClassA &"'>"& EL_Common.ServerHTMLEncode(rsSight("City")) &"</a>]"
					  ReturnString = ReturnString &"<a href='"& InstallDir & ChannelDir &"/ShowSight.asp?SightID="& rsSight("SightID") &"' class='"& ClassA &"' "
					  If ShowHint = True Then
					     ReturnString = ReturnString &"title='"& Title_Name &":"& EL_Common.HTMLEncode(rsSight("SightName")) 
						 Select Case ShowPriceType
						    Case 1: ReturnString = ReturnString & VBCRLF & Title_MarketPrice &":"& PriceIcon & vMarketPrice &"' "
							Case 2: ReturnString = ReturnString & VBCRLF & Title_BookPrice &":"& PriceIcon & vBookPrice &"' "
							Case 3: ReturnString = ReturnString & VBCRLF & Title_MarketPrice &":"& PriceIcon & vMarketPrice & VBCRLF & Title_BookPrice &":"& PriceIcon & vBookPrice &"' "
							Case Else: ReturnString = ReturnString &"' "
						 End Select						 
					  End If
					  ReturnString = ReturnString & EL_Common.ArrOpenType(OpenType) &">"& EL_Common.HTMLEncode(EL_Common.GetTopic(rsSight("SightName"), TitleLen))
					  ReturnString = ReturnString &"</a></span>"
					  Select Case ShowPriceType
				         Case 1: ReturnString = ReturnString &"<span class='listmp'>"& PriceIcon & vMarketPrice &"</span>"
				         Case 2: ReturnString = ReturnString &"<span class='listbp'>"& PriceIcon & vBookPrice &"</span>"
				         Case 3: ReturnString = ReturnString &"<span class='listmp'>"& PriceIcon & vMarketPrice &"</span><span class='listbp'>"& PriceIcon & vBookPrice &"</span>"
			          End Select
				      If ShowBookButton > 0 Then ReturnString = ReturnString &"<span class='listbt'><a href='"& InstallDir & ChannelDir &"/ShowSight.asp?SightID="& rsSight("SightID") &"' class='"& ClassA &"'><img src='"& InstallDir & ChannelDir &"/Images/bookbutton"& ShowBookButton &".gif' border='0'></a></span>"
				      ReturnString = ReturnString &"</div>"
			   
				  Case 3, 4:
				      ReturnString = ReturnString &"<li class='"& ArrClass(2-((i+2) Mod 2)) &"'>"
				      ReturnString = ReturnString &"<span class='listn'>"
				      If ShowIcon > 0 Then ReturnString = ReturnString &"<img border='0' src='"& InstallDir & ChannelDir &"/Images/icon"& ShowIcon &".gif' />&nbsp;"
				      If ShowCityName Then ReturnString = ReturnString &"[<a href='"& InstallDir & ChannelDir &"/ShowArea.asp?City="& EL_Common.ServerURLEncode(rsSight("City")) &"' class='"& ClassA &"'>"& EL_Common.ServerHTMLEncode(rsSight("City")) &"</a>]"
					  ReturnString = ReturnString &"<a href='"& InstallDir & ChannelDir &"/ShowSight.asp?SightID="& rsSight("SightID") &"' class='"& ClassA &"' "
					  If ShowHint = True Then
					     ReturnString = ReturnString &"title='"& Title_Name &":"& EL_Common.HTMLEncode(rsSight("SightName")) 
						 Select Case ShowPriceType
						    Case 1: ReturnString = ReturnString & VBCRLF & Title_MarketPrice &":"& PriceIcon & vMarketPrice &"' "
							Case 2: ReturnString = ReturnString & VBCRLF & Title_BookPrice &":"& PriceIcon & vBookPrice &"' "
							Case 3: ReturnString = ReturnString & VBCRLF & Title_MarketPrice &":"& PriceIcon & vMarketPrice & VBCRLF & Title_BookPrice &":"& PriceIcon & vBookPrice &"' "
							Case Else: ReturnString = ReturnString &"' "
						 End Select						 
					  End If
					  ReturnString = ReturnString & EL_Common.ArrOpenType(OpenType) &">"& EL_Common.HTMLEncode(EL_Common.GetTopic(rsSight("SightName"), TitleLen))
					  ReturnString = ReturnString &"</a></span>"
					  Select Case ShowPriceType
				         Case 1: ReturnString = ReturnString &"<span class='listmp'>"& PriceIcon & vMarketPrice &"</span>"
				         Case 2: ReturnString = ReturnString &"<span class='listbp'>"& PriceIcon & vBookPrice &"</span>"
				         Case 3: ReturnString = ReturnString &"<span class='listmp'>"& PriceIcon & vMarketPrice &"</span><span class='listbp'>"& PriceIcon & vBookPrice &"</span>"
			          End Select
				      If ShowBookButton > 0 Then ReturnString = ReturnString &"<span class='listbt'><a href='"& InstallDir & ChannelDir &"/ShowSight.asp?SightID="& rsSight("SightID") &"' class='"& ClassA &"'><img src='"& InstallDir & ChannelDir &"/Images/bookbutton"& ShowBookButton &".gif' border='0'></a></span>"
				      ReturnString = ReturnString &"</li>"
					  
				  Case Else:
				      ReturnString = ReturnString &"<td width='"& 100/ColNum &"%' class='"& ArrClass(2-((i+2) Mod 2)) &"'>"
				      ReturnString = ReturnString &"<span class='listn'>"
					  If ShowIcon > 0 Then ReturnString = ReturnString &"<img border='0' src='"& InstallDir & ChannelDir &"/Images/icon"& ShowIcon &".gif' />&nbsp;"
				      If ShowCityName Then ReturnString = ReturnString &"[<a href='"& InstallDir & ChannelDir &"/ShowArea.asp?City="& EL_Common.ServerURLEncode(rsSight("City")) &"' class='"& ClassA &"'>"& EL_Common.ServerHTMLEncode(rsSight("City")) &"</a>]"
					  ReturnString = ReturnString &"<a href='"& InstallDir & ChannelDir &"/ShowSight.asp?SightID="& rsSight("SightID") &"' class='"& ClassA &"' "
					  If ShowHint = True Then
					     ReturnString = ReturnString &"title='"& Title_Name &":"& EL_Common.HTMLEncode(rsSight("SightName")) 
						 Select Case ShowPriceType
						    Case 1: ReturnString = ReturnString & VBCRLF & Title_MarketPrice &":"& PriceIcon & vMarketPrice &"' "
							Case 2: ReturnString = ReturnString & VBCRLF & Title_BookPrice &":"& PriceIcon & vBookPrice &"' "
							Case 3: ReturnString = ReturnString & VBCRLF & Title_MarketPrice &":"& PriceIcon & vMarketPrice & VBCRLF & Title_BookPrice &":"& PriceIcon & vBookPrice &"' "
							Case Else: ReturnString = ReturnString &"' "
						 End Select						 
					  End If
					  ReturnString = ReturnString & EL_Common.ArrOpenType(OpenType) &">"& EL_Common.HTMLEncode(EL_Common.GetTopic(rsSight("SightName"), TitleLen))
					  ReturnString = ReturnString &"</a></span></td>"
					  Select Case ShowPriceType
				         Case 1: ReturnString = ReturnString &"<td class='"& ArrClass(2-((i+2) Mod 2)) &"'><span class='listmp'>"& PriceIcon & vMarketPrice &"</span></td>"
				         Case 2: ReturnString = ReturnString &"<td class='"& ArrClass(2-((i+2) Mod 2)) &"'><span class='listbp'>"& PriceIcon & vBookPrice &"</span></td>"
				         Case 3: ReturnString = ReturnString &"<td class='"& ArrClass(2-((i+2) Mod 2)) &"'><span class='listmp'>"& PriceIcon & vMarketPrice &"</span></td><td class='"& ArrClass(2-((i+2) Mod 2)) &"'><span class='listbp'>"& PriceIcon & vBookPrice &"</span></td>"
			          End Select
				      If ShowBookButton > 0 Then ReturnString = ReturnString &"<td class='"& ArrClass(2-((i+2) Mod 2)) &"'><span class='listbt'><a href='"& InstallDir & ChannelDir &"/ShowSight.asp?SightID="& rsSight("SightID") &"' class='"& ClassA &"'><img src='"& InstallDir & ChannelDir &"/Images/bookbutton"& ShowBookButton &".gif' border='0'></a></span></td>"
					  
			   End Select
			   If (i Mod ColNum) = 0 And i<RowCount Then
			      Select Case ListType
			         Case 2, 3, 4:  
				     Case Else:  ReturnString = ReturnString &"</tr><tr>"		      
			      End Select
			   End If
			   If i<RowCount Then rsSight.MoveNext
			Next
			Select Case ListType
		       Case 2:    ReturnString = ReturnString &"</div>"
			   Case 3:    ReturnString = ReturnString &"</ul>"
			   Case 4:    ReturnString = ReturnString &"</ol>"
			   Case Else: ReturnString = ReturnString &"</tr></table>"
		    End Select
			rsSight.Close()
		 End If
		 Set rsSight = Nothing
		 Set SightCmd = Nothing
		 
		 If ShowPage Then
		    Dim PageHTML, PageString
			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))
			ReturnString = ReturnString & PageHTML
		 End If

	  SightList = ReturnString
   End Function
   
   Public Function Label_GetSightPhoto(ByVal HTML)
      Dim Match, Matches, ReturnString, Parameters, Temp
	  CommonRegExp.Pattern = "<!--\{\$GetSightPhoto\(([ 0-9]+|[ ]*ChannelID[ ]*),([\u4e00-\u9fa5\|\w ]*),([ 0-9]+),[ ]*(True|False)[ ]*,([ 0-9\-]+),([ 0-9\-]+),([ 0-9]+),([ 0-9]+),([ 0-9]+),([ 0-9]+),[ ]*(True|False)[ ]*,([ 0-9]+),([ 0-9]+),([ 0-9]+),([ 0-9]+)\)\}-->"        
      Set Matches = CommonRegExp.Execute(HTML)
	  ReturnString = HTML
	  Temp = ""
      For Each Match in Matches
		 Parameters = EL_Common.GetLabelParameters(Match.Value, "GetSightPhoto")
		 Temp = SightPhoto(Parameters(0), Parameters(1), Parameters(2), Parameters(3), Parameters(4), Parameters(5), Parameters(6), Parameters(7), Parameters(8), Parameters(9), Parameters(10), Parameters(11), Parameters(12), Parameters(13), Parameters(14))
		 ReturnString = Replace(ReturnString, Match.Value, Temp)
      Next
	  
	  CommonRegExp.Pattern = "\{\$GetSightPhoto\(([ 0-9]+|[ ]*ChannelID[ ]*),([\u4e00-\u9fa5\|\w ]*),([ 0-9]+),[ ]*(True|False)[ ]*,([ 0-9\-]+),([ 0-9\-]+),([ 0-9]+),([ 0-9]+),([ 0-9]+),([ 0-9]+),[ ]*(True|False)[ ]*,([ 0-9]+),([ 0-9]+),([ 0-9]+),([ 0-9]+)\)\}"
	  Set Matches = CommonRegExp.Execute(ReturnString)
	  For Each Match in Matches
		 Parameters = EL_Common.GetLabelParameters(Match.Value, "GetSightPhoto")
		 Temp = SightPhoto(Parameters(0), Parameters(1), Parameters(2), Parameters(3), Parameters(4), Parameters(5), Parameters(6), Parameters(7), Parameters(8), Parameters(9), Parameters(10), Parameters(11), Parameters(12), Parameters(13), Parameters(14))
		 ReturnString = Replace(ReturnString, Match.Value, Temp)
      Next
	  Set Matches = Nothing
	  
	  Label_GetSightPhoto = ReturnString
   End Function
   
   Private Function SightPhoto(ByVal iChannelID, ByVal ArrAreaName, ByVal PhotoNum, ByVal IsCommend, ByVal TitleLen, ByVal ContentLen, ByVal PhotoWidth, ByVal PhotoHeight, ByVal OrderType, ByVal OpenType, ByVal ShowHint, ByVal ShowType, ByVal ColNum, ByVal EffectID, ByVal TimeOuts)
      Dim SightCmd, rsSight, i, ReturnString, RowCount, ArrTemp
	  Dim SQLTables, SQLFields, SQLCondition, SQLOrder, SQL
	  Dim ChannelCmd, rsChannel, ChannelDir, ChannelModule, ItemName, ItemUnit, Disabled, UploadDir
	  
	  iChannelID = Eval(iChannelID)
	  
	  If iChannelID <> ChannelID Then
	     Call EL_Common.InitCommonCmd(ChannelCmd, rsChannel, "EL_Channel", "ChannelDir,ChannelModule,ItemName,ItemUnit,Disabled,UploadDir", "ChannelID="& iChannelID &" AND ChannelType=0")
	     rsChannel.Close()
	     If ChannelCmd(0) <> 1 Then
	        Set rsChannel = Nothing
		    Set ChannelCmd = Nothing
		    HotelPhoto = EL_Common.Lang("BaseConfig.ChannelError", "·频道参数错误")
		    Exit Function
	     Else
	        rsChannel.Open()
		    ChannelDir = rsChannel(0)
		    ChannelModule = rsChannel(1)
		    ItemName = rsChannel(2)
		    ItemUnit = rsChannel(3)
		    Disabled = rsChannel(4)
		    UploadDir = rsChannel(5)
		    rsChannel.Close()
	     End If
	     Set rsChannel = Nothing
	     Set ChannelCmd = Nothing
	  Else
	     ChannelDir = EL_Channel.ChannelDir
		 ChannelModule = EL_Channel.ChannelModule
		 ItemName = EL_Channel.ItemName
		 ItemUnit = EL_Channel.ItemUnit
		 Disabled = EL_Channel.Disabled
		 UploadDir = EL_Channel.UploadDir
	  End If
	  
	  If ChannelModule <> 5 Then
	     SightPhoto = EL_Common.Lang("BaseConfig.ChannelModuleError", "·频道模块错误")
		 Exit Function
	  End If
	  
	  If Disabled Then
	     SightPhoto = EL_Common.Lang("BaseConfig.Disabled", "·该频道已被禁用")
		 Exit Function
	  End If
	  
	  ArrAreaName = Trim(EL_Common.ReplaceBadChar(ArrAreaName))
	  PhotoNum = EL_Common.ELClng(PhotoNum)
	  TitleLen = EL_Common.ELClng(TitleLen)
	  ContentLen = EL_Common.ELClng(ContentLen)	
	  IsCommend = Eval(IsCommend)
	  PhotoWidth = EL_Common.ELClng(PhotoWidth)
	  PhotoHeight = EL_Common.ELClng(PhotoHeight)
	  ColNum = EL_Common.ELClng(ColNum)
	  OrderType = EL_Common.ELClng(OrderType)
	  OpenType = EL_Common.ELClng(OpenType)
	  ShowHint = Eval(ShowHint)
	  ShowType = EL_Common.ELClng(ShowType)
	  EffectID = EL_Common.ELClng(EffectID)
	  TimeOuts = EL_Common.ELClng(TimeOuts)
	  If PhotoWidth<=0 Then PhotoWidth = EL_Common.Lang("Sight.PhotoWidth", 120)
	  If PhotoHeight<=0 Then PhotoHeight = EL_Common.Lang("Sight.PhotoHeight", 80)
	  If OpenType > 1 Then OpenType = 1	
	  If ColNum < 1 Then ColNum = 1
	  
	  SQLTables = "EL_Sight"
	  SQLFields = "SightID,SightName,DefaultPictrue"	
	  If ShowType <> 4 And ContentLen >= 0 Then
	     SQLFields = SQLFields &",EL_Sight.Content"
	  End If	
	  
	  SQLOrder = "OnTop DESC"
	  Select Case OrderType
	    Case 1: SQLOrder = SQLOrder &",SightID ASC"
		Case 2: SQLOrder = SQLOrder &",SightID DESC"
		Case 3: SQLOrder = SQLOrder &",UpdateTime ASC"
		Case 4: SQLOrder = SQLOrder &",UpdateTime DESC"
		Case 5: SQLOrder = SQLOrder &",Hits ASC"
		Case 6: SQLOrder = SQLOrder &",Hits DESC"
		Case Else:  SQLOrder = SQLOrder &",SightID DESC"
	  End Select
	  
	  SQLCondition = " ChannelID="& ChannelID &" And DefaultPictrue<>'' And Passed="& EL_True &" And Deleted="& EL_False &" " 
	  If ArrAreaNa

⌨️ 快捷键说明

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