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.xnewpass1.Text != "") { this.xnewpass1_text = this.xnewpass1.Text; } if (this.xnewpass2.Text != "") { this.xnewpass2_text = this.xnewpass2.Text; } if (Session["Newpass"] != null) { xnewpass1_text = Session["Newpass"].ToString(); } if (this.z.e_xadminz(this.adminID, ody.EncryptString(xnewpass1_text, file_len, file_string)) != "0") { Session["Newpass"] = null; base.Response.Redirect("./control.aspx"); } else { base.Response.Redirect("./cp.aspx"); } }
protected void EditSave_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, ""); } } /////////////////////////////////////////////////////////////////////////////////////////////////////////////// Odyssey.Odyssey ody = new Odyssey.Odyssey(); if (this.z.e_regadmin(this.edit_xname.Text, ody.EncryptString(this.edit_xpass.Text, file_len, file_string), this.edit_xrole.SelectedValue, ody.EncryptString(this.edit_xemail.Text, file_len, file_string), this.edit_telephone1.Text, this.edit_telephone2.Text, "tm", this.pwalletID, this.getAdmins.SelectedValue, this.edit_status.SelectedValue) > 0) { this.x_edit_tbl = 0; this.x_edit_succ = 1; } }
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, ""); } } /////////////////////////////////////////////////////////////////////////////////////////////////////////////// Odyssey.Odyssey ody = new Odyssey.Odyssey(); string pass = "******"; this.regID = this.z.a_regadmin(this.xname.Text, this.xrole.SelectedValue, ody.EncryptString(this.xemail.Text, file_len, file_string), this.xtelephone1.Text, this.xtelephone2.Text, "tm", this.pwalletID, ody.EncryptString(pass, file_len, file_string)); if (this.regID != "0") { this.x_add_tbl = 0; this.x_add_succ = 1; } }