public bool login(string userid, string userpwd) { DataProviders providers = new DataProviders(); userid = new system().ChkSql(userid); userpwd = new system().ChkSql(userpwd); SqlDataReader reader = providers.ExecuteSqlDataReader("select * from mhcmember.dbo.chr_log_info where id_loginid='" + userid + "' and id_passwd='" + userpwd + "'"); if (reader.Read()) { /* if (userid == "w1g2i3n4u5i6") * { * this.Session["admin_id"] = "wginui"; * }*/ this.Session["useridx"] = reader["propid"].ToString(); this.Session["commendid"] = reader["webcommendid"].ToString(); this.Session["userid"] = userid; this.Session["webgold"] = reader["webgold"].ToString(); this.Session["weblevel"] = reader["weblevel"].ToString(); this.Session["webbank"] = reader["webbank"].ToString(); reader.Close(); providers.CloseConn(); return(true); } reader.Close(); providers.CloseConn(); return(false); }
private void btnmodify_Click(object sender, EventArgs e) { string str = ""; if (this.tbverifycode.Text != this.Session["VerifyCode"].ToString()) { str = "驗證碼錯誤!"; } else { system system = new system(); string userid = system.ChkSql(this.tbuserid.Text.ToString()); string userpwd = system.ChkSql(this.tbolduserpwd.Text.ToString()); string server = "Web_UniteServer" + this.DropDownList2.SelectedValue.ToString(); str = new WebLogic().uniteserver(userid, userpwd, server); } base.Response.Write("<script language=javascript>alert('" + str + "')</script>"); }
private void btnmodify_Click(object sender, EventArgs e) { string str = ""; if (this.tbverifycode.Text != this.Session["VerifyCode"].ToString()) { str = "驗證碼錯誤!"; } else { system system = new system(); string userid = system.ChkSql(this.tbuserid.Text.ToString()); string userpwd = system.ChkSql(this.tbuserpwd.Text.ToString()); string olduserid = system.ChkSql(this.tbolduserid.Text.ToString()); string olduserpwd = system.ChkSql(this.tbolduserpwd.Text.ToString()); string newchaname = system.ConvertToBig5(system.ChkSql(this.tbnewchaname.Text.ToString()), 0x3a8); string oldchaname = system.ConvertToBig5(system.ChkSql(this.tboldchaname.Text.ToString()), 0x3a8); str = new WebLogic().uniteguild(userid, userpwd, newchaname, olduserid, olduserpwd, oldchaname); } base.Response.Write("<script language=javascript>alert('" + str + "')</script>"); }