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

📄 classcar.asp

📁 依蓝旅游网站管理系统Elan2008.SP2
💻 ASP
📖 第 1 页 / 共 5 页
字号:
	  HTML = Label_GetCarPhoto(HTML)
	  
	  
	  Call EL_Common.UpdateHits(ChannelID, CarID)
	  
	  Response.Write HTML
   End Sub
   
   Public Sub Print()
      Dim CarCmd, rsCar, i
	  Dim CarID, CarName, Seat, Foregift, PriceHour1, PriceHour2, PriceDay1, PriceDay2, PriceMonth1, PriceMonth2
	  Dim OverExpense, Content, SkinID, TemplateID
	  
	  CarID = EL_Common.ELRequest("InfoID", 2)
	  
	  Call EL_Common.InitCommand(CarCmd, "EL_SP_GetCarInfo")
	  With CarCmd
	     .Parameters.Append .CreateParameter("RETURN", 2, 4)
		 .Parameters.Append .CreateParameter("@CarID", 3, 1, 4, CarID)
		 .Parameters.Append .CreateParameter("@ChannelID", 3, 1, 4, ChannelID)
		 Set rsCar = .Execute()
	  End With
	  rsCar.Close()
	  If CarCmd(0) <> 1 Then
	     EL_Common.ShowErrorMsg(EL_Common.RegExpStaticLabel(EL_Common.Lang("BaseConfig.InfoError", "指定{$ItemName}不存在"), "{$ItemName}", EL_Channel.ItemName))
		 Set rsCar = Nothing
		 Set CarCmd = Nothing
		 Exit Sub
	  End If
	  rsCar.Open()
	  ClassID = rsCar("ClassID")
	  CarName = rsCar("CarName")
	  Seat = rsCar("Seat")
	  Foregift = rsCar("Foregift")
	  PriceHour1 = rsCar("PriceHour1")
	  PriceHour2 = rsCar("PriceHour2")
	  PriceDay1 = rsCar("PriceDay1")
	  PriceDay2 = rsCar("PriceDay2")
	  PriceMonth1 = rsCar("PriceMonth1")
	  PriceMonth2 = rsCar("PriceMonth2")
	  OverExpense = rsCar("OverExpense")
	  Content = rsCar("Content")
	  SkinID = rsCar("SkinID")
	  TemplateID = rsCar("TemplateID")
	  
	  HTML = EL_Common.Template(ChannelID, 7, 0)	
	  
	  HTML = EL_Common.ReplaceCommonLabels(HTML)  
	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$PageTitle}", EL_Common.Join2String(CarName, 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) &"}", rsCar(rsField(0).value))
			If i<FieldCount Then rsField.MoveNext
		 Next
		 rsField.Close()
		 Set rsField = Nothing
		 Set FieldCmd = Nothing
	  End If
	  
	  rsCar.Close()
	  Set rsCar = Nothing
	  Set CarCmd = Nothing	  	  
	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$CarID}", CarID)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$CarName}", CarName)	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Seat}", Seat)	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Foregift}", Foregift)	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$PriceHour1}", PriceHour1)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$PriceHour2}", PriceHour2)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$PriceDay1}", PriceDay1)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$PriceDay2}", PriceDay2)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$PriceMonth1}", PriceMonth1)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$PriceMonth2}", PriceMonth2)
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$OverExpense}", OverExpense)	  
	  HTML = EL_Common.RegExpStaticLabel(HTML, "{$Content}", Content)
	  
	  Response.Write HTML
   End Sub
   
   Private Function GetChildClass()
      Dim ChildCmd, rsChild, RowCount, i, ReturnString, ClassIcon
	  ClassIcon = EL_Common.Lang("BaseConfig.ClassIncludeIcon", " ·")
	  Call EL_Common.InitCommand(ChildCmd, "EL_SP_ClassList")
	  With ChildCmd
	     .Parameters.Append .CreateParameter("RETURN", 2, 4)
		 .Parameters.Append .CreateParameter("@ParentID", 3, 1, 4, ClassID)
		 .Parameters.Append .CreateParameter("@ChannelID", 3, 1, 4, ChannelID)
		 Set rsChild = .Execute()
	  End With
	  rsChild.Close()
	  RowCount = ChildCmd(0)
	  rsChild.Open()
	  ReturnString = ""
	  For i = 1 To RowCount
	     ReturnString = ReturnString & ClassIcon &"<a href='"& InstallDir & EL_Channel.ChannelDir &"/ShowClass.asp?ClassID="& rsChild(0) &"'>"& rsChild(1) &"</a><br>"
		 If i<RowCount Then rsChild.MoveNext
	  Next
	  rsChild.Close()
	  Set rsChild = Nothing
	  Set ChildCmd = Nothing
	  GetChildClass = ReturnString
   End Function
   
   Private Function Label_CurrentClass(ByVal HTML, ByVal ClassName, ByVal ItemCount)
      Dim Match, Matches, ReturnString, Temp
	  Dim TempString, MatchString
	  Dim ArrClassCmd, rsArrClass, SQLCondition, RowCount, i
	  
	  CommonRegExp.Pattern = "\[CurrentClass\][\w\W]*\[\/CurrentClass\]"        
      Set Matches = CommonRegExp.Execute(HTML)
	  ReturnString = HTML
	  EL_Flag = False
	  For Each Match in Matches	
	     If ItemCount > 0 Then
		    Temp = Match.Value
		    Temp = EL_Common.ReplaceText(Temp, "\[CurrentClass\]", "")
		    Temp = EL_Common.ReplaceText(Temp, "\[\/CurrentClass\]", "") 			
			Temp = EL_Common.ReplaceText(Temp, "Current_ClassID", ClassID)
		    Temp = EL_Common.RegExpStaticLabel(Temp, "{$Current_ClassName}", ClassName)
		    Temp = EL_Common.RegExpStaticLabel(Temp, "{$Current_ClassURL}", InstallDir & EL_Channel.ChannelDir &"/ShowClass.asp?ShowType=1&ClassID="& ClassID)
			ShowClassType = 1
		    Temp = Label_GetCarList(Temp)
		    Temp = Label_GetCarPhoto(Temp)
			ShowClassType = 0
		 Else
		    Temp = ""
		 End If
		 ReturnString = Replace(ReturnString, Match.Value, Temp)
      Next	  
	  
	  Set Matches = Nothing
	  EL_Flag = True
	  Label_CurrentClass = ReturnString
   End Function
   
   Private Function Label_ArrClassList(ByVal HTML)
      Dim Match, Matches, ReturnString, Cols, Temp
	  Dim TempString, MatchString
	  Dim ArrClassCmd, rsArrClass, SQLCondition, RowCount, i
	  
	  CommonRegExp.Pattern = "\[arrClassList\(([ 0-9]+)\)\][\w\W]*\[\/arrClassList\]"        
      Set Matches = CommonRegExp.Execute(HTML)
	  ReturnString = HTML
	  EL_Flag = False
	  For Each Match in Matches	
		 MatchString = Match.Value
		 TempString = LCase(Left(MatchString, InStr(MatchString, "]")))
		 TempString = Replace(Replace(TempString, "[", ""), "]", "")
		 TempString = Replace(TempString, " ", "")
		 TempString = Replace(TempString, "arrclasslist", "")
		 TempString = Replace(Replace(TempString, "(", ""), ")", "")
		 Cols = EL_Common.ELClng(TempString)
		 If Cols < 1 Then Cols = 1
		 If ClassID = 0 Then
		    SQLCondition = "ChannelID="& ChannelID &" And ParentID="& ClassID &" And ShowOnIndex="& EL_True &" ORDER BY OrderID"
		 Else
		    SQLCondition = "ChannelID="& ChannelID &" And ParentID="& ClassID &" And ShowOnParent="& EL_True &" ORDER BY OrderID"
		 End If 
		 Call EL_Common.InitCommonCmd(ArrClassCmd, rsArrClass, "EL_Class", "ClassID,ClassName", SQLCondition)
		 rsArrClass.Close()
		 RowCount = ArrClassCmd(0)
		 If RowCount = 0 Then
		    Temp = ""
		 Else
			MatchString = EL_Common.ReplaceText(MatchString, "\[arrClassList\(([ 0-9]+)\)\]", "")
			MatchString = EL_Common.ReplaceText(MatchString, "\[\/arrClassList\]", "")			
			rsArrClass.Open()
			Temp = "<table width=100% border='0' cellpadding='0' cellspacing='0'><tr>"
			Dim ItemHTML, ArrClassID
		    For i = 1 To RowCount
			   ArrClassID = Replace(EL_Common.GetAllClassID(rsArrClass(0)), ",", "|")	
			   ItemHTML = ""		   
			   ItemHTML = EL_Common.RegExpStaticLabel(MatchString, "{$arr_ClassID}", rsArrClass(0).value)			   
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$arr_ClassName}", rsArrClass(1).value)
			   ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$arr_ClassURL}", InstallDir & EL_Channel.ChannelDir &"/ShowClass.asp?ClassID="& rsArrClass(0).value)
			   ItemHTML = EL_Common.ReplaceText(ItemHTML, "arr_AllChildID", ArrClassID)
			   ItemHTML = Label_GetCarList(ItemHTML)
			   ItemHTML = Label_GetCarPhoto(ItemHTML)
			   Temp = Temp &"<td width='"& 100/Cols &"%' valign='top'>"
			   Temp = Temp & ItemHTML
			   Temp = Temp &"</td>"
			   If (i Mod Cols)=0 And i<RowCount Then 
			      Temp = Temp &"</tr><tr>"
			   Else
			   If (i Mod Cols)>0 Then Temp = Temp &"<td>&nbsp;</td>"
			   End If
			   If i<RowCount Then rsArrClass.MoveNext
			Next
			Temp = Temp &"</tr></table>"
			rsArrClass.Close()
		 End if
		 Set rsArrClass = Nothing
		 Set ArrClassCmd = Nothing
		 ReturnString = Replace(ReturnString, Match.Value, Temp)
      Next	  
	  
	  Set Matches = Nothing
	  EL_Flag = True
	  Label_ArrClassList = ReturnString
   End Function
   
   Private Function GetBookNumber()
      Dim RndN, DtNow, Prefix_Car
	  Prefix_Car = EL_Common.GetFieldValue("Prefix_Car", "EL_Config", "1=1")
	  Randomize
	  DtNow = Now()
	  RndN = Cint(9999*rnd)+1000
	  GetBookNumber = year(DtNow) & right("0" & month(DtNow),2) & right("0" & day(DtNow),2) & right("0" & hour(DtNow),2) & right("0" & minute(DtNow),2) & right("0" & second(DtNow),2) & RndN
	  If Len(GetBookNumber)>18 Then GetBookNumber = Left(GetBookNumber, 18)
	  GetBookNumber = Prefix_Car & GetBookNumber
   End Function
   
   Private Function Label_GetCarList(ByVal HTML)
      Dim Match, Matches, ReturnString, Parameters, Temp
	  CommonRegExp.Pattern = "<!--\{\$GetCarList\(([ 0-9]+|[ ]*ChannelID[ ]*),([ 0-9\|]+|[ ]*ClassID[ ]*),([ 0-9]+),([ 0-9]+),([ 0-9]+),[ ]*(True|False)[ ]*,[ ]*(True|False)[ ]*,([ 0-9]+),([ 0-9]+),([ 0-9]+),([ 0-9]+),([ 0-9]+),([ 0-9]+),[ ]*(True|False)[ ]*,[ ]*(True|False)[ ]*,[ \w\""]*,[ \w\""]*,[ \w\""]*\)\}-->"        
      Set Matches = CommonRegExp.Execute(HTML)
	  ReturnString = HTML
	  Temp = ""
      For Each Match in Matches
		 Parameters = EL_Common.GetLabelParameters(Match.Value, "GetCarList")
		 Temp = CarList(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), Parameters(15), Parameters(16), Parameters(17))
		 ReturnString = Replace(ReturnString, Match.Value, Temp)
      Next
	  
	  CommonRegExp.Pattern = "\{\$GetCarList\(([ 0-9]+|[ ]*ChannelID[ ]*),([ 0-9\|]+|[ ]*ClassID[ ]*),([ 0-9]+),([ 0-9]+),([ 0-9]+),[ ]*(True|False)[ ]*,[ ]*(True|False)[ ]*,([ 0-9]+),([ 0-9]+),([ 0-9]+),([ 0-9]+),([ 0-9]+),([ 0-9]+),[ ]*(True|False)[ ]*,[ ]*(True|False)[ ]*,[ \w\""]*,[ \w\""]*,[ \w\""]*\)\}"
	  Set Matches = CommonRegExp.Execute(ReturnString)
	  For Each Match in Matches
		 Parameters = EL_Common.GetLabelParameters(Match.Value, "GetCarList")
		 Temp = CarList(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), Parameters(15), Parameters(16), Parameters(17))
		 ReturnString = Replace(ReturnString, Match.Value, Temp)
      Next
	  Set Matches = Nothing
	  
	  Label_GetCarList = ReturnString
   End Function
   
   Private Function CarList(ByVal iChannelID, ByVal ArrClassID, ByVal CarNum, ByVal TitleLen, ByVal ShowBookButton, ByVal ShowClassName, ByVal IsCommend, ByVal ShowPriceType, ByVal OrderType, ByVal OpenType, ByVal ColNum, ByVal ListType, ByVal ShowIcon, ByVal ShowHint, ByVal ShowPage, ByVal ClassA, ByVal Class1, ByVal Class2)
      Dim CarCmd, rsCar, i, ReturnString
	  Dim PageSizes, RowCount, TotalRowCount, PageCounts
	  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

⌨️ 快捷键说明

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