using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.SessionState;
using System.Data;
using System.Text.RegularExpressions;
using DotNet.FrameWork.Common.Encrypt;
using DotNet.FrameWork.Data;


namespace HteamDd.Web.Web
{
    /// <summary>
    /// Dd_do_register 的摘要说明
    /// </summary>
    public class Dd_do_register : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            //context.Response.Write("Hello World");
            string email = context.Request.QueryString["email"];
            string sqlStr = "select * from Dd_User where User_Email = '" + email + "' ";
            DataSet result = DbHelperSQL.GetDataSet(sqlStr);
            StringWriter sw = new StringWriter();
            if (result.Tables[0].Rows.Count == 0)
                sw.Write("1");
            else
                sw.Write("0");

            HtmlTextWriter htw = new HtmlTextWriter(sw);
            context.Response.Write(sw.ToString());
            context.Response.End();
            
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}