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

📄 classproduct.asp

📁 依蓝旅游网站管理系统Elan2008.SP2
💻 ASP
📖 第 1 页 / 共 5 页
字号:
					     ReturnString = ReturnString &"title='"& Title_Name &":"& EL_Common.HTMLEncode(rsProduct("ProductName")) & VBCRLF & Title_Days &":"& rsProduct(2)
						 If ShowPrice = True Then 
						    ReturnString = ReturnString & VBCRLF & Title_BookPrice &":"& PriceIcon & vBookPrice & PriceUnit &"' "
						 Else
						    ReturnString = ReturnString &"' "
						 End If
					  End If
					  ReturnString = ReturnString & EL_Common.ArrOpenType(OpenType) &">"& EL_Common.HTMLEncode(EL_Common.GetTopic(rsProduct("ProductName"), TitleLen)) 
					  If ShowDays = True Then ReturnString = ReturnString &"("& rsProduct("Days") & DayName &")"
					  ReturnString = ReturnString &"</a></span>"
					  If ShowPrice = True Then ReturnString = ReturnString &"<span class='listbp'>"& PriceIcon & vBookPrice & PriceUnit &"</span>"
					  If ShowBookButton > 0 Then ReturnString = ReturnString &"<span class='listbt'><a href='"& InstallDir & ChannelDir &"/ShowProduct.asp?ProductID="& rsProduct("ProductID") &"' 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 ShowClassName = True Then ReturnString = ReturnString &"[<a href='"& InstallDir & ChannelDir &"/ShowClass.asp?ClassID="& rsProduct("ClassID") &"' class='"& ClassA &"'>"& EL_Common.ServerHTMLEncode(rsHotel("ClassName")) &"</a>]"
				      ReturnString = ReturnString &"<a href='"& InstallDir & ChannelDir &"/ShowProduct.asp?ProductID="& rsProduct("ProductID") &"' class='"& ClassA &"' "
					  If ShowHint = True Then
					     ReturnString = ReturnString &"title='"& Title_Name &":"& EL_Common.HTMLEncode(rsProduct("ProductName")) & VBCRLF & Title_Days &":"& rsProduct(2)
						 If ShowPrice = True Then 
						    ReturnString = ReturnString & VBCRLF & Title_BookPrice &":"& PriceIcon & vBookPrice & PriceUnit &"' "
						 Else
						    ReturnString = ReturnString &"' "
						 End If
					  End If
					  ReturnString = ReturnString & EL_Common.ArrOpenType(OpenType) &">"& EL_Common.HTMLEncode(EL_Common.GetTopic(rsProduct("ProductName"), TitleLen)) 
					  If ShowDays = True Then ReturnString = ReturnString &"("& rsProduct("Days") & DayName &")"
					  ReturnString = ReturnString &"</a></span></td>"
					  If ShowPrice = True Then ReturnString = ReturnString &"<td class='"& ArrClass(2-((i+2) Mod 2)) &"'><span class='listbp'>"& PriceIcon & vBookPrice & PriceUnit &"</span></td>"
					  If ShowBookButton > 0 Then ReturnString = ReturnString &"<td class='"& ArrClass(2-((i+2) Mod 2)) &"'><span class='listbt'><a href='"& InstallDir & ChannelDir &"/ShowProduct.asp?ProductID="& rsProduct("ProductID") &"' 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 rsProduct.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
			rsProduct.Close()
		 End If
		 Set rsProduct = Nothing
		 Set ProductCmd = 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
	  
	  ProductList = ReturnString
   End Function
   
   Private Function Label_GetProductPhoto(ByVal HTML)
      Dim Match, Matches, ReturnString, Parameters, Temp
	  CommonRegExp.Pattern = "<!--\{\$GetProductPhoto\(([ 0-9]+|[ ]*ChannelID[ ]*),([ 0-9\|]+|[ ]*ClassID[ ]*),([ 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, "GetProductPhoto")
		 Temp = ProductPhoto(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 = "\{\$GetProductPhoto\(([ 0-9]+|[ ]*ChannelID[ ]*),([ 0-9\|]+|[ ]*ClassID[ ]*),([ 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, "GetProductPhoto")
		 Temp = ProductPhoto(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_GetProductPhoto = ReturnString
   End Function
   
   Private Function ProductPhoto(ByVal iChannelID, ByVal arrClassID, 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 ProductCmd, rsProduct, i, ReturnString, ListTable, RowCount
	  Dim SQLTables, SQLFields, SQLCondition, SQLOrder, SQL
	  Dim ChannelCmd, rsChannel, ChannelDir, ChannelModule, ItemName, ItemUnit, Disabled, UploadDir
	  
	  iChannelID = Eval(iChannelID)
	  If Instr(ArrClassID, "|")<1 Then
	     ArrClassID = Eval(ArrClassID)	
	  End If
	  ArrClassID = CStr(ArrClassID)
	  
	  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 <> 3 Then
	     ProductPhoto = EL_Common.Lang("BaseConfig.ChannelModuleError", "·频道模块错误")
		 Exit Function
	  End If
	  
	  If Disabled Then
	     ProductPhoto = EL_Common.Lang("BaseConfig.Disabled", "·该频道已被禁用")
		 Exit Function
	  End If
	  
	  
	  PhotoNum = EL_Common.ELClng(PhotoNum)
	  IsCommend = Eval(IsCommend)
	  TitleLen = EL_Common.ELClng(TitleLen)
	  ContentLen = EL_Common.ELClng(ContentLen)	  
	  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("Product.PhotoWidth", 120)
	  If PhotoHeight<=0 Then PhotoHeight = EL_Common.Lang("Product.PhotoHeight", 80)
	  If OpenType > 1 Then OpenType = 1	
	  If ColNum < 1 Then ColNum = 1
	  
	  SQLTables = "EL_Product"
	  SQLFields = "EL_Product.ProductID,EL_Product.ProductName,EL_Product.Days,EL_Product.DefaultPictrue"		
	  
	  SQLOrder = "EL_Product.OnTop DESC"
	  Select Case OrderType
	    Case 1: SQLOrder = SQLOrder &",EL_Product.ProductID ASC"
		Case 2: SQLOrder = SQLOrder &",EL_Product.ProductID DESC"
		Case 3: SQLOrder = SQLOrder &",EL_Product.UpdateTime ASC"
		Case 4: SQLOrder = SQLOrder &",EL_Product.UpdateTime DESC"
		Case 5: SQLOrder = SQLOrder &",EL_Product.Hits ASC"
		Case 6: SQLOrder = SQLOrder &",EL_Product.Hits DESC"
		Case Else:  SQLOrder = SQLOrder &",EL_Product.ProductID DESC"
	  End Select
	  
	  SQLCondition = " EL_Product.ChannelID="& ChannelID &" And EL_Product.DefaultPictrue<>'' And EL_Product.Passed="& EL_True &" And EL_Product.Deleted="& EL_False &" " 
	  If ArrClassID = "" Or ArrClassID = "0" Or Replace(ArrClassID, "|", "") = "" Then
	     'SQLCondition = SQLCondition &""
	  Else
		 If ShowClassType = 1 Then
		    ArrClassID = ArrClassID			
		 Else
		    ArrClassID = EL_Common.GetAllClassID(ArrClassID)
		 End If
		 SQLCondition = SQLCondition &"AND EL_Product.ClassID In("& ArrClassID &") "
	  End If
	  
	  If IsCommend Then SQLCondition = SQLCondition &" AND EL_Product.Commended="& EL_True &" "
	  
	  If PhotoNum < 1 Then PhotoNum = EL_Common.Lang("Product.TopNum", 10)
	  Call EL_Common.InitCommonCmd(ProductCmd, rsProduct, SQLTables, " TOP "& PhotoNum &" "& SQLFields, SQLCondition &" ORDER BY "& SQLOrder)
	  rsProduct.Close()
	  RowCount = ProductCmd(0)
	  If RowCount = 0 Then
		 Set rsProduct = Nothing
		 Set ProductCmd = Nothing
		 ProductPhoto = EL_Common.RegExpStaticLabel(EL_Common.Lang("BaseConfig.NoPictrue", "·没有任何{$ItemName}图片"), "{$ItemName}", ItemName)
		 ProductPhoto = Replace(ProductPhoto, "{$InstallDir}", InstallDir)
		 ProductPhoto = Replace(ProductPhoto, "{$PhotoWidth}", PhotoWidth)
		 ProductPhoto = Replace(ProductPhoto, "{$PhotoHeight}", PhotoHeight)
		 Exit Function
	  End If
	  
	  Dim Title_Name, Title_Days, Title_BookPrice
	  If ShowHint = True Then
	     Title_Name = EL_Common.RegExpStaticLabel(EL_Common.Lang("Product.Name", "{$ItemName}名称"), "{$ItemName}", ItemName)
	     Title_Days = EL_Common.Lang("Product.Days", "天&nbsp;&nbsp;&nbsp;&nbsp;数")
		 Title_BookPrice = EL_Common.Lang("BaseConfig.BookPrice", "预订价")
	  End If
		 
	  rsProduct.Open()
	  
	  If ShowType = 4 Then
	     Dim PictrueID
		 PictrueID = EL_Common.GetRndNumber()
	     ReturnString = "<script language='javascript'>"& VBCRLF
		 ReturnString = ReturnString &"var PictrueList = new Array();"& VBCRLF
		 ReturnString = ReturnString &"var PictrueURL  = new Array();"& VBCRLF
		 ReturnString = ReturnString &"var PictrueText = new Array();"& VBCRLF
		 ReturnString = ReturnString &"var PictrueIndex  = 0;"& VBCRLF
		 
		 For i = 1 To RowCount
		    ReturnString = ReturnString &"PictrueList["& i-1 &"] = """& EL_Common.PictrueURL(rsProduct("DefaultPictrue"), EL_Channel.FilePath) &""";"& VBCRLF
			ReturnString = ReturnString &"PictrueURL["& i-1 &"]  = """& InstallDir & ChannelDir &"/ShowProduct.asp?ProductID="& rsProduct("ProductID") &""";"& VBCRLF
			If TitleLen >= 0 Then
			   ReturnString = ReturnString &"PictrueText["& i-1 &"] = """& EL_Common.HTMLDecode(EL_Common.GetTopic(rsProduct("ProductName"), TitleLen)) &""";"& VBCRLF
			Else
			   ReturnString = ReturnString &"PictrueText["& i-1 &"] = """";"& VBCRLF
			End If
		    If i < RowCount Then rsProduct.MoveNext
		 Next
		 ReturnString = ReturnString &"function NextPictrue(){"& VBCRLF
		 ReturnString = ReturnString &"  if(PictrueIndex<"& RowCount-1 &") PictrueIndex++ ;"& VBCRLF
		 ReturnString = ReturnString &"  else PictrueIndex=0;"& VBCRLF
		 ReturnString = ReturnString &"  if(document.all){"& VBCRLF
		 ReturnString = ReturnString &"     Pictrue_"& PictrueID &".filters.revealTrans.Transition=Math.floor(Math.random()*"& EffectID &");"& VBCRLF
		 ReturnString = ReturnString &"     Pictrue_"& PictrueID &".filters.revealTrans.apply();"& VBCRLF
		 ReturnString = ReturnString &"     Pictrue_"& PictrueID &".filters.revealTrans.play();"& VBCRLF
		 ReturnString = ReturnString &"  }"& VBCRLF
		 ReturnString = ReturnString &"  document.getElementById(""Pictrue_"& PictrueID &""").src = PictrueList[PictrueIndex];"& VBCRLF
		 ReturnString = ReturnString &"  document.getElementById(""URL_"& PictrueID &""").href = PictrueURL[PictrueIndex];"& VBCRLF
		 ReturnString = ReturnString &"  document.getElementById(""URL_"& PictrueID &""").title = """& Title_Name &"""+PictrueText[PictrueIndex];"& VBCRLF
		 If TitleLen >= 0 Then
		    ReturnString = ReturnString &"  document.getElementById(""Text_"& PictrueID &""").innerText = PictrueText[PictrueIndex];"& VBCRLF
		 End If
		 ReturnString = ReturnString &"  theTimer = setTimeout('NextPictrue()', "& TimeOuts &");"& VBCRLF
		 ReturnString = ReturnString &"}"& VBCRLF
		 ReturnString = ReturnString &"</script>"
		 ReturnString = ReturnString &"<div class='piclisttd' align=center><a id='URL_"& PictrueID &"' href='' title='' "& EL_Common.ArrOpenType(OpenType) &"><img class='piclisti' id='Pictrue_"& PictrueID &"' src='' style='FILTER: revealTrans(duration=1,transition=23)' width='"& PhotoWidth &"' height='"& PhotoHeight &"' border='0'>"
		 If TitleLen >= 0 Then
		    ReturnString = ReturnString &"<br><span id='Text_"& PictrueID &"' class='piclistn'></span>"
		 End If
		 ReturnString = ReturnString &"</a></div>"
		 ReturnString = ReturnString &"<script>NextPictrue()</script>"
	  Else			 	 
		 ReturnString = "<table width='' border='0' cellspacing='0' cellpadding='0' class='piclist'><tr>"
		 For i = 1 To RowCount
		    ReturnString = ReturnString &"<td class='piclisttd'>"
			Select Case ShowType
			   Case 2:
			       ReturnString = ReturnString &"<span style='float

⌨️ 快捷键说明

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