public ActionResult Mall(MallModel model) { if (ModelState.IsValid) { MallConfigInfo mallConfigInfo = BMAConfig.MallConfig; mallConfigInfo.IsGuestSC = model.IsGuestSC; mallConfigInfo.SCSubmitType = model.SCSubmitType; mallConfigInfo.GuestSCCount = model.GuestSCCount; mallConfigInfo.MemberSCCount = model.MemberSCCount; mallConfigInfo.SCExpire = model.SCExpire; mallConfigInfo.OSNFormat = model.OSNFormat; mallConfigInfo.OnlinePayExpire = model.OnlinePayExpire; mallConfigInfo.ReceiveExpire = model.ReceiveExpire; mallConfigInfo.BroHisCount = model.BroHisCount; mallConfigInfo.MaxShipAddress = model.MaxShipAddress; mallConfigInfo.FavoriteProductCount = model.FavoriteProductCount; mallConfigInfo.FavoriteStoreCount = model.FavoriteStoreCount; BMAConfig.SaveMallConfig(mallConfigInfo); Emails.ResetMall(); SMSes.ResetMall(); AddMallAdminLog("修改商城设置"); return(PromptView(Url.Action("mall"), "修改商城设置成功")); } return(View(model)); }
public ActionResult Access(AccessModel model) { if (ModelState.IsValid) { MallConfigInfo mallConfigInfo = BMAConfig.MallConfig; mallConfigInfo.IsClosed = model.IsClosed; mallConfigInfo.CloseReason = model.CloseReason == null ? "" : model.CloseReason; mallConfigInfo.BanAccessTime = model.BanAccessTime == null ? "" : model.BanAccessTime; mallConfigInfo.BanAccessIP = model.BanAccessIP == null ? "" : model.BanAccessIP; mallConfigInfo.AllowAccessIP = model.AllowAccessIP == null ? "" : model.AllowAccessIP; mallConfigInfo.AdminAllowAccessIP = model.AdminAllowAccessIP == null ? "" : model.AdminAllowAccessIP; mallConfigInfo.SecretKey = model.SecretKey; mallConfigInfo.CookieDomain = model.CookieDomain == null ? "" : model.CookieDomain.Trim('.'); mallConfigInfo.RandomLibrary = model.RandomLibrary == null ? "" : model.RandomLibrary; mallConfigInfo.VerifyPages = CommonHelper.StringArrayToString(model.VerifyPages); mallConfigInfo.IgnoreWords = model.IgnoreWords == null ? "" : model.IgnoreWords; mallConfigInfo.AllowEmailProvider = model.AllowEmailProvider == null ? "" : model.AllowEmailProvider; mallConfigInfo.BanEmailProvider = model.BanEmailProvider == null ? "" : model.BanEmailProvider; BMAConfig.SaveMallConfig(mallConfigInfo); Emails.ResetMall(); SMSes.ResetMall(); Randoms.ResetRandomLibrary(); FilterWords.ResetIgnoreWordsRegex(); AddMallAdminLog("修改访问控制"); return(PromptView(Url.Action("access"), "修改访问控制成功")); } ViewData["verifyPages"] = CommonHelper.StringArrayToString(model.VerifyPages); return(View(model)); }
public ActionResult Performance(PerformanceModel model) { if (ModelState.IsValid) { MallConfigInfo mallConfigInfo = BMAConfig.MallConfig; mallConfigInfo.ImageCDN = model.ImageCDN == null ? "" : model.ImageCDN; mallConfigInfo.CSSCDN = model.CSSCDN == null ? "" : model.CSSCDN; mallConfigInfo.ScriptCDN = model.ScriptCDN == null ? "" : model.ScriptCDN; mallConfigInfo.OnlineUserExpire = model.OnlineUserExpire; mallConfigInfo.UpdateOnlineTimeSpan = model.UpdateOnlineTimeSpan; mallConfigInfo.MaxOnlineCount = model.MaxOnlineCount; mallConfigInfo.OnlineCountExpire = model.OnlineCountExpire; mallConfigInfo.IsStatBrowser = model.IsStatBrowser; mallConfigInfo.IsStatOS = model.IsStatOS; mallConfigInfo.IsStatRegion = model.IsStatRegion; BMAConfig.SaveMallConfig(mallConfigInfo); Emails.ResetMall(); SMSes.ResetMall(); AddMallAdminLog("修改性能设置"); return(PromptView(Url.Action("performance"), "修改性能设置成功")); } return(View(model)); }
public ActionResult Upload(UploadModel model) { if (ModelState.IsValid) { MallConfigInfo mallConfigInfo = BMAConfig.MallConfig; mallConfigInfo.UploadImgType = model.UploadImgType; mallConfigInfo.UploadImgSize = model.UploadImgSize * 1000; mallConfigInfo.WatermarkType = model.WatermarkType; mallConfigInfo.WatermarkQuality = model.WatermarkQuality; mallConfigInfo.WatermarkPosition = model.WatermarkPosition; mallConfigInfo.WatermarkImg = model.WatermarkImg == null ? "" : model.WatermarkImg; mallConfigInfo.WatermarkImgOpacity = model.WatermarkImgOpacity; mallConfigInfo.WatermarkText = model.WatermarkText == null ? "" : model.WatermarkText; mallConfigInfo.WatermarkTextFont = model.WatermarkTextFont; mallConfigInfo.WatermarkTextSize = model.WatermarkTextSize; mallConfigInfo.BrandThumbSize = model.BrandThumbSize; mallConfigInfo.ProductShowThumbSize = model.ProductShowThumbSize; mallConfigInfo.UserAvatarThumbSize = model.UserAvatarThumbSize; mallConfigInfo.UserRankAvatarThumbSize = model.UserRankAvatarThumbSize; mallConfigInfo.StoreRankAvatarThumbSize = model.StoreRankAvatarThumbSize; mallConfigInfo.StoreLogoThumbSize = model.StoreLogoThumbSize; BMAConfig.SaveMallConfig(mallConfigInfo); Emails.ResetMall(); SMSes.ResetMall(); AddMallAdminLog("修改上传设置"); return(PromptView(Url.Action("upload"), "修改上传设置成功")); } LoadFont(); return(View(model)); }
public ActionResult Site(SiteModel model) { if (ModelState.IsValid) { MallConfigInfo mallConfigInfo = BMAConfig.MallConfig; mallConfigInfo.MallName = model.MallName == null ? "" : model.MallName; mallConfigInfo.SiteUrl = model.SiteUrl == null ? "" : model.SiteUrl; mallConfigInfo.SiteTitle = model.SiteTitle == null ? "" : model.SiteTitle; mallConfigInfo.SEOKeyword = model.SEOKeyword == null ? "" : model.SEOKeyword; mallConfigInfo.SEODescription = model.SEODescription == null ? "" : model.SEODescription; mallConfigInfo.ICP = model.ICP == null ? "" : model.ICP; mallConfigInfo.Script = model.Script == null ? "" : model.Script; mallConfigInfo.IsLicensed = model.IsLicensed; BMAConfig.SaveMallConfig(mallConfigInfo); Emails.ResetMall(); SMSes.ResetMall(); AddMallAdminLog("修改站点信息"); return(PromptView(Url.Action("site"), "修改站点信息成功")); } return(View(model)); }
public ActionResult Account(AccountModel model) { if (ModelState.IsValid) { MallConfigInfo mallConfigInfo = BMAConfig.MallConfig; mallConfigInfo.RegType = model.RegType == null ? "" : CommonHelper.IntArrayToString(model.RegType, ""); mallConfigInfo.ReservedName = model.ReservedName ?? ""; mallConfigInfo.RegTimeSpan = model.RegTimeSpan; mallConfigInfo.IsWebcomeMsg = model.IsWebcomeMsg; mallConfigInfo.WebcomeMsg = model.WebcomeMsg ?? ""; mallConfigInfo.LoginType = model.LoginType == null ? "" : CommonHelper.IntArrayToString(model.LoginType, ""); mallConfigInfo.ShadowName = model.ShadowName ?? ""; mallConfigInfo.IsRemember = model.IsRemember; mallConfigInfo.LoginFailTimes = model.LoginFailTimes; BMAConfig.SaveMallConfig(mallConfigInfo); Emails.ResetMall(); SMSes.ResetMall(); AddMallAdminLog("修改账号设置"); return(PromptView(Url.Action("account"), "修改账号设置成功")); } return(View(model)); }