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

📄 admin_editview.aspx.vb

📁 程序设计:Flyangel 用到了vb.net c# asp.net xml等 最大特别是核心功能组件化. 特色: 强大的后台管理功能 支持二级分类 支持匿名投稿 超强用户权限设置
💻 VB
📖 第 1 页 / 共 2 页
字号:
Imports flyangel.editor.flashhtmledit
Imports System.Configuration
Imports flyangel.article.twotipclass

Public Class Admin_editview
    Inherits System.Web.UI.Page

#Region " Web 窗体设计器生成的代码 "

    '该调用是 Web 窗体设计器所必需的。
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub
    Protected WithEvents readme_add As System.Web.UI.WebControls.Label
    Protected WithEvents txttitle As System.Web.UI.WebControls.TextBox
    Protected WithEvents typeid As System.Web.UI.WebControls.DropDownList
    Protected WithEvents zhuantiid As System.Web.UI.WebControls.DropDownList
    Protected WithEvents picurl As System.Web.UI.WebControls.TextBox
    Protected WithEvents about_word As System.Web.UI.WebControls.TextBox
    Protected WithEvents article_author As System.Web.UI.WebControls.TextBox
    Protected WithEvents article_tj As System.Web.UI.WebControls.CheckBox
    Protected WithEvents article_comefrom As System.Web.UI.WebControls.TextBox
    Protected WithEvents Flashhtmledit1 As flyangel.editor.flashhtmledit
    'Protected WithEvents Form1 As System.Web.UI.HtmlControls.HtmlForm
    Protected WithEvents article_shenghe As System.Web.UI.WebControls.CheckBox
    Protected WithEvents Form1 As System.Web.UI.HtmlControls.HtmlForm
    Protected WithEvents Button_repub As System.Web.UI.WebControls.Button
    Protected WithEvents Panel_manage As System.Web.UI.WebControls.Panel
    Protected WithEvents Button_del_sh As System.Web.UI.WebControls.Button
    Protected WithEvents Button_del As System.Web.UI.WebControls.Button
    Protected WithEvents Button_pubnormal As System.Web.UI.WebControls.Button
    Protected WithEvents Button_pubhtml As System.Web.UI.WebControls.Button
    Protected WithEvents Button_pubxml As System.Web.UI.WebControls.Button
    Protected WithEvents Panel_shenghe As System.Web.UI.WebControls.Panel

    '注意: 以下占位符声明是 Web 窗体设计器所必需的。
    '不要删除或移动它。
    Private designerPlaceholderDeclaration As System.Object

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: 此方法调用是 Web 窗体设计器所必需的
        '不要使用代码编辑器修改它。
        Flashhtmledit1.SetShowCopyRight = "flash@ycdx.edu.cn"
        InitializeComponent()
    End Sub

