protected void btnAddComment_Click(object sender, EventArgs e)
    {
        if ((User.Identity.IsAuthenticated) || (tbxCode.Text == Session["CaptchaImageText"].ToString()))
        {
            int iBlogID = Convert.ToInt32(Request.QueryString["bid"]);
            DataLayer dl = new DataLayer();
            DataTable dtBlog = dl.GetBlogBy_BlogID(iBlogID);
            string sName = "";
            if (User.Identity.IsAuthenticated)
            {
                dl.AddComment(User.Identity.Name, DateTime.Now, tbxAddComment.Text, "Blog", cbxThumbsUp.Checked, iBlogID, "");
                sName = dl.GetFullMemberNameBy_Email(User.Identity.Name);
            }
            else
            {
                dl.AddComment("ANON|" + tbxAnonymousName.Text + "|" + tbxAnonymousWebsite.Text, DateTime.Now, tbxAddComment.Text, "Blog", false, iBlogID, "");
                sName = tbxAnonymousName.Text;
            }

            SmtpMail.SmtpServer = "relay-hosting.secureserver.net";
            MailMessage mm;
            mm = new MailMessage();
            mm.BodyFormat = MailFormat.Html;
            mm.To = "[email protected];[email protected]";
            mm.From = "*****@*****.**";
            mm.Subject = "Someone posted a blog comment.";
            mm.Body = sName + " posted a comment on a blog: " + dtBlog.Rows[0].ItemArray[3].ToString();
            mm.Body += "<br /><br />Here is the comment:<br />" + tbxAddComment.Text;
            mm.Body += "<br /><br /><a href=\"http://www.referralnetworx.com/Blog.aspx?bid=" + iBlogID.ToString() + "\">Click to view</a>";
            SmtpMail.Send(mm);

            if (User.Identity.Name.ToLower() != dtBlog.Rows[0].ItemArray[1].ToString().ToLower())
            {
                mm = new MailMessage();
                mm.BodyFormat = MailFormat.Html;
                mm.To = dtBlog.Rows[0].ItemArray[1].ToString();
                mm.From = "*****@*****.**";
                mm.Subject = "Someone posted a comment on your blog.";
                mm.Body = sName + " posted a comment on your blog titled: " + dtBlog.Rows[0].ItemArray[3].ToString();
                mm.Body += "<br /><a href=\"http://www.referralnetworx.com/Blog.aspx?bid=" + iBlogID.ToString() + "\">Click to view</a>";
                SmtpMail.Send(mm);
            }

            Session["resultColor"] = "#009900";
            Session["resultTitle"] = "Comment Added";
            Session["resultMessage"] = "Thank you for your comment!";
            Session["resultReturnURL"] = Request.RawUrl;
            Response.Redirect("Result.aspx", true);
        }
        else
        {
            cvInvalidCode.IsValid = false;
        }
    }
Example #2
0
    protected void btnAddComment_Click(object sender, EventArgs e)
    {
        if ((User.Identity.IsAuthenticated) || (tbxCode.Text == Session["CaptchaImageText"].ToString()))
        {
            int       iBlogID = Convert.ToInt32(Request.QueryString["bid"]);
            DataLayer dl      = new DataLayer();
            DataTable dtBlog  = dl.GetBlogBy_BlogID(iBlogID);
            string    sName   = "";
            if (User.Identity.IsAuthenticated)
            {
                dl.AddComment(User.Identity.Name, DateTime.Now, tbxAddComment.Text, "Blog", cbxThumbsUp.Checked, iBlogID, "");
                sName = dl.GetFullMemberNameBy_Email(User.Identity.Name);
            }
            else
            {
                dl.AddComment("ANON|" + tbxAnonymousName.Text + "|" + tbxAnonymousWebsite.Text, DateTime.Now, tbxAddComment.Text, "Blog", false, iBlogID, "");
                sName = tbxAnonymousName.Text;
            }

            SmtpMail.SmtpServer = "relay-hosting.secureserver.net";
            MailMessage mm;
            mm            = new MailMessage();
            mm.BodyFormat = MailFormat.Html;
            mm.To         = "[email protected];[email protected]";
            mm.From       = "*****@*****.**";
            mm.Subject    = "Someone posted a blog comment.";
            mm.Body       = sName + " posted a comment on a blog: " + dtBlog.Rows[0].ItemArray[3].ToString();
            mm.Body      += "<br /><br />Here is the comment:<br />" + tbxAddComment.Text;
            mm.Body      += "<br /><br /><a href=\"http://www.referralnetworx.com/Blog.aspx?bid=" + iBlogID.ToString() + "\">Click to view</a>";
            SmtpMail.Send(mm);

            if (User.Identity.Name.ToLower() != dtBlog.Rows[0].ItemArray[1].ToString().ToLower())
            {
                mm            = new MailMessage();
                mm.BodyFormat = MailFormat.Html;
                mm.To         = dtBlog.Rows[0].ItemArray[1].ToString();
                mm.From       = "*****@*****.**";
                mm.Subject    = "Someone posted a comment on your blog.";
                mm.Body       = sName + " posted a comment on your blog titled: " + dtBlog.Rows[0].ItemArray[3].ToString();
                mm.Body      += "<br /><a href=\"http://www.referralnetworx.com/Blog.aspx?bid=" + iBlogID.ToString() + "\">Click to view</a>";
                SmtpMail.Send(mm);
            }

            Session["resultColor"]     = "#009900";
            Session["resultTitle"]     = "Comment Added";
            Session["resultMessage"]   = "Thank you for your comment!";
            Session["resultReturnURL"] = Request.RawUrl;
            Response.Redirect("Result.aspx", true);
        }
        else
        {
            cvInvalidCode.IsValid = false;
        }
    }
Example #3
0
        public void AddComment(int adviceId, string comment, int userId, string connString)
        {
            try
            {
                SqlCommand sqlcmd = new SqlCommand();
                sqlcmd.CommandType = CommandType.StoredProcedure;
                sqlcmd.CommandText = "usp_AddComment";


                SqlParameter pAdviceId = new SqlParameter("@AdviceId", SqlDbType.Int, 0);
                SqlParameter pUserId   = new SqlParameter("@UserId", SqlDbType.Int, 0);
                SqlParameter pComment  = new SqlParameter("@Comment", SqlDbType.NVarChar, 100);


                pAdviceId.Value = adviceId;
                pUserId.Value   = userId;
                pComment.Value  = comment;


                sqlcmd.Parameters.Add(pAdviceId);
                sqlcmd.Parameters.Add(pUserId);
                sqlcmd.Parameters.Add(pComment);

                DataLayer dataObj = new DataLayer();
                sqlcmd = dataObj.AddComment(sqlcmd, connString);
            }
            catch
            {
                throw;
            }
        }
