|
发表于 2006-10-3 00:23:03
|
显示全部楼层
") For i = 0 To UBound(arrTempContents) ArrayList = Split(arrTempContent(i), ",") strTemp = Replace(strTemp, arrTempContents(i), LoadPopularFlash(ArrayList(0), ArrayList(1), ArrayList(2), ArrayList(3), ArrayList(4), ArrayList(5), ArrayList(6), ArrayList(7), ArrayList(8))) Next End If ReadPopularFlash = strTemp End Function '================================================ '函数名:LoadSoftType '作 用:装载软件类型列表 '参 数:chanid ----频道ID ' SoftType ----软件类型 ' maxline ----显示列表数 ' maxlen ----显示标题长度 ' showclass ----是否显示分类 ' showdate ----是否显示日期 ' DateMode ----显示日期模式 ' newindow ----是否新窗口打开连接 ' styles ----样式名称 '================================================ Public Function LoadSoftType(ByVal chanid, ByVal SoftType, ByVal maxlen, _ ByVal maxline, ByVal showclass, ByVal showdate, _ ByVal DateMode, ByVal newindow, ByVal styles)
Dim SQL, Rs, foundsql, strContent, i Dim strSoftName, ChildStr, ListStyle, HtmlFileName, BestCode, BestString Dim ClassName, HtmlFileUrl, SoftTime, LinkTarget, SoftTopic
SoftType = Newasp.CheckStr(SoftType) chanid = Newasp.ChkNumeric(chanid) maxline = Newasp.ChkNumeric(maxline) If chanid = 0 Then chanid = 2 If maxline = 0 Then maxline = 10
On Error Resume Next Newasp.LoadChannel(chanid)
If Trim(SoftType) <> "" Then foundsql = "And A.SoftType='" & SoftType & "' Order By A.SoftTime Desc ,A.SoftID Desc" Else foundsql = "Order By A.SoftTime Desc ,A.SoftID Desc" End If
SQL = " A.SoftID,A.ClassID,A.ColorMode,A.FontMode,A.SoftName,A.SoftVer,A.SoftType,A.AllHits,A.SoftTime,A.HtmlFileDate,A.isBest," SQL = "SELECT TOP " & maxline & SQL & " C.ClassName,C.ColorModes,C.FontModes,C.HtmlFileDir,C.UseHtml FROM [NC_SoftList] A INNER JOIN [NC_Classify] C ON A.ClassID=C.ClassID WHERE A.isAccept>0 And A.ChannelID=" & chanid & " " & foundsql Set Rs = Newasp.Execute(SQL) i = 0 strContent = "" 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(14) strSoftName = Newasp.GotTopic(Rs("SoftName") & " " & Rs("SoftVer"), CInt(maxlen)) strSoftName = Newasp.ReadFontMode(strSoftName, Rs("ColorMode"), Rs("FontMode"))
ClassName = Newasp.ReadFontMode(Rs("ClassName"), Rs("ColorModes"), Rs("FontModes")) HtmlFileName = Newasp.ReadFileName(Rs("HtmlFileDate"), Rs("SoftID"), Newasp.ChannelHtmlExt, Newasp.ChannelPrefix, Newasp.ChannelHtmlForm, "") 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("SoftID") 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 SoftTime = Newasp.ShowDateTime(Rs("SoftTime"), CInt(DateMode)) Else SoftTime = "" End If If CInt(newindow) <> 0 Then LinkTarget = " target=""_blank""" Else LinkTarget = "" End If
SoftTopic = "<a href='" & HtmlFileUrl & "'" & LinkTarget & " title='" & Newasp.ChannelModule & "名称:" & Rs("SoftName") & "
发布时间:" & Rs("SoftTime") & "
下载次数:" & Rs("AllHits") & "' class=showlist>" & strSoftName & "</a>" strContent = Replace(strContent, "{$SoftTopic}", SoftTopic) strContent = Replace(strContent, "{$InstallDir}", Newasp.InstallDir) strContent = Replace(strContent, "{$SoftName}", strSoftName) strContent = Replace(strContent, "{$Title}", Rs("SoftName")) strContent = Replace(strContent, "{$DateAndTitle}", Rs("SoftTime")) 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}", Rs("AllHits")) strContent = Replace(strContent, "{$ListStyle}", ListStyle) strContent = Replace(strContent, "{$BestCode}", BestCode) strContent = Replace(strContent, "{$BestString}", BestString) Rs.MoveNext i = i + 1 Loop strContent = strContent & "</table>" End If Set Rs = Nothing LoadSoftType = strContent End Function '================================================ '函数名:ReadSoftType '作 用:读取软件类型列表 '参 数:str ----原字符串 '================================================ Public Function ReadSoftType(ByVal str) On Error Resume Next Dim strTemp, i, sTempContent Dim nTempContent, ArrayList Dim arrTempContent, arrTempContents
strTemp = str If InStr(strTemp, "{$ReadSoftType(") > 0 Then sTempContent = Newasp.CutMatchContent(strTemp, "{$ReadSoftType(", ")}", 1) nTempContent = Newasp.CutMatchContent(strTemp, "{$ReadSoftType(", ")}", 0) arrTempContents = Split(sTempContent, " |
|