📄 cls_public.asp
字号:
BestString = ""
End If
If showclass > 0 Then
ClassLength = Newasp.strLength(SQL(10,i))
Else
ClassLength = 0
End If
strContent = strContent & Newasp.MainSetting(14)
strSoftName = Newasp.GotTopic(SQL(4,i) & " " & SQL(5,i), CInt(strLen) - ClassLength)
strSoftName = Newasp.ReadFontMode(strSoftName, SQL(2,i), SQL(3,i))
ClassName = Newasp.ReadFontMode(SQL(10,i), SQL(11,i), SQL(12,i))
HtmlFileName = Newasp.ReadFileName(SQL(8,i), SQL(0,i), Newasp.ChannelHtmlExt, Newasp.ChannelPrefix, Newasp.ChannelHtmlForm, "")
If CInt(Newasp.ChannelUseHtml) <> 0 Then
HtmlFileUrl = ShowChannelPath(Newasp.ChannelPath,SQL(13,i)) & Newasp.ShowDatePath(SQL(8,i), Newasp.ChannelHtmlPath) & HtmlFileName
ClassName = "<a href='" & Newasp.ChannelPath & SQL(13,i) & "index" & Newasp.ChannelHtmlExt & "'>" & ClassName & "</a>"
Else
HtmlFileUrl = Newasp.ChannelPath & "show.asp?id=" & SQL(0,i)
ClassName = "<a href='" & Newasp.ChannelPath & "list.asp?classid=" & SQL(1,i) & "'>" & ClassName & "</a>"
End If
If CInt(showclass) = 0 Then ClassName = ""
If CInt(showdate) <> 0 Then
SoftTime = Newasp.ShowDateTime(SQL(7,i), CInt(DateMode))
Else
SoftTime = ""
End If
If CInt(newindow) <> 0 Then
LinkTarget = " target=""_blank"""
Else
LinkTarget = ""
End If
SoftTopic = "<a href='" & HtmlFileUrl & "'" & LinkTarget & " class=""showlist""" & LoadRemark(SQL(4,i) & " " & SQL(5,i)) &">" & strSoftName & "</a>"
strContent = Replace(strContent, "{$SoftTopic}", SoftTopic)
strContent = Replace(strContent, "{$SoftID}", Rs("softid"))
strContent = Replace(strContent, "{$InstallDir}", Newasp.InstallDir)
strContent = Replace(strContent, "{$SoftName}", strSoftName)
strContent = Replace(strContent, "{$Title}", SQL(4,i))
strContent = Replace(strContent, "{$DateAndTitle}", SQL(7,i))
strContent = Replace(strContent, "{$HtmlFileUrl}", HtmlFileUrl)
strContent = Replace(strContent, "{$ClassName}", ClassName)
strContent = Replace(strContent, "[]", "")
strContent = Replace(strContent, "{$Target}", LinkTarget)
strContent = Replace(strContent, "{$SoftTime}", SoftTime)
strContent = Replace(strContent, "{$SoftHits}", SQL(6,i))
strContent = Replace(strContent, "{$ListStyle}", ListStyle)
strContent = Replace(strContent, "{$BestCode}", BestCode)
strContent = Replace(strContent, "{$BestString}", BestString)
j = j + 1
Next
SQL=Null
strContent = strContent & "</table>"
End If
Rs.Close: Set Rs = Nothing
LoadSoftList = strContent
End Function
'================================================
'函数名:ReadSoftList
'作 用:读取软件列表
'参 数:str ----原字符串
'================================================
Public Function ReadSoftList(ByVal str)
Dim strTemp, i
Dim sTempContent, nTempContent
Dim arrTempContent, arrTempContents, ArrayList
On Error Resume Next
strTemp = str
If InStr(strTemp, "{$ReadSoftList(") > 0 Then
sTempContent = Newasp.CutMatchContent(strTemp, "{$ReadSoftList(", ")}", 1)
nTempContent = Newasp.CutMatchContent(strTemp, "{$ReadSoftList(", ")}", 0)
arrTempContents = Split(sTempContent, "|||")
arrTempContent = Split(nTempContent, "|||")
For i = 0 To UBound(arrTempContents)
ArrayList = Split(arrTempContent(i), ",")
strTemp = Replace(strTemp, arrTempContents(i), LoadSoftList(ArrayList(0), ArrayList(1), ArrayList(2), ArrayList(3), ArrayList(4), ArrayList(5), ArrayList(6), ArrayList(7), ArrayList(8), ArrayList(9), ArrayList(10)))
Next
End If
ReadSoftList = strTemp
End Function
'================================================
'函数名:LoadShopList
'作 用:装载商品列表
'参 数:ClassID ----分类ID
' ChannelID ----频道ID
' sType ----调用类型
' TopNum ----显示列表数
' strlen ----显示标题长度
' ShowClass ----是否显示分类
' ShowDate ----是否显示日期
' DateMode ----显示日期模式
' newindow ----新窗口打开
'================================================
Public Function LoadShopList(ByVal ChannelID, ByVal ClassID, ByVal SpecialID, _
ByVal stype, ByVal TopNum, ByVal strLen, ByVal showclass, _
ByVal showdate, ByVal DateMode, ByVal newindow, ByVal styles)
Dim Rs, SQL, i, strContent, foundstr
Dim sTradeName, ChildStr, ListStyle, HtmlFileName, BestCode, BestString
Dim ClassName, HtmlFileUrl, addTime, LinkTarget, TradeTopic, PastPrice, NowPrice
ChannelID = Newasp.ChkNumeric(ChannelID)
ClassID = Newasp.ChkNumeric(ClassID)
SpecialID = Newasp.ChkNumeric(SpecialID)
stype = Newasp.ChkNumeric(stype)
On Error Resume Next
Newasp.LoadChannel(ChannelID)
If CInt(stype) >= 3 And CLng(ClassID) <> 0 Then
SQL = "select ChildStr from [NC_Classify] where ChannelID = " & ChannelID & " And ClassID = " & ClassID
Set Rs = Newasp.Execute(SQL)
If Rs.BOF And Rs.EOF Then
Set Rs = Nothing
LoadShopList = ""
Exit Function
Else
ChildStr = Rs("ChildStr")
End If
Rs.Close
Else
ChildStr = 0
End If
Select Case CInt(stype)
Case 0: foundstr = "Order By A.addTime Desc ,A.ShopID Desc"
Case 1: foundstr = "And A.isBest > 0 Order By A.addTime Desc ,A.ShopID Desc"
Case 2: foundstr = "Order By A.AllHits Desc ,A.ShopID Desc"
Case 3: foundstr = "And A.ClassID in (" & ChildStr & ") Order By A.addTime Desc ,A.ShopID Desc"
Case 4: foundstr = "And A.ClassID in (" & ChildStr & ") And A.isBest > 0 Order By A.addTime Desc ,A.ShopID Desc"
Case 5: foundstr = "And A.ClassID in (" & ChildStr & ") Order By A.AllHits Desc ,A.ShopID Desc"
Case Else
foundstr = "Order By A.addTime Desc ,A.ShopID Desc"
End Select
If CInt(stype) >= 3 And CLng(ClassID) = 0 Then
foundstr = "Order By A.addTime Desc ,A.ShopID Desc"
End If
If CLng(SpecialID) <> 0 Then
foundstr = "And A.SpecialID =" & CLng(SpecialID) & " " & foundstr
End If
SQL = " A.ShopID,A.ClassID,A.TradeName,A.PastPrice,A.NowPrice,A.addTime,A.AllHits,A.HtmlFileDate,A.isBest,"
SQL = "select Top " & CInt(TopNum) & SQL & " C.ClassName,C.ColorModes,C.FontModes,C.HtmlFileDir,C.UseHtml from [NC_ShopList] A inner join [NC_Classify] C On A.ClassID=C.ClassID where A.isAccept>0 And A.ChannelID=" & ChannelID & " " & foundstr & ""
Set Rs = Newasp.Execute(SQL)
i = 0
If Rs.BOF And Rs.EOF Then
strContent = "没有添加任何商品!"
Else
strContent = "<table width=""100%"" border=0 cellpadding=2 cellspacing=0>"
Do While Not Rs.EOF
If (i Mod 2) = 0 Then
ListStyle = Trim(styles) & 1
Else
ListStyle = Trim(styles) & 2
End If
If Rs("isBest") <> 0 Then
BestCode = 2
BestString = "<font color='" & Newasp.MainSetting(3) & "'>推荐</font>"
Else
BestCode = 1
BestString = ""
End If
strContent = strContent & Newasp.MainSetting(15)
sTradeName = Newasp.GotTopic(Rs("TradeName"), CInt(strLen))
HtmlFileName = Newasp.ReadFileName(Rs("HtmlFileDate"), Rs("ShopID"), Newasp.ChannelHtmlExt, Newasp.ChannelPrefix, Newasp.ChannelHtmlForm, "")
ClassName = Newasp.ReadFontMode(Rs("ClassName"), Rs("ColorModes"), Rs("FontModes"))
If CInt(Newasp.ChannelUseHtml) <> 0 Then
HtmlFileUrl = Newasp.ChannelPath & Rs("HtmlFileDir") & Newasp.ShowDatePath(Rs("HtmlFileDate"), Newasp.ChannelHtmlPath) & HtmlFileName
ClassName = "<a href='" & Newasp.ChannelPath & Rs("HtmlFileDir") & "index" & Newasp.ChannelHtmlExt & "'>" & ClassName & "</a>"
Else
HtmlFileUrl = Newasp.ChannelPath & "show.asp?id=" & Rs("ShopID")
ClassName = "<a href='" & Newasp.ChannelPath & "list.asp?classid=" & Rs("ClassID") & "'>" & ClassName & "</a>"
End If
If CInt(showclass) = 0 Then ClassName = ""
If CInt(showdate) <> 0 Then
addTime = Newasp.ShowDateTime(Rs("addTime"), CInt(DateMode))
Else
addTime = ""
End If
If CInt(newindow) <> 0 Then
LinkTarget = " target=""_blank"""
Else
LinkTarget = ""
End If
PastPrice = FormatCurrency(Rs("PastPrice"), , -1)
NowPrice = FormatCurrency(Rs("NowPrice"), , -1)
TradeTopic = "<a href='" & HtmlFileUrl & "'" & LinkTarget & " title='" & Newasp.ChannelModule & "名称:" & Rs("TradeName") & " 上架时间:" & Rs("addTime") & " 订购次数:" & Rs("AllHits") & " " & Newasp.ChannelModule & "价格:" & NowPrice & " 元' class=showlist>" & sTradeName & "</a>"
strContent = Replace(strContent, "{$TradeTopic}", TradeTopic)
strContent = Replace(strContent, "{$ShopID}", Rs("shopid"))
strContent = Replace(strContent, "{$InstallDir}", Newasp.InstallDir)
strContent = Replace(strContent, "{$TradeName}", sTradeName)
strContent = Replace(strContent, "{$Title}", Rs("TradeName"))
strContent = Replace(strContent, "{$DateAndTitle}", Rs("addTime"))
strContent = Replace(strContent, "{$HtmlFileUrl}", HtmlFileUrl)
strContent = Replace(strContent, "{$ClassName}", ClassName)
strContent = Replace(strContent, "[]", "")
strContent = Replace(strContent, "{$Target}", LinkTarget)
strContent = Replace(strContent, "{$addTime}", addTime)
strContent = Replace(strContent, "{$ShopHits}", Rs("AllHits"))
strContent = Replace(strContent, "{$ListStyle}", ListStyle)
strContent = Replace(strContent, "{$BestCode}", BestCode)
strContent = Replace(strContent, "{$BestString}", BestString)
strContent = Replace(strContent, "{$PastPrice}", PastPrice)
strContent = Replace(strContent, "{$NowPrice}", NowPrice)
Rs.MoveNext
i = i + 1
Loop
strContent = strContent & "</table>"
End If
Rs.Close: Set Rs = Nothing
LoadShopList = strContent
End Function
'================================================
'函数名:ReadShopList
'作 用:读取商品列表
'参 数:str ----原字符串
'================================================
Public Function ReadShopList(ByVal str)
Dim strTemp, i
Dim sTempContent, nTempContent
Dim arrTempContent, arrTempContents, ArrayList
On Error Resume Next
strTemp = str
If InStr(strTemp, "{$ReadShopList(") > 0 Then
sTempContent = Newasp.CutMatchContent(strTemp, "{$ReadShopList(", ")}", 1)
nTempContent = Newasp.CutMatchContent(strTemp, "{$ReadShopList(", ")}", 0)
arrTempContents = Split(sTempContent, "|||")
arrTempContent = Split(nTempContent, "|||")
For i = 0 To UBound(arrTempContents)
ArrayList = Split(arrTempContent(i), ",")
strTemp = Replace(strTemp, arrTempContents(i), LoadShopList(ArrayList(0), ArrayList(1), ArrayList(2), ArrayList(3), ArrayList(4), ArrayList(5), ArrayList(6), ArrayList(7), ArrayList(8), ArrayList(9), ArrayList(10)))
Next
End If
ReadShopList = strTemp
Exit Function
End Function
'================================================
'函数名:LoadFlashList
'作 用:装载动画列表
'参 数:ClassID ----分类ID
' ChannelID ----频道ID
' sType ----调用类型
' TopNum ----显示列表数
' strlen ----显示标题长度
' ShowClass ----是否显示分类
' ShowDate ----是否显示日期
' DateMode ----显示日期模式
' newindow ----新窗口打开
'================================================
Public Function LoadFlashList(ByVal ChannelID, ByVal ClassID, ByVal SpecialID, _
ByVal stype, ByVal TopNum, ByVal strLen, ByVal showclass, _
ByVal showdate, ByVal DateMode, ByVal newindow, ByVal styles)
Dim Rs, SQL, i, strContent, foundstr,j
Dim strTitle, ChildStr, ListStyle, ClassLength
Dim HtmlFileName, BestCode, BestString,ChannelPath
Dim ClassName, HtmlFileUrl, addTime, LinkTarget, FlashTopic
ChannelID = Newasp.ChkNumeric(ChannelID)
ClassID = Newasp.ChkNumeric(ClassID)
SpecialID = Newasp.ChkNumeric(SpecialID)
stype = Newasp.ChkNumeric(stype)
On Error Resume Next
Newasp.LoadChannel(ChannelID)
If CInt(stype) >= 3 And CInt(stype) <> 9 And CLng(ClassID) <> 0 Then
SQL = "SELECT ChildStr FROM [NC_Classify] WHERE ChannelID=" & ChannelID & " And ClassID = " & ClassID
Set Rs = Newasp.Execute(SQL)
If Rs.BOF And Rs.EOF Then
Set Rs = Nothing
LoadFlashList = ""
Exit Function
Else
ChildStr = Rs("ChildStr")
End If
Rs.Close
Else
ChildStr = 0
End If
Select Case CInt(stype)
Case 0: foundstr = "Order By A.addTime Desc ,A.flashid Desc"
Case 1: foundstr = "And A.isBest > 0 Order By A.addTime Desc ,A.flashid Desc"
Case 2: foundstr = "Order By A.AllHits Desc ,A.flashid Desc"
Case 3: foundstr = "And A.ClassID in (" & ChildStr & ") Order By A.addTime Desc ,A.flashid Desc"
Case 4: foundstr = "And A.ClassID in (" & ChildStr & ") And A.isBest > 0 Order By A.addTime Desc ,A.flashid Desc"
Case 5: foundstr = "And A.ClassID in (" & ChildStr & ") Order By A.AllHits Desc ,A.flashid Desc"
Case 9
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -