📄 classindex.asp
字号:
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(rsHotel("DefaultPictrue"), InstallDir & ChannelDir &"/"& UploadDir &"/") &""";"& VBCRLF
ReturnString = ReturnString &"PictrueURL["& i-1 &"] = """& InstallDir & ChannelDir &"/ShowHotel.asp?HotelID="& rsHotel("HotelID") &""";"& VBCRLF
If TitleLen >= 0 Then
ReturnString = ReturnString &"PictrueText["& i-1 &"] = """& EL_Common.HTMLDecode(EL_Common.GetTopic(rsHotel("HotelName"), TitleLen)) &""";"& VBCRLF
Else
ReturnString = ReturnString &"PictrueText["& i-1 &"] = """";"& VBCRLF
End If
If i < RowCount Then rsHotel.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'><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 class='piclistn' id='Text_"& PictrueID &"'></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:left;'><a href='"& InstallDir & ChannelDir &"/ShowHotel.asp?HotelID="& rsHotel("HotelID") &"' "
If ShowHint = True Then ReturnString = ReturnString &"title='"& Title_Name &":"& EL_Common.ServerHTMLEncode(rsHotel("HotelName")) & VBCRLF & Title_Level &":"& rsHotel("LevelName") &"' "
ReturnString = ReturnString & EL_Common.ArrOpenType(OpenType) &">"
ReturnString = ReturnString &"<img class='piclisti' src='"& EL_Common.PictrueURL(rsHotel("DefaultPictrue"), InstallDir & ChannelDir &"/"& UploadDir &"/") &"' width='"& PhotoWidth &"' height='"& PhotoHeight &"' border='0'>"
If TitleLen >= 0 Then ReturnString = ReturnString &"<br><span class='piclistn'>"& EL_Common.HTMLEncode(EL_Common.GetTopic(rsHotel("HotelName"), TitleLen)) &"</span>"
ReturnString = ReturnString &"</a></span>"
If ContentLen >=0 Then ReturnString = ReturnString &"<span class='piclistc'>"& EL_Common.GetTopic(EL_Common.RemoveHTML(rsHotel("Content")), ContentLen) &"</span>"
Case 3:
ReturnString = ReturnString &"<a href='"& InstallDir & ChannelDir &"/ShowHotel.asp?HotelID="& rsHotel("HotelID") &"' "
If ShowHint = True Then ReturnString = ReturnString &"title='"& Title_Name &":"& EL_Common.ServerHTMLEncode(rsHotel("HotelName")) & VBCRLF & Title_Level &":"& rsHotel("LevelName") &"' "
ReturnString = ReturnString & EL_Common.ArrOpenType(OpenType) &">"
ReturnString = ReturnString &"<img align='left' class='piclisti' src='"& EL_Common.PictrueURL(rsHotel("DefaultPictrue"), InstallDir & ChannelDir &"/"& UploadDir &"/") &"' width='"& PhotoWidth &"' height='"& PhotoHeight &"' border='0'>"
ReturnString = ReturnString &"</a>"
If TitleLen >= 0 Then
ReturnString = ReturnString &"<a href='"& InstallDir & ChannelDir &"/ShowHotel.asp?HotelID="& rsHotel("HotelID") &"' "
If ShowHint = True Then ReturnString = ReturnString &"title='"& Title_Name &":"& EL_Common.ServerHTMLEncode(rsHotel("HotelName")) & VBCRLF & Title_Level &":"& rsHotel("LevelName") &"' "
ReturnString = ReturnString &"<span class='piclistn'>"& EL_Common.HTMLEncode(EL_Common.GetTopic(rsHotel("HotelName"), TitleLen)) &"</span>"
ReturnString = ReturnString &"</a>"
End If
If ContentLen >=0 Then ReturnString = ReturnString &"<br><span class='piclistc'>"& EL_Common.GetTopic(EL_Common.RemoveHTML(rsHotel("Content")), ContentLen) &"</span>"
Case Else:
ReturnString = ReturnString &"<a href='"& InstallDir & ChannelDir &"/ShowHotel.asp?HotelID="& rsHotel("HotelID") &"' "
If ShowHint = True Then ReturnString = ReturnString &"title='"& Title_Name &":"& EL_Common.ServerHTMLEncode(rsHotel("HotelName")) & VBCRLF & Title_Level &":"& rsHotel("LevelName") &"' "
ReturnString = ReturnString & EL_Common.ArrOpenType(OpenType) &">"
ReturnString = ReturnString &"<img class='piclisti' src='"& EL_Common.PictrueURL(rsHotel("DefaultPictrue"), InstallDir & ChannelDir &"/"& UploadDir &"/") &"' width='"& PhotoWidth &"' height='"& PhotoHeight &"' border='0'>"
If TitleLen >= 0 Then ReturnString = ReturnString &"<br><span class='piclistn'>"& EL_Common.HTMLEncode(EL_Common.GetTopic(rsHotel("HotelName"), TitleLen)) &"</span>"
ReturnString = ReturnString &"</a>"
If ContentLen >=0 Then ReturnString = ReturnString &"<br><span class='piclistc'>"& EL_Common.GetTopic(EL_Common.RemoveHTML(rsHotel("Content")), ContentLen) &"</span>"
End Select
ReturnString = ReturnString &"</td>"
If (i Mod ColNum) = 0 And i<RowCount Then
ReturnString = ReturnString &"</tr><tr>"
End If
If i<RowCount Then rsHotel.MoveNext
Next
ReturnString = ReturnString &"</tr></table>"
End If
rsHotel.Close()
Set rsHotel = Nothing
Set HotelCmd = Nothing
HotelPhoto = ReturnString
End Function
Private Function Label_GetProductList(ByVal HTML)
Dim Match, Matches, ReturnString, Parameters, Temp
CommonRegExp.Pattern = "<!--\{\$GetProductList\(([ 0-9]+),([ 0-9\|]+),([ 0-9]+),([ 0-9]+),[ ]*(True|False)[ ]*,([ 0-9]+),[ ]*(True|False)[ ]*,[ ]*(True|False)[ ]*,[ ]*(True|False)[ ]*,([ 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, "GetProductList")
Temp = ProductList(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(17), Parameters(17), Parameters(18))
ReturnString = Replace(ReturnString, Match.Value, Temp)
Next
CommonRegExp.Pattern = "\{\$GetProductList\(([ 0-9]+),([ 0-9\|]+),([ 0-9]+),([ 0-9]+),[ ]*(True|False)[ ]*,([ 0-9]+),[ ]*(True|False)[ ]*,[ ]*(True|False)[ ]*,[ ]*(True|False)[ ]*,([ 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, "GetProductList")
Temp = ProductList(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(17), Parameters(17), Parameters(18))
ReturnString = Replace(ReturnString, Match.Value, Temp)
Next
Set Matches = Nothing
Label_GetProductList = ReturnString
End Function
Private Function ProductList(ByVal ChannelID, ByVal arrClassID, ByVal ProductNum, ByVal TitleLen, ByVal ShowPrice, ByVal ShowBookButton, ByVal ShowDays, ByVal ShowClassName, ByVal IsCommend, ByVal OrderType, ByVal OpenType, ByVal ColNum, ByVal ListType, ByVal ShowIcon, ByVal ShowHint, ByVal ShowPage, ByVal ClassA, ByVal Class1, ByVal Class2)
Dim ProductCmd, rsProduct, i, ReturnString
Dim PageSizes, RowCount, TotalCount, PageCounts
Dim SQLTables, SQLFields, SQLCondition, SQLOrder, SQL
Dim ChannelCmd, rsChannel, ChannelDir, ChannelModule, ItemName, ItemUnit, Disabled
ChannelID = EL_Common.ELClng(Trim(ChannelID))
Call EL_Common.InitCommonCmd(ChannelCmd, rsChannel, "EL_Channel", "ChannelDir,ChannelModule,ShowPageSize,ItemName,ItemUnit,Disabled", "ChannelID="& ChannelID &" AND ChannelType=0")
rsChannel.Close()
If ChannelCmd(0) <> 1 Then
Set rsChannel = Nothing
Set ChannelCmd = Nothing
ProductList = EL_Common.Lang("BaseConfig.ChannelError", "·频道参数错误")
Exit Function
Else
rsChannel.Open()
ChannelDir = rsChannel(0)
ChannelModule = rsChannel(1)
PageSizes = rsChannel(2)
ItemName = rsChannel(3)
ItemUnit = rsChannel(4)
Disabled = rsChannel(5)
rsChannel.Close()
End If
Set rsChannel = Nothing
Set ChannelCmd = Nothing
If ChannelModule <> 3 Then
ProductList = EL_Common.Lang("BaseConfig.ChannelModuleError", "·频道模块错误")
Exit Function
End If
If Disabled Then
ProductList = EL_Common.Lang("BaseConfig.Disabled", "·该频道已被禁用")
Exit Function
End If
ProductNum = EL_Common.ELClng(ProductNum)
TitleLen = EL_Common.ELClng(TitleLen)
ShowPrice = Eval(ShowPrice)
ShowBookButton = EL_Common.ELClng(ShowBookButton)
ShowDays = Eval(ShowDays)
ShowClassName = Eval(ShowClassName)
IsCommend = Eval(IsCommend)
OrderType = EL_Common.ELClng(OrderType)
OpenType = EL_Common.ELClng(OpenType)
ColNum = EL_Common.ELClng(ColNum)
ListType = EL_Common.ELClng(ListType)
ShowIcon = EL_Common.ELClng(ShowIcon)
ShowHint = Eval(ShowHint)
ShowPage = Eval(ShowPage)
SQLTables = "EL_Product,EL_Class"
SQLFields = "EL_Product.ProductID,EL_Product.ProductName,EL_Product.Days"
If ShowPrice Then SQLFields = SQLFields &",EL_Product.LeastPerson,EL_Product.Price"
If ShowClassName Then SQLFields = SQLFields &",EL_Class.ClassID,EL_Class.ClassName"
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.ClassID=EL_Class.ClassID And EL_Product.Passed="& EL_True &" And EL_Product.Deleted="& EL_False &" "
If ArrClassID = "" Or ArrClassID = "0" Or Replace(ArrClassID, "|", "") = "" Then
'SQLCondition = SQLCondition &""
Else
ArrClassID = EL_Common.GetAllClassID(ArrClassID)
SQLCondition = SQLCondition &"AND EL_Product.ClassID In("& ArrClassID &") "
End If
If IsCommend Then SQLCondition = SQLCondition &" AND EL_Product.Commended="& EL_True &" "
ReturnString = ""
ShowPage = False
If ShowPage Then
'=======================================
' 网站首页调用不设置分页
'=======================================
Else
If ProductNum < 1 Then ProductNum = EL_Common.Lang("Product.TopNum", 5)
Call EL_Common.InitCommonCmd(ProductCmd, rsProduct, SQLTables, " TOP "& ProductNum &" "& SQLFields, SQLCondition &" ORDER BY "& SQLOrder)
rsProduct.Close()
RowCount = ProductCmd(0)
If RowCount = 0 Then
Set rsProduct = Nothing
Set ProductCmd = Nothing
ProductList = EL_Common.RegExpStaticLabel(EL_Common.Lang("BaseConfig.NoList", "·没有任何{$ItemName}"), "{$ItemName}", ItemName)
Exit Function
Else
Dim Title_Name, Title_Days, Title_BookPrice, PriceIcon, PriceUnit, DayName, ArrClass(2), vBookPrice
If ShowHint = True Then
Title_Name = EL_Common.RegExpStaticLabel(EL_Common.Lang("Product.Name", "{$ItemName}名称"), "{$ItemName}", ItemName)
Title_Days = EL_Common.Lang("Product.Days", "天 数")
Title_BookPrice = EL_Common.Lang("BaseConfig.BookPrice", "预订价")
End If
DayName = EL_Common.Lang("Product.DayName", "天")
PriceUnit = EL_Common.Lang("Product.PriceUnit", "元/人")
PriceIcon = EL_Common.Lang("BaseConfig.PriceIcon", "¥")
rsProduct.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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -