⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 powereasy.createjs.asp

📁 个人网站比较简短
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%
'**************************************************************
' Software name: PowerEasy SiteWeaver
' Web: http://www.powereasy.net
' Copyright (C) 2005-2008 佛山市动易网络科技有限公司 版权所有
'**************************************************************

Response.Write "<html><head><title>更新JS文件</title>" & vbCrLf
Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>" & vbCrLf
Response.Write "<link href='Admin_Style.css' rel='stylesheet' type='text/css'>" & vbCrLf
Response.Write "</head>" & vbCrLf
Response.Write "<body leftmargin='2' topmargin='0' marginwidth='0' marginheight='0'>" & vbCrLf
Call GetChannel(ChannelID)
Dim rsJs
Select Case Action
Case "CreateAllJs"
    Call CreateAllJS
Case "CreateJs"
    Call CreateJS
End Select
If Trim(Request("ShowBack")) = "Yes" Then
    Response.Write "<p align='center'><a href='" & ComeUrl & "'>【返回】</a></p>"
End If
Response.Write "</body></html>"
Call CloseConn

Sub CreateAllJS()
    If ObjInstalled_FSO = False Then
        Exit Sub
    End If
    Response.Write "<li>开始更新所有JS文件……</li>"
    Set rsJs = Conn.Execute("select * from PE_JsFile where ChannelID=" & ChannelID)
    Do While Not rsJs.EOF
        Call CreateJS_CommonSub
        rsJs.MoveNext
    Loop
    rsJs.Close
    Set rsJs = Nothing
    Response.Write "<li>更新所有JS文件成功!</li>"
End Sub

Sub CreateJS()
    If ObjInstalled_FSO = False Then
        Exit Sub
    End If

    Dim ID
    ID = PE_CLng(Trim(Request("ID")))
    If ID = 0 Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>参数丢失!</li>"
        Exit Sub
    End If
    Set rsJs = Conn.Execute("select * from PE_JsFile where ID=" & ID)
    If rsJs.BOF And rsJs.EOF Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>找不到指定的JS文件!</li>"
        rsJs.Close
        Set rsJs = Nothing
        Exit Sub
    End If
    
    Call CreateJS_CommonSub

    rsJs.Close
    Set rsJs = Nothing
End Sub

Sub CreateJS_CommonSub()
    If rsJs("JsType") = 0 Then
        Select Case ModuleType
        Case 1
            Call CreateJS_ArticleList(rsJs("JsFileName"), rsJs("Config"), rsJs("ContentType"))
        Case 2
            Call CreateJS_SoftList(rsJs("JsFileName"), rsJs("Config"), rsJs("ContentType"))
        Case 3
            Call CreateJS_PhotoList(rsJs("JsFileName"), rsJs("Config"), rsJs("ContentType"))
        Case 5
            Call CreateJS_ProductList(rsJs("JsFileName"), rsJs("Config"), rsJs("ContentType"))
        End Select
    Else
        Select Case ModuleType
        Case 1
            Call CreateJS_PicArticle(rsJs("JsFileName"), rsJs("Config"), rsJs("ContentType"))
        Case 2
            Call CreateJS_PicSoft(rsJs("JsFileName"), rsJs("Config"), rsJs("ContentType"))
        Case 3
            Call CreateJS_PicPhoto(rsJs("JsFileName"), rsJs("Config"), rsJs("ContentType"))
        Case 5
            Call CreateJS_PicProduct(rsJs("JsFileName"), rsJs("Config"), rsJs("ContentType"))
        End Select
    End If
    Response.Write "<li>更新“" & rsJs("JsName") & "”JS文件成功!</li>"
End Sub


