Esempio n. 1
0
        public string Get()
        {
            GetNoticeParams actionParams = JavaScriptConvert.DeserializeObject <GetNoticeParams>(JsonParams);

            if (actionParams.UId <= 0)
            {
                return("");
            }
            GetNoticeResponse getNoticeResponse = new GetNoticeResponse();

            getNoticeResponse.Message.UnRead = PrivateMessages.GetPrivateMessageCount(actionParams.UId, 0, 1);
            DateTime time = new DateTime();

            if (getNoticeResponse.Message.UnRead > 0)
            {
                getNoticeResponse.Message.MostRecent = Utils.ConvertToUnixTimestamp(DateTime.TryParse(PrivateMessages.GetPrivateMessageInfo(PrivateMessages.GetLatestPMID(actionParams.UId)).Postdatetime, out time) ? time : DateTime.Now);
            }

            getNoticeResponse.Notification.UnRead = Notices.GetNoticeCount(actionParams.UId, 1);
            if (getNoticeResponse.Notification.UnRead > 0)
            {
                getNoticeResponse.Notification.MostRecent = Utils.ConvertToUnixTimestamp(DateTime.TryParse(Notices.GetNewNotices(actionParams.UId)[0].Postdatetime, out time) ? time : DateTime.Now);
            }

            List <FriendshipRequestInfo> requestList = Friendship.GetUserFriendRequestList(actionParams.UId, 1, Friendship.GetUserFriendRequestCount(actionParams.UId));

            getNoticeResponse.FriendRequest.UIds = GetFriendRequestUid(requestList);
            if (getNoticeResponse.FriendRequest.UIds.Length > 0)
            {
                getNoticeResponse.FriendRequest.MostRecent = Utils.ConvertToUnixTimestamp(DateTime.TryParse(requestList[requestList.Count - 1].DateTime, out time) ? time : DateTime.Now);
            }

            return(GetResult(getNoticeResponse));
        }
Esempio n. 2
0
        public override bool Run(CommandParameter commandParam, ref string result)
        {
            //如果是桌面程序则需要验证用户身份
            if (commandParam.AppInfo.ApplicationType == (int)ApplicationType.DESKTOP)
            {
                if (commandParam.LocalUid < 1)
                {
                    result = Util.CreateErrorMessage(ErrorType.API_EC_SESSIONKEY, commandParam.ParamList);
                    return(false);
                }
            }

            if (!commandParam.CheckRequiredParams("uid,page_size,page_index"))
            {
                result = Util.CreateErrorMessage(ErrorType.API_EC_PARAM, commandParam.ParamList);
                return(false);
            }

            int uid       = commandParam.GetIntParam("uid");
            int pageSize  = commandParam.GetIntParam("page_size", 10);
            int pageIndex = commandParam.GetIntParam("page_index", 1);

            pageSize  = pageSize < 1 ? 10 : pageSize;
            pageIndex = pageIndex < 1 ? 1 : pageIndex;

            List <PrivateMessageInfo> list = PrivateMessages.GetPrivateMessageCollection(uid, 0, pageSize, pageIndex, 1);

            List <Message> newList = new List <Message>();

            foreach (PrivateMessageInfo pm in list)
            {
                Message m = new Message();
                m.MessageId      = pm.Pmid;
                m.From           = pm.Msgfrom;
                m.FromId         = pm.Msgfromid;
                m.MessageContent = pm.Message;
                m.PostDateTime   = pm.Postdatetime;
                m.Subject        = pm.Subject;

                newList.Add(m);
            }

            MessageGetResponse mgr = new MessageGetResponse();

            mgr.Count    = PrivateMessages.GetPrivateMessageCount(uid, 0, 1);
            mgr.List     = true;
            mgr.Messages = newList.ToArray();

            result = commandParam.Format == FormatType.JSON ?
                     JavaScriptConvert.SerializeObject(mgr) : Util.AddMessageCDATA(SerializationHelper.Serialize(mgr));

            return(true);
        }
Esempio n. 3
0
        /// <summary>
        /// 加载用户当前请求页数的短消息列表并装入DataTable中
        /// </summary>
        private void BindItems()
        {
            //得到当前用户请求的页数
            pageid = DNTRequest.GetInt("page", 1);
            //获取主题总数
            pmcount = PrivateMessages.GetPrivateMessageCount(userid, 0);
            //获取总页数
            pagecount = pmcount % 16 == 0 ? pmcount / 16 : pmcount / 16 + 1;
            if (pagecount == 0)
            {
                pagecount = 1;
            }
            //修正请求页数中可能的错误
            if (pageid < 1)
            {
                pageid = 1;
            }
            if (pageid > pagecount)
            {
                pageid = pagecount;
            }

            usedmsgcount = PrivateMessages.GetPrivateMessageCount(userid, -1);
            maxmsg       = usergroupinfo.Maxpmnum;

            if (maxmsg <= 0)
            {
                usedmsgbarwidth   = 0;
                unusedmsgbarwidth = 0;
            }
            else
            {
                usedmsgbarwidth   = usedmsgcount * 100 / maxmsg;
                unusedmsgbarwidth = 100 - usedmsgbarwidth;
            }

//				//用户是不是有新的短信息,如果没有则设置用户的短信息状态为没有状态(状态为 0 )
//				pmlist = PrivateMessages.GetPrivateMessageList(userid, 0, 1, 1, "[new]=1");
//				if (pmlist!=null)
//				{
//					if (pmlist.Rows.Count<=0)
//					{
//						Users.SetUserNewPMCount(userid,0);
//					}
//				}
//				else
//				{
//					Users.SetUserNewPMCount(userid,0);
//				}

            pmlist      = PrivateMessages.GetPrivateMessageCollection(userid, 0, 16, pageid, 2);
            pagenumbers = Utils.GetPageNumbers(pageid, pagecount, "usercpinbox.aspx", 8);
        }
Esempio n. 4
0
 /// <summary>
 /// 绑定短消息
 /// </summary>
 /// <param name="folder">文件箱,所属文件夹(0:收件箱,1:发件箱,2:草稿箱),-1为获取全部短消息条数</param>
 protected void BindPrivateMessage(int folder)
 {
     //获取主题总数
     pmcount      = PrivateMessages.GetPrivateMessageCount(userid, folder);
     usedmsgcount = PrivateMessages.GetPrivateMessageCount(userid, folder);
     maxmsg       = usergroupinfo.Maxpmnum;
     if (maxmsg > 0)
     {
         usedmsgbarwidth   = usedmsgcount * 100 / maxmsg;
         unusedmsgbarwidth = 100 - usedmsgbarwidth;
     }
     BindItems(pmcount);
 }
Esempio n. 5
0
        /// <summary>
        /// 创建短消息
        /// </summary>
        /// <param name="folder">所属文件夹(0:收件箱,1:发件箱,2:草稿箱)</param>
        /// <param name="saveToSendBox">是否保存到发件箱</param>
        /// <param name="url">跳转链接</param>
        /// <param name="msg">提示信息</param>
        private void CreatePM(int folder, int saveToSendBox, string url, string msg)
        {
            if (folder != 2)
            {
                UserInfo touser = Users.GetUserInfo(msgtoid);
                // 检查接收人的短消息是否已超过接收人用户组的上限,管理组不受接收人短消息上限限制
                int radminId = UserGroups.GetUserGroupInfo(usergroupid).Radminid;
                if (!(radminId > 0 && radminId <= 3) && PrivateMessages.GetPrivateMessageCount(msgtoid, -1) >= UserGroups.GetUserGroupInfo(touser.Groupid).Maxpmnum)
                {
                    AddErrLine("抱歉,接收人的短消息已达到上限,无法接收");
                    return;
                }
                if (!Utils.InArray(Convert.ToInt32(touser.Newsletter).ToString(), "2,3,6,7"))
                {
                    AddErrLine("抱歉,接收人拒绝接收短消息");
                    return;
                }
            }

            // 检查发送人的短消息是否已超过发送人用户组的上限
            if (url != "usercpinbox.aspx" && PrivateMessages.GetPrivateMessageCount(userid, -1) >= usergroupinfo.Maxpmnum)
            {
                AddErrLine("抱歉,您的短消息已达到上限,无法保存到发件箱");
                return;
            }
            pm.Folder = folder;
            if (CreditsFacade.SendPM(userid) == -1)
            {
                AddErrLine("您的积分不足, 不能发送短消息");
                return;
            }
            pm.Pmid = PrivateMessages.CreatePrivateMessage(pm, saveToSendBox);
            //发送邮件通知
            if (DNTRequest.GetString("emailnotify") == "on")
            {
                SendNotifyEmail(Users.GetUserInfo(msgtoid).Email.Trim(), pm);
            }

            SetUrl(url);
            SetMetaRefresh();
            SetShowBackLink(true);
            MsgForward("usercppostpm_succeed");
            AddMsgLine(msg);
        }
Esempio n. 6
0
        /// <summary>
        /// 加载用户当前请求页数的短消息列表并装入DataTable中
        /// </summary>
        private void BindItems()
        {
            //得到当前用户请求的页数
            pageid = DNTRequest.GetInt("page", 1);
            //获取主题总数
            pmcount = PrivateMessages.GetPrivateMessageCount(userid, 1);
            //获取总页数
            pagecount = pmcount % 16 == 0 ? pmcount / 16 : pmcount / 16 + 1;
            if (pagecount == 0)
            {
                pagecount = 1;
            }
            //修正请求页数中可能的错误
            if (pageid < 1)
            {
                pageid = 1;
            }
            if (pageid > pagecount)
            {
                pageid = pagecount;
            }

            //取得用户所有短消息总数,第二个参数就传-1
            usedmsgcount = PrivateMessages.GetPrivateMessageCount(userid, -1);
            maxmsg       = usergroupinfo.Maxpmnum;

            if (maxmsg <= 0)
            {
                usedmsgbarwidth   = 0;
                unusedmsgbarwidth = 0;
            }
            else
            {
                usedmsgbarwidth   = usedmsgcount * 100 / maxmsg;
                unusedmsgbarwidth = 100 - usedmsgbarwidth;
            }

            pmlist      = PrivateMessages.GetPrivateMessageCollection(userid, 1, 16, pageid, 2);
            pagenumbers = Utils.GetPageNumbers(pageid, pagecount, "usercpsentbox.aspx", 8);
        }
Esempio n. 7
0
        /// <summary>
        /// 获取短消息列表
        /// </summary>
        /// <returns></returns>
        public string Get()
        {
            if (Signature != GetParam("sig").ToString())
            {
                ErrorCode = (int)ErrorType.API_EC_SIGNATURE;
                return("");
            }

            //如果是桌面程序则需要验证用户身份
            if (this.App.ApplicationType == (int)ApplicationType.DESKTOP && Uid < 1)
            {
                //if (Uid < 1)
                //{
                ErrorCode = (int)ErrorType.API_EC_SESSIONKEY;
                return("");
                //}
            }

            if (CallId <= LastCallId)
            {
                ErrorCode = (int)ErrorType.API_EC_CALLID;
                return("");
            }

            if (!CheckRequiredParams("uid,page_size,page_index"))
            {
                ErrorCode = (int)ErrorType.API_EC_PARAM;
                return("");
            }
            int uid       = GetIntParam("uid");
            int pageSize  = GetIntParam("page_size", 10);
            int pageIndex = GetIntParam("page_index", 1);

            List <PrivateMessageInfo> list = PrivateMessages.GetPrivateMessageCollection(uid, 0, pageSize, pageIndex, 1);

            List <Message> newList = new List <Message>();

            foreach (PrivateMessageInfo pm in list)
            {
                Message m = new Message();
                m.MessageId      = pm.Pmid;
                m.From           = pm.Msgfrom;
                m.FromId         = pm.Msgfromid;
                m.MessageContent = pm.Message;
                m.PostDateTime   = pm.Postdatetime;
                m.Subject        = pm.Subject;

                newList.Add(m);
            }

            MessageGetResponse mgr = new MessageGetResponse();

            mgr.Count    = PrivateMessages.GetPrivateMessageCount(uid, 0, 1);
            mgr.List     = true;
            mgr.Messages = newList.ToArray();

            if (Format == FormatType.JSON)
            {
                return(JsonConvert.SerializeObject(mgr));
            }

            return(Util.AddMessageCDATA(SerializationHelper.Serialize(mgr)));
        }
Esempio n. 8
0
        protected override void ShowPage()
        {
            pagetitle = "撰写短消息";

            if (userid == -1)
            {
                AddErrLine("你尚未登录");

                return;
            }
            user = Discuz.Forum.Users.GetUserInfo(userid);

            if (!CheckPermission())
            {
                return;
            }

            if (DNTRequest.IsPost())
            {
                if (!CheckPermissionAfterPost())
                {
                    return;
                }

                #region 创建并发送短消息

                PrivateMessageInfo pm = new PrivateMessageInfo();

                string curdatetime = Utils.GetDateTime();
                // 收件箱
                if (useradminid == 1)
                {
                    pm.Message = Utils.HtmlEncode(DNTRequest.GetString("message"));
                    pm.Subject = Utils.HtmlEncode(DNTRequest.GetString("subject"));
                }
                else
                {
                    pm.Message =
                        Utils.HtmlEncode(ForumUtils.BanWordFilter(DNTRequest.GetString("message")));
                    pm.Subject =
                        Utils.HtmlEncode(ForumUtils.BanWordFilter(DNTRequest.GetString("subject")));
                }

                if (ForumUtils.HasBannedWord(pm.Message) || ForumUtils.HasBannedWord(pm.Subject))
                {
                    //HasBannedWord 指定的字符串中是否含有禁止词汇

                    AddErrLine("对不起, 您提交的内容包含不良信息, 因此无法提交, 请返回修改!");
                    return;
                }


                if (ForumUtils.HasAuditWord(pm.Message) || ForumUtils.HasAuditWord(pm.Subject))
                {
                    AddErrLine("对不起, 您提交的内容包含不良信息, 因此无法提交, 请返回修改!");
                    return;
                }

                pm.Message = ForumUtils.BanWordFilter(pm.Message);
                pm.Subject = ForumUtils.BanWordFilter(pm.Subject);

                pm.Msgto        = DNTRequest.GetString("msgto");
                pm.Msgtoid      = msgtoid;
                pm.Msgfrom      = username;
                pm.Msgfromid    = userid;
                pm.New          = 1;
                pm.Postdatetime = curdatetime;


                if (!DNTRequest.GetString("savetousercpdraftbox").Equals(""))
                {
                    // 检查发送人的短消息是否已超过发送人用户组的上限
                    if (PrivateMessages.GetPrivateMessageCount(userid, -1) >= usergroupinfo.Maxpmnum)
                    {
                        AddErrLine("抱歉,您的短消息已达到上限,无法保存到草稿箱");
                        return;
                    }
                    // 只将消息保存到草稿箱
                    pm.Folder = 2;
                    if (UserCredits.UpdateUserCreditsBySendpms(base.userid) == -1)
                    {
                        AddErrLine("您的金币不足, 不能发送短消息");
                        return;
                    }
                    pm.Pmid = PrivateMessages.CreatePrivateMessage(pm, 0);

                    //发送邮件通知
                    if (DNTRequest.GetString("emailnotify") == "on")
                    {
                        SendNotifyEmail(Discuz.Forum.Users.GetUserInfo(msgtoid).Email.Trim(), pm);
                    }

                    SetUrl("usercpdraftbox.aspx");
                    SetMetaRefresh();
                    SetShowBackLink(true);
                    AddMsgLine("已将消息保存到草稿箱");
                }
                else if (!DNTRequest.GetString("savetosentbox").Equals(""))
                {
                    // 检查接收人的短消息是否已超过接收人用户组的上限
                    UserInfo touser = Discuz.Forum.Users.GetUserInfo(msgtoid);
                    //管理组不受接收人短消息上限限制
                    int radminId = UserGroups.GetUserGroupInfo(usergroupid).Radminid;
                    if (!(radminId > 0 && radminId <= 3) && PrivateMessages.GetPrivateMessageCount(msgtoid, -1) >=
                        UserGroups.GetUserGroupInfo(touser.Groupid).Maxpmnum)
                    {
                        AddErrLine("抱歉,接收人的短消息已达到上限,无法接收");
                        return;
                    }

                    if (!Utils.InArray(Convert.ToInt32(touser.Newsletter).ToString(), "2,3,6,7"))
                    {
                        AddErrLine("抱歉,接收人拒绝接收短消息");
                        return;
                    }
                    // 检查发送人的短消息是否已超过发送人用户组的上限
                    if (PrivateMessages.GetPrivateMessageCount(userid, -1) >= usergroupinfo.Maxpmnum)
                    {
                        AddErrLine("抱歉,您的短消息已达到上限,无法保存到发件箱");
                        return;
                    }
                    // 发送消息且保存到发件箱
                    pm.Folder = 0;
                    if (UserCredits.UpdateUserCreditsBySendpms(base.userid) == -1)
                    {
                        AddErrLine("您的金币不足, 不能发送短消息");
                        return;
                    }
                    pm.Pmid = PrivateMessages.CreatePrivateMessage(pm, 1);

                    //发送邮件通知
                    if (DNTRequest.GetString("emailnotify") == "on")
                    {
                        SendNotifyEmail(touser.Email.Trim(), pm);
                    }

                    // 更新在线表中的用户最后发帖时间
                    OnlineUsers.UpdatePostPMTime(olid);

                    SetUrl("usercpsentbox.aspx");
                    SetMetaRefresh();
                    SetShowBackLink(true);
                    AddMsgLine("发送完毕, 且已将消息保存到发件箱");
                }
                else
                {
                    UserInfo touser = Discuz.Forum.Users.GetUserInfo(msgtoid);
                    // 检查接收人的短消息是否已超过接收人用户组的上限,管理组不受接收人短消息上限限制
                    int radminId = UserGroups.GetUserGroupInfo(usergroupid).Radminid;
                    if (!(radminId > 0 && radminId <= 3) && PrivateMessages.GetPrivateMessageCount(msgtoid, -1) >=
                        UserGroups.GetUserGroupInfo(touser.Groupid).Maxpmnum)
                    {
                        AddErrLine("抱歉,接收人的短消息已达到上限,无法接收");
                        return;
                    }
                    if (!Utils.InArray(Convert.ToInt32(touser.Newsletter).ToString(), "2,3,6,7"))
                    {
                        AddErrLine("抱歉,接收人拒绝接收短消息");
                        return;
                    }

                    // 发送消息但不保存到发件箱
                    pm.Folder = 0;
                    if (UserCredits.UpdateUserCreditsBySendpms(base.userid) == -1)
                    {
                        AddErrLine("您的金币不足, 不能发送短消息");
                        return;
                    }
                    pm.Pmid = PrivateMessages.CreatePrivateMessage(pm, 0);

                    //发送邮件通知
                    if (DNTRequest.GetString("emailnotify") == "on")
                    {
                        SendNotifyEmail(touser.Email.Trim(), pm);
                    }

                    SetUrl("usercpinbox.aspx");
                    SetMetaRefresh();
                    SetShowBackLink(true);
                    AddMsgLine("发送完毕");
                }

                #endregion
            }

            msgto = Utils.HtmlEncode(DNTRequest.GetString("msgto"));

            msgtoid = DNTRequest.GetInt("msgtoid", 0);
            if (msgtoid > 0)
            {
                msgto = Discuz.Forum.Users.GetUserName(msgtoid).Trim();
            }

            subject = Utils.HtmlEncode(DNTRequest.GetString("subject"));
            message = Utils.HtmlEncode(DNTRequest.GetString("message"));

            string action = DNTRequest.GetQueryString("action").ToLower();
            if (action.CompareTo("re") == 0 || action.CompareTo("fw") == 0) //回复或者转发
            {
                int pmid = DNTRequest.GetQueryInt("pmid", -1);
                if (pmid != -1)
                {
                    PrivateMessageInfo pm = PrivateMessages.GetPrivateMessageInfo(pmid);
                    if (pm != null)
                    {
                        if (pm.Msgtoid == userid || pm.Msgfromid == userid)
                        {
                            if (action.CompareTo("re") == 0)
                            {
                                msgto = Utils.HtmlEncode(pm.Msgfrom);
                            }
                            else
                            {
                                msgto = "";
                            }
                            subject = Utils.HtmlEncode(action) + ":" + pm.Subject;
                            message = Utils.HtmlEncode("> ") + pm.Message.Replace("\n", "\n> ") + "\r\n\r\n";
                        }
                    }
                }
            }
        }
Esempio n. 9
0
        private bool DoOperations(ForumInfo forum, AdminGroupInfo admininfo, int reasonpm)
        {
            string operationName = "";
            string next          = DNTRequest.GetFormString("next");
            string referer       = DNTRequest.GetFormString("referer");

            DataTable dt = null;

            #region DoOperation

            string reason = DNTRequest.GetString("reason");
            if (operation != "identify")
            {
                if (reason.Equals(""))
                {
                    AddErrLine("操作原因不能为空");
                    return(false);
                }
                else
                {
                    if (reason.Length > 200)
                    {
                        AddErrLine("操作原因不能多于200个字符");
                        return(false);
                    }
                }
            }

            if ("delete,highlight,close,movecategory".IndexOf(operation) == -1)
            {
                AddErrLine("未知的操作参数");
                return(false);
            }
            //执行提交操作
            if (next.Trim() != "")
            {
                referer = string.Format("goodsadmin.aspx?action={0}&categoryid={1}&goodsid={2}", next, categoryid, goodslist);
            }
            else
            {
                referer = string.Format(base.ShowGoodsListAspxRewrite(categoryid, 1));
            }

            #region switch operation

            switch (operation)
            {
            case "delete":
                operationName = "删除商品";
                if (!DoDeleteOperation(forum))
                {
                    return(false);
                }
                break;

            case "highlight":     //设置高亮
                operationName = "设置高亮";
                if (!DoHighlightOperation())
                {
                    return(false);
                }
                break;

            case "close":
                operationName = "关闭商品/取消";
                if (!DoCloseOperation())
                {
                    return(false);
                }
                break;

            case "movecategory":
                operationName = "移动商品";
                if (!DoMoveOperation())
                {
                    return(false);
                }
                break;

            default:
                operationName = "未知操作";
                break;
            }

            #endregion

            if (next.CompareTo("") == 0)
            {
                AddMsgLine("管理操作成功,现在将转入商品列表");
            }
            else
            {
                AddMsgLine("管理操作成功,现在将转入后续操作");
            }

            dt = Goods.GetGoodsList(goodslist);
            if (config.Modworkstatus == 1)
            {
                if (dt != null)
                {
                    foreach (DataRow dr in dt.Rows)
                    {
                        AdminModeratorLogs.InsertLog(this.userid.ToString(), username, usergroupid.ToString(),
                                                     this.usergroupinfo.Grouptitle, Utils.GetRealIP(),
                                                     Utils.GetDateTime(), this.forumid.ToString(), this.forumname,
                                                     dr["goodsid"].ToString(), dr["title"].ToString(), operationName,
                                                     reason);

                        if (reasonpm == 1)
                        {
                            int posterid = Utils.StrToInt(dr["selleruid"], -1);
                            if (posterid != -1) //是游客,管理操作就不发短消息了
                            {
                                if (PrivateMessages.GetPrivateMessageCount(posterid, -1) <
                                    UserGroups.GetUserGroupInfo(Users.GetShortUserInfo(posterid).Groupid).Maxpmnum)
                                {
                                    PrivateMessageInfo __privatemessageinfo = new PrivateMessageInfo();

                                    string curdatetime = Utils.GetDateTime();
                                    // 收件箱
                                    __privatemessageinfo.Message =
                                        Utils.HtmlEncode(
                                            string.Format(
                                                "这是由论坛系统自动发送的通知短消息。\r\n以下您所发表的商品被 {0} {1} 执行 {2} 操作。\r\n\r\n商品: {3} \r\n操作理由: {4}\r\n\r\n如果您对本管理操作有异议,请与我取得联系。",
                                                Utils.RemoveHtml(this.usergroupinfo.Grouptitle), username,
                                                operationName, dr["title"].ToString().Trim(),
                                                reason));
                                    __privatemessageinfo.Subject      = Utils.HtmlEncode("您发表的商品被执行管理操作");
                                    __privatemessageinfo.Msgto        = dr["seller"].ToString();
                                    __privatemessageinfo.Msgtoid      = posterid;
                                    __privatemessageinfo.Msgfrom      = username;
                                    __privatemessageinfo.Msgfromid    = userid;
                                    __privatemessageinfo.New          = 1;
                                    __privatemessageinfo.Postdatetime = curdatetime;
                                    __privatemessageinfo.Folder       = 0;
                                    PrivateMessages.CreatePrivateMessage(__privatemessageinfo, 0);
                                }
                            }
                        }
                    }
                    dt.Dispose();
                }
            }


            //执行完某一操作后转到后续操作
            SetUrl(referer);
            if (next != string.Empty)
            {
                HttpContext.Current.Response.Redirect(BaseConfigs.GetForumPath + referer, false);
            }
            else
            {
                AddScript("window.setTimeout('redirectURL()', 2000);function redirectURL() {window.location='" + referer + "';}");
            }

            SetShowBackLink(false);

            #endregion

            return(true);
        }