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

📄 frame.aspx.cs

📁 最好用的站点内容管理系统 全部源代码都有
💻 CS
字号:
//======================================================
//==     (c)2008 aspxcms inc by NeTCMS v1.0              ==
//==          Forum:bbs.aspxcms.com                   ==
//==         Website:www.aspxcms.com                  ==
//======================================================
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NetCMS.Content;

public partial class manage_news_Frame : NetCMS.Web.UI.ManagePage
{
    ContentManage rd = new ContentManage();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["Special"] == null)
            {
                this.Authority_Code = "C013";
                this.CheckAdminAuthority();
                DataTable TB = rd.sel_newsInfo(8);
                if (TB != null)
                {
                    this.DropDownList1.DataSource = TB;
                    this.DropDownList1.DataTextField = "JSName";
                    this.DropDownList1.DataValueField = "JsID";
                    this.DropDownList1.DataBind();
                    this.dspecial.Visible = false;
                }
            }
            else
            {
                NetCMS.Content.AdminGroup agc = new NetCMS.Content.AdminGroup();
                DataTable dc = agc.getClassList("SpecialID,SpecialCName,ParentID", "news_special", " Where isLock=0 And isRecyle=0 And SiteID='" + SiteID + "' ");
                listShow(dc, "0", 0, Special);
                dc.Clear(); dc.Dispose();
                this.js.Visible = false;
            }
        }
    }

    protected void listShow(DataTable tempdt, string PID, int Layer, HtmlSelect list)
    {
        DataRow[] row = null;
        row = tempdt.Select("ParentID='" + PID + "'");
        if (row.Length < 1)
            return;
        else
        {
            foreach (DataRow r in row)
            {
                string strText = "┝ ";
                for (int j = 0; j < Layer; j++)
                {
                    strText += " ┉ ";
                }
                ListItem itm = new ListItem();
                itm.Value = r[0].ToString();
                itm.Text = strText + r[1].ToString();
                list.Items.Add(itm);
                if (r[0].ToString() != "0")
                    listShow(tempdt, r[0].ToString(), Layer + 1, list);
            }
        }
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        string sid = "";
        if (Request.QueryString["NewsID"] != null)
        {
            sid = Request.QueryString["NewsID"];
        }
        string GSpecial = Request.QueryString["Special"];
        string[] ID = sid.Split(',');
        string Njf_title = "";
        string PicPath = "";
        string ClassId = "";
        string NewsID = "";
        string Special=Request.Form["Special"];
        if (GSpecial != null)
        {
            if (Special != null && Special != string.Empty)
            {
                string[] SpecialARR = Special.Split(',');
                for (int j = 0; j < ID.Length; j++)
                {
                    for (int m = 0; m < SpecialARR.Length;m++ )
                    {
                        rd.addSpecialTo(ID[j], SpecialARR[m]);
                    }
                }
            }
            else
            {
                Response.Write("<script>alert('选择专题');loaction.href='history.back();';</script>");
            }
        }
        else
        {
            DateTime CreatTime = DateTime.Now;
            DateTime TojsTime = DateTime.Now;
            string JsID = DropDownList1.SelectedValue;
            for (int i = 0; i < ID.Length; i++)
            {
                DataTable dt = rd.getClassContent(ID[i],10);
                if (dt != null)
                {
                    NewsID = dt.Rows[0]["NewsID"].ToString();
                    Njf_title = dt.Rows[0]["NewsTitle"].ToString();
                    PicPath = dt.Rows[0]["PicURL"].ToString();
                    ClassId = dt.Rows[0]["ClassID"].ToString();
                    CreatTime = DateTime.Parse(dt.Rows[0]["CreatTime"].ToString());
                }
                if (rd.Add_JSFile(JsID, Njf_title, NewsID, PicPath, ClassId, SiteID, CreatTime, TojsTime) == 0)
                    break;
            }
        }
        Response.Write("<script language='javascript'>window.opener='anyone';window.close();</script>"); 
    }
}

⌨️ 快捷键说明

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