private Image GetRecentTopicIcon(Enumerators.PostStatus tStatus, int tReplies) { var image = new Image { ID = "postIcon" }; switch (tStatus) { case Enumerators.PostStatus.Closed: image.SkinID = "FolderNewLocked"; break; default: image.SkinID = "FolderNew"; if (tReplies > Config.HotTopicNum) { image.SkinID = "FolderNewHot"; } break; } image.GenerateEmptyAlternateText = true; image.ApplyStyleSheetSkin(Page); return(image); }
private static Image GetForumIcon(string username, DateTime lasthere, Enumerators.PostStatus fStatus, DateTime?tLastPost) { var image = new Image { ID = "imgTopicIcon", EnableViewState = false, SkinID = "FolderNew" }; string imagedir = Config.ImageDirectory; switch (fStatus) { case Enumerators.PostStatus.Open: image.AlternateText = webResources.lblOldPosts; image.SkinID = "Folder"; image.ImageUrl = imagedir + "/folders/foldernoposts.png"; if (username != "") { if (tLastPost > lasthere) { image.SkinID = "FolderNew"; image.ImageUrl = imagedir + "/folders/foldernewposts.png"; image.AlternateText = webResources.lblNewPosts; } } break; default: image.SkinID = "FolderLocked"; image.ImageUrl = imagedir + "/folders/folder_locked.png"; image.AlternateText = webResources.lblLockedForum; break; } return(image); }
protected void SetForumLockState(int forumid, Enumerators.PostStatus lockstatus) { Forums.SetForumStatus(forumid, (int)lockstatus); Response.Redirect(Request.RawUrl); }
protected void SetCategoryLockState(int catid, Enumerators.PostStatus lockstatus) { Categories.SetCatStatus(catid, (int)lockstatus); Response.Redirect(Request.RawUrl); }