Example #4
0
    protected void btnAddComment_Click(object sender, EventArgs e)
    {
        if (Session["CaptchaImageText"].ToString() == tbxCode.Text)
        {
            if (tbxAddComment.Text.Length > 0)
            {
                DataLayer.AddComment(iBlogID, tbxUsername.Text, tbxAddComment.Text.Replace("\r", "<br />").Replace("\n", ""), DateTime.Now, tbxWebsite.Text);

                DataTable dtBlog = DataLayer.GetBlogsBy_blogID(iBlogID);

                SmtpMail.SmtpServer = "relay-hosting.secureserver.net";
                MailMessage mm = new MailMessage();
                mm.BodyFormat = MailFormat.Html;
                mm.To         = "*****@*****.**";
                mm.From       = "*****@*****.**";
                mm.Subject    = "New Blog Comment";
                mm.Body       = tbxUsername.Text + " posted a comment on your blog titled: " + dtBlog.Rows[0].ItemArray[1].ToString() + "<br />Here it is below:<br /><br />";
                mm.Body      += tbxAddComment.Text.Replace("\r", "<br />").Replace("\n", "");
                try
                {
                    SmtpMail.Send(mm);
                }
                catch
                { }

                Response.Redirect("http://www.fordscleaning.com/Blog.aspx?blog=" + iBlogID.ToString());
            }
        }
        else
        {
            cvCode.IsValid = false;
            Session["CaptchaImageText"] = CaptchaImage.GenerateRandomCode(random);
        }
    }
 protected void btnAddComment_Click(object sender, EventArgs e)
 {
     if (tbxCode.Text == Session["CaptchaImageText"].ToString())
     {
         int    iBlogID  = Convert.ToInt32(Request.QueryString["bid"]);
         string sWebsite = tbxWebsite.Text;
         if (tbxWebsite.Text.Length == 0)
         {
             sWebsite = "nosite";
         }
         DataLayer dl = new DataLayer();
         dl.AddComment(tbxAuthor.Text, iBlogID, DateTime.Now, sWebsite, tbxComment.Text.Replace("\r", "<br />").Replace("\n", ""));
         Response.Redirect(Request.RawUrl, true);
     }
     else
     {
         CustomValidator1.IsValid = false;
     }
 }
 protected void btnAddComment_Click(object sender, EventArgs e)
 {
     if (tbxCode.Text == Session["CaptchaImageText"].ToString())
     {
         int iBlogID = Convert.ToInt32(Request.QueryString["bid"]);
         string sWebsite = tbxWebsite.Text;
         if (tbxWebsite.Text.Length == 0)
         {
             sWebsite = "nosite";
         }
         DataLayer dl = new DataLayer();
         dl.AddComment(tbxAuthor.Text, iBlogID, DateTime.Now, sWebsite, tbxComment.Text.Replace("\r", "<br />").Replace("\n", ""));
         Response.Redirect(Request.RawUrl, true);
     }
     else
     {
         CustomValidator1.IsValid = false;
     }
 }
Example #7
0
    protected void btnAddComment_Click(object sender, EventArgs e)
    {
        DataLayer dl = new DataLayer();

        dl.AddComment(User.Identity.Name, DateTime.Now, tbxAddComment.Text.Replace("\r", "<br />").Replace("\n", ""), "Member", cbxThumbsUp.Checked, -1, sMember);
        if (cbxThumbsUp.Checked)
        {
            dl.AddThumbsUp(sMember);
        }

        SmtpMail.SmtpServer = "relay-hosting.secureserver.net";
        MailMessage mm;

        mm            = new MailMessage();
        mm.BodyFormat = MailFormat.Html;
        mm.To         = "[email protected];[email protected]";
        mm.From       = "*****@*****.**";
        mm.Subject    = "Someone posted a profile comment.";
        mm.Body       = dl.GetFullMemberNameBy_Email(User.Identity.Name) + " posted a comment on " + dl.GetFullMemberNameBy_Email(sMember) + "'s profile.";
        mm.Body      += "<br /><a href=\"http://www.referralnetworx.com/profile.aspx?member=" + sMember + "\">Click to view</a>";
        mm.Body      += "<br /><br />The comment is below:<br /><br />" + tbxAddComment.Text.Replace("\r", "<br />").Replace("\n", "");
        SmtpMail.Send(mm);

        if (sMember.ToLower() != User.Identity.Name.ToLower())
        {
            mm            = new MailMessage();
            mm.BodyFormat = MailFormat.Html;
            mm.To         = sMember;
            mm.From       = "*****@*****.**";
            mm.Subject    = "Someone posted a comment on your profile!";
            mm.Body       = dl.GetFullMemberNameBy_Email(User.Identity.Name) + " posted a comment on your profile.";
            mm.Body      += "<br /><a href=\"http://www.referralnetworx.com/profile.aspx?member=" + sMember + "\">Click to view</a>";
            SmtpMail.Send(mm);
        }

        Session["resultColor"]     = "#009900";
        Session["resultTitle"]     = "Comment Added";
        Session["resultMessage"]   = "Thank you for your comment! ";
        Session["resultReturnURL"] = Request.RawUrl;
        Response.Redirect("Result.aspx", true);
    }
    protected void btnAddComment_Click(object sender, EventArgs e)
    {
        DataLayer dl = new DataLayer();
        dl.AddComment(User.Identity.Name, DateTime.Now, tbxAddComment.Text.Replace("\r", "<br />").Replace("\n", ""), "Member", cbxThumbsUp.Checked, -1, sMember);
        if (cbxThumbsUp.Checked)
        {
            dl.AddThumbsUp(sMember);
        }

        SmtpMail.SmtpServer = "relay-hosting.secureserver.net";
        MailMessage mm;
        mm = new MailMessage();
        mm.BodyFormat = MailFormat.Html;
        mm.To = "[email protected];[email protected]";
        mm.From = "*****@*****.**";
        mm.Subject = "Someone posted a profile comment.";
        mm.Body = dl.GetFullMemberNameBy_Email(User.Identity.Name) + " posted a comment on " + dl.GetFullMemberNameBy_Email(sMember) + "'s profile.";
        mm.Body += "<br /><a href=\"http://www.referralnetworx.com/profile.aspx?member=" + sMember + "\">Click to view</a>";
        mm.Body += "<br /><br />The comment is below:<br /><br />" + tbxAddComment.Text.Replace("\r", "<br />").Replace("\n", "");
        SmtpMail.Send(mm);

        if (sMember.ToLower() != User.Identity.Name.ToLower())
        {
            mm = new MailMessage();
            mm.BodyFormat = MailFormat.Html;
            mm.To = sMember;
            mm.From = "*****@*****.**";
            mm.Subject = "Someone posted a comment on your profile!";
            mm.Body = dl.GetFullMemberNameBy_Email(User.Identity.Name) + " posted a comment on your profile.";
            mm.Body += "<br /><a href=\"http://www.referralnetworx.com/profile.aspx?member=" + sMember + "\">Click to view</a>";
            SmtpMail.Send(mm);
        }

        Session["resultColor"] = "#009900";
        Session["resultTitle"] = "Comment Added";
        Session["resultMessage"] = "Thank you for your comment! ";
        Session["resultReturnURL"] = Request.RawUrl;
        Response.Redirect("Result.aspx", true);
    }
