コード例 #1
0
ファイル: SetController.cs プロジェクト: nuet/OWZXAPP
        public ActionResult Shop(ShopModel model)
        {
            if (ModelState.IsValid)
            {
                ShopConfigInfo shopConfigInfo = BSPConfig.ShopConfig;

                shopConfigInfo.IsGuestSC        = model.IsGuestSC;
                shopConfigInfo.SCSubmitType     = model.SCSubmitType;
                shopConfigInfo.GuestSCCount     = model.GuestSCCount;
                shopConfigInfo.MemberSCCount    = model.MemberSCCount;
                shopConfigInfo.SCExpire         = model.SCExpire;
                shopConfigInfo.OSNFormat        = model.OSNFormat;
                shopConfigInfo.OnlinePayExpire  = model.OnlinePayExpire;
                shopConfigInfo.OfflinePayExpire = model.OfflinePayExpire;
                shopConfigInfo.BroHisCount      = model.BroHisCount;
                shopConfigInfo.MaxShipAddress   = model.MaxShipAddress;
                shopConfigInfo.FavoriteCount    = model.FavoriteCount;

                BSPConfig.SaveShopConfig(shopConfigInfo);
                Emails.ResetShop();
                SMSes.ResetShop();
                AddAdminOperateLog("修改商城设置");
                return(PromptView(Url.Action("shop"), "修改商城设置成功"));
            }
            return(View(model));
        }
コード例 #2
0
ファイル: SetController.cs プロジェクト: nuet/OWZXAPP
        public ActionResult Access(AccessModel model)
        {
            if (ModelState.IsValid)
            {
                ShopConfigInfo shopConfigInfo = BSPConfig.ShopConfig;

                shopConfigInfo.IsClosed           = model.IsClosed;
                shopConfigInfo.CloseReason        = model.CloseReason == null ? "" : model.CloseReason;
                shopConfigInfo.BanAccessTime      = model.BanAccessTime == null ? "" : model.BanAccessTime;
                shopConfigInfo.BanAccessIP        = model.BanAccessIP == null ? "" : model.BanAccessIP;
                shopConfigInfo.AllowAccessIP      = model.AllowAccessIP == null ? "" : model.AllowAccessIP;
                shopConfigInfo.AdminAllowAccessIP = model.AdminAllowAccessIP == null ? "" : model.AdminAllowAccessIP;
                shopConfigInfo.SecretKey          = model.SecretKey;
                shopConfigInfo.CookieDomain       = model.CookieDomain == null ? "" : model.CookieDomain.Trim('.');
                shopConfigInfo.RandomLibrary      = model.RandomLibrary == null ? "" : model.RandomLibrary;
                shopConfigInfo.VerifyPages        = CommonHelper.StringArrayToString(model.VerifyPages);
                shopConfigInfo.IgnoreWords        = model.IgnoreWords == null ? "" : model.IgnoreWords;
                shopConfigInfo.AllowEmailProvider = model.AllowEmailProvider == null ? "" : model.AllowEmailProvider;
                shopConfigInfo.BanEmailProvider   = model.BanEmailProvider == null ? "" : model.BanEmailProvider;

                BSPConfig.SaveShopConfig(shopConfigInfo);
                Emails.ResetShop();
                SMSes.ResetShop();
                Randoms.ResetRandomLibrary();
                FilterWords.ResetIgnoreWordsRegex();
                AddAdminOperateLog("修改访问控制");
                return(PromptView(Url.Action("access"), "修改访问控制成功"));
            }

            ViewData["verifyPages"] = CommonHelper.StringArrayToString(model.VerifyPages);
            return(View(model));
        }
コード例 #3
0
ファイル: SetController.cs プロジェクト: nuet/OWZXAPP
        public ActionResult Performance(PerformanceModel model)
        {
            if (ModelState.IsValid)
            {
                ShopConfigInfo shopConfigInfo = BSPConfig.ShopConfig;

                shopConfigInfo.ImageCDN             = model.ImageCDN == null ? "" : model.ImageCDN;
                shopConfigInfo.CSSCDN               = model.CSSCDN == null ? "" : model.CSSCDN;
                shopConfigInfo.ScriptCDN            = model.ScriptCDN == null ? "" : model.ScriptCDN;
                shopConfigInfo.OnlineUserExpire     = model.OnlineUserExpire;
                shopConfigInfo.UpdateOnlineTimeSpan = model.UpdateOnlineTimeSpan;
                shopConfigInfo.MaxOnlineCount       = model.MaxOnlineCount;
                shopConfigInfo.OnlineCountExpire    = model.OnlineCountExpire;
                shopConfigInfo.UpdatePVStatTimespan = model.UpdatePVStatTimespan;
                shopConfigInfo.IsStatBrowser        = model.IsStatBrowser;
                shopConfigInfo.IsStatOS             = model.IsStatOS;
                shopConfigInfo.IsStatRegion         = model.IsStatRegion;

                BSPConfig.SaveShopConfig(shopConfigInfo);
                Emails.ResetShop();
                SMSes.ResetShop();
                AddAdminOperateLog("修改性能设置");
                return(PromptView(Url.Action("performance"), "修改性能设置成功"));
            }
            return(View(model));
        }
