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;

public partial class etw_c_m_gotomanage : System.Web.UI.Page
{
    public string userid = string.Empty;
    protected void Page_Load(object sender, EventArgs e)
    {
        HttpCookie GetCookie = Request.Cookies["cook_admin"];
        if (Request.Cookies["cook_admin"] == null)
        {
            Response.Redirect("index.aspx");
        }
        if (!IsPostBack)
        {
            userid = Request.QueryString["userid"].ToString();
            zzhdata();
        }
    }
    public void zzhdata()
    {
        int There = 0;
        etw.etw_user lead = new etw.etw_user();
        lead.userid = Convert.ToInt32(userid);
        lead.GetModel();
        HttpCookie user = new HttpCookie("cookEtwuser", lead.username.ToString());
        user.Values.Add("IsLogin", "ok");
        user.Values.Add("username", lead.username.ToString());
        user.Expires = DateTime.Now.AddHours(12);
        Response.Cookies.Add(user);
        FormsAuthentication.SetAuthCookie(lead.username.ToString(), true);
        Response.Cookies["cookChatuser"].Expires = DateTime.Now.AddDays(-5);
        this.Response.Redirect("../etwuser/Help.aspx");
    }
}
