918博天堂

Server : Microsoft-IIS/10.0
System : Windows NT EBS-6136 10.0 build 17763 (Windows Server 2016) i586
User : jxgj ( 0)
PHP Version : 7.0.33
Disable Function : passthru,exec,system,shell_exec,proc_open,popen,pcntl_exec,socket_bind,stream_socket_server
Directory :  D:/tmp_aspnet/root/b8bcf8c8/45c44a59/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : D:/tmp_aspnet/root/b8bcf8c8/45c44a59/App_Web_qrxnuey0.1.cs
?#pragma checksum "D:\wwwroot\patena\wwwroot\wap\subscribe.aspx.cs" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "BD161E4E8685D09B9EBEA0D263370BBB"

#line 1 "D:\wwwroot\patena\wwwroot\wap\subscribe.aspx.cs"
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 TCLinkModel;
using TCLinkBLL;
public partial class wap_subscribe : System.Web.UI.Page
{
    protected string title;
    protected string keywords;
    protected string description;
    protected string type;
    protected string type1;
    protected string images;

    protected string id, bgimages = "";
    NewsManager nmanager = new NewsManager();
    NewsTypeManager tmanager = new NewsTypeManager();
    NewsClassManager cmanager = new NewsClassManager();
    protected void Page_Load(object sender, EventArgs e)
    {
        BindDate();

        if (Request.QueryString["action"] != null && Request.QueryString["action"] == "sendmail")
        {
            PostEmail();
        }

    }

    public void BindDate()
    {
        //绑定网站信息

        DataTable dt = nmanager.NewsByType(223, 1);
        if (dt.Rows.Count > 0)
        {
            title = dt.Rows[0]["NTitle"].ToString();
            keywords = dt.Rows[0]["NKeywords"].ToString();
            description = dt.Rows[0]["NDescription"].ToString();

        }

        DataTable bgdt = nmanager.NewsByType(229, 1);
        if (bgdt.Rows.Count > 0)
        {
            bgimages = bgdt.Rows[0]["NImages"].ToString();
        }
 

    }
    MessageBoardManager mananger = new MessageBoardManager();
    public void PostEmail()
    {
        TCLinkModel.MessageBoard model = new TCLinkModel.MessageBoard();

        model.MName = Request["txtemail"].ToString();
  
        try
        {
            if (mananger.GetMessageBoardCount(model.MName) == 0)
            {
                mananger.MessageBoardAdd(model);

                Response.Write("<script>alert('邮箱订阅成功!');window.location.href='subscribe.aspx';</script>");
 
            }
            else
            {
                Response.Write("<script>alert('邮箱已订阅成功!不需沉新订阅!');window.location.href='subscribe.aspx';</script>");
            }
        }
        catch (Exception ex)
        {
            Response.Write("<script>alert('邮箱订阅失败!');window.location.href='subscribe.aspx';</script>");
 
              throw ex;

        } 
    }




    //截取字符
    protected string str(string myobj, int count)
    {
        string mystr = myobj.ToString();
        string returnstr = mystr;
        if (mystr.Length > count)
        {
            returnstr = mystr.Substring(0, count) + "...";
        }
        return returnstr;
    }
 
}


#line default
#line hidden