コード例 #4
0
ファイル: SetController.cs プロジェクト: nuet/OWZXAPP
        public ActionResult Upload(UploadModel model)
        {
            if (ModelState.IsValid)
            {
                ShopConfigInfo shopConfigInfo = BSPConfig.ShopConfig;

                shopConfigInfo.UploadImgType           = model.UploadImgType;
                shopConfigInfo.UploadImgSize           = model.UploadImgSize * 1000;
                shopConfigInfo.WatermarkType           = model.WatermarkType;
                shopConfigInfo.WatermarkQuality        = model.WatermarkQuality;
                shopConfigInfo.WatermarkPosition       = model.WatermarkPosition;
                shopConfigInfo.WatermarkImg            = model.WatermarkImg == null ? "" : model.WatermarkImg;
                shopConfigInfo.WatermarkImgOpacity     = model.WatermarkImgOpacity;
                shopConfigInfo.WatermarkText           = model.WatermarkText == null ? "" : model.WatermarkText;
                shopConfigInfo.WatermarkTextFont       = model.WatermarkTextFont;
                shopConfigInfo.WatermarkTextSize       = model.WatermarkTextSize;
                shopConfigInfo.BrandThumbSize          = model.BrandThumbSize;
                shopConfigInfo.ProductShowThumbSize    = model.ProductShowThumbSize;
                shopConfigInfo.UserAvatarThumbSize     = model.UserAvatarThumbSize;
                shopConfigInfo.UserRankAvatarThumbSize = model.UserRankAvatarThumbSize;

                BSPConfig.SaveShopConfig(shopConfigInfo);
                Emails.ResetShop();
                SMSes.ResetShop();
                AddAdminOperateLog("修改上传设置");
                return(PromptView(Url.Action("upload"), "修改上传设置成功"));
            }

            LoadFont();
            return(View(model));
        }
コード例 #5
0
ファイル: SetController.cs プロジェクト: nuet/OWZXAPP
        public ActionResult Site(SiteModel model)
        {
            if (ModelState.IsValid)
            {
                ShopConfigInfo shopConfigInfo = BSPConfig.ShopConfig;

                shopConfigInfo.WebName        = model.ShopName == null ? "" : model.ShopName;
                shopConfigInfo.SiteUrl        = model.SiteUrl == null ? "" : model.SiteUrl;
                shopConfigInfo.SiteTitle      = model.SiteTitle == null ? "" : model.SiteTitle;
                shopConfigInfo.SEOKeyword     = model.SEOKeyword == null ? "" : model.SEOKeyword;
                shopConfigInfo.SEODescription = model.SEODescription == null ? "" : model.SEODescription;
                shopConfigInfo.ICP            = model.ICP == null ? "" : model.ICP;
                shopConfigInfo.Script         = model.Script == null ? "" : model.Script;
                shopConfigInfo.IsLicensed     = model.IsLicensed;

                BSPConfig.SaveShopConfig(shopConfigInfo);
                Emails.ResetShop();
                SMSes.ResetShop();
                AddAdminOperateLog("修改站点信息");
                return(PromptView(Url.Action("site"), "修改站点信息成功"));
            }
            return(View(model));
        }
コード例 #6
0
ファイル: SetController.cs プロジェクト: nuet/OWZXAPP
        public ActionResult Account(AccountModel model)
        {
            if (ModelState.IsValid)
            {
                ShopConfigInfo shopConfigInfo = BSPConfig.ShopConfig;

                shopConfigInfo.RegType        = model.RegType == null ? "" : CommonHelper.IntArrayToString(model.RegType, "");
                shopConfigInfo.ReservedName   = model.ReservedName ?? "";
                shopConfigInfo.RegTimeSpan    = model.RegTimeSpan;
                shopConfigInfo.IsWebcomeMsg   = model.IsWebcomeMsg;
                shopConfigInfo.WebcomeMsg     = model.WebcomeMsg ?? "";
                shopConfigInfo.LoginType      = model.LoginType == null ? "" : CommonHelper.IntArrayToString(model.LoginType, "");
                shopConfigInfo.ShadowName     = model.ShadowName ?? "";
                shopConfigInfo.IsRemember     = model.IsRemember;
                shopConfigInfo.LoginFailTimes = model.LoginFailTimes;

                BSPConfig.SaveShopConfig(shopConfigInfo);
                Emails.ResetShop();
                SMSes.ResetShop();
                AddAdminOperateLog("修改账号设置");
                return(PromptView(Url.Action("account"), "修改账号设置成功"));
            }
            return(View(model));
        }