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"); } } } } }
protected void Save_Click(object sender, EventArgs e) { string keydir = serverpath + "\\Handlers\\bf.pke"; if (File.Exists(keydir)) { StreamReader streamReader = new StreamReader(keydir, true); file_string = streamReader.ReadToEnd(); streamReader.Close(); if (file_string != null) { string bitStrengthString = file_string.Substring(0, file_string.IndexOf("</BitStrength>") + 14); file_string = file_string.Replace(bitStrengthString, ""); } } /////////////////////////////////////////////////////////////////////////////////////////////////////////////// if (this.xpassword.Text != "") { this.password_text = this.xpassword.Text; } Odyssey ody = new Odyssey(); // this.adminID = this.z.a_xadminz(ody.EncryptString(this.xemail.Text, file_len, file_string), ody.EncryptString(this.xpassword.Text, file_len, file_string)); this.adminID = this.z.a_xadminz(this.xemail.Text, this.xpassword.Text, serverpath); string str = this.z.getRoleByID(this.adminID); if (this.adminID != "0") { string succ = z.addAdminLog(str, RemoteIP, remote_host, remote_user, server_name, server_url); if (succ != "") { Session["pwalletID"] = this.adminID; switch (str) { case "1": base.Response.Redirect("./x_unit/profile.aspx"); break; case "2": base.Response.Redirect("./agent_unit/profile.aspx"); break; case "3": base.Response.Redirect("./verification_unit/profile.aspx"); break; case "4": base.Response.Redirect("./search_unit/profile.aspx"); break; case "5": base.Response.Redirect("./examiners_unit/profile.aspx"); break; case "6": base.Response.Redirect("./acceptance_unit/profile.aspx"); break; case "7": base.Response.Redirect("./publication_unit/profile.aspx"); break; case "8": base.Response.Redirect("./opposition_unit/profile.aspx"); break; case "9": base.Response.Redirect("./certification_unit/profile.aspx"); break; case "10": base.Response.Redirect("./registrar_unit/profile_index.aspx"); return; case "11": base.Response.Redirect("./cash_unit/profile.aspx"); return; case "12": base.Response.Redirect("./search_unit2/profile.aspx"); return; case "15": base.Response.Redirect("./Appeal_Rejection/profile.aspx"); return; } } else { base.Response.Redirect("../../control.aspx"); } } }