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;

namespace JuSNS.Web.inc.Ajax.poke
{
    public partial class send : JuSNS.UI.Page.BasePage
    {
        protected string ulink = string.Empty;
        protected string root = string.Empty;
        protected string liid = string.Empty;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.ReturnIsNotEmail() != string.Empty)
            {
                Response.Write("<div class=\"spline\"></div><span class=\"font14\">您需要激活电子邮件后才能进行此操作。</span><a href=\"" + rooDir + "/EmailActive.aspx?r=" + this.GetUserID().ToString() + "\">点这里激活邮箱</a><div class=\"spline\"></div>");
                Response.End();
            }
            if (this.GetUserID()==0)
            {
                Response.Write("<div class=\"spline\"></div><span class=\"font14\">你需要登录才能进行操作。</span><div class=\"spline\"></div>");
                Response.End();
            }
            liid = Request.QueryString["liid"];
            string action = Request.QueryString["action"];
            if (action == "update")
            {
                if (JuSNS.Common.Input.IsInteger(liid))
                {
                    JuSNS.Home.JUser ju = new JuSNS.Home.JUser();
                    if (ju.ChanagePokeState(Convert.ToInt32(liid), this.GetUserID()) > 0)
                    {
                        Response.Write("succ");
                        Response.End();
                    }
                    else
                    {
                        Response.Write("error");
                        Response.End();
                    }

                }
                else
                {
                    Response.Write("error");
                    Response.End();
                }
            }
            else
            {
                this.p_Hid_UserID.Value = Request.QueryString["uid"];
                ulink = rooDir + "/user/" + JuSNS.Common.Public.URLWrite("", "r", Request.QueryString["uid"]);
                root = rooDir;
            }
        }
    }
}
