📄 flashchannel.asp
字号:
If i >= maxperpage Then Exit Do
Loop
Dim strHtmlFront, strHtmlPage
If t = 1 Then
sulCurrentPage = Newasp.HtmlPrefix & "Best"
ElseIf t = 2 Then
sulCurrentPage = Newasp.HtmlPrefix & "Hot"
Else
sulCurrentPage = Newasp.HtmlPrefix & "New"
End If
strHtmlFront = sulCurrentPage
strHtmlPage = ShowHtmlPage(CurrentPage, TotalPageNum, TotalNumber, maxperpage, strHtmlFront, Newasp.HtmlExtName, strClassName)
HtmlTemplate = HtmlContent
HtmlTemplate = Replace(HtmlTemplate, TempListContent, ListContent)
HtmlTemplate = Replace(HtmlTemplate, "{$ReadListPage}", strHtmlPage)
HtmlTemplate = Replace(HtmlTemplate, "[ShowRepetend]", "")
HtmlTemplate = Replace(HtmlTemplate, "[/ShowRepetend]", "")
'开始生成子分类的HTML页
HtmlFileName = HtmlFilePath & sulCurrentPage & Newasp.Supplemental(CurrentPage, 3) & Newasp.HtmlExtName
Newasp.CreatedTextFile HtmlFileName, HtmlTemplate
If IsShowFlush = 1 Then
Response.Write "<li style=""font-size: 12px;"">生成" & Newasp.ModuleName & "列表HTML完成... <a href=" & HtmlFileName & " target=_blank>" & Server.MapPath(HtmlFileName) & "</a></li>" & vbNewLine
Response.Flush
End If
Next
End Sub
'#############################\\执行专题软件开始//#############################
Public Sub BuildFlashSpecial()
'On Error Resume Next
If CreateHtml <> 0 Then
Response.Redirect (ChannelRootDir & "index" & Newasp.HtmlExtName)
Exit Sub
Else
Newasp.PreventInfuse
If Not IsNumeric(Request("page")) And Len(Request("page")) <> 0 Then
Response.Write ("错误的系统参数!请输入整数")
Response.End
End If
If Not IsEmpty(Request("page")) And Len(Request("page")) <> 0 Then
CurrentPage = CLng(Request("page"))
Else
CurrentPage = 1
End If
SpecialID = Newasp.ChkNumeric(Request("sid"))
Response.Write LoadFlashSpecial(SpecialID, 1)
End If
End Sub
'=================================================
'过程名:LoadFlashSpecial
'作 用:载入其它FLASH专题列表
'=================================================
Public Function LoadFlashSpecial(sid,n)
'On Error Resume Next
Dim rsPecial
Dim HtmlFileName
PageType = 2
If Not IsNumeric(SpecialID) Then Exit Function
Set rsPecial = Newasp.Execute("SELECT SpecialID,SpecialName,SpecialDir FROM [NC_Special] WHERE ChannelID = " & ChannelID & " And SpecialID=" & sid)
If rsPecial.BOF And rsPecial.EOF Then
Response.Write ("错误的系统参数!")
Set rsPecial = Nothing
Exit Function
Else
SpecialName = rsPecial("SpecialName")
SpecialID = rsPecial("SpecialID")
SpecialDir = rsPecial("SpecialDir")
skinid = CLng(Newasp.ChannelSkin)
End If
rsPecial.Close: Set rsPecial = Nothing
Newasp.LoadTemplates ChannelID, 4, skinid
If CreateHtml <> 0 Then
HtmlFilePath = Newasp.InstallDir & Newasp.ChannelDir & "special/" & SpecialDir & "/"
Newasp.CreatPathEx (HtmlFilePath)
End If
HtmlContent = Newasp.HtmlContent
HtmlContent = Replace(HtmlContent, "{$ChannelRootDir}", ChannelRootDir)
HtmlContent = Replace(HtmlContent, "{$InstallDir}", strInstallDir)
HtmlContent = Replace(HtmlContent, "{$ChannelID}", ChannelID)
HtmlContent = Replace(HtmlContent, "{$ModuleName}", Newasp.ModuleName)
HtmlContent = Replace(HtmlContent, "{$SpecialID}", SpecialID)
HtmlContent = Replace(HtmlContent, "{$PageTitle}", SpecialName)
HtmlContent = Replace(HtmlContent, "{$SoftIndex}", strIndexName)
HtmlContent = Replace(HtmlContent, "{$SpecialName}", SpecialName)
Call ReplaceString
maxperpage = CInt(Newasp.HtmlSetting(1))
If CLng(CurrentPage) = 0 Then CurrentPage = 1
'记录总数
TotalNumber = Newasp.Execute("SELECT COUNT(FlashID) from NC_FlashList WHERE ChannelID = " & ChannelID & " And isAccept > 0 And SpecialID = " & SpecialID)(0)
TotalPageNum = CLng(TotalNumber / maxperpage) '得到总页数
If TotalPageNum < TotalNumber / maxperpage Then TotalPageNum = TotalPageNum + 1
If CurrentPage < 1 Then CurrentPage = 1
If CurrentPage > TotalPageNum Then CurrentPage = TotalPageNum
Set Rs = CreateObject("ADODB.Recordset")
SQL = "SELECT A.flashid,A.ClassID,A.title,A.ColorMode,A.FontMode,A.Introduce,A.[filesize],A.Author,A.star,A.miniature,A.UserName,A.addTime,A.AllHits,A.grade,A.IsTop,A.HtmlFileDate,A.isBest,C.ClassName,C.ParentID,C.ParentStr,C.skinid,C.HtmlFileDir,C.ChildStr,C.UseHtml FROM [NC_FlashList] A INNER JOIN [NC_Classify] C On A.ClassID=C.ClassID WHERE A.ChannelID=" & ChannelID & " And A.isAccept > 0 And A.SpecialID = " & SpecialID & " ORDER BY A.isTop DESC, A.addTime DESC ,A.FlashID DESC"
If isSqlDataBase = 1 Then
Set Rs = Newasp.Execute(SQL)
Else
Rs.Open SQL, Conn, 1, 1
End If
If Rs.BOF And Rs.EOF Then
'如果没有找到相关内容,清除掉无用的标签代码
HtmlContent = Replace(HtmlContent, "{$ReadListPage}", "还没有找到任何专题" & Newasp.ModuleName & "")
HtmlContent = Replace(HtmlContent, Newasp.CutFixContent(HtmlContent, "[ShowRepetend]", "[/ShowRepetend]", 1), "")
'如果是生成HTML,执行下面的语句
If CreateHtml <> 0 Then
HtmlFileName = HtmlFilePath & Newasp.SpecialFileName(SpecialID, Newasp.HtmlExtName, 1)
Newasp.CreatedTextFile HtmlFileName, HtmlContent
If IsShowFlush = 1 Then
Response.Write "<li style=""font-size: 12px;"">生成" & strClassName & "HTML完成... <a href=" & HtmlFileName & " target=_blank>" & Server.MapPath(HtmlFileName) & "</a></li>" & vbNewLine
Response.Flush
End If
End If
Else
'获取模板标签[ShowRepetend][/ReadSoftList]中的字符串
TempListContent = Newasp.CutFixContent(HtmlContent, "[ShowRepetend]", "[/ShowRepetend]", 1)
If CreateHtml <> 0 Then
Call LoadFlashListHtml(n)
Else
Call LoadFlashAspList
End If
End If
Rs.Close: Set Rs = Nothing
If CreateHtml = 0 Then LoadFlashSpecial = HtmlContent
End Function
'================================================
'过程名:LoadFlashListHtml
'作 用:装载FLASH专题列表并生成HTML
'================================================
Private Sub LoadFlashListHtml(n)
Dim HtmlFileName
If IsNull(TempListContent) Then Exit Sub
For CurrentPage = n To TotalPageNum
Rs.MoveFirst
i = 0
If TotalPageNum > 1 Then Rs.Move (CurrentPage - 1) * maxperpage
'Dim bookmark:bookmark = Rs.bookmark
ListContent = ""
j = (CurrentPage - 1) * maxperpage + 1
Do While Not Rs.EOF And i < CInt(maxperpage)
If Not Response.IsClientConnected Then Response.End
Call LoadListDetail
Rs.MoveNext
i = i + 1
j = j + 1
If i >= maxperpage Then Exit Do
Loop
Dim strHtmlFront, strHtmlPage
strHtmlFront = "Special" & Newasp.Supplemental(SpecialID, 3) & "_"
strHtmlPage = htmlshowpage(CurrentPage, TotalPageNum, TotalNumber, maxperpage, strHtmlFront, Newasp.HtmlExtName, SpecialName)
HtmlTemplate = HtmlContent
HtmlTemplate = Replace(HtmlTemplate, TempListContent, ListContent)
HtmlTemplate = Replace(HtmlTemplate, "{$ReadListPage}", strHtmlPage)
HtmlTemplate = Replace(HtmlTemplate, "[ShowRepetend]", "")
HtmlTemplate = Replace(HtmlTemplate, "[/ShowRepetend]", "")
'开始生成子分类的HTML页
HtmlFileName = HtmlFilePath & Newasp.SpecialFileName(SpecialID, Newasp.HtmlExtName, CurrentPage)
Newasp.CreatedTextFile HtmlFileName, HtmlTemplate
If IsShowFlush = 1 Then Response.Write "<li style=""font-size: 12px;"">生成" & strClassName & "HTML完成... <a href=" & HtmlFileName & " target=""_blank"">" & Server.MapPath(HtmlFileName) & "</a></li>" & vbNewLine
Response.Flush
Next
Exit Sub
End Sub
'#############################\\FLASH搜索开始//#############################
Public Sub BuildFlashSearch()
Dim SearchMaxPageList
Dim Action, findword
Dim rsClass, strNoResult
Dim strWord, s
PageType = 5
keyword = Newasp.ChkQueryStr(Trim(Request("keyword")))
keyword = Newasp.CheckInfuse(keyword,255)
strWord = Newasp.CheckStr(Trim(Request("word")))
strWord = Newasp.CheckInfuse(strWord,10)
s = Newasp.ChkNumeric(Request.QueryString("s"))
If Newasp.CheckNull(strWord) Then
strWord = UCase(Left(strWord, 6))
keyword = strWord
Else
strWord = ""
End If
If keyword = "" And strWord = "" Then
Call OutAlertScript("请输入要查询的关键字!")
Exit Sub
End If
If strWord = "" Then
If Not Newasp.CheckQuery(keyword) Then
Call OutAlertScript("你查询的关键中有非法字符!\n请返回重新输入关键字查询。")
Exit Sub
End If
End If
skinid = CLng(Newasp.ChannelSkin)
On Error Resume Next
Newasp.LoadTemplates ChannelID, 7, skinid
If Newasp.HtmlSetting(4) <> "0" Then
If IsNumeric(Newasp.HtmlSetting(4)) Then
'If CInt(Newasp.HtmlSetting(4)) Mod CInt(Newasp.HtmlSetting(1)) = 0 Then
'SearchMaxPageList = CLng(Newasp.HtmlSetting(4)) \ CInt(Newasp.HtmlSetting(1))
'Else
'SearchMaxPageList = CLng(Newasp.HtmlSetting(4)) \ CInt(Newasp.HtmlSetting(1)) + 1
'End If
SearchMaxPageList = CLng(Newasp.HtmlSetting(4))
Else
SearchMaxPageList = 50
End If
Else
SearchMaxPageList = 50
End If
strNoResult = Replace(Newasp.HtmlSetting(8), "{$KeyWord}", keyword)
Action = Newasp.CheckStr(Trim(Request("act")))
Action = Newasp.CheckStr(Action)
If strWord = "" And LCase(Action) <> "isweb" Then
If Newasp.strLength(keyword) < CLng(Newasp.HtmlSetting(5)) Or Newasp.strLength(keyword) > CLng(Newasp.HtmlSetting(6)) Then
Call OutAlertScript("查询错误!\n您查询的关键字不能小于 " & Newasp.HtmlSetting(5) & " 或者大于 " & Newasp.HtmlSetting(6) & " 个字节。")
Exit Sub
End If
End If
If strWord = "" Then
If LCase(Action) = "topic" Then
findword = "A.title like '%" & keyword & "%'"
ElseIf LCase(Action) = "content" Then
If CInt(Newasp.FullContQuery) <> 0 Then
findword = "A.Content like '%" & keyword & "%'"
Else
Call OutAlertScript(Replace(Replace(Newasp.HtmlSetting(10), Chr(34), "\"""), vbCrLf, ""))
Exit Sub
End If
Else
findword = "A.title like '%" & keyword & "%'"
End If
Else
findword = "A.AlphaIndex='" & strWord & "'"
End If
If LCase(Action) <> "isweb" Then
If IsEmpty(Session("QueryLimited")) Then
Session("QueryLimited") = keyword & "|" & Action & "|" & Now()
Else
Dim QueryLimited
QueryLimited = Split(Session("QueryLimited"), "|")
If UBound(QueryLimited) = 2 Then
If CStr(Trim(QueryLimited(0))) = CStr(keyword) And CStr(Trim(QueryLimited(1))) = CStr(Action) Then
Session("QueryLimited") = keyword & "|" & Action & "|" & Now()
Else
If DateDiff("s", QueryLimited(2), Now()) < CLng(Newasp.HtmlSetting(7)) Then
Dim strLimited
strLimited = Replace(Newasp.HtmlSetting(9), "{$TimeLimited}", Newasp.HtmlSetting(7))
Call OutAlertScript(Replace(Replace(strLimited, Chr(34), "\"""), vbCrLf, ""))
Exit Sub
Else
Session("QueryLimited") = keyword & "|" & Action & "|" & Now()
End If
End If
Else
Session("QueryLimited") = keyword & "|" & Action & "|" & Now()
End If
End If
End If
HtmlContent = Newasp.HtmlContent
HtmlContent = Replace(HtmlContent, "{$ChannelRootDir}", ChannelRootDir)
HtmlContent = Replace(HtmlContent, "{$InstallDir}", strInstallDir)
HtmlContent = Replace(HtmlContent, "{$ChannelID}", ChannelID)
HtmlContent = Replace(HtmlContent, "{$ModuleName}", Newasp.ModuleName)
HtmlContent = Replace(HtmlContent, "{$FlashIndex}", strIndexName)
HtmlContent = Replace(HtmlContent, "{$KeyWord}", KeyWord)
HtmlContent = Replace(HtmlContent, "{$PageTitle}", Newasp.ModuleName & "搜索")
HtmlContent = Replace(HtmlContent, "{$QueryKeyWord}", "<font color=red><strong>" & keyword & "</strong></font>")
Call ReplaceString
If LCase(Action) <> "isweb" Then
If IsNumeric(Request("classid")) And Request("classid") <> "" Then
Set rsClass = Newasp.Execute("SELECT ClassID,ChildStr FROM [NC_Classify] WHERE ChannelID = " & ChannelID & " And ClassID=" & CLng(Request("classid")))
If rsClass.BOF And rsClass.EOF Then
HtmlContent = Replace(HtmlContent, "{$ReadListPage}", strNoResult, 1, 1, 1)
HtmlContent = Replace(HtmlContent, "{$ReadListPage}", "")
HtmlContent = Replace(HtmlContent, "{$totalrec}", 0)
HtmlContent = Replace(HtmlContent, Newasp.CutFixContent(HtmlContent, "[ShowRepetend]", "[/ShowRepetend]", 1), "")
Set rsClass = Nothing
Response.Write HtmlContent
Exit Sub
Else
findword = "A.ClassID IN (" & rsClass("ChildStr") & ") And " & findword
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -