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_SiteSettings : ManagePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
 
        if (!IsPostBack)
            BindSettings();
    }

    private void BindSettings()
    {
        SiteSettings sets=Globals.GetSiteSettings();
        txtSiteName.Text = sets.SiteName;
        txtSiteUrl.Text = sets.SiteUrl;
        txtSiteDescription.Text = sets.SiteDescription;
        txtSpacesLogo.Text = sets.SpacesLogo;
        chkTrackBack.Checked = sets.DisabledTrackBack;
    }
    protected void buttonUpdate_Click(object sender, EventArgs e)
    {
        SiteSettings sets = Globals.GetSiteSettings();
        sets.SiteName = txtSiteName.Text;
        sets.SiteUrl = txtSiteUrl.Text;
        sets.SiteDescription = txtSiteDescription.Text;
        sets.SpacesLogo = txtSpacesLogo.Text;
        sets.DisabledTrackBack = chkTrackBack.Checked;

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