Example #9
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        this.Validate("signup");
        if (Page.IsValid)
        {
            if (cbxAgree.Checked)
            {
                DataLayer dl = new DataLayer();
                if (!dl.EmailExists(tbxEmail.Text))
                {
                    //SmtpClient smtp = new SmtpClient("localhost");

                    //MailMessage mm;

                    dl.AddMember(tbxEmail.Text, tbxPassword.Text, tbxName.Text, "no_avatar.gif", "", "", "", "", "", "no_logo.gif", "", DateTime.Now, "", "", "", "", "", "", false, false, false, true, true, false, false, "", "", "Not Specified", 0, DateTime.Now, "Not Selected", "#77BB77,#ffffff,#DDFFDD,#444444,#1985b5,#77BB77,#ffffff,#ffffff,#000000,#0000EE,#CCDDCC", "None", "", "");

                    #region -= Add Comments to New Member Profile =-

                    int iPerson = rand.Next(2);
                    if (iPerson == 0)
                    {
                        int    iComment = rand.Next(10);
                        string sComment = "";
                        if (iComment == 0)
                        {
                            sComment = "Welcome to the site! I hope you like what you find.<br /><br />- Alex";
                        }
                        else if (iComment == 1)
                        {
                            sComment = "Welcome to Referral NetworX! We are glad to have you as a member.<br /><br />- Alex";
                        }
                        else if (iComment == 2)
                        {
                            sComment = "I love seeing new faces! Welcome to the site.<br /><br />- Alex";
                        }
                        else if (iComment == 3)
                        {
                            sComment = "Welcome to the site! I look forward to networking with you.<br /><br />- Alex";
                        }
                        else if (iComment == 4)
                        {
                            sComment = "A new member! I am excited that you have joined us!<br /><br />- Alex";
                        }
                        else if (iComment == 5)
                        {
                            sComment = "Welcome to the site! We are excited to benefit from the knowledge you have to offer!<br /><br />- Alex";
                        }
                        else if (iComment == 6)
                        {
                            sComment = "We are excited to have you here! I am confident you will make a great addition to the RNX community!<br /><br />- Alex";
                        }
                        else if (iComment == 7)
                        {
                            sComment = "Glad you could join us! I look forward to networking with you.<br /><br />- Alex";
                        }
                        else if (iComment == 8)
                        {
                            sComment = "I am happy you decided to be a part of Referral NetworX! Here is your first thumbs up!<br /><br />- Alex";
                        }
                        else if (iComment == 9)
                        {
                            sComment = "Welcome to ReferralNetworX.com! Let me know if you need anything at all!<br /><br />- Alex";
                        }

                        dl.AddComment("*****@*****.**", DateTime.Now, sComment, "Member", true, -1, tbxEmail.Text);
                        dl.AddThumbsUp(tbxEmail.Text);

                        //mm = new MailMessage();
                        //mm.IsBodyHtml = true;
                        //mm.To.Add(tbxEmail.Text);
                        //mm.From = new MailAddress("*****@*****.**");
                        //mm.Subject = "Someone posted a comment on your profile!";
                        //mm.Body = "Alex Ford posted a comment on your profile.";
                        //mm.Body += "<br /><a href=\"http://www.referralnetworx.com/profile.aspx?member=" + tbxEmail.Text + "\">Click to view</a>";
                        //smtp.Send(mm);
                    }
                    else if (iPerson == 1)
                    {
                        int    iComment = rand.Next(6);
                        string sComment = "";
                        if (iComment == 0)
                        {
                            sComment = "Hi and welcome to Referral NetworX! Our mission is your success!<br /><br />- Walt";
                        }
                        else if (iComment == 1)
                        {
                            sComment = "Welcome to Referral NetworX! I am really looking forward to networking with you. Here's to you continued success!<br /><br />- Walt";
                        }
                        else if (iComment == 2)
                        {
                            sComment = "Its great to have you as a member of Referral NetworX! We are here to help you with your continued success!<br /><br />- Walt";
                        }
                        else if (iComment == 3)
                        {
                            sComment = "Congratulations! You are now a member of Referral NetworX. Our mission is your success!<br /><br />- Walt";
                        }
                        else if (iComment == 4)
                        {
                            sComment = "Welcome! Referral NetworX is your beginning to expanding your personal network! Relationship, Relationship, Relationship!<br /><br />- Walt";
                        }
                        else if (iComment == 5)
                        {
                            sComment = "Welcome to Referral NetworX! Your journey to building quality relationships and expanding your network has begun!<br /><br />- Walt";
                        }

                        dl.AddComment("*****@*****.**", DateTime.Now, sComment, "Member", true, -1, tbxEmail.Text);
                        dl.AddThumbsUp(tbxEmail.Text);

                        //mm = new MailMessage();
                        //mm.IsBodyHtml = true;
                        //mm.To.Add(tbxEmail.Text);
                        //mm.From = new MailAddress("*****@*****.**");
                        //mm.Subject = "Someone posted a comment on your profile!";
                        //mm.Body = "Walt Ford posted a comment on your profile.";
                        //mm.Body += "<br /><a href=\"http://www.referralnetworx.com/profile.aspx?member=" + tbxEmail.Text + "\">Click to view</a>";
                        //smtp.Send(mm);
                    }

                    #endregion

                    #region -= Email notifcation of new member =-

                    //mm = new MailMessage();
                    //mm.IsBodyHtml = true;
                    //mm.To.Add("*****@*****.**");
                    //mm.To.Add("*****@*****.**");
                    //mm.From = new MailAddress("*****@*****.**");
                    //mm.Subject = "Someone signed up on ReferralNetworX.com!";
                    //mm.Body = tbxName.Text + " signed up on ReferralNetworX.com.";
                    //mm.Body += "<br /><br />How they heard about us: " + ddlHeardAboutUs.SelectedValue;
                    //mm.Body += "<br /><br /><a href=\"http://www.referralnetworx.com/profile.aspx?member=" + tbxEmail.Text + "\">Click to view</a>";
                    //smtp.Send(mm);

                    //mm = new MailMessage();
                    //mm.IsBodyHtml = true;
                    //mm.To.Add(tbxEmail.Text);
                    //mm.From = new MailAddress("*****@*****.**");
                    //mm.Subject = "Welcome to ReferralNetworX.com!";
                    //mm.Body = "Welcome " + dl.GetMemberNameBy_Email(tbxEmail.Text) + ",<br /><br />";
                    //mm.Body += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;We are dedicated to helping you and your business succeed. I truly hope RNX helps you to grow to new heights and accomplish your goals. I am confident that you will provide a lot of value to the RNX community and that your knowledge will benefit everyone! Please <a href=\"http://www.referralnetworx.com/referralnetworx/Topic.aspx?topic=50\">visit our forums to say hi</a> to fellow members and get to know everyone. Also, be sure to log in and edit your profile. The more information you provide about yourself and your business, the more you will get noticed and more opportunities will be presented to you.<br /><br />Alex Ford<br />Referral NetworX Administrator";
                    //smtp.Send(mm);

                    #endregion

                    try
                    {
                        dl.DeleteNonMember(tbxEmail.Text);
                    }
                    catch { }

                    FormsAuthentication.SetAuthCookie(tbxEmail.Text, false);
                    Response.Redirect("~/");
                }
                else
                {
                    CustomValidator1.IsValid = false;
                }
            }
            else
            {
                CustomValidator2.IsValid = false;
            }
        }
    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (lbxMembers.SelectedIndex == -1)
        {
            string sSubscriptionID = "Free";
            string sMembershipType = "0.00";
            DataLayer dl = new DataLayer();
            DateTime dtJoinDate = DateTime.Now;

            int iPassword = rPassword.Next(9999999);

            dl.AddMember(tbxEmail.Text, iPassword.ToString(), tbxName.Text, "no_avatar.gif", "", "", "", "", tbxBusinessName.Text, "no_logo.gif", "", dtJoinDate, "", "", "", "", "", "", cbxAdmin.Checked, cbxModerator.Checked, cbxCanPostBlog.Checked, cbxMemberNewsletter.Checked, cbxDailyMotivator.Checked, false, false, "", "", "Not Specified", 0, DateTime.Today, "", "#77BB77,#ffffff,#DDFFDD,#444444,#1985b5,#77BB77,#ffffff,#ffffff,#000000,#0000EE,#CCDDCC", ddlArticleColumn.SelectedValue, sSubscriptionID, sMembershipType);

            try
            {
                WebRequest wrGETURL;
                wrGETURL = WebRequest.Create("http://tinyurl.com/api-create.php?url=http://www.ReferralNetworX.com/Profile.aspx?member=" + tbxEmail.Text);
                Stream objStream;
                objStream = wrGETURL.GetResponse().GetResponseStream();
                StreamReader objReader = new StreamReader(objStream);
                string sURL = objReader.ReadToEnd();

                Yedda.Twitter t = new Yedda.Twitter();
                t.Update("ReferralNetworX", "1million!", "New Member! " + dl.GetFullMemberNameBy_Email(tbxEmail.Text) + " has joined us on ReferralNetworX.com " + sURL, Yedda.Twitter.OutputFormatType.XML);
                t.Update("Chevex", "Ch3vyF0rd", "New Member! " + dl.GetFullMemberNameBy_Email(tbxEmail.Text) + " has joined us on ReferralNetworX.com " + sURL, Yedda.Twitter.OutputFormatType.XML);
                t.Update("WALTatRNX", "robinwalt98", "New Member! " + dl.GetFullMemberNameBy_Email(tbxEmail.Text) + " has joined us on ReferralNetworX.com " + sURL, Yedda.Twitter.OutputFormatType.XML);
            }
            catch
            {
            }

            SmtpMail.SmtpServer = "relay-hosting.secureserver.net";
            MailMessage mm;

            ////////////////// -= Add Comment To New Member's Profile =- ////////////////////////
            int iPerson = rand.Next(2);
            string sPerson;
            if (iPerson == 0)
            {
                int iComment = rand.Next(10);
                string sComment = "";
                if (iComment == 0)
                {
                    sComment = "Welcome to the site! I hope you like what you find.<br /><br />- Alex";
                }
                else if (iComment == 1)
                {
                    sComment = "Welcome to Referral NetworX! We are glad to have you as a member.<br /><br />- Alex";
                }
                else if (iComment == 2)
                {
                    sComment = "I love seeing new faces! Welcome to the site.<br /><br />- Alex";
                }
                else if (iComment == 3)
                {
                    sComment = "Welcome to the site! I look forward to networking with you.<br /><br />- Alex";
                }
                else if (iComment == 4)
                {
                    sComment = "A new member! I am excited that you have joined us!<br /><br />- Alex";
                }
                else if (iComment == 5)
                {
                    sComment = "Welcome to the site! We are excited to benefit from the knowledge you have to offer!<br /><br />- Alex";
                }
                else if (iComment == 6)
                {
                    sComment = "We are excited to have you here! I am confident you will make a great addition to the RNX community!<br /><br />- Alex";
                }
                else if (iComment == 7)
                {
                    sComment = "Glad you could join us! I look forward to networking with you.<br /><br />- Alex";
                }
                else if (iComment == 8)
                {
                    sComment = "I am happy you decided to be a part of Referral NetworX! Here is your first thumbs up!<br /><br />- Alex";
                }
                else if (iComment == 9)
                {
                    sComment = "Welcome to ReferralNetworX.com! Let me know if you need anything at all!<br /><br />- Alex";
                }

                dl.AddComment("*****@*****.**", DateTime.Now, sComment, "Member", true, -1, tbxEmail.Text);
                dl.AddThumbsUp(tbxEmail.Text);

                mm = new MailMessage();
                mm.BodyFormat = MailFormat.Html;
                mm.To = tbxEmail.Text;
                mm.From = "*****@*****.**";
                mm.Subject = "Someone posted a comment on your profile!";
                mm.Body = "Alex Ford posted a comment on your profile.";
                mm.Body += "<br /><a href=\"http://www.referralnetworx.com/profile.aspx?member=" + tbxEmail.Text + "\">Click to view</a>";
                SmtpMail.Send(mm);
            }
            else if (iPerson == 1)
            {
                int iComment = rand.Next(6);
                string sComment = "";
                if (iComment == 0)
                {
                    sComment = "Hi and welcome to Referral NetworX! Our mission is your success!<br /><br />- Walt";
                }
                else if (iComment == 1)
                {
                    sComment = "Welcome to Referral NetworX! I am really looking forward to networking with you. Here's to you continued success!<br /><br />- Walt";
                }
                else if (iComment == 2)
                {
                    sComment = "Its great to have you as a member of Referral NetworX! We are here to help you with your continued success!<br /><br />- Walt";
                }
                else if (iComment == 3)
                {
                    sComment = "Congratulations! You are now a member of Referral NetworX. Our mission is your success!<br /><br />- Walt";
                }
                else if (iComment == 4)
                {
                    sComment = "Welcome! Referral NetworX is your beginning to expanding your personal network! Relationship, Relationship, Relationship!<br /><br />- Walt";
                }
                else if (iComment == 5)
                {
                    sComment = "Welcome to Referral NetworX! Your journey to building quality relationships and expanding your network has begun!<br /><br />- Walt";
                }

                dl.AddComment("*****@*****.**", DateTime.Now, sComment, "Member", true, -1, tbxEmail.Text);
                dl.AddThumbsUp(tbxEmail.Text);

                mm = new MailMessage();
                mm.BodyFormat = MailFormat.Html;
                mm.To = tbxEmail.Text;
                mm.From = "*****@*****.**";
                mm.Subject = "Someone posted a comment on your profile!";
                mm.Body = "Walt Ford posted a comment on your profile.";
                mm.Body += "<br /><a href=\"http://www.referralnetworx.com/profile.aspx?member=" + tbxEmail.Text + "\">Click to view</a>";
                SmtpMail.Send(mm);
            }

            //////////////////////////////////////////////////////////////

            mm = new MailMessage();
            mm.BodyFormat = MailFormat.Html;
            mm.To = "[email protected];[email protected]";
            mm.From = "*****@*****.**";
            mm.Subject = "Someone signed up on ReferralNetworX.com!";
            mm.Body = tbxName.Text + " signed up on ReferralNetworX.com.";
            mm.Body += "<br /><br /><a href=\"http://www.referralnetworx.com/profile.aspx?member=" + tbxEmail.Text + "\">Click to view</a>";
            SmtpMail.Send(mm);

            mm = new MailMessage();
            mm.BodyFormat = MailFormat.Html;
            mm.To = tbxEmail.Text;
            mm.From = "*****@*****.**";
            mm.Subject = "Welcome to ReferralNetworX.com!";
            mm.Body = "Welcome " + dl.GetMemberNameBy_Email(tbxEmail.Text) + ",<br /><br />";
            mm.Body += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;We are dedicated to helping you and your business succeed. I truly hope RNX helps you to grow to new heights and accomplish your goals. I am confident that you will provide a lot of value to the RNX community and that your knowledge will benefit everyone! Please <a href=\"http://www.referralnetworx.com/referralnetworx/Topic.aspx?topic=50\">visit our forums to say hi</a> to fellow members and get to know everyone. Also, be sure to log in and edit your profile. The more information you provide about yourself and your business, the more you will get noticed and more opportunities will be presented to you.<br /><br />Here is your username and temporary password:<br />Password - " + iPassword.ToString() + " (You can change this after logging in)<br />Username - " + tbxEmail.Text + "<br /><br />Alex Ford<br />Referral NetworX Administrator";
            SmtpMail.Send(mm);

            try
            {
                dl.DeleteNonMember(tbxEmail.Text);
            }
            catch { }

            Session["resultColor"] = "#007700";
            Session["resultTitle"] = "Member Added";
            Session["resultMessage"] = "Member Added Successfuly";
            Session["resultReturnURL"] = "ManageMembers.aspx";
            Response.Redirect("Result.aspx");
        }
        else
        {
            if (cbxDeleteMember.Checked)
            {
                DataLayer dl = new DataLayer();
                dl.DeleteMember(lbxMembers.SelectedValue);
                Session["resultColor"] = "#007700";
                Session["resultTitle"] = "Member Deleted";
                Session["resultMessage"] = "Member Deleted Successfuly";
                Session["resultReturnURL"] = "ManageMembers.aspx";
                Response.Redirect("Result.aspx");
            }
            else
            {
                DataLayer dl = new DataLayer();
                DataTable dt = dl.GetMemberBy_Email(lbxMembers.SelectedValue);
                string sTwitterFeedStyles = dt.Rows[0].ItemArray[32].ToString();
                string sPersonalAvatar = dt.Rows[0].ItemArray[3].ToString();
                string sMemberAvatar = dt.Rows[0].ItemArray[3].ToString();
                string sPhone = dt.Rows[0].ItemArray[4].ToString();
                string sInterests = dt.Rows[0].ItemArray[5].ToString();
                string sWebsite = dt.Rows[0].ItemArray[6].ToString();
                string sPersonalBio = dt.Rows[0].ItemArray[7].ToString();
                string sBusinessLogo = dt.Rows[0].ItemArray[9].ToString();
                string sBusinessBio = dt.Rows[0].ItemArray[10].ToString();
                string sAIM = dt.Rows[0].ItemArray[13].ToString();
                string sMSN = dt.Rows[0].ItemArray[14].ToString();
                string sYahoo = dt.Rows[0].ItemArray[15].ToString();
                string sGoogleTalk = dt.Rows[0].ItemArray[16].ToString();
                string sLocation = dt.Rows[0].ItemArray[17].ToString();
                string sSignature = dt.Rows[0].ItemArray[18].ToString();
                bool bShowEmail = Convert.ToBoolean(dt.Rows[0].ItemArray[24]);
                bool bUpdateTwitter = Convert.ToBoolean(dt.Rows[0].ItemArray[25]);
                string sTwitterUsername = dt.Rows[0].ItemArray[26].ToString();
                string sTwitterPassword = dt.Rows[0].ItemArray[27].ToString();
                string sGender = dt.Rows[0].ItemArray[28].ToString();
                DateTime dtBirthday = Convert.ToDateTime(dt.Rows[0].ItemArray[30]);
                string sBusinessCategory = dt.Rows[0].ItemArray[31].ToString();

                dl.UpdateMember(lbxMembers.SelectedValue, tbxName.Text, sPersonalAvatar, sPhone, sInterests, sWebsite, sPersonalBio, tbxBusinessName.Text, sBusinessLogo, sBusinessBio, sAIM, sMSN, sYahoo, sGoogleTalk, sLocation, sSignature, cbxAdmin.Checked, cbxModerator.Checked, cbxCanPostBlog.Checked, cbxMemberNewsletter.Checked, cbxDailyMotivator.Checked, bShowEmail, bUpdateTwitter, sTwitterUsername, sTwitterPassword, sGender, dtBirthday, sBusinessCategory, sTwitterFeedStyles, ddlArticleColumn.SelectedValue);
                if (lbxMembers.SelectedValue.ToUpper() != tbxEmail.Text.ToUpper())
                {
                    if (sPersonalAvatar != "no_avatar.gif")
                    {
                        string sExt = sPersonalAvatar.Remove(0, sPersonalAvatar.LastIndexOf('.'));
                        string sNewPersonalAvatar = tbxEmail.Text + sExt;
                        if (File.Exists(MapPath("~/images/MemberAvatars/" + sNewPersonalAvatar)))
                            File.Delete(MapPath("~/images/MemberAvatars/" + sNewPersonalAvatar));
                        File.Move(MapPath("~/images/MemberAvatars/" + sPersonalAvatar), MapPath("~/images/MemberAvatars/" + sNewPersonalAvatar));
                        sPersonalAvatar = sNewPersonalAvatar;
                    }
                    if (sBusinessLogo != "no_logo.gif")
                    {
                        string sExt = sBusinessLogo.Remove(0, sBusinessLogo.LastIndexOf('.'));
                        string sNewBusinessLogo = tbxEmail.Text + sExt;
                        if (File.Exists(MapPath("~/images/BusinessLogos/" + sNewBusinessLogo)))
                            File.Delete(MapPath("~/images/BusinessLogos/" + sNewBusinessLogo));
                        File.Move(MapPath("~/images/BusinessLogos/" + sBusinessLogo), MapPath("~/images/BusinessLogos/" + sNewBusinessLogo));
                        sBusinessLogo = sNewBusinessLogo;
                    }
                    dl.UpdateMemberEmail(lbxMembers.SelectedValue, tbxEmail.Text, sPersonalAvatar, sBusinessLogo);
                    if (User.Identity.Name.ToUpper() == lbxMembers.SelectedValue.ToUpper())
                    {
                        FormsAuthentication.SignOut();
                        FormsAuthentication.SetAuthCookie(tbxEmail.Text, false);
                    }
                }
                Session["resultColor"] = "#007700";
                Session["resultTitle"] = "Member Updated";
                Session["resultMessage"] = "Member Updated Successfuly ";
                Session["resultReturnURL"] = "ManageMembers.aspx";
                Response.Redirect("Result.aspx");
            }
        }
    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (lbxMembers.SelectedIndex == -1)
        {
            string    sSubscriptionID = "Free";
            string    sMembershipType = "0.00";
            DataLayer dl         = new DataLayer();
            DateTime  dtJoinDate = DateTime.Now;

            int iPassword = rPassword.Next(9999999);

            dl.AddMember(tbxEmail.Text, iPassword.ToString(), tbxName.Text, "no_avatar.gif", "", "", "", "", tbxBusinessName.Text, "no_logo.gif", "", dtJoinDate, "", "", "", "", "", "", cbxAdmin.Checked, cbxModerator.Checked, cbxCanPostBlog.Checked, cbxMemberNewsletter.Checked, cbxDailyMotivator.Checked, false, false, "", "", "Not Specified", 0, DateTime.Today, "", "#77BB77,#ffffff,#DDFFDD,#444444,#1985b5,#77BB77,#ffffff,#ffffff,#000000,#0000EE,#CCDDCC", ddlArticleColumn.SelectedValue, sSubscriptionID, sMembershipType);

            try
            {
                WebRequest wrGETURL;
                wrGETURL = WebRequest.Create("http://tinyurl.com/api-create.php?url=http://www.ReferralNetworX.com/Profile.aspx?member=" + tbxEmail.Text);
                Stream objStream;
                objStream = wrGETURL.GetResponse().GetResponseStream();
                StreamReader objReader = new StreamReader(objStream);
                string       sURL      = objReader.ReadToEnd();

                Yedda.Twitter t = new Yedda.Twitter();
                t.Update("ReferralNetworX", "1million!", "New Member! " + dl.GetFullMemberNameBy_Email(tbxEmail.Text) + " has joined us on ReferralNetworX.com " + sURL, Yedda.Twitter.OutputFormatType.XML);
                t.Update("Chevex", "Ch3vyF0rd", "New Member! " + dl.GetFullMemberNameBy_Email(tbxEmail.Text) + " has joined us on ReferralNetworX.com " + sURL, Yedda.Twitter.OutputFormatType.XML);
                t.Update("WALTatRNX", "robinwalt98", "New Member! " + dl.GetFullMemberNameBy_Email(tbxEmail.Text) + " has joined us on ReferralNetworX.com " + sURL, Yedda.Twitter.OutputFormatType.XML);
            }
            catch
            {
            }

            SmtpMail.SmtpServer = "relay-hosting.secureserver.net";
            MailMessage mm;

            ////////////////// -= Add Comment To New Member's Profile =- ////////////////////////
            int    iPerson = rand.Next(2);
            string sPerson;
            if (iPerson == 0)
            {
                int    iComment = rand.Next(10);
                string sComment = "";
                if (iComment == 0)
                {
                    sComment = "Welcome to the site! I hope you like what you find.<br /><br />- Alex";
                }
                else if (iComment == 1)
                {
                    sComment = "Welcome to Referral NetworX! We are glad to have you as a member.<br /><br />- Alex";
                }
                else if (iComment == 2)
                {
                    sComment = "I love seeing new faces! Welcome to the site.<br /><br />- Alex";
                }
                else if (iComment == 3)
                {
                    sComment = "Welcome to the site! I look forward to networking with you.<br /><br />- Alex";
                }
                else if (iComment == 4)
                {
                    sComment = "A new member! I am excited that you have joined us!<br /><br />- Alex";
                }
                else if (iComment == 5)
                {
                    sComment = "Welcome to the site! We are excited to benefit from the knowledge you have to offer!<br /><br />- Alex";
                }
                else if (iComment == 6)
                {
                    sComment = "We are excited to have you here! I am confident you will make a great addition to the RNX community!<br /><br />- Alex";
                }
                else if (iComment == 7)
                {
                    sComment = "Glad you could join us! I look forward to networking with you.<br /><br />- Alex";
                }
                else if (iComment == 8)
                {
                    sComment = "I am happy you decided to be a part of Referral NetworX! Here is your first thumbs up!<br /><br />- Alex";
                }
                else if (iComment == 9)
                {
                    sComment = "Welcome to ReferralNetworX.com! Let me know if you need anything at all!<br /><br />- Alex";
                }

                dl.AddComment("*****@*****.**", DateTime.Now, sComment, "Member", true, -1, tbxEmail.Text);
                dl.AddThumbsUp(tbxEmail.Text);

                mm            = new MailMessage();
                mm.BodyFormat = MailFormat.Html;
                mm.To         = tbxEmail.Text;
                mm.From       = "*****@*****.**";
                mm.Subject    = "Someone posted a comment on your profile!";
                mm.Body       = "Alex Ford posted a comment on your profile.";
                mm.Body      += "<br /><a href=\"http://www.referralnetworx.com/profile.aspx?member=" + tbxEmail.Text + "\">Click to view</a>";
                SmtpMail.Send(mm);
            }
            else if (iPerson == 1)
            {
                int    iComment = rand.Next(6);
                string sComment = "";
                if (iComment == 0)
                {
                    sComment = "Hi and welcome to Referral NetworX! Our mission is your success!<br /><br />- Walt";
                }
                else if (iComment == 1)
                {
                    sComment = "Welcome to Referral NetworX! I am really looking forward to networking with you. Here's to you continued success!<br /><br />- Walt";
                }
                else if (iComment == 2)
                {
                    sComment = "Its great to have you as a member of Referral NetworX! We are here to help you with your continued success!<br /><br />- Walt";
                }
                else if (iComment == 3)
                {
                    sComment = "Congratulations! You are now a member of Referral NetworX. Our mission is your success!<br /><br />- Walt";
                }
                else if (iComment == 4)
                {
                    sComment = "Welcome! Referral NetworX is your beginning to expanding your personal network! Relationship, Relationship, Relationship!<br /><br />- Walt";
                }
                else if (iComment == 5)
                {
                    sComment = "Welcome to Referral NetworX! Your journey to building quality relationships and expanding your network has begun!<br /><br />- Walt";
                }

                dl.AddComment("*****@*****.**", DateTime.Now, sComment, "Member", true, -1, tbxEmail.Text);
                dl.AddThumbsUp(tbxEmail.Text);

                mm            = new MailMessage();
                mm.BodyFormat = MailFormat.Html;
                mm.To         = tbxEmail.Text;
                mm.From       = "*****@*****.**";
                mm.Subject    = "Someone posted a comment on your profile!";
                mm.Body       = "Walt Ford posted a comment on your profile.";
                mm.Body      += "<br /><a href=\"http://www.referralnetworx.com/profile.aspx?member=" + tbxEmail.Text + "\">Click to view</a>";
                SmtpMail.Send(mm);
            }

            //////////////////////////////////////////////////////////////

            mm            = new MailMessage();
            mm.BodyFormat = MailFormat.Html;
            mm.To         = "[email protected];[email protected]";
            mm.From       = "*****@*****.**";
            mm.Subject    = "Someone signed up on ReferralNetworX.com!";
            mm.Body       = tbxName.Text + " signed up on ReferralNetworX.com.";
            mm.Body      += "<br /><br /><a href=\"http://www.referralnetworx.com/profile.aspx?member=" + tbxEmail.Text + "\">Click to view</a>";
            SmtpMail.Send(mm);

            mm            = new MailMessage();
            mm.BodyFormat = MailFormat.Html;
            mm.To         = tbxEmail.Text;
            mm.From       = "*****@*****.**";
            mm.Subject    = "Welcome to ReferralNetworX.com!";
            mm.Body       = "Welcome " + dl.GetMemberNameBy_Email(tbxEmail.Text) + ",<br /><br />";
            mm.Body      += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;We are dedicated to helping you and your business succeed. I truly hope RNX helps you to grow to new heights and accomplish your goals. I am confident that you will provide a lot of value to the RNX community and that your knowledge will benefit everyone! Please <a href=\"http://www.referralnetworx.com/referralnetworx/Topic.aspx?topic=50\">visit our forums to say hi</a> to fellow members and get to know everyone. Also, be sure to log in and edit your profile. The more information you provide about yourself and your business, the more you will get noticed and more opportunities will be presented to you.<br /><br />Here is your username and temporary password:<br />Password - " + iPassword.ToString() + " (You can change this after logging in)<br />Username - " + tbxEmail.Text + "<br /><br />Alex Ford<br />Referral NetworX Administrator";
            SmtpMail.Send(mm);


            try
            {
                dl.DeleteNonMember(tbxEmail.Text);
            }
            catch { }

            Session["resultColor"]     = "#007700";
            Session["resultTitle"]     = "Member Added";
            Session["resultMessage"]   = "Member Added Successfuly";
            Session["resultReturnURL"] = "ManageMembers.aspx";
            Response.Redirect("Result.aspx");
        }
        else
        {
            if (cbxDeleteMember.Checked)
            {
                DataLayer dl = new DataLayer();
                dl.DeleteMember(lbxMembers.SelectedValue);
                Session["resultColor"]     = "#007700";
                Session["resultTitle"]     = "Member Deleted";
                Session["resultMessage"]   = "Member Deleted Successfuly";
                Session["resultReturnURL"] = "ManageMembers.aspx";
                Response.Redirect("Result.aspx");
            }
            else
            {
                DataLayer dl = new DataLayer();
                DataTable dt = dl.GetMemberBy_Email(lbxMembers.SelectedValue);
                string    sTwitterFeedStyles = dt.Rows[0].ItemArray[32].ToString();
                string    sPersonalAvatar    = dt.Rows[0].ItemArray[3].ToString();
                string    sMemberAvatar      = dt.Rows[0].ItemArray[3].ToString();
                string    sPhone             = dt.Rows[0].ItemArray[4].ToString();
                string    sInterests         = dt.Rows[0].ItemArray[5].ToString();
                string    sWebsite           = dt.Rows[0].ItemArray[6].ToString();
                string    sPersonalBio       = dt.Rows[0].ItemArray[7].ToString();
                string    sBusinessLogo      = dt.Rows[0].ItemArray[9].ToString();
                string    sBusinessBio       = dt.Rows[0].ItemArray[10].ToString();
                string    sAIM              = dt.Rows[0].ItemArray[13].ToString();
                string    sMSN              = dt.Rows[0].ItemArray[14].ToString();
                string    sYahoo            = dt.Rows[0].ItemArray[15].ToString();
                string    sGoogleTalk       = dt.Rows[0].ItemArray[16].ToString();
                string    sLocation         = dt.Rows[0].ItemArray[17].ToString();
                string    sSignature        = dt.Rows[0].ItemArray[18].ToString();
                bool      bShowEmail        = Convert.ToBoolean(dt.Rows[0].ItemArray[24]);
                bool      bUpdateTwitter    = Convert.ToBoolean(dt.Rows[0].ItemArray[25]);
                string    sTwitterUsername  = dt.Rows[0].ItemArray[26].ToString();
                string    sTwitterPassword  = dt.Rows[0].ItemArray[27].ToString();
                string    sGender           = dt.Rows[0].ItemArray[28].ToString();
                DateTime  dtBirthday        = Convert.ToDateTime(dt.Rows[0].ItemArray[30]);
                string    sBusinessCategory = dt.Rows[0].ItemArray[31].ToString();

                dl.UpdateMember(lbxMembers.SelectedValue, tbxName.Text, sPersonalAvatar, sPhone, sInterests, sWebsite, sPersonalBio, tbxBusinessName.Text, sBusinessLogo, sBusinessBio, sAIM, sMSN, sYahoo, sGoogleTalk, sLocation, sSignature, cbxAdmin.Checked, cbxModerator.Checked, cbxCanPostBlog.Checked, cbxMemberNewsletter.Checked, cbxDailyMotivator.Checked, bShowEmail, bUpdateTwitter, sTwitterUsername, sTwitterPassword, sGender, dtBirthday, sBusinessCategory, sTwitterFeedStyles, ddlArticleColumn.SelectedValue);
                if (lbxMembers.SelectedValue.ToUpper() != tbxEmail.Text.ToUpper())
                {
                    if (sPersonalAvatar != "no_avatar.gif")
                    {
                        string sExt = sPersonalAvatar.Remove(0, sPersonalAvatar.LastIndexOf('.'));
                        string sNewPersonalAvatar = tbxEmail.Text + sExt;
                        if (File.Exists(MapPath("~/images/MemberAvatars/" + sNewPersonalAvatar)))
                        {
                            File.Delete(MapPath("~/images/MemberAvatars/" + sNewPersonalAvatar));
                        }
                        File.Move(MapPath("~/images/MemberAvatars/" + sPersonalAvatar), MapPath("~/images/MemberAvatars/" + sNewPersonalAvatar));
                        sPersonalAvatar = sNewPersonalAvatar;
                    }
                    if (sBusinessLogo != "no_logo.gif")
                    {
                        string sExt             = sBusinessLogo.Remove(0, sBusinessLogo.LastIndexOf('.'));
                        string sNewBusinessLogo = tbxEmail.Text + sExt;
                        if (File.Exists(MapPath("~/images/BusinessLogos/" + sNewBusinessLogo)))
                        {
                            File.Delete(MapPath("~/images/BusinessLogos/" + sNewBusinessLogo));
                        }
                        File.Move(MapPath("~/images/BusinessLogos/" + sBusinessLogo), MapPath("~/images/BusinessLogos/" + sNewBusinessLogo));
                        sBusinessLogo = sNewBusinessLogo;
                    }
                    dl.UpdateMemberEmail(lbxMembers.SelectedValue, tbxEmail.Text, sPersonalAvatar, sBusinessLogo);
                    if (User.Identity.Name.ToUpper() == lbxMembers.SelectedValue.ToUpper())
                    {
                        FormsAuthentication.SignOut();
                        FormsAuthentication.SetAuthCookie(tbxEmail.Text, false);
                    }
                }
                Session["resultColor"]     = "#007700";
                Session["resultTitle"]     = "Member Updated";
                Session["resultMessage"]   = "Member Updated Successfuly ";
                Session["resultReturnURL"] = "ManageMembers.aspx";
                Response.Redirect("Result.aspx");
            }
        }
    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        this.Validate("signup");
        if (Page.IsValid)
        {
            if (cbxAgree.Checked)
            {
                DataLayer dl = new DataLayer();
                if (!dl.EmailExists(tbxEmail.Text))
                {

                    //SmtpClient smtp = new SmtpClient("localhost");

                    //MailMessage mm;

                        dl.AddMember(tbxEmail.Text, tbxPassword.Text, tbxName.Text, "no_avatar.gif", "", "", "", "", "", "no_logo.gif", "", DateTime.Now, "", "", "", "", "", "", false, false, false, true, true, false, false, "", "", "Not Specified", 0, DateTime.Now, "Not Selected", "#77BB77,#ffffff,#DDFFDD,#444444,#1985b5,#77BB77,#ffffff,#ffffff,#000000,#0000EE,#CCDDCC", "None", "", "");

                        #region -= Add Comments to New Member Profile =-

                        int iPerson = rand.Next(2);
                        if (iPerson == 0)
                        {
                            int iComment = rand.Next(10);
                            string sComment = "";
                            if (iComment == 0)
                            {
                                sComment = "Welcome to the site! I hope you like what you find.<br /><br />- Alex";
                            }
                            else if (iComment == 1)
                            {
                                sComment = "Welcome to Referral NetworX! We are glad to have you as a member.<br /><br />- Alex";
                            }
                            else if (iComment == 2)
                            {
                                sComment = "I love seeing new faces! Welcome to the site.<br /><br />- Alex";
                            }
                            else if (iComment == 3)
                            {
                                sComment = "Welcome to the site! I look forward to networking with you.<br /><br />- Alex";
                            }
                            else if (iComment == 4)
                            {
                                sComment = "A new member! I am excited that you have joined us!<br /><br />- Alex";
                            }
                            else if (iComment == 5)
                            {
                                sComment = "Welcome to the site! We are excited to benefit from the knowledge you have to offer!<br /><br />- Alex";
                            }
                            else if (iComment == 6)
                            {
                                sComment = "We are excited to have you here! I am confident you will make a great addition to the RNX community!<br /><br />- Alex";
                            }
                            else if (iComment == 7)
                            {
                                sComment = "Glad you could join us! I look forward to networking with you.<br /><br />- Alex";
                            }
                            else if (iComment == 8)
                            {
                                sComment = "I am happy you decided to be a part of Referral NetworX! Here is your first thumbs up!<br /><br />- Alex";
                            }
                            else if (iComment == 9)
                            {
                                sComment = "Welcome to ReferralNetworX.com! Let me know if you need anything at all!<br /><br />- Alex";
                            }

                            dl.AddComment("*****@*****.**", DateTime.Now, sComment, "Member", true, -1, tbxEmail.Text);
                            dl.AddThumbsUp(tbxEmail.Text);

                            //mm = new MailMessage();
                            //mm.IsBodyHtml = true;
                            //mm.To.Add(tbxEmail.Text);
                            //mm.From = new MailAddress("*****@*****.**");
                            //mm.Subject = "Someone posted a comment on your profile!";
                            //mm.Body = "Alex Ford posted a comment on your profile.";
                            //mm.Body += "<br /><a href=\"http://www.referralnetworx.com/profile.aspx?member=" + tbxEmail.Text + "\">Click to view</a>";
                            //smtp.Send(mm);
                        }
                        else if (iPerson == 1)
                        {
                            int iComment = rand.Next(6);
                            string sComment = "";
                            if (iComment == 0)
                            {
                                sComment = "Hi and welcome to Referral NetworX! Our mission is your success!<br /><br />- Walt";
                            }
                            else if (iComment == 1)
                            {
                                sComment = "Welcome to Referral NetworX! I am really looking forward to networking with you. Here's to you continued success!<br /><br />- Walt";
                            }
                            else if (iComment == 2)
                            {
                                sComment = "Its great to have you as a member of Referral NetworX! We are here to help you with your continued success!<br /><br />- Walt";
                            }
                            else if (iComment == 3)
                            {
                                sComment = "Congratulations! You are now a member of Referral NetworX. Our mission is your success!<br /><br />- Walt";
                            }
                            else if (iComment == 4)
                            {
                                sComment = "Welcome! Referral NetworX is your beginning to expanding your personal network! Relationship, Relationship, Relationship!<br /><br />- Walt";
                            }
                            else if (iComment == 5)
                            {
                                sComment = "Welcome to Referral NetworX! Your journey to building quality relationships and expanding your network has begun!<br /><br />- Walt";
                            }

                            dl.AddComment("*****@*****.**", DateTime.Now, sComment, "Member", true, -1, tbxEmail.Text);
                            dl.AddThumbsUp(tbxEmail.Text);

                            //mm = new MailMessage();
                            //mm.IsBodyHtml = true;
                            //mm.To.Add(tbxEmail.Text);
                            //mm.From = new MailAddress("*****@*****.**");
                            //mm.Subject = "Someone posted a comment on your profile!";
                            //mm.Body = "Walt Ford posted a comment on your profile.";
                            //mm.Body += "<br /><a href=\"http://www.referralnetworx.com/profile.aspx?member=" + tbxEmail.Text + "\">Click to view</a>";
                            //smtp.Send(mm);
                        }

                        #endregion

                        #region -= Email notifcation of new member =-

                        //mm = new MailMessage();
                        //mm.IsBodyHtml = true;
                        //mm.To.Add("*****@*****.**");
                        //mm.To.Add("*****@*****.**");
                        //mm.From = new MailAddress("*****@*****.**");
                        //mm.Subject = "Someone signed up on ReferralNetworX.com!";
                        //mm.Body = tbxName.Text + " signed up on ReferralNetworX.com.";
                        //mm.Body += "<br /><br />How they heard about us: " + ddlHeardAboutUs.SelectedValue;
                        //mm.Body += "<br /><br /><a href=\"http://www.referralnetworx.com/profile.aspx?member=" + tbxEmail.Text + "\">Click to view</a>";
                        //smtp.Send(mm);

                        //mm = new MailMessage();
                        //mm.IsBodyHtml = true;
                        //mm.To.Add(tbxEmail.Text);
                        //mm.From = new MailAddress("*****@*****.**");
                        //mm.Subject = "Welcome to ReferralNetworX.com!";
                        //mm.Body = "Welcome " + dl.GetMemberNameBy_Email(tbxEmail.Text) + ",<br /><br />";
                        //mm.Body += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;We are dedicated to helping you and your business succeed. I truly hope RNX helps you to grow to new heights and accomplish your goals. I am confident that you will provide a lot of value to the RNX community and that your knowledge will benefit everyone! Please <a href=\"http://www.referralnetworx.com/referralnetworx/Topic.aspx?topic=50\">visit our forums to say hi</a> to fellow members and get to know everyone. Also, be sure to log in and edit your profile. The more information you provide about yourself and your business, the more you will get noticed and more opportunities will be presented to you.<br /><br />Alex Ford<br />Referral NetworX Administrator";
                        //smtp.Send(mm);

                        #endregion

                        try
                        {
                            dl.DeleteNonMember(tbxEmail.Text);
                        }
                        catch { }

                        FormsAuthentication.SetAuthCookie(tbxEmail.Text, false);
                        Response.Redirect("~/");
                }
                else
                {
                    CustomValidator1.IsValid = false;
                }
            }
            else
            {
                CustomValidator2.IsValid = false;
            }
        }
    }