Exemplo n.º 1
0
    protected void Save_Click(object sender, EventArgs e)
    {
        if (xpassword.Text != "")
        {
            password_text = xpassword.Text;
        }
        //  Odyssey odyssey = new Odyssey();
        adminID  = z.a_xadminz(xemail.Text, xpassword.Text, serverpath);
        xadminID = z.getRoleByID(adminID);
        if (adminID != "0")
        {
            if (!(z.addAdminLog(adminID, RemoteIP, remote_host, remote_user, server_name, server_url) != ""))
            {
                Response.Redirect("./login.aspx");
            }
            else
            {
                Session["pwalletID"] = adminID;
                string str3 = xadminID;
                if (str3 != null)
                {
                    if (!(str3 == "1"))
                    {
                        if (str3 == "2")
                        {
                            Response.Redirect("./admin/pt/verification_unit/profile.aspx");
                        }
                        else if (str3 == "3")
                        {
                            Response.Redirect("./admin/pt/search_unit/profile.aspx");
                        }
                        else if (str3 == "4")
                        {
                            Response.Redirect("./admin/pt/examiners_unit/profile.aspx");
                        }

                        else if (str3 == "8")
                        {
                            Response.Redirect("./admin/pt/examiners_unit2/profile.aspx");
                        }
                        else if (str3 == "5")
                        {
                            Response.Redirect("./admin/pt/acceptance_unit/profile.aspx");
                        }
                        else if (str3 == "6")
                        {
                            Response.Redirect("./admin/pt/registrar_unit/profile_index.aspx");
                        }
                    }
                    else
                    {
                        Response.Redirect("./admin/pt/x_unit/profile.aspx");
                    }
                }
            }
        }
    }