private DataTable SysField_UserBase() { B_UserBaseField bbf = new B_UserBaseField(); DataTable dt = bbf.Select_All(); dt.Columns.Add(new DataColumn("sys_type", typeof(int))); dt.Columns.Add(new DataColumn("rblCopy", typeof(int))); dt.Columns.Add(new DataColumn("Islotsize", typeof(int))); dt.Columns.Add(new DataColumn("IsChain", typeof(int))); for (int i = 0; i < dt.Rows.Count; i++) { dt.Rows[i]["sys_type"] = 0; //dt.Rows[i]["IsShow"] = 1; dt.Rows[i]["rblCopy"] = 0; dt.Rows[i]["Islotsize"] = 1; dt.Rows[i]["IsChain"] = 1; } DataTable sysdt = DBCenter.DB.Field_List("ZL_UserBase"); string sysStr = ""; foreach (DataRow dr in sysdt.Rows) { sysStr += dr["Name"] + ":" + dr["Name"] + ","; } string[] fields = sysStr.TrimEnd(',').Split(','); foreach (string field in fields) { SysField_AddToDT(dt, field); } return(dt); }
private void InitFileExtArr() { string content = ""; string fieldType = ""; if (ModelID > 0) { B_ModelField bmf = new B_ModelField(); M_ModelField mmf = bmf.GetModelByFieldName(ModelID, FieldName); mmf = (mmf == null) ? new M_ModelField() : mmf; content = mmf.Content; fieldType = mmf.FieldType; } else { B_UserBaseField bubf = new B_UserBaseField(); M_UserBaseField mubf = bubf.getUserBaseFieldByFieldName(FieldName); mubf = (mubf == null) ? new M_UserBaseField() : mubf; content = mubf.Content; fieldType = mubf.FieldType; } if (content != null) { string[] Setting = content.Split(new char[] { ',' }); if (fieldType == "PicType") { this.m_MaxFileSize = DataConverter.CLng(Setting[1].Split(new char[] { '=' })[1]); this.ViewState["MaxFileSize"] = Setting[1].Split(new char[] { '=' })[1]; this.m_FileExtArr = Setting[2].Split(new char[] { '=' })[1]; this.ViewState["FileExtArr"] = Setting[2].Split(new char[] { '=' })[1]; this.ViewState["UploadType"] = "PicType"; } if (fieldType == "FileType") { string chkSize = Setting[0].Split(new char[] { '=' })[1]; string SizeField = Setting[1].Split(new char[] { '=' })[1]; this.ViewState["SizeField"] = SizeField; this.m_MaxFileSize = DataConverter.CLng(Setting[2].Split(new char[] { '=' })[1]); this.ViewState["MaxFileSize"] = Setting[2].Split(new char[] { '=' })[1]; this.m_FileExtArr = Setting[3].Split(new char[] { '=' })[1]; this.ViewState["FileExtArr"] = Setting[3].Split(new char[] { '=' })[1]; this.ViewState["UploadType"] = "FileType"; } if (fieldType == "SmallFileType") { string chkSize = Setting[0].Split(new char[] { '=' })[1]; string SizeField = Setting[1].Split(new char[] { '=' })[1]; this.ViewState["SizeField"] = SizeField; this.m_MaxFileSize = DataConverter.CLng(chkSize); this.ViewState["MaxFileSize"] = chkSize; this.m_FileExtArr = SizeField; this.ViewState["FileExtArr"] = SizeField; this.ViewState["UploadType"] = "SmallFileType"; } } }
public ActionResult Register_Submit() { B_UserBaseField bmf = new B_UserBaseField(); string siteurls = SiteConfig.SiteInfo.SiteUrl.TrimEnd('/'); if (!SiteConfig.UserConfig.EnableUserReg) { function.WriteErrMsg("服务器已关闭用户注册"); return(null); } //----------------------------------- M_UserInfo info = new M_UserInfo(); info.UserBase = new M_Uinfo(); info.UserName = Request.Form["TxtUserName"].Replace(" ", ""); info.UserPwd = Request.Form["TxtPassword"]; info.Question = Request.Form["Question_DP"]; info.Answer = Request.Form["TxtAnswer"]; info.Email = Request.Form["TxtEmail"].Replace(" ", ""); info.CheckNum = function.GetRandomString(10); info.GroupID = DataConverter.CLng(Request.Form["UserGroup"]); info.RegisterIP = EnviorHelper.GetUserIP(); info.LastLoginIP = info.RegisterIP; //info.Purse = SiteConfig.UserConfig.PresentMoney;//注册赠送的余额,积分等 //info.UserPoint = SiteConfig.UserConfig.PresentPoint; //info.UserExp = DataConverter.CLng(SiteConfig.UserConfig.PresentExp); info.TrueName = Request.Form["TxtTrueName"]; info.UserPwd = StringHelper.MD5(info.UserPwd);; //----------------------------------------------------- //会员基本信息 info.UserBase.Address = Request.Form["TxtAddress"]; info.UserBase.BirthDay = Request.Form["TxtBirthday"]; info.UserFace = Request.Form["TxtUserFace"]; info.UserBase.Fax = Request.Form["TxtFax"]; info.UserBase.HomePage = Request.Form["TxtHomepage"]; info.UserBase.HomePhone = Request.Form["TxtHomePhone"]; info.UserBase.IDCard = Request.Form["TxtIDCard"]; info.UserBase.Mobile = Request.Form["TxtMobile"]; info.UserBase.OfficePhone = Request.Form["TxtOfficePhone"]; info.UserBase.Privating = DataConvert.CLng(Request.Form["DropPrivacy"]); info.UserBase.PHS = Request.Form["TxtPHS"]; info.UserBase.QQ = Request.Form["TxtQQ"]; info.UserBase.Sign = Request.Form["TxtSign"]; info.UserBase.UserSex = DataConverter.CBool(Request.Form["DropSex"]); info.UserBase.ZipCode = Request.Form["TxtZipCode"]; info.UserBase.HoneyName = ""; info.UserBase.CardType = ""; info.UserBase.Province = Request["selprovince"]; info.UserBase.City = Request["selcity"]; info.UserBase.County = Request["selcoutry"]; if (!string.IsNullOrEmpty(RegisterMobile)) { info.UserBase.Mobile = RegisterMobile; RegisterMobile = null; } //----------------------------------------------------- #region 信息检测 string err = ""; if (SiteConfig.UserConfig.EnableCheckCodeOfReg) { if (!ZoomlaSecurityCenter.VCodeCheck(Request.Form["VCode_hid"], Request.Form["VCode"])) { function.WriteErrMsg("您输入的验证码和系统产生的不一致,请重新输入", "javascript:history.go(-1);"); return(null); } } if (!CheckUserName(info.UserName, ref err)) { function.WriteErrMsg(err); return(null); } else if (!CheckUserInfo(info.UserBase)) { return(null); } else if (string.IsNullOrEmpty(info.Answer)) { function.WriteErrMsg("问题答案不能为空!"); return(null); } else if (!CheckEmail(info.Email, ref err)) { function.WriteErrMsg(err); return(null); } #endregion //推荐人处理 M_User_InviteCode utMod = null; { //支持使用用户名和用户ID info.ParentUserID = CheckParentUser(Request.Form["TxtParentUser"]).UserID.ToString(); //邀请码推荐用户,高于填写的推荐人 string inviteCode = Request.Form["TxtInvitCode"]; if (!string.IsNullOrEmpty(inviteCode)) { utMod = utBll.Code_SelModel(inviteCode); if (utMod != null) { if (utMod.ZStatus != 0) { function.WriteErrMsg("该邀请码已被使用"); return(null); } info.ParentUserID = utMod.UserID.ToString(); info.GroupID = utMod.JoinGroup; } } //计算深度 if (DataConvert.CLng(info.ParentUserID) > 0)//从1开始 { info.RoomID = (buser.SelParentTree(DataConvert.CLng(info.ParentUserID)).Split(',').Length + 1); } } //用于初始状态 if (SiteConfig.UserConfig.EmailCheckReg) { info.Status = 4; } //邮件认证 else if (SiteConfig.UserConfig.AdminCheckReg) { info.Status = 2; } //管理员认证 else if (SiteConfig.UserConfig.EmailCheckReg && SiteConfig.UserConfig.AdminCheckReg) { info.Status = 3; } //邮件认证及管理员认证 else if (!SiteConfig.UserConfig.UserValidateType) { info.Status = 5; } else { info.Status = 0; } //自定义字段信息 DataTable table; try { table = new Call().GetDTFromMVC(bmf.Select_All(), Request); } catch (Exception e) { function.WriteErrMsg(e.Message); return(Content("")); } string[] strArray2 = string.IsNullOrEmpty(SiteConfig.UserConfig.RegFieldsMustFill) ? new string[0] : SiteConfig.UserConfig.RegFieldsMustFill.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries); foreach (string str2 in strArray2) { if (Request.Form["txt_" + str2] == null || Request.Form["txt_" + str2] == "") { DataTable tbles = bmf.SelByFieldName(str2); } } //------------添加新用户 info.UserID = buser.AddModel(info); info.UserBase.UserId = info.UserID; buser.AddBase(info.UserBase); if (table != null && table.Rows.Count > 0) { buser.UpdateUserFile(info.UserID, table); } buser.SetLoginState(info); if (info.UserID < 1) { function.WriteErrMsg("注册失败"); return(null); } //邀请码状态变更 if (utMod != null) { utBll.Code_Used(utMod.ID, info); } //---------------------------------------------------------------------------- string ReturnUrl = Request.Form["ReturnUrl_Hid"]; string RegMessage = ""; string RegRUrl = ""; bool isok = false; //关联绑定微信用户 //if (!string.IsNullOrEmpty(WXOpenID)) //{ // B_User_Token tokenBll = new B_User_Token(); // M_User_Token tokenMod = tokenBll.SelModelByUid(info.UserID); // if (tokenMod == null) { tokenMod = new M_User_Token(); } // tokenMod.uid = info.UserID; // tokenMod.WXOpenID = WXOpenID; // tokenBll.Insert(tokenMod); //} #region 自定义模型 int ModelID = DataConverter.CLng(gpBll.GetGroupModel(info.GroupID)); string usertablename = modBll.GetModelById(ModelID).TableName; if (ModelID > 0 && usertablename != "" && usertablename != null) { DataTable groupset = fieldBll.GetModelFieldListall(ModelID); DataTable tablereg = new DataTable(); tablereg.Columns.Add(new DataColumn("FieldName", typeof(string))); tablereg.Columns.Add(new DataColumn("FieldType", typeof(string))); tablereg.Columns.Add(new DataColumn("FieldValue", typeof(string))); if (groupset != null && groupset.Rows.Count > 0) { foreach (DataRow dr in groupset.Rows) { if (dr["FieldType"].ToString() == "FileType") { string[] Sett = dr["Content"].ToString().Split(new char[] { ',' }); bool chksize = DataConverter.CBool(Sett[0].Split(new char[] { '=' })[1]); string sizefield = Sett[1].Split(new char[] { '=' })[1]; if (chksize && sizefield != "") { DataRow row2 = tablereg.NewRow(); row2[0] = sizefield; row2[1] = "FileSize"; row2[2] = Request.Form["txt_" + sizefield]; tablereg.Rows.Add(row2); } } if (dr["FieldType"].ToString() == "MultiPicType") { string[] Sett = dr["Content"].ToString().Split(new char[] { ',' }); bool chksize = DataConverter.CBool(Sett[0].Split(new char[] { '=' })[1]); string sizefield = Sett[1].Split(new char[] { '=' })[1]; if (chksize && sizefield != "") { if (string.IsNullOrEmpty(Request.Form["txt_" + sizefield])) { function.WriteErrMsg(dr["FieldAlias"].ToString() + "的缩略图不能为空!"); } DataRow row1 = tablereg.NewRow(); row1[0] = sizefield; row1[1] = "ThumbField"; row1[2] = Request.Form["txt_" + sizefield]; tablereg.Rows.Add(row1); } } DataRow row = tablereg.NewRow(); row[0] = dr["FieldName"].ToString(); string ftype = dr["FieldType"].ToString(); row[1] = ftype; string fvalue = Request.Form["txt_" + dr["FieldName"].ToString()]; if (ftype == "TextType" || ftype == "MultipleTextType" || ftype == "MultipleHtmlType") { if (dr["IsNotNull"].Equals("True") && string.IsNullOrEmpty(fvalue)) { function.WriteErrMsg(dr["FieldAlias"] + ":不能为空!"); } } row[2] = fvalue; tablereg.Rows.Add(row); } try { if (tablereg.Select("FieldName='UserID'").Length == 0) { DataRow rowsd1 = tablereg.NewRow(); rowsd1[0] = "UserID"; rowsd1[1] = "int"; rowsd1[2] = info.UserID; tablereg.Rows.Add(rowsd1); } else { tablereg.Rows[0]["UserID"] = info.UserID; } } catch (Exception) { } try { if (tablereg.Select("FieldName='UserName'").Length == 0) { DataRow rowsd2 = tablereg.NewRow(); rowsd2[0] = "UserName"; rowsd2[1] = "TextType"; rowsd2[2] = info.UserName; tablereg.Rows.Add(rowsd2); } else { tablereg.Rows[0]["UserName"] = info.UserName; } } catch (Exception) { } try { if (tablereg.Select("FieldName='Styleid'").Length == 0) { DataRow rowsd3 = tablereg.NewRow(); rowsd3[0] = "Styleid"; rowsd3[1] = "int"; rowsd3[2] = 0; tablereg.Rows.Add(rowsd3); } else { tablereg.Rows[0]["UserName"] = 0; } } catch (Exception) { } try { if (tablereg.Select("FieldName='Recycler'").Length == 0) { DataRow rowsd4 = tablereg.NewRow(); rowsd4[0] = "Recycler"; rowsd4[1] = "int"; rowsd4[2] = 0; tablereg.Rows.Add(rowsd4); } else { tablereg.Rows[0]["Recycler"] = 0; } } catch (Exception) { } try { if (tablereg.Select("FieldName='IsCreate'").Length == 0) { DataRow rowsd5 = tablereg.NewRow(); rowsd5[0] = "IsCreate"; rowsd5[1] = "int"; rowsd5[2] = 0; tablereg.Rows.Add(rowsd5); } else { tablereg.Rows[0]["IsCreate"] = 0; } } catch (Exception) { } try { if (tablereg.Select("FieldName='NewTime'").Length == 0) { DataRow rs6 = tablereg.NewRow(); rs6[0] = "NewTime"; rs6[1] = "DateType"; rs6[2] = DateTime.Now; tablereg.Rows.Add(rs6); } else { tablereg.Rows[0]["NewTime"] = DateTime.Now; } } catch (Exception) { } } if (tablereg != null && tablereg.Rows.Count > 0) { buser.InsertModel(tablereg, usertablename); } } #endregion if (SiteConfig.UserConfig.EmailCheckReg && !string.IsNullOrEmpty(info.Email))//发送认证邮件,当需要邮件认证时 { MailInfo mailInfo = new MailInfo(); mailInfo.IsBodyHtml = true; mailInfo.FromName = SiteConfig.SiteInfo.SiteName; MailAddress address = new MailAddress(info.Email); mailInfo.ToAddress = address; string regurl = siteurls + "/User/RegisterCheck?UserName="******"&CheckNum=" + info.CheckNum; string mailcontent = mailBll.SelByType(B_MailManage.MailType.NewUserReg); mailInfo.MailBody = new OrderCommon().TlpDeal(mailcontent, GetRegEmailDt(info.UserName, info.CheckNum, regurl)); mailInfo.Subject = SiteConfig.SiteInfo.SiteName + "网站会员注册验证码"; if (SendMail.Send(mailInfo) == SendMail.MailState.Ok) { RegMessage = "注册验证码已成功发送到你的注册邮箱,请到邮箱查收并验证!"; RegMessage = RegMessage + "<a href=\"/\">返回首页</a>"; } else { RegMessage = "注册成功,但发送验证邮件失败,请检查邮件地址是否正确,或与网站管理员联系!"; RegMessage = RegMessage + "<a href=\"/\">返回首页</a>"; } } switch (info.Status) { case 0: #region 直接注册成功 if (!string.IsNullOrEmpty(info.Email) && SiteConfig.UserConfig.EmailTell) { MailInfo mailInfo = new MailInfo(); mailInfo.IsBodyHtml = true; mailInfo.FromName = SiteConfig.SiteInfo.SiteName; MailAddress address = new MailAddress(info.Email); mailInfo.ToAddress = address; //SiteConfig.UserConfig.EmailOfRegCheck string regurl = siteurls + "/User/RegisterCheck?UserName="******"&CheckNum=" + info.CheckNum; mailInfo.MailBody = new OrderCommon().TlpDeal(mailBll.SelByType(B_MailManage.MailType.NewUserReg), GetRegEmailDt(info.UserName, info.CheckNum, regurl)); //mailInfo.MailBody = mailInfo.MailBody.Replace("{$UserName}", info.UserName).Replace("{$UserPwd}", TxtPassword.Text); mailInfo.Subject = SiteConfig.SiteInfo.SiteName + "_注册成功提醒"; if (SendMail.Send(mailInfo) == SendMail.MailState.Ok) { RegMessage = "注册基本信息已成功发送到你的注册邮箱!"; RegMessage = RegMessage + "<a href=\"/\">返回首页</a>"; } else { RegMessage = "注册成功,但发送注册基本信息邮件失败,请检查邮件地址是否正确,或与网站管理员联系!"; RegMessage = RegMessage + "<a href=\"/\">返回首页</a>"; } } else { RegMessage = "注册成功!"; if (string.IsNullOrEmpty(ReturnUrl)) { RegMessage = RegMessage + "<a href=\"/\">返回首页</a> <a href=\"/User/Index\">进入会员中心</a>,5秒后系统自动跳转到会员中心!"; RegRUrl = "/User/Index"; } else { RegMessage = RegMessage + "<a href=\"/\">返回首页</a> <a href=\"" + ReturnUrl + "\">进入默认页面</a>,5秒后系统自动跳转到默认页面!"; RegRUrl = ReturnUrl; } isok = true; } #endregion break; case 2: //等待管理员认证 RegMessage = "注册成功!新注册会员需管理员认证才能有效,请耐心等待!"; RegMessage = RegMessage + "若长期没有通过管理员认证,请及时和管理员联系!"; RegMessage = RegMessage + "<a href=\"/\">返回首页</a>"; break; default: //未开启邮箱验证,则可以登录 if (!SiteConfig.UserConfig.EmailCheckReg) { RegMessage = "注册成功!"; } if (string.IsNullOrEmpty(ReturnUrl)) { RegMessage = RegMessage + "<a href=\"/\">返回首页</a> <a href=\"/User/Index\">进入会员中心</a>,5秒后系统自动跳转到会员中心!"; RegRUrl = "default"; } else { RegMessage = RegMessage + "<a href=\"/\">返回首页</a> <a href=\"" + ReturnUrl + "\">进入默认页面</a>,5秒后系统自动跳转到默认页面!"; RegRUrl = ReturnUrl; } isok = true; break; } if (SiteConfig.UserConfig.EmailCheckReg) { RegMessage = "<div class='emptyDiv'><br/>注册成功! <a href='http://mail." + info.Email.Substring(info.Email.LastIndexOf('@') + 1) + "' target='_blank'>立即登录邮箱进行验证>></a><br/></div>"; isok = false; } ViewBag.RegMessage = RegMessage; ViewBag.RegRUrl = RegRUrl; ViewBag.isok = isok;//为true则自动跳转 ViewBag.pwd = Request.Form["TxtPassword"]; return(View("Register_Finish", info)); }
protected void Page_Load(object sender, EventArgs e) { if (!B_ARoleAuth.Check(ZLEnum.Auth.other, "SiteConfig")) { function.WriteErrMsg("没有权限进行此项操作"); } m_RegFields = new Dictionary <string, ListItem>(); m_RegFields.Add("Permissions", new ListItem("真实姓名", "Permissions")); m_RegFields.Add("UserSex", new ListItem("性别", "UserSex")); m_RegFields.Add("Birthday", new ListItem("出生日期", "Birthday")); m_RegFields.Add("Address", new ListItem("联系地址", "Address")); m_RegFields.Add("ZipCode", new ListItem("邮政编码", "ZipCode")); m_RegFields.Add("Homepage", new ListItem("个人主页", "Homepage")); m_RegFields.Add("QQ", new ListItem("QQ号码", "QQ")); // m_RegFields.Add("ICQ", new ListItem("ICQ号码", "ICQ")); //m_RegFields.Add("MSN", new ListItem("MSN帐号", "MSN")); //m_RegFields.Add("UC", new ListItem("UC号码", "UC")); //m_RegFields.Add("Yahoo", new ListItem("雅虎通帐号", "Yahoo")); m_RegFields.Add("OfficePhone", new ListItem("办公电话", "OfficePhone")); m_RegFields.Add("HomePhone", new ListItem("家庭电话", "HomePhone")); m_RegFields.Add("Mobile", new ListItem("手机号码", "Mobile")); m_RegFields.Add("Fax", new ListItem("传真号码", "Fax")); //m_RegFields.Add("PHS", new ListItem("小灵通", "PHS")); m_RegFields.Add("IDCard", new ListItem("身份证号码", "IDCard")); m_RegFields.Add("salt", new ListItem("用户头像", "UserFace")); m_RegFields.Add("FaceWidth", new ListItem("头像宽度", "FaceWidth")); m_RegFields.Add("FaceHeight", new ListItem("头像高度", "FaceHeight")); m_RegFields.Add("Sign", new ListItem("签名档", "Sign")); m_RegFields.Add("Privacy", new ListItem("隐私设定", "Privacy")); m_RegFields.Add("Province", new ListItem("省市县", "Province")); //m_RegFields.Add("ParentUserID", new ListItem("推荐人", "ParentUserID")); m_RegFields.Add("ParentUser", new ListItem("推荐人", "ParentUser")); m_RegFields.Add("InvitCode", new ListItem("邀请码", "InvitCode")); //ZL_UserBaseField B_UserBaseField ufll = new B_UserBaseField(); DataTable uftable = ufll.Select_All(); if (uftable != null) { if (uftable.Rows.Count > 0) { for (int c = 0; c < uftable.Rows.Count; c++) { string FieldName = uftable.Rows[c]["FieldName"].ToString(); string FieldAlias = uftable.Rows[c]["FieldAlias"].ToString(); m_RegFields.Add(FieldName, new ListItem(FieldAlias, FieldName)); } } } if (!IsPostBack) { Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "Main.aspx'>工作台</a></li><li><a href='" + CustomerPageAction.customPath2 + "user/UserManage.aspx'>用户管理</a></li><li>会员参数配置</li>" + Call.GetHelp(40)); RadioButtonList1.Checked = SiteConfig.UserConfig.EnableUserReg; //会员注册默认状态 UserValidateType_Rad.SelectedValue = SiteConfig.UserConfig.UserValidateType ? "0" : "1"; //是否开启注册后Email验证 rdoEmailCheck.Checked = SiteConfig.UserConfig.EmailCheckReg; //是否开启Email注册登录 RadioButtonList2.Checked = SiteConfig.UserConfig.EmailRegis; //是否开启注册成功邮件提醒 radioEmail.Checked = SiteConfig.UserConfig.EmailTell; //是否开启UserID登录 radioUserID.Checked = SiteConfig.UserConfig.UserIDlgn; //是否开启手机注册 radioMobile.Checked = SiteConfig.UserConfig.MobileReg; MobileCodeNum_T.Text = SiteConfig.UserConfig.MobileCodeNum.ToString(); function.Script(this, "SetRadVal('mobilecode_rad'," + SiteConfig.UserConfig.MobileCodeType + ");"); RadioButtonList3.Checked = SiteConfig.UserConfig.AdminCheckReg; RadioButtonList5.Checked = SiteConfig.UserConfig.EnableCheckCodeOfReg; TextBox6.Text = SiteConfig.UserConfig.UserNameLimit.ToString(); TextBox7.Text = SiteConfig.UserConfig.UserNameMax.ToString(); TextBox8.Text = SiteConfig.UserConfig.UserNameRegDisabled; RadioButtonList6.Checked = SiteConfig.UserConfig.EnableCheckCodeOfLogin; RadioButtonList7.Checked = SiteConfig.UserConfig.EnableMultiLogin; //DisCuzNT.Checked = SiteConfig.UserConfig.DisCuzNT; string regFieldsMustFill = SiteConfig.UserConfig.RegFieldsMustFill; string regFieldsSelectFill = SiteConfig.UserConfig.RegFieldsSelectFill; HdnRegFields_MustFill.Value = regFieldsMustFill; HdnRegFields_SelectFill.Value = regFieldsSelectFill; List <string> list = new List <string>(); List <string> list2 = new List <string>(); if (!string.IsNullOrEmpty(regFieldsMustFill)) { foreach (string str3 in regFieldsMustFill.Split(new char[] { ',' })) { list.Add(str3); if (m_RegFields.ContainsKey(str3)) { LitRegFields_MustFill.Items.Add(m_RegFields[str3]); } } } if (!string.IsNullOrEmpty(regFieldsSelectFill)) { foreach (string str4 in regFieldsSelectFill.Split(new char[] { ',' })) { list2.Add(str4); if (m_RegFields.ContainsKey(str4)) { LitRegFields_SelectFill.Items.Add(m_RegFields[str4]); } } } foreach (string str5 in m_RegFields.Keys) { if (!list.Contains(str5) && !list2.Contains(str5)) { LitRegFields.Items.Add(m_RegFields[str5]); } } //TextBox12.Text = SiteConfig.UserConfig.EmailOfRegCheck; //txtEmailTell.Text = SiteConfig.UserConfig.EmailTellContent; txtMobileRegInfo.Text = SiteConfig.UserConfig.MobileRegInfo; tb_CommentRule.Text = SiteConfig.UserConfig.CommentRule.ToString(); tb_InformationRule.Text = SiteConfig.UserConfig.InfoRule.ToString(); tb_RecommandRule.Text = SiteConfig.UserConfig.RecommandRule.ToString(); txtzi.Text = SiteConfig.UserConfig.PresentPointAll.ToString(); TxtPresentExp.Text = SiteConfig.UserConfig.PresentExp.ToString(); TxtPresentMoney.Text = SiteConfig.UserConfig.PresentMoney.ToString(); TxtPresentPoint.Text = SiteConfig.UserConfig.PresentPoint.ToString(); TxtPresentValidNum.Text = SiteConfig.UserConfig.PresentValidNum.ToString(); DropPresentValidUnit.SelectedValue = SiteConfig.UserConfig.PresentValidUnit.ToString(); TxtPresentExpPerLogin.Text = SiteConfig.UserConfig.PresentExpPerLogin.ToString(); SignPurse_T.Text = SiteConfig.UserConfig.SigninPurse.ToString(); TxtMoneyExchangePoint.Text = SiteConfig.UserConfig.MoneyExchangePointByMoney.ToString(); TxtMoneyExchangeValidDay.Text = SiteConfig.UserConfig.MoneyExchangeValidDayByMoney.ToString(); TxtUserExpExchangePoint.Text = SiteConfig.UserConfig.UserExpExchangePointByExp.ToString(); TxtUserExpExchangeValidDay.Text = SiteConfig.UserConfig.UserExpExchangeValidDayByExp.ToString(); TxtCMoneyExchangePoint.Text = SiteConfig.UserConfig.MoneyExchangePointByPoint.ToString(); TxtCMoneyExchangeValidDay.Text = SiteConfig.UserConfig.MoneyExchangeValidDayByValidDay.ToString(); TxtCUserExpExchangePoint.Text = SiteConfig.UserConfig.UserExpExchangePointByPoint.ToString(); TxtCUserExpExchangeValidDay.Text = SiteConfig.UserConfig.UserExpExchangeValidDayByValidDay.ToString(); txtCMoneyExchangeDummyPurse.Text = SiteConfig.UserConfig.MoneyExchangeDummyPurseByDummyPurse.ToString(); txtMoneyExchangeDummyPurse.Text = SiteConfig.UserConfig.MoneyExchangeDummyPurseByMoney.ToString(); TxtPointName.Text = SiteConfig.UserConfig.PointName; TxtPointUnit.Text = SiteConfig.UserConfig.PointUnit; TxtCUserExpExchangePoints.Text = SiteConfig.UserConfig.PointExp.ToString(); TxtCUserExpExchangeMoney.Text = SiteConfig.UserConfig.PointMoney.ToString(); TxtCUserExpExchangeExp.Text = SiteConfig.UserConfig.ChangeSilverCoinByExp.ToString(); TxtCUserExpExchangeSilverCoin.Text = SiteConfig.UserConfig.PointSilverCoin.ToString(); Agreement.SelectedValue = SiteConfig.UserConfig.Agreement; selPunch.Value = SiteConfig.UserConfig.PunchType.ToString(); txtPunch.Text = SiteConfig.UserConfig.PunchVal.ToString(); //txtEmailRegInfo.Text = SiteConfig.UserConfig.EmailRegInfo; //txtGetPassword.Text = SiteConfig.UserConfig.UserGetPasswordEmail; Txtintegral.Text = SiteConfig.UserConfig.Integral.ToString(); TxtIntegralPercentage.Text = SiteConfig.UserConfig.IntegralPercentage.ToString(); #region 用户名注册规则 string userregrule = SiteConfig.UserConfig.RegRule; if (userregrule != null && userregrule != "") { if (userregrule.IndexOf(',') > -1) { string[] rulearr = userregrule.Split(','); for (int ii = 0; ii < rulearr.Length; ii++) { if (rulearr[ii].ToString() == "1") { RegRule.Items[0].Selected = true; } if (rulearr[ii].ToString() == "2") { RegRule.Items[1].Selected = true; } if (rulearr[ii].ToString() == "3") { RegRule.Items[2].Selected = true; } } } else { if (userregrule.ToString() == "1") { RegRule.Items[0].Selected = true; } if (userregrule.ToString() == "2") { RegRule.Items[1].Selected = true; } if (userregrule.ToString() == "3") { RegRule.Items[2].Selected = true; } } } if (SiteConfig.UserConfig.RegRule != null) { RegRule.SelectedValue = SiteConfig.UserConfig.RegRule.ToString(); } #endregion #region 可使用站内短信用户组 B_Group b_Group = new B_Group(); MessageGroup.DataSource = b_Group.GetGroupList(); MessageGroup.DataBind(); string MessageGroupStr = SiteConfig.UserConfig.MessageGroup; if (!string.IsNullOrEmpty(MessageGroupStr)) { if (MessageGroupStr.IndexOf(",") > -1) { foreach (string Mstr in MessageGroupStr.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries)) { if (MessageGroup.Items.FindByValue(Mstr) != null) { MessageGroup.Items.FindByValue(Mstr).Selected = true; } } } } ////用户统计字段 //foreach (ListItem item in m_RegFields.Values) //{ // UserFields_list.Items.Add(item); //} #endregion RadioButtonList10.SelectedValue = SiteConfig.UserConfig.PromotionType.ToString(); RadioButtonList10_SelectedIndexChanged(null, null); //CountFields_Hid.Value = SiteConfig.UserConfig.CountUserField; txtPromotion.Text = SiteConfig.UserConfig.Promotion.ToString(); try { //邀请码配置 InviteCode_T.Text = SiteConfig.UserConfig.InviteCodeCount.ToString(); InviteFormat_T.Text = SiteConfig.UserConfig.InviteFormat; InviteJoinGroup_DP.DataSource = gpBll.Sel(); InviteJoinGroup_DP.DataBind(); InviteJoinGroup_DP.SelectedValue = SiteConfig.UserConfig.InviteJoinGroup.ToString(); } catch (Exception ex) { ZLLog.L(ex.Message); } MyBind(); } }