📄 site_add.aspx.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.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
using NetCMS.Model;
public partial class manage_news_Site_add : NetCMS.Web.UI.ManagePage
{
public manage_news_Site_add()
{
this.Authority_Code = "D020";
}
NetCMS.Content.Common.rootPublic pd = new NetCMS.Content.Common.rootPublic();
public string PublishType = NetCMS.Config.verConfig.PublicType;
protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString["ID"] != null && !Request.QueryString["ID"].Trim().Equals(string.Empty))
{
this.Authority_Code = "D021";
this.CheckAdminAuthority();
}
else
{
this.Authority_Code = "D020";
this.CheckAdminAuthority();
}
Response.CacheControl = "no-cache";
if (!Page.IsPostBack)
{
if (PublishType != "1")
{
N_13.Visible = false;
}
if (SiteID != "0") { PageError("您没有创建站群的权限!", ""); }
this.LblID.Text = "";
this.LblCID.Text = "";
this.RadStatus.Items[0].Selected = true;
this.RadFileType.Items[0].Selected = true;
this.DdlDataTable.Items.Clear();
NetCMS.Content.News news = new NetCMS.Content.News();
DataTable tbnews = news.GetTables();
this.DdlDataTable.DataSource = tbnews;
this.DdlDataTable.DataTextField = "TableName";
this.DdlDataTable.DataValueField = "TableName";
this.DdlDataTable.DataBind();
tbnews.Dispose();
this.LblCaption.Text = this.LblNavigation.Text = "新建站群";
if (Request.QueryString["ID"] != null && !Request.QueryString["ID"].Trim().Equals(string.Empty))
{
int id = int.Parse(Request.QueryString["ID"]);
this.TxtEnName.Enabled = false;
this.LblID.Text = id.ToString();
NetCMS.Content.Site site = new NetCMS.Content.Site();
DataTable tb = site.GetSingle(id);
if (tb != null && tb.Rows.Count > 0)
{
DataRow r = tb.Rows[0];
if (!r.IsNull("CName")) this.TxtCnName.Text = r["CName"].ToString();
if (!r.IsNull("EName")) this.TxtEnName.Text = r["EName"].ToString();
if (!r.IsNull("ChannelID")) this.LblCID.Text = r["ChannelID"].ToString();
if (!r.IsNull("ChannCName")) this.TxtItemName.Text = r["ChannCName"].ToString();
if (!r.IsNull("isLock"))
{
int n = int.Parse(r["isLock"].ToString());
if (n == 1)
this.RadStatus.Items[1].Selected = true;
else if (n == 0)
this.RadStatus.Items[0].Selected = true;
}
if (!r.IsNull("IsURL"))
{
int n = int.Parse(r["IsURL"].ToString());
if (n == 1)
this.ChbType.Checked = true;
else if (n == 0)
this.ChbType.Checked = false;
}
if (!r.IsNull("Urladdress")) this.TxtUrl.Text = r["Urladdress"].ToString();
if (!r.IsNull("DataLib")) this.DdlDataTable.SelectedValue = r["DataLib"].ToString();
if (!r.IsNull("IndexTemplet")) this.TxtIndxTmp.Text = r["IndexTemplet"].ToString();
if (!r.IsNull("ClassTemplet")) this.TxtClsTmp.Text = r["ClassTemplet"].ToString();
if (!r.IsNull("ReadNewsTemplet")) this.TxtBrwTmp.Text = r["ReadNewsTemplet"].ToString();
if (!r.IsNull("SpecialTemplet")) this.TxtSpcTmp.Text = r["SpecialTemplet"].ToString();
if (!r.IsNull("Domain")) this.TxtDomain.Text = r["Domain"].ToString();
//权限空缺
if (!r.IsNull("isCheck"))
{
int n = int.Parse(r["isCheck"].ToString());
if (n == 1)
this.ChbAuditing.Checked = true;
else if (n == 0)
this.ChbAuditing.Checked = false;
}
if (!r.IsNull("Keywords")) this.TxtKeywords.Text = r["Keywords"].ToString();
if (!r.IsNull("Descript")) this.TxtDescribe.Text = r["Descript"].ToString();
if (!r.IsNull("ContrTF"))
{
int n = int.Parse(r["ContrTF"].ToString());
if (n == 1)
this.ChbContribute.Checked = true;
else if (n == 0)
this.ChbContribute.Checked = false;
}
if (!r.IsNull("ShowNaviTF"))
{
int n = int.Parse(r["ShowNaviTF"].ToString());
if (n == 1)
this.ChbShowNavi.Checked = true;
else if (n == 0)
this.ChbShowNavi.Checked = false;
}
if (!r.IsNull("UpfileType")) this.TxtUpFileType.Text = r["UpfileType"].ToString();
if (!r.IsNull("UpfileSize")) this.TxtUpFileSize.Text = r["UpfileSize"].ToString();
if (!r.IsNull("NaviContent")) this.TxtLead.Text = r["NaviContent"].ToString();
if (!r.IsNull("NaviPicURL")) this.TxtPic.Text = r["NaviPicURL"].ToString();
if (PublishType == "1")
{
if (!r.IsNull("SaveType"))
{
int n = int.Parse(r["SaveType"].ToString());
if (n == 0)
this.DdlType.Items[0].Selected = true;
else if (n == 1)
this.DdlType.Items[1].Selected = true;
else if (n == 2)
this.DdlType.Items[2].Selected = true;
}
}
if (!r.IsNull("PicSavePath")) this.TxtAccessories.Text = r["PicSavePath"].ToString();
if (!r.IsNull("SaveFileType"))
{
int n = int.Parse(r["SaveFileType"].ToString());
if (n == 1)
this.RadFileType.Items[1].Selected = true;
else if (n == 0)
this.RadFileType.Items[0].Selected = true;
}
if (!r.IsNull("SaveDirPath")) this.TxtFileDir.Text = r["SaveDirPath"].ToString();
if (!r.IsNull("SaveDirRule")) this.TxtDirRule.Text = r["SaveDirRule"].ToString();
if (!r.IsNull("SaveFileRule")) this.TxtFileRule.Text = r["SaveFileRule"].ToString();
if (!r.IsNull("NaviPosition")) this.TxtNaviPosition.Text = r["NaviPosition"].ToString();
if (!r.IsNull("IndexEXName")) this.DdlIndexEXName.SelectedValue = r["IndexEXName"].ToString();
if (!r.IsNull("ClassEXName")) this.DdlClassEXName.SelectedValue = r["ClassEXName"].ToString();
if (!r.IsNull("NewsEXName")) this.DdlNewsEXName.SelectedValue = r["NewsEXName"].ToString();
if (!r.IsNull("SpecialEXName")) this.DdlOtherEXName.SelectedValue = r["SpecialEXName"].ToString();
//if (!r.IsNull("classRefeshNum")) this.TxtClassRefresh.Text = r["classRefeshNum"].ToString();
//if (!r.IsNull("infoRefeshNum")) this.TxtInfoRefresh.Text = r["infoRefeshNum"].ToString();
//if (!r.IsNull("DelNum")) this.TxtDelNum.Text = r["DelNum"].ToString();
//if (!r.IsNull("SpecialNum")) this.TxtSpecialNum.Text = r["SpecialNum"].ToString();
#region 权限
if (!r.IsNull("isDelPoint")) this.UserPop1.AuthorityType = int.Parse(r["isDelPoint"].ToString());
if (!r.IsNull("Gpoint")) this.UserPop1.Gold = int.Parse(r["Gpoint"].ToString());
if (!r.IsNull("iPoint")) this.UserPop1.Point = int.Parse(r["iPoint"].ToString());
if (!r.IsNull("GroupNumber")) this.UserPop1.MemberGroup = r["GroupNumber"].ToString().Split('|');
#endregion 权限
}
else
{
PageError("找不到站群!", "");
}
this.LblCaption.Text = this.LblNavigation.Text = "修改站群";
}
else
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -