Exemple #1
0
 public PropSaledNotify(int relateUserID, int propID, int propCount)
 {
     this.RelateUserID = relateUserID;
     this.PropID       = propID;
     this.PropCount    = propCount;
     this.Url          = BbsRouter.GetUrl("prop/my");
 }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int?clubID   = _Request.Get <int>("id");
            int?notifyID = _Request.Get <int>("notifyid");

            if (clubID != null && notifyID != null)
            {
                Club club = ClubBO.Instance.GetClub(clubID.Value);

                if (club != null)
                {
                    m_ClubName = club.Name;

                    if (_Request.IsClick("join"))
                    {
                        ClubBO.Instance.AcceptClubInvite(club, My);

                        NotifyBO.Instance.DeleteNotify(My, notifyID.Value);

                        m_DisplayMessage = true;
                        m_Message        = "您已成功的加入群组“<a href=\"" + BbsRouter.GetUrl("club/" + clubID) + "\" target=\"_blank\">" + club.Name + "</a>”。";
                    }
                }
                else
                {
                    ShowError("群组不存在");
                }
            }
            else
            {
                ShowError("缺少必要参数");
            }
        }
Exemple #3
0
        public static string GetSystemForumUrlForPager(SystemForum systemForumType, string codeName)
        {
            return(BbsRouter.GetUrl(string.Format("systemforum/{0}/code-{1}/{2}", systemForumType.ToString(), codeName, "{0}")));
            //string forumUrl = UrlManager.GetFriendlyUrl("ShowSystemForum.html?type={0}&Codename={1}&page={2}", true);

            //return string.Format(forumUrl, systemForumType.ToString(), codeName, "{0}");
        }
Exemple #4
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            if (_Request.IsClick("getprize"))
            {
                int?missionID = _Request.Get <int>("missionid");

                if (missionID != null)
                {
                    MissionBO.Instance.GetMissionPrize(My, missionID.Value);

                    BbsRouter.JumpToCurrentUrl();
                }
            }
            else if (_Request.IsClick("abandon"))
            {
                int?missionID = _Request.Get <int>("missionid");

                if (missionID != null)
                {
                    MissionBO.Instance.AbandonMission(My, missionID.Value);

                    BbsRouter.JumpToCurrentUrl();
                }
            }

            int pageNumber = _Request.Get <int>("page", 1);
            int pageSize   = 5;

            m_MissionList = MissionBO.Instance.GetUserMissions(MyUserID, pageNumber, pageSize, out m_MissionCount);

            SetPager("pager1", null, pageNumber, pageSize, m_MissionCount);

            AddNavigationItem("任务", BbsRouter.GetUrl("mission/index"));
            AddNavigationItem("我的任务");
        }
        public void GetDirectoriesByDirectory(int directoryID, Dictionary <int, DiskDirectoryCollection> dirs, string space, string html)
        {
            foreach (int dID in dirs.Keys)
            {
                if (dID == directoryID)
                {
                    foreach (DiskDirectory d in dirs[dID])
                    {
                        int currentID = CurrentDirectory.DirectoryID;

                        bool   isCurrent = MenuTreeIDs(currentID).Contains(d.DirectoryID);
                        string url       = BbsRouter.GetUrl("my/disk/" + d.DirectoryID);


                        //string dirname = string.Format(html, "%className%", url, space, "%imgPath%", d.DirectoryName);
                        //string className = noselectedClass;
                        //string imgPath = noselectedImg;

                        if (isCurrent)
                        {
                            if (d.DirectoryID == currentID)
                            {
                                //className = selectedClass;
                            }

                            //imgPath = selectedImg;
                        }

                        GetDirectoriesByDirectory(d.DirectoryID, dirs, space + tempSpace, html);
                    }
                }
            }
        }
Exemple #6
0
        public void GetDirectoriesByDirectory(int directoryID, Dictionary <int, DiskDirectoryCollection> dirs, string space, string html, string selectedImg, string noselectedImg, string selectedClass, string noselectedClass)
        {
            foreach (int dID in dirs.Keys)
            {
                if (dID == directoryID)
                {
                    foreach (DiskDirectory d in dirs[dID])
                    {
                        int currentID = CurrentDirectory.DirectoryID;

                        bool   isCurrent = MenuTreeIDs(currentID).Contains(d.DirectoryID);
                        string url       = BbsRouter.GetUrl("app/disk/index") + "?directoryID=" + d.DirectoryID + "&ViewMode=" + ViewMode;


                        string dirname   = string.Format(html, "%className%", url, space, "%imgPath%", d.DirectoryName);
                        string className = noselectedClass;
                        string imgPath   = noselectedImg;

                        if (isCurrent)
                        {
                            if (d.DirectoryID == currentID)
                            {
                                className = selectedClass;
                            }

                            imgPath = selectedImg;
                        }

                        menuString += dirname.Replace("%className%", className).Replace("%imgPath%", imgPath);
                        GetDirectoriesByDirectory(d.DirectoryID, dirs, space + tempSpace, html, selectedImg, noselectedImg, selectedClass, noselectedClass);
                    }
                }
            }
        }
Exemple #7
0
        public static string GetThreadCatalogUrl(string codeName, int threadCatalogID, int page)
        {
            return(BbsRouter.GetUrl(string.Format("{0}/catalog-{1}-{2}", codeName, threadCatalogID, page)));
            //string catalogUrl = UrlManager.GetFriendlyUrl("ShowForum.html?codename={0}&ThreadCatalogID={1}&page={2}", true);

            //return string.Format(catalogUrl, codeName, threadCatalogID, page);
        }
Exemple #8
0
        protected string GetDiskMenu(string space, string html, string selectedImg, string noselectedImg, string selectedClass, string noselectedClass, string dirNameStr, string rootNameStr)
        {
            tempSpace  = space;
            menuString = string.Empty;
            int dID = CurrentDirectory.DirectoryID;

            m_ParentDirectories = DiskBO.Instance.GetParentDiskDirectories(MyUserID, dID);
            DiskDirectory root = DiskBO.Instance.GetDiskRootDirectory(MyUserID);

            string rootstr = string.Empty;

            if (root == null || root.DirectoryID <= 0)
            {
                rootstr = string.Format(html, selectedClass, BbsRouter.GetUrl("app/disk/index") + "?directoryID=" + CurrentDirectory.DirectoryID + "&ViewMode=" + ViewMode, rootNameStr);// UrlHelper.GetDiskCenterUrl(), rootNameStr);

                return(rootstr);
            }

            rootstr = string.Format(html, ((root.DirectoryID == dID || dID == 0) ? selectedClass : noselectedClass), BbsRouter.GetUrl("app/disk/index") + "?ViewMode=" + ViewMode, rootNameStr);// UrlHelper.GetDiskCenterUrl(), rootNameStr);

            menuString += rootstr;

            html = string.Format(html, "{0}", "{1}", "{2}" + dirNameStr);

            GetDirectoriesByDirectory(root.DirectoryID, m_ParentDirectories, space,
                                      html, selectedImg, noselectedImg, selectedClass, noselectedClass);

            return(menuString);
        }
Exemple #9
0
 public ImpressionNotify(int relateUserID, int userID)
     : base(0, false)
 {
     this.RelateUserID = relateUserID;
     this.UserID       = userID;
     Url = BbsRouter.GetUrl("space/" + this.UserID) + "?implist=1#implist";
 }
Exemple #10
0
        public static string GetForumUrl(string codeName, string action, int page)
        {
            return(BbsRouter.GetUrl(string.Format("{0}/{1}-{2}", codeName, action, page)));
            //string forumUrl = UrlManager.GetFriendlyUrl("ShowForum.html?codename={0}&action={1}&page={2}", true);

            //return string.Format(forumUrl, codeName, action, page);
        }
Exemple #11
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            if (AllSettings.Current.SpaceSettings.AllowGuestAccess == false)
            {
                if (MyUserID <= 0)
                {
                    ShowError(new Errors.CustomError("", "您必须登录后才能访问用户空间"), BbsRouter.GetUrl("login"));
                }
            }

            if (EnableFunction == false)
            {
                BbsRouter.JumpTo("space/" + SpaceOwnerID);
            }


            if (SpaceOwner == null)
            {
                ShowError("用户空间不存在");
            }

            OnlineUserPool.Instance.Update(My, _Request, OnlineAction.ViewSpace, 0, 0, "");
        }
Exemple #12
0
        public static string GetThreadUrlForPagerExtParms(string codeName, int threadID, string threadTypeString, string extParms)
        {
            return(BbsRouter.GetUrl(string.Format("{0}/{4}-{1}-{2}-{3}", codeName, threadID, "{0}", 1, threadTypeString)) + "?extParms=" + System.Web.HttpContext.Current.Server.UrlEncode(extParms));

            //return BbsRouter.GetUrl(string.Format("showthread/{0}/tid-{1}/{2}/ext-{3}", codeName, threadID, "{0}", System.Web.HttpContext.Current.Server.UrlEncode(extParms)));
            //string threadUrl = UrlManager.GetFriendlyUrl("ShowThread.html?codename={0}&ThreadID={1}&page={2}&extParms={3}", true);
            //return string.Format(threadUrl, codeName, threadID, "{0}", System.Web.HttpContext.Current.Server.UrlEncode(extParms));
        }
Exemple #13
0
 //public static string GetThreadUrlForPager(string codeName, int threadID, int userID)
 //{
 //    return GetThreadUrlForPager(codeName,threadID,userID,1);
 //}
 public static string GetThreadUrlForPager(string codeName, int threadID, int userID, int listPage, string threadTypeString)
 {
     return(BbsRouter.GetUrl(string.Format("{0}/{4}-{1}-{2}-{3}", codeName, threadID, "{0}", listPage, threadTypeString)) + "?userid=" + userID);
     //return GetThreadUrl(codeName, threadID, listPage) + "?userid=" + userID + "&page={0}";
     //return BbsRouter.GetUrl(string.Format("showthread/{0}/tid-{1}/{2}/lp-{4}/uid-{3}", codeName, threadID, "{0}", userID, listPage));
     //string threadUrl = UrlManager.GetFriendlyUrl("ShowThread.html?codename={0}&ThreadID={1}&page={2}&userID={3}&listPage={4}", true);
     //return string.Format(threadUrl, codeName, threadID, "{0}", userID, listPage);
 }
Exemple #14
0
        public static string GetLastThreadUrl(string codeName, int threadID, string threadType, int lastPostID, int page, bool isLast)
        {
            string last = isLast ? ("last") : (lastPostID.ToString());

            return(BbsRouter.GetUrl(string.Format("{0}/{3}-{1}-{2}", codeName, threadID, page, threadType)) + "#" + last);
            //string threadUrl = UrlManager.GetFriendlyUrl("ShowThread.html?codename={0}&ThreadID={1}&page={2}", true);
            //return string.Format(threadUrl, codeName, threadID, page) + (isLast ? ("#last") : ("#" + lastPostID));
        }
Exemple #15
0
 /// <summary>
 /// 验证码图片地址
 /// </summary>
 /// <param name="type">动作类型或者验证码类型</param>
 /// <param name="isValidateCodeType">type 是否是“验证码类型”</param>
 /// <param name="id">
 /// 如果同一个页面 出现两个及两个以上相同动作的验证码
 /// 需要指定一个区别的标志(如: 输入框名字必须为 "{$inputName}id" id任意指定 不重复)
 /// 如果没有相同动作的验证码 则传null
 /// </param>
 /// <returns></returns>
 public static string GetValidateCodeImageUrl(string type, bool isValidateCodeType, string id)
 {
     if (id == null)
     {
         id = string.Empty;
     }
     return(BbsRouter.GetUrl(Consts.ValidateCode_ImageUrl, string.Format(Consts.ValidateCode_ImageUrlQuery, type, isValidateCodeType ? 1 : 0, id, DateTime.Now.Ticks)));
 }
Exemple #16
0
        public static string GetLastThreadUrl(string codeName, int threadID, string threadType, int lastPostID, int page, string searthText, bool isLast)
        {
            string last = isLast ? ("last") : (lastPostID.ToString());

            return(BbsRouter.GetUrl(string.Format("{0}/{3}-{1}-{2}", codeName, threadID, page, threadType)) + "?SearchText=" + searthText + "#" + last);
            //return BbsRouter.GetUrl(string.Format("showthread/{0}/tid-{1}/{2}/keyword-{3}", codeName, threadID, page, searthText)) + "?#" + last;
            //string threadUrl = UrlManager.GetFriendlyUrl("ShowThread.html?codename={0}&ThreadID={1}&page={2}&SearchText={3}", true);
            //return string.Format(threadUrl, codeName, threadID, page, searthText) + (isLast ? ("#last") : ("#" + lastPostID));
        }
Exemple #17
0
        public BoardCommentNotify(int relateUserID, int commentID, bool isReply, int spaceOwnerID)
            : base(commentID, isReply)
        {
            this.RelateUserID = relateUserID;
            this.TargetID     = spaceOwnerID;
            this.SpaceOwnerID = spaceOwnerID;

            Url = BbsRouter.GetUrl("space/board-list", "uid=" + SpaceOwnerID) + "#comment_" + CommentID + "_li";
        }
Exemple #18
0
        public SharePostNotify(int relateUserID, int targetID, int commentID, bool isReply, int spaceOwnerID)
            : base(commentID, isReply)
        {
            this.TargetID     = targetID;
            this.RelateUserID = relateUserID;
            this.SpaceOwnerID = spaceOwnerID;

            Url = BbsRouter.GetUrl("app/share");// (TargetID) + "#comment_" + CommentID + "_li";
        }
Exemple #19
0
        public static string GetArchiverIndexUrl()
        {
//#if V5
//            return Globals.AppRoot + "/archiver/default.aspx";
//#else
            return(BbsRouter.GetUrl("archiver/default"));
//#endif
            //return UrlManager.GetFriendlyUrl("Archiver_Default.html", true);
        }
Exemple #20
0
 public RecoverPasswordEmail(string toEmail, string username, string serial)
     : base(
         toEmail,
         AllSettings.Current.RecoverPasswordSettings.EmailTitle,
         AllSettings.Current.RecoverPasswordSettings.EmailContent
         )
 {
     this.Render.RegisterVariable("username", username);
     this.Render.RegisterVariable("url", Globals.SiteRoot + BbsRouter.GetUrl("recoverpassword", "serial=" + serial));  //Globals.AbsoluteWebRoot + "recoverpassword.aspx?serial=" + serial);
 }
Exemple #21
0
        public static string GetThreadManageLogsUrl(string codeName, int searchType, string keyWord)
        {
            return(BbsRouter.GetUrl("threadmanagelogs") + "?codename=" + codeName + "&searchType=" + searchType + "&keyWord=" + keyWord);

            //return BbsRouter.GetUrl(string.Format("threadmanagelogs/{0}/{1}/{2}",codeName,searchType,keyWord));

            //string url = UrlManager.GetFriendlyUrl("ThreadManageLogs.html?codename={0}&searchType={1}&keyWord={2}");

            //return string.Format(url, codeName, searchType.ToString(), keyWord);
        }
Exemple #22
0
        public BlogCommentNotify(int relateUserID, string blogTitle, int blogID, int commentID, bool isReply, int spaceOwnerID)
            : base(commentID, isReply)
        {
            this.RelateUserID = relateUserID;
            this.Title        = blogTitle;
            this.TargetID     = blogID;
            this.SpaceOwnerID = spaceOwnerID;

            Url = BbsRouter.GetUrl("app/blog/view", "id=" + TargetID) + "#comment_" + CommentID + "_li";
        }
        public PhotoCommentNotify(int relateUserID, int photoID, string photoName, int commentID, bool isReply, int spaceOwnerID)
            : base(commentID, isReply)
        {
            this.TargetID     = photoID;
            this.Title        = photoName;
            this.RelateUserID = relateUserID;
            this.SpaceOwnerID = spaceOwnerID;

            Url = BbsRouter.GetUrl("app/album/photo", "id=" + TargetID) + "#comment_" + CommentID + "_li";
        }
Exemple #24
0
        public static string GetArchiverThreadUrlForPager(string codeName, int threadID)
        {
//#if V5
//            return Globals.AppRoot + "/archiver/showthread.aspx?codename=" + codeName + "&threadid=" + threadID + "&page={0}";
//#else
            return(BbsRouter.GetUrl(string.Format("archiver/{0}/thread-{1}-{2}", codeName, threadID, "{0}")));
            //string threadUrl = UrlManager.GetFriendlyUrl("Archiver_ShowThread.html?codename={0}&ThreadID={1}&page={2}", true);
            //return string.Format(threadUrl, codeName, threadID, "{0}");
//#endif
        }
Exemple #25
0
 public EmailValidateEmail(string toEmail, string username, string validateCode)
     : base(
         toEmail,
         AllSettings.Current.RegisterSettings.EmailValidationTitle,
         AllSettings.Current.RegisterSettings.EmailValidationContent
         )
 {
     this.Render["url"]      = UrlUtil.JoinUrl(Globals.SiteRoot, BbsRouter.GetUrl("emailvalidator", "code=" + HttpUtility.UrlEncode(validateCode))); // Globals.AbsoluteWebRoot + "user-emailvalidator.aspx?code=" + HttpUtility.UrlEncode(validateCode);
     this.Render["username"] = username;
 }
Exemple #26
0
        //--------------------------------------------------------------------------------
        public static string GetArchiverForumUrl(string codeName)
        {
//#if V5
//            return Globals.AppRoot + "/archiver/showforum.aspx?codename=" + codeName;
//#else
            // return GetArchiverForumUrl(codeName, 1);
            return(BbsRouter.GetUrl(string.Format("archiver/{0}/list-{1}", codeName, 1)));
//#endif
            //return string.Format(UrlManager.GetFriendlyUrl("Archiver_ShowForum.html?codename={0}", true), codeName);
        }
Exemple #27
0
        public DoingPostNotify(int relateUserID, string doingContent, int doingID, int commentID, bool isReply, int spaceOwnerID)
            : base(commentID, isReply)
        {
            this.TargetID     = doingID;
            this.RelateUserID = relateUserID;
            this.Title        = doingContent;
            this.SpaceOwnerID = spaceOwnerID;

            Url = BbsRouter.GetUrl("app/doing/index", "uid=" + SpaceOwnerID) + "#doing_" + TargetID;
        }
Exemple #28
0
 public InviteSerialEmail(string toEmail, string serial, string username)
     : base(
         toEmail,
         AllSettings.Current.InvitationSettings.InviteSerialEmailTitle,
         AllSettings.Current.InvitationSettings.InviteSerialEmailContent
         )
 {
     this.Render.RegisterVariable("serial", serial);
     this.Render.RegisterVariable("username", username);
     this.Render.RegisterVariable("url", Globals.SiteRoot + BbsRouter.GetUrl("register", "invite=" + serial));             // Globals.AbsoluteWebRoot + "register.aspx?invite=" + serial);
 }
Exemple #29
0
        public static string GetArchiverForumUrlForPager(string codeName)
        {
//#if V5
//            return Globals.AppRoot + "/archiver/showforum.aspx?codename=" + codeName + "&page={0}";
//#else
            return(BbsRouter.GetUrl(string.Format("archiver/{0}/list-{1}", codeName, "{0}")));
            //string forumUrl = UrlManager.GetFriendlyUrl("Archiver_ShowForum.html?codename={0}&page={1}", true);
//#endif

            //return string.Format(forumUrl, codeName, "{0}");
        }
Exemple #30
0
 public ActiveEmail(string toEmail, string username, string serial)
     : base(
         toEmail,
         AllSettings.Current.RegisterSettings.ActivationEmailTitle,
         AllSettings.Current.RegisterSettings.ActivationEmailContent
         )
 {
     this.Render["url"]      = Globals.SiteRoot + BbsRouter.GetUrl("register", "active=" + serial);        // Globals.AbsoluteWebRoot + "register.aspx?active=" + serial;
     this.Render["username"] = username;
     this.Render["serial"]   = serial;
 }