Sub CreateJS_ArticleList(JsFileName, ByVal arrConfig, ByVal ContentType)
    Dim JsConfig, hf, strJS
    Dim ClassID, IncludeChild, SpecialID, ArticleNum, IsHot, IsElite, DateNum, OrderType, ShowType, TitleLen, ContentLen
    Dim ShowClassName, ShowIncludePic, ShowAuthor, ShowDateType, ShowHits, ShowHotSign
    Dim ShowNewSign, ShowTips, ShowCommentLink, OpenType, UrlType, ShowPropertyType
    Dim InputerName, Cols, CssNameA, CssName1, CssName2
    
    arrConfig = arrConfig & "|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0"
    JsConfig = Split(arrConfig, "|")
    ShowType = PE_CLng(JsConfig(0))
    ArticleNum = PE_CLng(JsConfig(1))
    ClassID = PE_CLng(JsConfig(2))
    IncludeChild = CBool(JsConfig(3))
    IsHot = CBool(JsConfig(4))
    IsElite = CBool(JsConfig(5))
    DateNum = PE_CLng(JsConfig(6))
    OrderType = PE_CLng(JsConfig(7))
    TitleLen = PE_CLng(JsConfig(8))
    ContentLen = PE_CLng(JsConfig(9))
    ShowClassName = CBool(JsConfig(10))
    ShowIncludePic = CBool(JsConfig(11))
    ShowAuthor = CBool(JsConfig(12))
    ShowDateType = PE_CLng(JsConfig(13))
    ShowHits = CBool(JsConfig(14))
    ShowHotSign = CBool(JsConfig(15))
    ShowNewSign = CBool(JsConfig(16))
    ShowTips = CBool(JsConfig(17))
    ShowCommentLink = CBool(JsConfig(18))
    OpenType = PE_CLng(JsConfig(19))
    SpecialID = PE_CLng(JsConfig(20))
    UrlType = PE_CLng(JsConfig(21))
    ShowPropertyType = PE_CLng(JsConfig(22))
    InputerName = ZeroToEmpty(JsConfig(23))
    Cols = PE_CLng1(JsConfig(24))
    CssNameA = ZeroToEmpty(JsConfig(25))
    CssName1 = ZeroToEmpty(JsConfig(26))
    CssName2 = ZeroToEmpty(JsConfig(27))

    Dim PE_Article
    Set PE_Article = New Article
    Call PE_Article.Init
    strJS = PE_Article.GetArticleList(ChannelID, ClassID, IncludeChild, SpecialID, UrlType, ArticleNum, IsHot, IsElite, InputerName, DateNum, OrderType, ShowType, TitleLen, ContentLen, ShowClassName, ShowPropertyType, ShowIncludePic, ShowAuthor, ShowDateType, ShowHits, ShowHotSign, ShowNewSign, ShowTips, ShowCommentLink, False, OpenType, Cols, CssNameA, CssName1, CssName2)
    Set PE_Article = Nothing
    Call SaveJsFile(ContentType, InstallDir & ChannelDir, JsFileName, strJS, ComeUrl)

End Sub

Sub CreateJS_PicArticle(JsFileName, ByVal arrConfig, ByVal ContentType)
    Dim JsConfig, hf, strJS
    Dim ClassID, IncludeChild, SpecialID, ArticleNum, IsHot, IsElite, DateNum, OrderType, ShowType, ImgWidth, ImgHeight, TitleLen, ContentLen, ShowTips, Cols, UrlType
    Dim InputerName, CssNameA, CssName1, CssName2
    arrConfig = arrConfig & "|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0"

    JsConfig = Split(arrConfig, "|")
    ClassID = PE_CLng(JsConfig(0))
    IncludeChild = CBool(JsConfig(1))
    ArticleNum = PE_CLng(JsConfig(2))
    IsHot = CBool(JsConfig(3))
    IsElite = CBool(JsConfig(4))
    DateNum = PE_CLng(JsConfig(5))
    OrderType = PE_CLng(JsConfig(6))
    ShowType = PE_CLng(JsConfig(7))
    ImgWidth = PE_CLng(JsConfig(8))
    ImgHeight = PE_CLng(JsConfig(9))
    TitleLen = PE_CLng(JsConfig(10))
    ContentLen = PE_CLng(JsConfig(11))
    ShowTips = CBool(JsConfig(12))
    Cols = PE_CLng1(JsConfig(13))
    SpecialID = PE_CLng(JsConfig(14))
    UrlType = PE_CLng(JsConfig(15))
    
    Dim PE_Article
    Set PE_Article = New Article
    Call PE_Article.Init
    strJS = PE_Article.GetPicArticle(ChannelID, ClassID, IncludeChild, SpecialID, ArticleNum, IsHot, IsElite, DateNum, OrderType, ShowType, ImgWidth, ImgHeight, TitleLen, ContentLen, ShowTips, Cols, UrlType)
    Set PE_Article = Nothing

    Call SaveJsFile(ContentType, InstallDir & ChannelDir, JsFileName, strJS, ComeUrl)
    
