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 JuSNS.Home;
using JuSNS.Model;
using JuSNS.Common;

namespace JuSNS.Web.inc.Ajax.ibase
{
    public partial class seting : JuSNS.UI.Page.UserPage
    {
        JuSNS.Home.MyInfo ac = new JuSNS.Home.MyInfo();
        JuSNS.Home.User us = new JuSNS.Home.User();
        protected void Page_Load(object sender, EventArgs e)
        {
            string t = Request.QueryString["Type"];
            if (!string.IsNullOrEmpty(t))
            {
                switch (t)
                {
                    case "Mobile":
                        string Value = Request.QueryString["Value"];
                        if (Value != string.Empty)
                        {
                            if (ac.getMSNGtalk(Value, 2) > 0)
                            {
                                Response.Write("2");
                                Response.End();
                            }
                        }

                        int n = ac.UpdateMSNGtalk(Value, this.UserID, 2);
                        if (n > 0)
                        {
                            Response.Write("1");
                            Response.End();
                        }
                        break;
                    case "emailr":
                        if (ac.UpdateEmailSet(Request.QueryString["itemid"], Request.QueryString["announce"], this.UserID, JuSNS.Common.Public.GetClientIP(), 0) > 0)
                        {
                            Response.Write("1");
                            Response.End();
                        }
                        break;
                }
            }
        }
    }
}
