예제 #1
0
 public PostSaveController()
 {
     topicService = new ForumTopicService();
     boardService = new ForumBoardService();
     postService = new ForumPostService();
     userIncomeService = new UserIncomeService();
 }
예제 #2
0
 public PostController() {
     topicService = new ForumTopicService();
     boardService = new ForumBoardService();
     postService = new ForumPostService();
     currencyService = new CurrencyService();
     rateService = new ForumRateService();
 }
예제 #3
0
 public TopicSaveController() {
     boardService = new ForumBoardService();
     topicService = new ForumTopicService();
     categoryService = new ForumCategoryService();
     logService = new ForumLogService();
     forumService = new ForumService();
 }
 public AttachmentController()
 {
     boardService = new ForumBoardService();
     attachmentService = new AttachmentService();
     topicService = new ForumTopicService();
     attachService = new AttachmentService();
 }
예제 #5
0
 public TopicListController() {
     forumService = new ForumService();
     boardService = new ForumBoardService();
     topicService = new ForumTopicService();
     categoryService = new ForumCategoryService();
     moderatorService = new ModeratorService();
 }
예제 #6
0
 public PostController() {
     boardService = new ForumBoardService();
     topicService = new ForumTopicService();
     postService = new ForumPostService();
     attachService = new AttachmentService();
     moderatorService = new ModeratorService();
 }
예제 #7
0
 public ForumController()
 {
     forumService = new ForumService();
     boardService = new ForumBoardService();
     linkService = new ForumLinkService();
     topicService = new ForumTopicService();
     userService = new UserService();
 }
예제 #8
0
 public TopicController()
 {
     boardService = new ForumBoardService();
     topicService = new ForumTopicService();
     postService = new ForumPostService();
     incomeService = new UserIncomeService();
     attachService = new AttachmentService();
 }
예제 #9
0
 public TopicController()
 {
     boardService = new ForumBoardService();
     categoryService = new ForumCategoryService();
     topicService = new ForumTopicService();
     postService = new ForumPostService();
     attachService = new AttachmentService();
 }
예제 #10
0
 public AttachmentController() {
     boardService = new ForumBoardService();
     attachmentService = new AttachmentService();
     topicService = new ForumTopicService();
     attachService = new AttachmentService();
     currencyService = new CurrencyService();
     incomeService = new UserIncomeService();
 }
예제 #11
0
 public PostController() {
     boardService = new ForumBoardService();
     topicService = new ForumTopicService();
     postService = new ForumPostService();
     attachService = new AttachmentService();
     moderatorService = new ModeratorService();
     buyService = new ForumBuyLogService();
     incomeService = new UserIncomeService();
 }
예제 #12
0
 public AdminSaveController()
 {
     boardService = new ForumBoardService();
     topicService = new ForumTopicService();
     categoryService = new ForumCategoryService();
     logService = new ForumLogService();
     msgService = new MessageService();
     forumService = new ForumService();
 }
예제 #13
0
 public ForumController() {
     forumService = new ForumService();
     boardService = new ForumBoardService();
     categoryService = new ForumCategoryService();
     topicService = new ForumTopicService();
     moderatorService = new ModeratorService();
     logService = new ForumLogService();
     postService = new ForumPostService();
 }
예제 #14
0
 public PostBlockController()
 {
     topicService = new ForumTopicService();
     boardService = new ForumBoardService();
     userService = new UserService();
     rateService = new ForumRateService();
     currencyService = new CurrencyService();
     buylogService = new ForumBuyLogService();
     moderatorService = new ModeratorService();
 }
예제 #15
0
 public GroupController() {
     postService = new GroupPostService();
     groupService = new GroupService();
     topicService = new ForumTopicService();
     msgService = new MessageService();
     mgrService = new MemberGroupService();
     userService = new UserService();
     logService = new SiteLogService();
     fpostService = new ForumPostService();
 }
예제 #16
0
 public PostAdminController() {
     topicService = new ForumTopicService();
     boardService = new ForumBoardService();
     postService = new ForumPostService();
     currencyService = new CurrencyService();
     userService = new UserService();
     rateService = new ForumRateService();
     buyService = new ForumBuyLogService();
     userIncomeService = new UserIncomeService();
     moderatorService = new ModeratorService();
 }
예제 #17
0
        public void CreateByTemp( String ids, ForumTopic topic )
        {
            int[] arrIds = cvt.ToIntArray( ids );
            if (arrIds.Length == 0) return;

            ForumTopicService topicService = new ForumTopicService();

            ForumPost post = topicService.GetPostByTopic( topic.Id );

            int attachmentCount = 0;
            foreach (int id in arrIds) {

                AttachmentTemp _temp = AttachmentTemp.findById( id );
                if (_temp == null) continue;

                Attachment a = new Attachment();

                a.AppId = _temp.AppId;
                a.Guid = _temp.Guid;

                a.FileSize = _temp.FileSize;
                a.Type = _temp.Type;
                a.Name = _temp.Name;

                a.Description = _temp.Description;
                a.ReadPermission = _temp.ReadPermission;
                a.Price = _temp.Price;

                a.TopicId = topic.Id;
                a.PostId = post.Id;

                a.OwnerId = topic.OwnerId;
                a.OwnerType = topic.OwnerType;
                a.OwnerUrl = topic.OwnerUrl;
                a.Creator = topic.Creator;
                a.CreatorUrl = topic.CreatorUrl;

                a.insert();

                _temp.delete();

                attachmentCount++;

            }

            if (attachmentCount > 0) {
                String msg = string.Format( "上传附件 <a href=\"{0}\">{1}</a>,获得奖励", alink.ToAppData( topic ), topic.Title );
                incomeService.AddIncome( topic.Creator, UserAction.Forum_AddAttachment.Id, msg );
            }

            topicService.UpdateAttachments( topic, attachmentCount );
        }
예제 #18
0
        public TopicController() {
            boardService = new ForumBoardService();
            topicService = new ForumTopicService();
            postService = new ForumPostService();
            incomeService = new UserIncomeService();
            attachService = new AttachmentService();

            userService = new UserService();
            rateService = new ForumRateService();
            currencyService = new CurrencyService();
            buylogService = new ForumBuyLogService();
            moderatorService = new ModeratorService();
        }
예제 #19
0
        public void CreateByTemp( String ids, ForumTopic topic )
        {
            int[] arrIds = cvt.ToIntArray( ids );
            if (arrIds.Length == 0) return;

            ForumTopicService topicService = new ForumTopicService();

            ForumPost post = topicService.GetPostByTopic( topic.Id );

            int attachmentCount = 0;
            foreach (int id in arrIds) {

                AttachmentTemp at = AttachmentTemp.findById( id );
                if (at == null) continue;

                Attachment a = new Attachment();

                a.AppId = at.AppId;
                a.Guid = at.Guid;

                a.FileSize = at.FileSize;
                a.Type = at.Type;
                a.Name = at.Name;

                a.Description = at.Description;
                a.ReadPermission = at.ReadPermission;
                a.Price = at.Price;

                a.TopicId = topic.Id;
                a.PostId = post.Id;

                a.OwnerId = topic.OwnerId;
                a.OwnerType = topic.OwnerType;
                a.OwnerUrl = topic.OwnerUrl;
                a.Creator = topic.Creator;
                a.CreatorUrl = topic.CreatorUrl;

                a.insert();

                at.delete();

                attachmentCount++;

            }

            topicService.UpdateAttachments( topic, attachmentCount );
        }
예제 #20
0
        public ForumPostService()
        {
            forumService = new ForumService();
            categoryService = new ForumCategoryService();
            boardService = new ForumBoardService();
            topicService = new ForumTopicService();
            userService = new UserService();
            forumLogService = new ForumLogService();
            rateService = new ForumRateService();
            attachmentService = new AttachmentService();
            msgService = new MessageService();

            incomeService = new UserIncomeService();

            notificationService = new NotificationService();
            microblogService = new MicroblogService();
        }