End Sub


Sub CreateJS_PhotoList(JsFileName, ByVal arrConfig, ByVal ContentType)
    Dim JsConfig, hf, strJS
    Dim ClassID, IncludeChild, SpecialID, PhotoNum, IsHot, IsElite, DateNum, OrderType, ShowType, TitleLen, ContentLen
    Dim ShowClassName, ShowAuthor, ShowDateType, ShowHits, ShowHotSign
    Dim ShowNewSign, ShowTips, OpenType, UrlType, ShowPropertyType
    Dim InputerName, Cols, CssNameA, CssName1, CssName2
    
    arrConfig = arrConfig & "|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0"
    JsConfig = Split(arrConfig, "|")
    ShowType = PE_CLng(JsConfig(0))
    PhotoNum = PE_CLng(JsConfig(1))
    ClassID = PE_CLng(JsConfig(2))
    IncludeChild = CBool(JsConfig(3))
    IsHot = CBool(JsConfig(4))
    IsElite = CBool(JsConfig(5))
    DateNum = PE_CLng(JsConfig(6))
    OrderType = PE_CLng(JsConfig(7))
    TitleLen = PE_CLng(JsConfig(8))
    ContentLen = PE_CLng(JsConfig(9))
    ShowClassName = CBool(JsConfig(10))
    ShowAuthor = CBool(JsConfig(11))
    ShowDateType = PE_CLng(JsConfig(12))
    ShowHits = CBool(JsConfig(13))
    ShowHotSign = CBool(JsConfig(14))
    ShowNewSign = CBool(JsConfig(15))
    ShowTips = CBool(JsConfig(16))
    OpenType = PE_CLng(JsConfig(17))
    UrlType = PE_CLng(JsConfig(18))
    ShowPropertyType = PE_CLng(JsConfig(19))
    InputerName = ZeroToEmpty(JsConfig(20))
    SpecialID = PE_CLng(JsConfig(21))
    Cols = PE_CLng1(JsConfig(22))
    CssNameA = ZeroToEmpty(JsConfig(23))
    CssName1 = ZeroToEmpty(JsConfig(24))
    CssName2 = ZeroToEmpty(JsConfig(25))
    
    Dim PE_Photo
    Set PE_Photo = New Photo
    Call PE_Photo.Init
    strJS = PE_Photo.GetPhotoList(ChannelID, ClassID, IncludeChild, SpecialID, UrlType, PhotoNum, IsHot, IsElite, InputerName, DateNum, OrderType, ShowType, TitleLen, ContentLen, ShowClassName, ShowPropertyType, ShowAuthor, ShowDateType, ShowHits, ShowHotSign, ShowNewSign, ShowTips, False, OpenType, Cols, CssNameA, CssName1, CssName2)
    Set PE_Photo = Nothing

    Call SaveJsFile(ContentType, InstallDir & ChannelDir, JsFileName, strJS, ComeUrl)

End Sub

Sub CreateJS_PicPhoto(JsFileName, ByVal arrConfig, ByVal ContentType)
    Dim JsConfig, hf, strJS
    Dim ClassID, IncludeChild, SpecialID, PhotoNum, IsHot, IsElite, DateNum, OrderType, ShowType, ImgWidth, ImgHeight, TitleLen, ContentLen, ShowTips, Cols, UrlType

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -