private void InitForModify() { BaseConfigInfo cacheBaseConfig = ConfigProvider.GetCacheBaseConfig(); if (cacheBaseConfig != null) { this.TextBox1.Text = cacheBaseConfig.SiteName; this.TextBox2.Text = (string.IsNullOrEmpty(cacheBaseConfig.SiteDomain) ? ("http://" + base.Request.Url.Host) : cacheBaseConfig.SiteDomain); this.TextBox4.Text = cacheBaseConfig.SiteLogo; this.TextBox10.Text = cacheBaseConfig.SiteBanner; this.TextBox5.Text = cacheBaseConfig.CopyRight; this.TextBox6.Text = cacheBaseConfig.IcpNo; ListItem listItem = this.showlang.Items.FindByValue(cacheBaseConfig.DefaultLang); if (listItem != null) { listItem.Selected = true; } ListItem listItem2 = this.DropDownList10.Items.FindByValue(cacheBaseConfig.BrowseType); if (listItem2 != null) { listItem2.Selected = true; } this.globalpagesize.Text = cacheBaseConfig.GlobalPageSize.ToString(); this.nodehtmlrule.Text = cacheBaseConfig.HtmlNodeFileRule; this.contenthtmlrule.Text = cacheBaseConfig.HtmlFileRule; this.htmlext.Text = cacheBaseConfig.HtmlFileExt; } }
protected void btnok_Click(object sender, System.EventArgs e) { if (!base.IsAuthorizedOp(ActionType.Modify.ToString())) { base.ShowMsg("Không có thẩm quyền"); } else { BaseConfigInfo baseConfigInfo = ConfigProvider.GetCacheBaseConfig(); if (baseConfigInfo == null) { baseConfigInfo = new BaseConfigInfo(); } baseConfigInfo.LimitBuyPayExpire = WebUtils.GetInt(this.TextBox1.Text); baseConfigInfo.BuyPayExpire = WebUtils.GetInt(this.TextBox2.Text); baseConfigInfo.SignExpire = WebUtils.GetInt(this.TextBox3.Text); baseConfigInfo.AfterSaleExpire = WebUtils.GetInt(this.TextBox4.Text); if (ConfigProvider.Update(baseConfigInfo)) { CacheUtils.Del("JsonLeeCMS_CacheForGetBaseConfig"); PageBase.log.AddEvent(base.LoginAccount.AccountName, "更新基本配置的订单设置成功"); base.ShowMsg("Cập nhật thành công"); } else { base.ShowMsg("Cập nhật thất bại"); } } }
protected void btnok_Click(object sender, System.EventArgs e) { if (!base.IsAuthorizedOp(ActionType.Modify.ToString())) { base.ShowMsg("Không có thẩm quyền"); } else { BaseConfigInfo baseConfigInfo = ConfigProvider.GetCacheBaseConfig(); if (baseConfigInfo == null) { baseConfigInfo = new BaseConfigInfo(); } baseConfigInfo.BadWords = WebUtils.GetString(this.badword.Text); baseConfigInfo.BWReplaceWord = WebUtils.GetString(this.bwreplaceword.Text); baseConfigInfo.DefKuaidiFee = WebUtils.GetDecimal(this.txtdefkdfee.Text, 10.0m); baseConfigInfo.DefEMSFee = WebUtils.GetDecimal(this.txtdefemsfee.Text, 30.0m); baseConfigInfo.IsCNTWTrans = this.cntwtrans.Checked; baseConfigInfo.DefaultHtmlEditor = WebUtils.GetString(this.TextBox6.Text); baseConfigInfo.STATLink = WebUtils.GetString(this.TextBox7.Text); if (ConfigProvider.Update(baseConfigInfo)) { CacheUtils.Del("JsonLeeCMS_CacheForGetBaseConfig"); CacheUtils.Del("JsonLeeCMS_CacheForVER"); PageBase.log.AddEvent(base.LoginAccount.AccountName, "Cấu hình khác được cập nhật thành công"); base.ShowMsg("Cập nhật thành công"); } else { base.ShowMsg("Cập nhật thất bại"); } } }
protected void btnok_Click(object sender, System.EventArgs e) { if (!base.IsAuthorizedOp(ActionType.Modify.ToString())) { base.ShowMsg("Không có thẩm quyền"); } else { BaseConfigInfo baseConfigInfo = ConfigProvider.GetCacheBaseConfig(); if (baseConfigInfo == null) { baseConfigInfo = new BaseConfigInfo(); } baseConfigInfo.SMSClass = WebUtils.GetString(this.TextBox1.Text); baseConfigInfo.SMSUid = WebUtils.GetString(this.TextBox3.Text); string @string = WebUtils.GetString(this.TextBox4.Text); if (!string.IsNullOrEmpty(@string)) { baseConfigInfo.SMSPwd = @string; } if (ConfigProvider.Update(baseConfigInfo)) { CacheUtils.Del("JsonLeeCMS_CacheForGetBaseConfig"); CacheUtils.Del("JsonLeeCMS_CacheForVER"); PageBase.log.AddEvent(base.LoginAccount.AccountName, "更新短信配置成功"); base.ShowMsg("Cập nhật thành công"); } else { base.ShowMsg("Cập nhật thất bại"); } } }
protected void btnok_Click(object sender, System.EventArgs e) { if (!base.IsAuthorizedOp(ActionType.Modify.ToString())) { base.ShowMsg("Không có thẩm quyền"); } else { BaseConfigInfo baseConfigInfo = ConfigProvider.GetCacheBaseConfig(); if (baseConfigInfo == null) { baseConfigInfo = new BaseConfigInfo(); } baseConfigInfo.SEOKey = WebUtils.GetString(this.TextBox1.Text); baseConfigInfo.SEODescription = WebUtils.GetString(this.TextBox2.Text); if (ConfigProvider.Update(baseConfigInfo)) { CacheUtils.Del("JsonLeeCMS_CacheForGetBaseConfig"); PageBase.log.AddEvent(base.LoginAccount.AccountName, "Cập nhật thành công tối ưu hóa việc phân bổ tìm kiếm toàn cầu"); base.ShowMsg("Cập nhật thành công"); } else { base.ShowMsg("Cập nhật thất bại"); } } }
private void InitForModify() { BaseConfigInfo cacheBaseConfig = ConfigProvider.GetCacheBaseConfig(); if (cacheBaseConfig != null) { this.TextBox1.Text = cacheBaseConfig.SEOKey; this.TextBox2.Text = cacheBaseConfig.SEODescription; } }
private void InitForModify() { BaseConfigInfo cacheBaseConfig = ConfigProvider.GetCacheBaseConfig(); if (cacheBaseConfig != null) { this.TextBox1.Text = cacheBaseConfig.SMSClass; this.TextBox3.Text = cacheBaseConfig.SMSUid; this.TextBox4.Text = cacheBaseConfig.SMSPwd; } }
private void InitForModify() { BaseConfigInfo cacheBaseConfig = ConfigProvider.GetCacheBaseConfig(); if (cacheBaseConfig != null) { this.TextBox1.Text = cacheBaseConfig.LimitBuyPayExpire.ToString(); this.TextBox2.Text = cacheBaseConfig.BuyPayExpire.ToString(); this.TextBox3.Text = cacheBaseConfig.SignExpire.ToString(); this.TextBox4.Text = cacheBaseConfig.AfterSaleExpire.ToString(); } }
private void InitForModify() { BaseConfigInfo cacheBaseConfig = ConfigProvider.GetCacheBaseConfig(); if (cacheBaseConfig != null) { this.TextBox1.Text = cacheBaseConfig.ServMailAccount; this.TextBox2.Text = cacheBaseConfig.ServMailUserName; this.TextBox3.Text = cacheBaseConfig.ServMailUserPwd; this.TextBox4.Text = cacheBaseConfig.ServMailSMTP; this.TextBox5.Text = cacheBaseConfig.ServMailPort; this.CheckBox6.Checked = cacheBaseConfig.ServMailIsSSL; } }
private void InitForModify() { BaseConfigInfo cacheBaseConfig = ConfigProvider.GetCacheBaseConfig(); if (cacheBaseConfig != null) { this.CheckBox1.Checked = cacheBaseConfig.EnableFileUpload; this.TextBox2.Text = cacheBaseConfig.EnableUploadExt; this.TextBox3.Text = cacheBaseConfig.UploadSizeLimit.ToString(); this.TextBox4.Text = cacheBaseConfig.UploadSaveRule; if (cacheBaseConfig.ThumbSize.IndexOf("X") == -1) { this.TextBox11.Text = "0"; this.TextBox5.Text = "0"; } else { this.TextBox5.Text = cacheBaseConfig.ThumbSize.Split(new char[] { 'X' })[0]; this.TextBox6.Text = cacheBaseConfig.ThumbSize.Split(new char[] { 'X' })[1]; } ListItem listItem = this.ddl_cutmode.Items.FindByValue(cacheBaseConfig.ThumbModel); if (listItem != null) { listItem.Selected = true; } this.LoadPosition(cacheBaseConfig.WaterMarkPosition); ListItem listItem2 = this.sytype.Items.FindByText(cacheBaseConfig.WaterMarkType); if (listItem2 != null) { listItem2.Selected = true; } this.TextBox10.Text = cacheBaseConfig.WaterMarkText; this.TextBox11.Text = cacheBaseConfig.WaterMarkTextSize.ToString(); ListItem listItem3 = this.watermarkfontname.Items.FindByText(cacheBaseConfig.WaterMarkTextFont); if (listItem3 != null) { listItem3.Selected = true; } this.TextBox12.Text = cacheBaseConfig.WaterMarkTextColor; this.TextBox13.Text = cacheBaseConfig.WaterMarkImage; this.TextBox14.Text = cacheBaseConfig.WaterMarkAlpha.ToString(); } }
private void InitForModify() { BaseConfigInfo cacheBaseConfig = ConfigProvider.GetCacheBaseConfig(); if (cacheBaseConfig != null) { this.badword.Text = cacheBaseConfig.BadWords; this.bwreplaceword.Text = cacheBaseConfig.BWReplaceWord; this.txtdefkdfee.Text = cacheBaseConfig.DefKuaidiFee.ToString("f2"); this.txtdefemsfee.Text = cacheBaseConfig.DefEMSFee.ToString("f2"); this.cntwtrans.Checked = cacheBaseConfig.IsCNTWTrans; this.TextBox6.Text = cacheBaseConfig.DefaultHtmlEditor; this.TextBox7.Text = cacheBaseConfig.STATLink; } }
protected void btn_Save_Click(object sender, System.EventArgs e) { BaseConfigInfo cacheBaseConfig = ConfigProvider.GetCacheBaseConfig(); cacheBaseConfig.VisitRec = this.isstatopen.Checked; if (ConfigProvider.Update(cacheBaseConfig)) { CacheUtils.Del("JsonLeeCMS_CacheForGetBaseConfig"); PageBase.log.AddEvent(base.LoginAccount.AccountName, cacheBaseConfig.VisitRec ? "开启流量统计" : "关闭流量统计"); base.ShowMsg("Thao tác thành công"); } else { base.ShowMsg("Thao tác thất bại"); } }
protected void btnok_Click(object sender, System.EventArgs e) { if (!base.IsAuthorizedOp(ActionType.Modify.ToString())) { base.ShowMsg("Không có thẩm quyền"); } else { BaseConfigInfo baseConfigInfo = ConfigProvider.GetCacheBaseConfig(); if (baseConfigInfo == null) { baseConfigInfo = new BaseConfigInfo(); } baseConfigInfo.SiteName = WebUtils.GetString(this.TextBox1.Text); baseConfigInfo.SiteDomain = WebUtils.GetString(this.TextBox2.Text).TrimEnd(new char[] { '/' }); baseConfigInfo.SiteLogo = WebUtils.GetString(this.TextBox4.Text); baseConfigInfo.SiteBanner = WebUtils.GetString(this.TextBox10.Text); baseConfigInfo.CopyRight = WebUtils.GetString(this.TextBox5.Text); baseConfigInfo.IcpNo = WebUtils.GetString(this.TextBox6.Text); baseConfigInfo.DefaultLang = this.showlang.SelectedValue; baseConfigInfo.BrowseType = this.DropDownList10.SelectedValue; baseConfigInfo.GlobalPageSize = WebUtils.GetInt(this.globalpagesize.Text, 10); baseConfigInfo.HtmlNodeFileRule = WebUtils.GetString(this.nodehtmlrule.Text); baseConfigInfo.HtmlFileRule = WebUtils.GetString(this.contenthtmlrule.Text); baseConfigInfo.HtmlFileExt = WebUtils.GetString(this.htmlext.Text); if (ConfigProvider.Update(baseConfigInfo)) { base.SetLanguage(baseConfigInfo.DefaultLang); CacheUtils.Del("JsonLeeCMS_CacheForGetBaseConfig"); CacheUtils.Del("JsonLeeCMS_CacheForVER"); CacheUtils.Del("JsonLeeCMS_CacheForGetCMSNode"); CacheUtils.Del("JsonLeeCMS_CacheForGetShopCategory"); CacheUtils.Del("JsonLeeCMS_CacheForProCATEGORY"); CacheUtils.Del("JsonLeeCMS_CacheForUrlRewriteCustom"); PageBase.log.AddEvent(base.LoginAccount.AccountName, "Cập nhật cấu hình cơ bản成功"); base.ShowMsg("Cập nhật成功"); } else { base.ShowMsg("Cập nhật thất bại"); } } }
protected void btn_SaveRule_Click(object sender, System.EventArgs e) { try { System.Collections.Generic.Dictionary <string, SinGooCMS.Plugin.MessageSet> dictionary = SinGooCMS.Plugin.MessageSet.LoadDict(); string[] array = base.Request.Form["_setkey"].Split(new char[] { ',' }); if (array != null && array.Length > 0) { for (int i = 0; i < array.Length; i++) { dictionary[array[i]].IsSendMsg = (base.Request.Form["_chk_" + array[i] + "_msg"] != null); dictionary[array[i]].IsSendMail = (base.Request.Form["_chk_" + array[i] + "_mail"] != null); dictionary[array[i]].IsSendSMS = (base.Request.Form["_chk_" + array[i] + "_sms"] != null); } } SinGooCMS.Plugin.MessageSet.Save(dictionary); BaseConfigInfo baseConfigInfo = ConfigProvider.GetCacheBaseConfig(); if (baseConfigInfo == null) { baseConfigInfo = new BaseConfigInfo(); } baseConfigInfo.ManagerMail = WebUtils.GetString(this.managermail.Text); baseConfigInfo.ManagerMobile = WebUtils.GetString(this.managermobile.Text); if (ConfigProvider.Update(baseConfigInfo)) { CacheUtils.Del("JsonLeeCMS_CacheForGetBaseConfig"); this.BindData(); PageBase.log.AddEvent(base.LoginAccount.AccountName, "Sửa đổi cài đặt báo có tin nhắn thành công"); base.ShowMsg("Thao tác thành công"); } else { base.ShowMsg("Thao tác thất bại"); } } catch (System.Exception ex) { base.ShowMsg("Thao tác thất bại:" + ex.Message); } }
protected void btnok_Click(object sender, System.EventArgs e) { if (!base.IsAuthorizedOp(ActionType.Modify.ToString())) { base.ShowMsg("Không có thẩm quyền"); } else { BaseConfigInfo baseConfigInfo = ConfigProvider.GetCacheBaseConfig(); if (baseConfigInfo == null) { baseConfigInfo = new BaseConfigInfo(); } baseConfigInfo.EnableFileUpload = this.CheckBox1.Checked; baseConfigInfo.EnableUploadExt = WebUtils.GetString(this.TextBox2.Text); baseConfigInfo.UploadSizeLimit = WebUtils.GetInt(this.TextBox3.Text, 0); baseConfigInfo.UploadSaveRule = WebUtils.GetString(this.TextBox4.Text); int @int = WebUtils.GetInt(this.TextBox5.Text); int int2 = WebUtils.GetInt(this.TextBox6.Text); baseConfigInfo.ThumbSize = @int.ToString() + "X" + int2.ToString(); baseConfigInfo.ThumbModel = this.ddl_cutmode.SelectedValue; baseConfigInfo.WaterMarkText = WebUtils.GetString(this.TextBox10.Text); baseConfigInfo.WaterMarkImage = WebUtils.GetString(this.TextBox13.Text); baseConfigInfo.WaterMarkPosition = WebUtils.GetFormInt("watermarkstatus"); baseConfigInfo.WaterMarkType = this.sytype.SelectedValue; baseConfigInfo.WaterMarkTextSize = WebUtils.GetInt(this.TextBox11.Text, 12); baseConfigInfo.WaterMarkAlpha = WebUtils.GetDouble(this.TextBox14.Text, 0.6); baseConfigInfo.WaterMarkTextFont = this.watermarkfontname.SelectedValue; baseConfigInfo.WaterMarkTextColor = WebUtils.GetString(this.TextBox12.Text); if (ConfigProvider.Update(baseConfigInfo)) { CacheUtils.Del("JsonLeeCMS_CacheForGetBaseConfig"); CacheUtils.Del("JsonLeeCMS_CacheForVER"); PageBase.log.AddEvent(base.LoginAccount.AccountName, "更新文件参数成功"); base.ShowMsg("Cập nhật thành công"); } else { base.ShowMsg("Cập nhật thất bại"); } } }
protected void btn_SaveKey_Click(object sender, System.EventArgs e) { BaseConfigInfo cacheBaseConfig = ConfigProvider.GetCacheBaseConfig(); cacheBaseConfig.Kuaidi100Key = WebUtils.GetString(this.AuthKey.Text); if (ConfigProvider.Update(cacheBaseConfig)) { CacheUtils.Del("JsonLeeCMS_CacheForGetBaseConfig"); CacheUtils.Del("JsonLeeCMS_CacheForVER"); CacheUtils.Del("JsonLeeCMS_CacheForGetCMSNode"); CacheUtils.Del("JsonLeeCMS_CacheForGetShopCategory"); CacheUtils.Del("JsonLeeCMS_CacheForProCATEGORY"); CacheUtils.Del("JsonLeeCMS_CacheForUrlRewriteCustom"); PageBase.log.AddEvent(base.LoginAccount.AccountName, "Update Express 100 Authorize Key Success"); base.ShowMsg("Thao tác thành công"); } else { base.ShowMsg("Thao tác thất bại"); } }
protected void btnok_Click(object sender, System.EventArgs e) { if (!base.IsAuthorizedOp(ActionType.Modify.ToString())) { base.ShowMsg("Không có thẩm quyền"); } else { BaseConfigInfo baseConfigInfo = ConfigProvider.GetCacheBaseConfig(); if (baseConfigInfo == null) { baseConfigInfo = new BaseConfigInfo(); } baseConfigInfo.ServMailAccount = WebUtils.GetString(this.TextBox1.Text); baseConfigInfo.ServMailUserName = WebUtils.GetString(this.TextBox2.Text); string @string = WebUtils.GetString(this.TextBox3.Text); if (!string.IsNullOrEmpty(@string)) { baseConfigInfo.ServMailUserPwd = @string; } baseConfigInfo.ServMailSMTP = WebUtils.GetString(this.TextBox4.Text); baseConfigInfo.ServMailPort = WebUtils.GetString(this.TextBox5.Text); baseConfigInfo.ServMailIsSSL = this.CheckBox6.Checked; if (!string.IsNullOrEmpty(baseConfigInfo.ServMailAccount) && !ValidateUtils.IsEmail(baseConfigInfo.ServMailAccount)) { base.ShowMsg("Định dạng địa chỉ hệ thống-mail là không chính xác, xin vui lòng để trống nếu không cần thiết"); } else if (ConfigProvider.Update(baseConfigInfo)) { CacheUtils.Del("JsonLeeCMS_CacheForGetBaseConfig"); CacheUtils.Del("JsonLeeCMS_CacheForVER"); PageBase.log.AddEvent(base.LoginAccount.AccountName, "Cấu hình mail cập nhật thành công"); base.ShowMsg("Cập nhật thành công"); } else { base.ShowMsg("Cập nhật thất bại"); } } }
private void InitForModify() { BaseConfigInfo cacheBaseConfig = ConfigProvider.GetCacheBaseConfig(); if (cacheBaseConfig != null) { this.TextBox2.Text = cacheBaseConfig.UserNameRule; this.TextBox3.Text = cacheBaseConfig.SysUserName; this.TextBox6.Text = cacheBaseConfig.RegAgreement; this.TextBox7.Text = cacheBaseConfig.RegGiveIntegral.ToString(); this.TextBox8.Text = cacheBaseConfig.TgIntegral.ToString(); this.CheckBox1.Checked = cacheBaseConfig.VerifycodeForReg; this.CheckBox2.Checked = cacheBaseConfig.VerifycodeForLogin; this.CheckBox3.Checked = cacheBaseConfig.VerifycodeForGetPwd; this.TextBox9.Text = cacheBaseConfig.TryLoginTimes.ToString(); ListItem listItem = this.RadioButtonList10.Items.FindByText(cacheBaseConfig.CookieTime.ToString()); if (listItem != null) { listItem.Selected = true; } } }
protected void btnok_Click(object sender, System.EventArgs e) { if (!base.IsAuthorizedOp(ActionType.Modify.ToString())) { base.ShowMsg("Không có thẩm quyền"); } else { BaseConfigInfo baseConfigInfo = ConfigProvider.GetCacheBaseConfig(); if (baseConfigInfo == null) { baseConfigInfo = new BaseConfigInfo(); } baseConfigInfo.UserNameRule = WebUtils.GetString(this.TextBox2.Text); baseConfigInfo.SysUserName = WebUtils.GetString(this.TextBox3.Text); baseConfigInfo.RegAgreement = StringUtils.ChkSQL(this.TextBox6.Text); baseConfigInfo.RegGiveIntegral = WebUtils.GetInt(this.TextBox7.Text, 10); baseConfigInfo.TgIntegral = WebUtils.GetInt(this.TextBox8.Text, 50); baseConfigInfo.VerifycodeForReg = this.CheckBox1.Checked; baseConfigInfo.VerifycodeForLogin = this.CheckBox2.Checked; baseConfigInfo.VerifycodeForGetPwd = this.CheckBox3.Checked; baseConfigInfo.TryLoginTimes = WebUtils.GetInt(this.TextBox9.Text, 5); baseConfigInfo.CookieTime = this.RadioButtonList10.SelectedValue; if (ConfigProvider.Update(baseConfigInfo)) { CacheUtils.Del("JsonLeeCMS_CacheForGetBaseConfig"); CacheUtils.Del("JsonLeeCMS_CacheForVER"); PageBase.log.AddEvent(base.LoginAccount.AccountName, "更新会员配置成功"); base.ShowMsg("Cập nhật thành công"); } else { base.ShowMsg("Cập nhật thất bại"); } } }