예제 #21
0
        public ForumPostService()
        {
            forumService      = new ForumService();
            categoryService   = new ForumCategoryService();
            boardService      = new ForumBoardService();
            topicService      = new ForumTopicService();
            userService       = new UserService();
            forumLogService   = new ForumLogService();
            rateService       = new ForumRateService();
            attachmentService = new AttachmentService();
            msgService        = new MessageService();

            incomeService = new UserIncomeService();

            notificationService = new NotificationService();
            feedService         = new FeedService();
        }
예제 #22
0
        public virtual void UpdateFile(User user, Attachment a, String oldFilePath)
        {
            a.Created = DateTime.Now;
            a.update();

            if (a.IsImage)
            {
                Img.DeleteImgAndThumb(oldFilePath);
            }
            else
            {
                Img.DeleteFile(oldFilePath);
            }

            ForumTopicService topicService = new ForumTopicService();
            ForumPost         post         = ForumPost.findById(a.PostId);

            topicService.UpdateLastEditInfo(user, post);
        }
예제 #23
0
        public virtual Result Create( Attachment a, User user, IMember owner )
        {
            a.OwnerId = owner.Id;
            a.OwnerType = owner.GetType().FullName;
            a.OwnerUrl = owner.Url;
            a.Creator = user;
            a.CreatorUrl = user.Url;

            a.Guid = Guid.NewGuid().ToString();

            ForumTopicService topicService = new ForumTopicService();
            ForumPost post = topicService.GetPostByTopic( a.TopicId );
            a.PostId = post.Id;

            Result result = db.insert( a );

            refreshTopicCount( a );

            return result;
        }
예제 #24
0
        public virtual Result Create(Attachment a, User user, IMember owner)
        {
            a.OwnerId    = owner.Id;
            a.OwnerType  = owner.GetType().FullName;
            a.OwnerUrl   = owner.Url;
            a.Creator    = user;
            a.CreatorUrl = user.Url;

            a.Guid = Guid.NewGuid().ToString();

            ForumTopicService topicService = new ForumTopicService();
            ForumPost         post         = topicService.GetPostByTopic(a.TopicId);

            a.PostId = post.Id;


            Result result = db.insert(a);

            refreshTopicCount(a);

            return(result);
        }
예제 #25
0
 public UploaderController()
 {
     topicService = new ForumTopicService();
     attachService = new AttachmentService();
 }
예제 #26
0
 public SearchController()
 {
     topicService = new ForumTopicService();
 }
예제 #27
0
 public TagAdminController()
 {
     boardService = new ForumBoardService();
     topicService = new ForumTopicService();
 }
예제 #28
0
 public RecentController() {
     topicService = new ForumTopicService();
     boardService = new ForumBoardService();
     postService = new ForumPostService();
 }
예제 #29
0
 public SecurityController()
 {
     boardService = new ForumBoardService();
     topicService = new ForumTopicService();
     postService = new ForumPostService();
 }
예제 #30
0
 public ForumPollService()
 {
     topicService = new ForumTopicService();
 }
예제 #31
0
 public TopController()
 {
     topicService = new ForumTopicService();
     postService = new ForumPostService();
 }
예제 #32
0
        public virtual void UpdateFile( User user, Attachment a, String oldFilePath )
        {
            a.Created = DateTime.Now;
            a.update();

            if (a.IsImage) {
                Img.DeleteImgAndThumb( oldFilePath );
            }
            else {
                Img.DeleteFile( oldFilePath );
            }

            ForumTopicService topicService = new ForumTopicService();
            ForumPost post = ForumPost.findById( a.PostId );
            topicService.UpdateLastEditInfo( user, post );
        }
예제 #33
0
 public TagController()
 {
     topicService = new ForumTopicService();
 }
예제 #34
0
 public PollController()
 {
     topicService = new ForumTopicService();
     boardService = new ForumBoardService();
     pollService = new ForumPollService();
 }