Beispiel #1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            //set up passwords
            //but check first if the login really exists

            int usertype = Convert.ToInt16(Request.QueryString["utype"]);

            if (Request.QueryString["keyid"] != null)
            {
                string keyid = Request.QueryString["keyid"];

                var clapslog = new DlLogins();
                if (keyid == clapslog.Getkeyuser(keyid, usertype))
                {
                    //change password user
                    if (usertype == 2)
                    {
                        clapslog.Chgpwdjswkey(keyid, TextBox1.Text);
                    }

                    //change admin password
                    if (usertype == 1)
                    {
                        clapslog.Chgpwdrecwkey(keyid, TextBox1.Text);
                    }
                }
            }
        }
Beispiel #2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            //set up passwords
            //but check first if the login really exists

            int usertype = Convert.ToInt16(Request.QueryString["utype"]);

            if (Request.QueryString["keyid"] != null)
            {
                string keyid = Request.QueryString["keyid"];

                var clapslog = new DlLogins();
                if (keyid == clapslog.Getkeyuser(keyid, usertype))
                {
                    //change password user
                    if (usertype == 2)
                    {
                        clapslog.Chgpwdjswkey(keyid, TextBox1.Text);
                    }

                    //change admin password
                    if (usertype == 1)
                    {
                        clapslog.Chgpwdrecwkey(keyid, TextBox1.Text);
                    }
                }
            }
        }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //LinkButton5.Visible = false;

            if (Session["pusername"] != null)
            {
                string storsess = Session["pusername"].ToString();

                var clls = new DlLogins();

                //this is recruiter
                if (clls.Checkusertype(storsess, 1) == 1)
                {
                    LinkButton1.Text = storsess + "'s cpanel";
                    LinkButton2.Enabled = false;
                    LinkButton2.CssClass = "Styleag1";
                }

                    //this is a normal user
                else
                {
                    LinkButton2.Text = storsess + "'s cpanel";
                    LinkButton1.Enabled = false;
                    LinkButton1.CssClass = "Styleag1";
                }

                //check recruiters
            }
        }
Beispiel #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //LinkButton5.Visible = false;

            if (Session["pusername"] != null)
            {
                string storsess = Session["pusername"].ToString();

                var clls = new DlLogins();

                //this is recruiter
                if (clls.Checkusertype(storsess, 1) == 1)
                {
                    LinkButton1.Text     = storsess + "'s cpanel";
                    LinkButton2.Enabled  = false;
                    LinkButton2.CssClass = "Styleag1";
                }

                //this is a normal user
                else
                {
                    LinkButton2.Text     = storsess + "'s cpanel";
                    LinkButton1.Enabled  = false;
                    LinkButton1.CssClass = "Styleag1";
                }

                //check recruiters
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            //activate the account
            if (Request.QueryString["usertype"] != null)
            {
                int    usertype   = Convert.ToInt16(Request.QueryString["usertype"]);
                string username   = Request.QueryString["username"];
                string activation = Request.QueryString["activationid"];

                var cllog = new DlLogins();
                cllog.ActivateAcc(usertype, username, activation);
            }
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            //insert into the usertable random key
            //recalc password hash
            var clpdh = new ClPwdhash();
            var rnd   = new Random();

            string hashedpwd = clpdh.GetMd5Hash(rnd.Next(10, 1000).ToString(CultureInfo.InvariantCulture));

            //one goes to email as hashvalue.
            var cemp = new DlEmailprocessor();

            string ebody = string.Empty;

            //second inserts into the db.
            var clog = new DlLogins();

            if (CheckBox1.Checked)
            {
                clog.Chgkeyrec(TextBox1.Text, hashedpwd);

                ebody =
                    cemp.Emailpwdnotify("https://ahrcloud.com/PwdChange.aspx?keyid=" + hashedpwd + "&utype=" + 1,
                                        TextBox1.Text).ToString();

                cemp.Clemail.Sendmailproc(TextBox1.Text, "ahrcloud: Password Reset", ebody, 2);

                //logg it as the entry for email
                cemp.Sendappemaildbupdate(TextBox1.Text, 2);
            }

            else
            {
                clog.Chgkeyuser(TextBox1.Text, hashedpwd);

                ebody =
                    cemp.Emailpwdnotify("https://ahrcloud.com/PwdChange.aspx?keyid=" + hashedpwd + "&utype=" + 2,
                                        TextBox1.Text).ToString();

                cemp.Clemail.Sendmailproc(TextBox1.Text, "ahrcloud: Password Reset", ebody, 2);

                //logg it as the entry for email
                cemp.Sendappemaildbupdate(TextBox1.Text, 2);
            }
        }