#End Region

    Dim _newsid As Integer

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        '在此处放置初始化页的用户代码
        If Session("KEY") <> "super" And Session("KEY") <> "check" And Session("KEY") <> "normal" Then
            Response.Redirect("article_save.aspx?action=nologin")
            Exit Sub
        End If
        If Request.Cookies("UserInfo").Values("Upload_Level") <> 1 Then
            Response.Redirect("article_save.aspx?action=nologin")
            Exit Sub
        End If

        AddHandler Flashhtmledit1.EditorHTMLSaved, AddressOf Me.OnEditorHTMLSaved
        Dim dbfly As iArticleClass = HowToUsingFlyangel.iArticleClass(ConfigurationSettings.AppSettings("AssemblyFilePath"))
        dbfly.SetDBConnstring = ConfigurationSettings.AppSettings("ConnstringA")
        dbfly.SetLogXmlDocument = ConfigurationSettings.AppSettings("logxml")

        dbfly.Addarticle_Sort(typeid, "addarticle_class_type")
        dbfly.Addarticle_Zhuanti(zhuantiid)

        _newsid = Request.QueryString("newsid")
        If _newsid = 0 Then
            readme_add.Text = "请注意,您目前处在新闻文章编辑状态下,但你并没有选择好相应要修改的文章!<BR>请选择你要修改的文章!"
        Else
            Dim dpfly As iArticleClass = HowToUsingFlyangel.iArticleClass(ConfigurationSettings.AppSettings("AssemblyFilePath"))
            dpfly.SetDBConnstring = ConfigurationSettings.AppSettings("ConnstringA")

            Dim listarticle As ArticleListView = dpfly.GetArticle_View(_newsid, False)

            If listarticle.ArticleBool = False Then
                readme_add.Text = "请注意,您目前处在新闻文章编辑状态下,你所选择要修改的文章并不存在!<BR>请选择你要修改的文章!"
                Exit Sub
            Else
                readme_add.Text = "请注意,您目前处在新闻文章编辑状态下!<BR>请及时保存你已经修改过的文章!"
                If listarticle.ArticleShtml_Y <> 0 Then
                    readme_add.Text += "<br>注:此文已经发布为HTML/XML格式的文档:" & listarticle.ArticleShtmlUrl
                Else
                    readme_add.Text += "<br>注:此文没有发布成HTML/XML格式的文档!"
                End If
                If listarticle.ArticleShengHe = 2 Then
                    Panel_manage.Visible = True
                    article_shenghe.Checked = True
                Else
                    Panel_shenghe.Visible = True
                    article_shenghe.Checked = False
                End If
                txttitle.Text = listarticle.ArticleTitle
                picurl.Text = listarticle.ArticlePicUrl
                about_word.Text = listarticle.ArticleAboutKey
                article_author.Text = listarticle.ArticleAuthor
                article_comefrom.Text = listarticle.ArticleNfrom
                If listarticle.ArticleTuiJian = 1 Then
                    article_tj.Checked = True
                End If

                Dim i, j As Integer
                For i = 0 To typeid.Items.Count - 1
                    If typeid.Items(i).Value = "typeid=" & listarticle.ArticleTypeId Then
                        typeid.SelectedIndex = i
                        Exit For
                    End If
                Next

                For j = 0 To zhuantiid.Items.Count - 1
                    If zhuantiid.Items(j).Value = listarticle.ArticleZhuanTiId Then
                        zhuantiid.SelectedIndex = j
                        Exit For
                    End If
                Next
                Flashhtmledit1.HTMLValue = listarticle.ArticleContent

            End If
        End If

    End Sub


    Private Sub OnEditorHTMLSaved(ByVal sender As System.Object, ByVal e As flyangel.editor.flashhtmledit.EditorEventArgs) Handles Flashhtmledit1.EditorHTMLSaved
        If Session("KEY") <> "super" And Session("KEY") <> "check" And Session("KEY") <> "normal" Then
            Response.Redirect("article_save.aspx?action=nologin")
            Exit Sub
        End If

        Dim _textcontent As ArticleAddInfo
        _textcontent.ArticleNewsId = _newsid
        _textcontent.ArticleAboutKey = Request.Params("about_word").Trim()
        _textcontent.ArticleAuthor = Request.Params("article_author").Trim()

        Dim asds As iStringClass = HowToUsingFlyangel.iStringClass(ConfigurationSettings.AppSettings("AssemblyFilePath"))
        _textcontent.ArticleContent = asds.StringChangeSql(Flashhtmledit1.HTMLValue)

        _textcontent.ArticleNfrom = Request.Params("article_comefrom").Trim()

        If Request.Params("picurl").Trim <> "" Then
            _textcontent.ArticlePicUrl = Request.Params("picurl").Trim()
            _textcontent.ArticlePicChk = 1
        Else
            _textcontent.ArticlePicUrl = ""
            _textcontent.ArticlePicChk = 0
        End If

        _textcontent.ArticleTitle = Request.Params("txttitle").Trim()

        _textcontent.ArticleTypeId = Request.Params("typeid").Substring(7)

        _textcontent.ArticleZhuanTiId = Request.Params("zhuantiid")

        If Request.Params("article_tj") = "on" Then
            _textcontent.ArticleTuiJian = 1
        Else
            _textcontent.ArticleTuiJian = 0

⌨️ 快捷键说明

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