📄 classcar.asp
字号:
HTML = EL_Common.RegExpStaticLabel(HTML, "{$PageTitle}", EL_Common.Join2String(EL_Common.Join2String(StrCommend, EL_Channel.ChannelName, EL_Common.TitleDivide), SiteTitle, EL_Common.TitleDivide))
HTML = EL_Common.RegExpStaticLabel(HTML, "{$DefaultSkin}", EL_Common.Skin(ChannelID, 0, 0))
EL_Common.ShowPath = EL_Common.ShowPath & EL_Common.Lang("BaseConfig.Path", " >> ") &"<a href='"& InstallDir & EL_Channel.ChannelDir &"/'>"& EL_Channel.ChannelName &"</a>"& EL_Common.Lang("BaseConfig.Path", " >> ") & StrCommend
HTML = EL_Common.RegExpStaticLabel(HTML, "{$ShowPath}", EL_Common.ShowPath)
HTML = ChannelCommonLabels(HTML)
HTML = EL_Common.RegExpStaticLabel(HTML, "{$ShowCommendList}", CarList(ChannelID, 0, 7, 90, 1, False, True, 2, 4, 0, 1, 1, 4, True, True, "", "", ""))
HTML = Label_GetCarList(HTML)
HTML = Label_GetCarPhoto(HTML)
Response.Write HTML
End Sub
Public Sub Search()
Dim SearchCmd, rsSearch, RowCount, i, StrPath
Dim PageSizes, PageCounts, TotalRowCount
Dim PriceArea, MinPrice, MaxPrice
Dim CarName, Seat, HireType, Price, Keyword
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
ClassID = EL_Common.ELRequest("ClassID", 2)
CarName = EL_Common.ELRequest("CarName", 3)
Seat = EL_Common.ELRequest("Seat", 2)
HireType = EL_Common.ELRequest("HireType", 2)
Price = EL_Common.ELRequest("Price", 2)
Keyword = EL_Common.ELRequest("Keyword", 3)
PriceArea = EL_Common.Lang("Car.SearchField.PriceArea.a"& 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_SearchCar")
With SearchCmd
.Parameters.Append .CreateParameter("RETURN", 2, 4)
.Parameters.Append .CreateParameter("@ChannelID", 3, 1, 4, ChannelID)
.Parameters.Append .CreateParameter("@ClassID", 3, 1, 4, ClassID)
.Parameters.Append .CreateParameter("@CarName", 200, 1, 255, CarName)
.Parameters.Append .CreateParameter("@Seat", 3, 1, 4, Seat)
.Parameters.Append .CreateParameter("@HireType", 3, 1, 4, HireType)
.Parameters.Append .CreateParameter("@MinPrice", 6, 1, 8, MinPrice)
.Parameters.Append .CreateParameter("@MaxPrice", 6, 1, 8, MaxPrice)
.Parameters.Append .CreateParameter("@Keyword", 200, 1, 255, Keyword)
.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 rsSearch = .Execute()
End With
rsSearch.Close()
PageSizes = SearchCmd(11)
TotalRowCount = SearchCmd(12)
PageCounts = SearchCmd(13)
RowCount = SearchCmd(14)
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", " >> ")
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_ClassID}", ClassID)
HTML = EL_Common.RegExpStaticLabel(HTML, "{$Search_CarName}", CarName)
HTML = EL_Common.RegExpStaticLabel(HTML, "{$Search_Seat}", Seat)
HTML = EL_Common.RegExpStaticLabel(HTML, "{$Search_HireType}", HireType)
HTML = EL_Common.RegExpStaticLabel(HTML, "{$Search_Price}", Price)
HTML = EL_Common.RegExpStaticLabel(HTML, "{$Search_Keyword}", Keyword)
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> </p>搜索不到任何{$ItemName}<p> </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\]", "")
ReturnString = ""
Dim ItemHTML
For i = 1 To RowCount
ItemHTML = MatchString
ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_CarID}", rsSearch("CarID"))
ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_CarName}", EL_Common.HTMLEncode(rsSearch("CarName")))
If rsSearch("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_PriceHour1}", PriceIcon & rsSearch("PriceHour1"))
ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_PriceHour2}", PriceIcon & rsSearch("PriceHour2"))
ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_PriceDay1}", PriceIcon & rsSearch("PriceDay1"))
ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_PriceDay2}", PriceIcon & rsSearch("PriceDay2"))
ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_PriceMonth1}", PriceIcon & rsSearch("PriceMonth1"))
ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_PriceMonth2}", PriceIcon & rsSearch("PriceMonth1"))
ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_OverExpense}", EL_Common.HTMLEncode(rsSearch("OverExpense")))
If Trim(rsSearch("DefaultPictrue")) = "" Then
ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_DefaultPictrue}", "")
Else
ItemHTML = EL_Common.RegExpStaticLabel(ItemHTML, "{$Arr_DefaultPictrue}", "<img src='"& EL_Common.PictrueURL(rsSearch("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(rsSearch("Content")), EL_Common.Lang("Car.ContentLen", 250)))
ReturnString = ReturnString & ItemHTML
If i<RowCount Then rsSearch.MoveNext
Next
HTML = Replace(HTML, Match.Value, ReturnString)
Next
rsSearch.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_GetCarList(HTML)
HTML = Label_GetCarPhoto(HTML)
Set Matches = Nothing
Set rsSearch = Nothing
Set SearchCmd = Nothing
Session("EL_LastSearchDateTime") = Now()
Response.Write HTML
End Sub
Public Sub ShowCar()
Dim CarCmd, rsCar, i
Dim CarID, CarName, Seat, Foregift, PriceHour1, PriceHour2, PriceDay1, PriceDay2, PriceMonth1, PriceMonth2
Dim OverExpense, Content, SkinID, TemplateID
CarID = EL_Common.ELRequest("CarID", 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, 3, TemplateID)
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", " >> ")
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)
Dim CarAction
CarAction = EL_Common.Lang("Car.CarAction", "")
If CarAction<>"" Then
CarAction = EL_Common.ReplaceText(CarAction, "\{\$SendCommentURL\}", InstallDir & EL_Channel.ChannelDir &"/Comment.asp?InfoID="& CarID &"#Add")
CarAction = EL_Common.ReplaceText(CarAction, "\{\$ShowCommentURL\}", InstallDir & EL_Channel.ChannelDir &"/Comment.asp?InfoID="& CarID)
CarAction = EL_Common.ReplaceText(CarAction, "\{\$AddFavoriteURL\}", InstallDir & "User/User_Favorite.asp?ChannelID="& ChannelID &"&InfoID="& CarID &"&Action=Add")
CarAction = EL_Common.ReplaceText(CarAction, "\{\$SendToFriendURL\}", InstallDir & EL_Channel.ChannelDir &"/SendToFriend.asp?InfoID="& CarID )
CarAction = EL_Common.ReplaceText(CarAction, "\{\$PintURL\}", InstallDir & EL_Channel.ChannelDir &"/Print.asp?InfoID="& CarID)
End If
HTML = EL_Common.RegExpStaticLabel(HTML, "{$CarAction}", CarAction)
HTML = Label_ShowComment(HTML, CarID)
HTML = Label_GetCarList(HTML)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -