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 Spaces;
using Spaces.Controls;

public partial class Manage_AdSet : ManagePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
            BindSettings();
    }

    private void BindSettings()
    {
        SiteSettings sets = Globals.GetSiteSettings();
        chkEnableTopAD.Checked = sets.EnableTopAD;
        txtTopAD.Text = sets.TopAD;
    }
    protected void buttonUpdate_Click(object sender, EventArgs e)
    {
        SiteSettings sets = Globals.GetSiteSettings();
        sets.EnableTopAD = chkEnableTopAD.Checked;
        sets.TopAD = txtTopAD.Text;

        sets.Save();
        Message.Text = Msg.GetMsg("成功修改站点设置！");
    }
}
