private void refreshTodayStats(ForumApp forum) { if (time.IsNextDay(forum.TodayTime) == false) { return; } int all = forum.TodayTopicCount + forum.TodayPostCount; if (all > forum.PeakPostCount) { forum.PeakPostCount = all; } forum.YestodayPostCount = forum.TodayTopicCount + forum.TodayPostCount; forum.TodayPostCount = 0; forum.TodayTopicCount = 0; forum.TodayVisitCount = 0; forum.TodayTime = DateTime.Now; forum.update(); ForumBoard.updateBatch("set TodayTopics=0, TodayPosts=0", "AppId=" + forum.Id); }
private void updateSettings(ForumApp forum) { ForumSetting s = forum.GetSettingsObj(); // 配置:隐藏头条新帖 s.IsHideTop = 1; forum.Settings = Json.ToString(s); forum.update(); }
public void SaveNotice() { String notice = ctx.PostHtml("Notice"); ForumApp forum = ctx.app.obj as ForumApp; forum.Notice = notice; forum.update("Notice"); echoRedirect(lang("opok")); }
public void Save() { ForumSetting s = ctx.PostValue <ForumSetting>(); s.IsHideStats = ctx.PostIsCheck("forumSetting.HideShowStats"); s.IsHideTop = ctx.PostIsCheck("forumSetting.IsHideTop"); s.IsHideOnline = ctx.PostIsCheck("forumSetting.IsHideOnline"); s.IsHideLink = ctx.PostIsCheck("forumSetting.IsHideLink"); ForumApp app = ctx.app.obj as ForumApp; app.Settings = JsonString.ConvertObject(s); app.update(); echoRedirect(lang("opok")); }
public virtual void Save() { ForumSetting s = ctx.PostValue <ForumSetting>(); s.IsHideStats = ctx.PostIsCheck("forumSetting.HideShowStats"); s.IsHideTop = ctx.PostIsCheck("forumSetting.IsHideTop"); s.IsHideOnline = ctx.PostIsCheck("forumSetting.IsHideOnline"); s.IsHideLink = ctx.PostIsCheck("forumSetting.IsHideLink"); s.MetaDescription = strUtil.CutString(s.MetaDescription, 500); ForumApp app = ctx.app.obj as ForumApp; app.Settings = Json.ToString(s); app.update(); echoRedirect(lang("opok")); }
private void refreshTodayStats( ForumApp forum ) { if (time.IsNextDay( forum.TodayTime ) == false) return; int all = forum.TodayTopicCount + forum.TodayPostCount; if (all > forum.PeakPostCount) { forum.PeakPostCount = all; } forum.YestodayPostCount = forum.TodayTopicCount + forum.TodayPostCount; forum.TodayPostCount = 0; forum.TodayTopicCount = 0; forum.TodayVisitCount = 0; forum.TodayTime = DateTime.Now; forum.update(); ForumBoard.updateBatch( "set TodayTopics=0, TodayPosts=0", "AppId=" + forum.Id ); }
private void updateSettings( ForumApp forum ) { ForumSetting s = forum.GetSettingsObj(); // 配置:隐藏头条新帖 s.IsHideTop = 1; forum.Settings = Json.ToString( s ); forum.update(); }