• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Entity.PostpramsInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Discuz.Entity.PostpramsInfo的典型用法代码示例。如果您正苦于以下问题:C# PostpramsInfo类的具体用法?C# PostpramsInfo怎么用?C# PostpramsInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PostpramsInfo类属于Discuz.Entity命名空间,在下文中一共展示了PostpramsInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetPostPramsInfo

        /// <summary>
        /// 获取帖子参数信息(PostPramsInfo)
        /// </summary>
        /// <param name="price"></param>
        /// <returns></returns>
        public PostpramsInfo GetPostPramsInfo()
        {
            //获取当前页主题列表
            PostpramsInfo postpramsInfo = new PostpramsInfo();
            postpramsInfo.Fid = forum.Fid;
            postpramsInfo.Tid = topicid;
            postpramsInfo.Jammer = forum.Jammer;
            //postpramsInfo.Pagesize = int.MaxValue;
            postpramsInfo.Pagesize = (ppp <= 0 ? config.Ppp : ppp);
            postpramsInfo.Pageindex = 1;
            postpramsInfo.Getattachperm = forum.Getattachperm;
            postpramsInfo.Usergroupid = usergroupid;
            postpramsInfo.Attachimgpost = config.Attachimgpost;
            postpramsInfo.Showattachmentpath = config.Showattachmentpath;
            postpramsInfo.Price = 0;
            postpramsInfo.Usergroupreadaccess = usergroupinfo.Readaccess;
            postpramsInfo.Usergroupreadaccess = (ismoder == 1) ? int.MaxValue : usergroupinfo.Readaccess;
            postpramsInfo.CurrentUserid = userid;
            postpramsInfo.Showimages = forum.Allowimgcode;
            postpramsInfo.Smiliesinfo = Smilies.GetSmiliesListWithInfo();
            postpramsInfo.Customeditorbuttoninfo = Editors.GetCustomEditButtonListWithInfo();
            postpramsInfo.Smiliesmax = config.Smiliesmax;
            postpramsInfo.Bbcodemode = config.Bbcodemode;
            postpramsInfo.CurrentUserGroup = usergroupinfo;
            //判断是否为回复可见帖, hide=0为不解析[hide]标签, hide>0解析为回复可见字样, hide=-1解析为以下内容回复可见字样显示真实内容
            //将逻辑判断放入取列表的循环中处理,此处只做是否为回复人的判断,主题作者也该可见
            postpramsInfo.Hide = (topic.Hide == 1 && (Posts.IsReplier(topicid, userid) || ismoder == 1)) ? -1 : 1;
            postpramsInfo.Condition = Posts.GetPostPramsInfoCondition(onlyauthor, topicid, topic.Posterid);
            //if (!(Utils.StrIsNullOrEmpty(onlyauthor) || onlyauthor.Equals("0")))
            //    postpramsInfo.Condition = string.Format(" {0}.posterid={1}", Posts.GetPostTableName(topicid), topic.Posterid);

            postlist = Posts.GetPostListWithBonus(postpramsInfo, out attachmentlist, ismoder == 1);

            return postpramsInfo;
        }
开发者ID:simazhao,项目名称:discuz-nt,代码行数:40,代码来源:showbonus.aspx.cs


示例2: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        int tid=DNTRequest.GetInt("tid", 0);

        if (tid > 0)
        {
            //ShowtopicPagePostInfo info = Posts.GetSinglePost(tid);
            PostInfo postInfo = Posts.GetPostInfo(tid, Posts.GetFirstPostId(tid));
            if (postInfo != null)
            {

                //处理帖子内容
                PostpramsInfo postpramsinfo = new PostpramsInfo();
                postpramsinfo.Smileyoff = postInfo.Smileyoff;
                postpramsinfo.Bbcodeoff = postInfo.Bbcodeoff;
                postpramsinfo.Parseurloff = postInfo.Parseurloff;
                postpramsinfo.Allowhtml = postInfo.Htmlon;
                postpramsinfo.Sdetail = postInfo.Message;
                postpramsinfo.Pid = postInfo.Pid;
                postpramsinfo.Showimages = 1;

                //Discuz.Web.News.News

                //显示内容
                lblTitle.Text = postInfo.Title;
                lblAuthor.Text = postInfo.Poster;
                lblDatetime.Text = postInfo.Postdatetime.ToString();
                content.InnerHtml = UBB.UBBToHTML(postpramsinfo);




            }
        }
    }
开发者ID:ichari,项目名称:ichari,代码行数:35,代码来源:News.aspx.cs


示例3: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        int tid = DNTRequest.GetInt("tid", 0);

        if (tid > 0)
        {
            try
            {
                //ShowtopicPagePostInfo info = Posts.GetSinglePost(tid);
                PostInfo postInfo = Posts.GetPostInfo(tid, Posts.GetFirstPostId(tid));
                if (postInfo != null)
                {

                    //处理帖子内容
                    PostpramsInfo postpramsinfo = new PostpramsInfo();
                    postpramsinfo.Smileyoff = postInfo.Smileyoff;
                    postpramsinfo.Bbcodeoff = postInfo.Bbcodeoff;
                    postpramsinfo.Parseurloff = postInfo.Parseurloff;
                    postpramsinfo.Allowhtml = postInfo.Htmlon;
                    postpramsinfo.Sdetail = postInfo.Message;
                    postpramsinfo.Pid = postInfo.Pid;
                    postpramsinfo.Showimages = 1;

                    //Discuz.Web.News.News

                    //显示内容
                    //lblTitle.Text = postInfo.Title;
                    //lblAuthor.Text = postInfo.Poster;
                    //lblDatetime.Text = postInfo.Postdatetime.ToString();
                    //content.InnerHtml = UBB.UBBToHTML(postpramsinfo);
                    string postInfos = "0|" + postInfo.Title + "|" + postInfo.Postdatetime + "|" + postInfo.Poster + "$$$$";
                    string test = UBB.UBBToHTML(postpramsinfo);
                    Response.Write(postInfos + UBB.UBBToHTML(postpramsinfo));
                }
                else
                {
                    Response.Write("1|不存在相关内容");
                }

            }
            catch (Exception ex)
            {
                Response.Write("2|获取信息出错:" + ex);
            }
        }
        else
        {
            Response.Write("3|帖子不存在");
        }
    }
开发者ID:ichari,项目名称:ichari,代码行数:50,代码来源:GetPostContent.aspx.cs


示例4: UpdateUserAllInfo

		/// <summary>
		/// 更新用户全部信息
		/// </summary>
		/// <param name="__userinfo"></param>
		/// <returns></returns>
		public static bool UpdateUserAllInfo(UserInfo userInfo)
		{
            Users.UpdateUser(userInfo);

			//当用户不是版主(超级版主)或管理员
			if ((userInfo.Adminid == 0) || (userInfo.Adminid > 3))
			{
				//删除用户在版主列表中相关数据
                Data.Moderators.DeleteModerator(userInfo.Uid);
				//同时更新版块相关的版主信息
				UpdateForumsFieldModerators(userInfo.Username);
			}

			#region 以下为更新该用户的扩展信息

			string signature = Utils.HtmlEncode(ForumUtils.BanWordFilter(userInfo.Signature));

			UserGroupInfo usergroupinfo = AdminUserGroups.AdminGetUserGroupInfo(userInfo.Groupid);
            GeneralConfigInfo config = GeneralConfigs.GetConfig();

			PostpramsInfo postPramsInfo = new PostpramsInfo();
			postPramsInfo.Usergroupid = usergroupinfo.Groupid;
			postPramsInfo.Attachimgpost = config.Attachimgpost;
			postPramsInfo.Showattachmentpath = config.Showattachmentpath;
			postPramsInfo.Hide = 0;
			postPramsInfo.Price = 0;
			postPramsInfo.Sdetail = userInfo.Signature;
			postPramsInfo.Smileyoff = 1;
			postPramsInfo.Bbcodeoff = 1 - usergroupinfo.Allowsigbbcode;
			postPramsInfo.Parseurloff = 1;
			postPramsInfo.Showimages = usergroupinfo.Allowsigimgcode;
			postPramsInfo.Allowhtml = 0;
			postPramsInfo.Smiliesinfo = Smilies.GetSmiliesListWithInfo();
			postPramsInfo.Customeditorbuttoninfo = Editors.GetCustomEditButtonListWithInfo();
			postPramsInfo.Smiliesmax = config.Smiliesmax;
			postPramsInfo.Signature = 1;
			postPramsInfo.Onlinetimeout = config.Onlinetimeout;

            userInfo.Signature = signature;
            userInfo.Authstr = ForumUtils.CreateAuthStr(20);
            userInfo.Sightml = UBB.UBBToHTML(postPramsInfo);
            Users.UpdateUser(userInfo);

			#endregion

			Users.UpdateUserForumSetting(userInfo);
			return true;
		}
开发者ID:wenysky,项目名称:dnt31-lite,代码行数:53,代码来源:AdminUsers.cs


示例5: GetSinglePost

        /// <summary>
        /// 获得单个帖子的信息, 包括发帖人的一般资料
        /// </summary>
        /// <param name="_postpramsinfo">参数列表</param>
        /// <returns>帖子的信息</returns>
        public static ShowtopicPagePostInfo GetSinglePost(PostpramsInfo postPramsInfo, out Discuz.Common.Generic.List<ShowtopicPageAttachmentInfo> attachmentList, bool ismoder)
        {
            //此代码已被移至showdebate.aspx.cs页面
            //UserInfo userInfo = Users.GetUserInfo(postPramsInfo.CurrentUserid);
            //postPramsInfo.Usercredits = userInfo == null ? 0 : userInfo.Credits;

            ShowtopicPagePostInfo postInfo = Discuz.Data.Posts.GetPostInfoWithAttachments(postPramsInfo, out attachmentList);
            if (postInfo != null)
            {
                int allowGetAttach = GetAllowGetAttachValue(postPramsInfo);
                Attachments.CheckPurchasedAttachments(attachmentList, postPramsInfo.CurrentUserid);
                int adcount = Advertisements.GetInPostAdCount("", postInfo.Fid);
                postInfo.Id = 1;
                LoadExtraPostInfo(postInfo, adcount);
                LoadPostMessage(postPramsInfo, attachmentList, ismoder, allowGetAttach, postPramsInfo.Hide, postInfo);
            }
            return postInfo;
        }
开发者ID:WySky,项目名称:Memo-Project,代码行数:23,代码来源:Posts.cs


示例6: GetAllowGetAttachValue

        /// <summary>
        /// 计算是否允许查看附件
        /// </summary>
        /// <param name="postpramsInfo"></param>
        /// <returns></returns>
        private static int GetAllowGetAttachValue(PostpramsInfo postpramsInfo)
        {
            if (Forums.AllowGetAttachByUserID(Forums.GetForumInfo(postpramsInfo.Fid).Permuserlist, postpramsInfo.CurrentUserid))
                return 1;

            int allowGetAttach = 0;

            if (postpramsInfo.Getattachperm.Equals("") || postpramsInfo.Getattachperm == null)
                allowGetAttach = postpramsInfo.CurrentUserGroup.Allowgetattach;
            else if (Forums.AllowGetAttach(postpramsInfo.Getattachperm, postpramsInfo.Usergroupid))
                allowGetAttach = 1;

            return allowGetAttach;
        }
开发者ID:WySky,项目名称:Memo-Project,代码行数:19,代码来源:Posts.cs


示例7: LoadPostMessage

        /// <summary>
        /// 根据附件加载帖子内容
        /// </summary>
        /// <param name="postpramsInfo">参数对象</param>
        /// <param name="attachList">附件列表</param>
        /// <param name="isModer">是否是管理人员</param>
        /// <param name="allowGetAttach">是否允许获取附件</param>
        /// <param name="originalHideStatus">帖子原始Hide属性</param>
        /// <param name="postInfo">帖子信息 </param>
        private static void LoadPostMessage(PostpramsInfo postpramsInfo, List<ShowtopicPageAttachmentInfo> attachList, bool isModer, int allowGetAttach, int originalHideStatus, ShowtopicPagePostInfo postInfo)
        {
            UserGroupInfo tmpGroupInfo;

            bool showMessage = !Utils.InArray(postInfo.Groupid.ToString(), "4,5,6") && postInfo.Invisible == 0;

            //如果当前帖子不可见,但是查看用户是管理组时
            if (!showMessage && isModer)
            {
                postInfo.Message = "<div class='hintinfo'>该用户帖子内容已被屏蔽, 您拥有管理权限, 以下是帖子内容</div>" + postInfo.Message;
            }
            else if (!showMessage)
            {
                postInfo.Message = "<div class='hintinfo'>该用户帖子内容已被屏蔽</div>";
                List<ShowtopicPageAttachmentInfo> delattlist = new List<ShowtopicPageAttachmentInfo>();
                foreach (ShowtopicPageAttachmentInfo attach in attachList)
                {
                    if (attach.Pid == postInfo.Pid)
                        delattlist.Add(attach);
                }

                foreach (ShowtopicPageAttachmentInfo attach in delattlist)
                {
                    attachList.Remove(attach);
                }
            }

            //如果当前帖子可见 或者 当前查看用户是管理组时
            if (showMessage || isModer)
            {
                //处理帖子内容
                postpramsInfo.Smileyoff = postInfo.Smileyoff;
                postpramsInfo.Bbcodeoff = postInfo.Bbcodeoff;
                postpramsInfo.Parseurloff = postInfo.Parseurloff;
                postpramsInfo.Allowhtml = postInfo.Htmlon;
                postpramsInfo.Sdetail = postInfo.Message;
                postpramsInfo.Pid = postInfo.Pid;
                //校正hide处理
                tmpGroupInfo = UserGroups.GetUserGroupInfo(postInfo.Groupid);
                if (tmpGroupInfo.Allowhidecode == 0)
                    postpramsInfo.Hide = 0;

                //先简单判断是否是动网兼容模式
                if (!postpramsInfo.Ubbmode)
                    postInfo.Message = UBB.UBBToHTML(postpramsInfo);
                else
                    postInfo.Message = Utils.HtmlEncode(postInfo.Message);

                if (postpramsInfo.Jammer == 1)
                    postInfo.Message = ForumUtils.AddJammer(postInfo.Message);

                string message = postInfo.Message;
                if (postInfo.Attachment > 0 || regexAttach.IsMatch(message) || regexAttachImg.IsMatch(message))
                {
                    //获取在[hide]标签中的附件id
                    string[] attHidArray = GetHiddenAttachIdList(postpramsInfo.Sdetail, postpramsInfo.Hide);
                    List<ShowtopicPageAttachmentInfo> attachDeleteList = new List<ShowtopicPageAttachmentInfo>();
                    foreach (ShowtopicPageAttachmentInfo attach in attachList)
                    {
                        message = Attachments.GetMessageWithAttachInfo(postpramsInfo, allowGetAttach, attHidArray, postInfo, attach, message);
                        //if (attach.Inserted == 1 && (postpramsInfo.CurrentUserGroup.Radminid == 1 || attach.Uid == postpramsInfo.CurrentUserid || attach.Attachprice <= 0 || attach.Isbought == 1)//当为发帖人或不为收费附件或已购买该收费附件时
                        //    || Utils.InArray(attach.Aid.ToString(), attHidArray))

                        //如果附件已经插入到帖子内容中,则显示内容控制完全交给GetMessageWithAttachInfo
                        if ((attach.Inserted == 1 || Utils.InArray(attach.Aid.ToString(), attHidArray)))
                            attachDeleteList.Add(attach);
                    }

                    foreach (ShowtopicPageAttachmentInfo attach in attachDeleteList)
                    {
                        attachList.Remove(attach);
                    }
                    postInfo.Message = message;
                }

                //恢复hide初值
                postpramsInfo.Hide = originalHideStatus;
            }
        }
开发者ID:WySky,项目名称:Memo-Project,代码行数:88,代码来源:Posts.cs


示例8: GetPostList

        /// <summary>
        /// 获取指定条件的帖子DataSet
        /// </summary>
        /// <param name="_postpramsinfo">参数列表</param>
        /// <returns>指定条件的帖子DataSet</returns>
        public static List<ShowtopicPagePostInfo> GetPostList(PostpramsInfo postpramsInfo)
        {
            IDataReader reader;
            string postTableId = PostTables.GetPostTableId(postpramsInfo.Tid);
            if (!postpramsInfo.Condition.Equals(""))
                reader = DatabaseProvider.GetInstance().GetPostListByCondition(postpramsInfo, postTableId);
            else
            {
                //更新Cache缓存中的帖子信息(目前只对当前分表进行查询,这主要出于将所有分表数据转换对于某些中型论坛的服务器硬盘内存要求过高的暂时方案)
                if (postTableId == PostTables.GetPostTableId() && appDBCache && IPostService != null)
                {
                    List<ShowtopicPagePostInfo> list = IPostService.GetPostList(postpramsInfo, postTableId);
                    if (list != null && list.Count > 0)
                        return list;
                }

                reader = DatabaseProvider.GetInstance().GetPostList(postpramsInfo, postTableId);
            }

            return LoadPostList(postpramsInfo, reader);
        }
开发者ID:Vinna,项目名称:DeepInSummer,代码行数:26,代码来源:Posts.cs


示例9: ParsePostListExtraInfo

        /// <summary>
        /// 解析帖子列表附加信息及内容
        /// </summary>
        /// <param name="postpramsInfo">参数对象</param>
        /// <param name="attachList">附件列表</param>
        /// <param name="isModer">是否为版主</param>
        /// <param name="postList">帖子列表</param>
        public static void ParsePostListExtraInfo(PostpramsInfo postpramsInfo, List<ShowtopicPageAttachmentInfo> attachList, bool isModer, List<ShowtopicPagePostInfo> postList)
        {
            int originalHideStatus = postpramsInfo.Hide;
            // 计算是否允许查看附件
            int allowGetAttach = GetAllowGetAttachValue(postpramsInfo);

            #region 计算辩论帖是否被顶过
            string diggedPidList = string.Empty;
            TopicInfo topicInfo = postpramsInfo.Topicinfo == null ? Topics.GetTopicInfo(postpramsInfo.Tid) : postpramsInfo.Topicinfo;
            if (topicInfo.Special == 4 && UserGroups.GetUserGroupInfo(7).Allowdiggs != 1)
            {
                diggedPidList = Discuz.Data.Debates.GetUesrDiggs(postpramsInfo.Tid, postpramsInfo.CurrentUserid);
            }
            #endregion

            //UserInfo userInfo = Users.GetUserInfo(postpramsInfo.CurrentUserid);
            //postpramsInfo.Usercredits = userInfo == null ? 0 : userInfo.Credits;

            foreach (ShowtopicPagePostInfo postInfo in postList)
            {
                LoadPostMessage(postpramsInfo, attachList, isModer, allowGetAttach, originalHideStatus, postInfo);

                if (topicInfo.Special == 4)
                {
                    if (UserGroups.GetUserGroupInfo(7).Allowdiggs == 1)
                        postInfo.Digged = Debates.IsDigged(postInfo.Pid, postpramsInfo.CurrentUserid);
                    else
                        postInfo.Digged = Utils.InArray(postInfo.Pid.ToString(), diggedPidList); //diggslist.Contains(reader["pid"].ToString());
                }
            }
        }
开发者ID:WySky,项目名称:Memo-Project,代码行数:38,代码来源:Posts.cs


示例10: GetPostInfoWithAttachments

        /// <summary>
        /// 获取ShowtopicPagePostInfo对象与ShowtopicPageAttachmentInfo对象列表
        /// </summary>
        /// <param name="postPramsInfo">参数对象</param>
        /// <param name="attachmentList">输出附件列表</param>
        /// <returns></returns>
        public static ShowtopicPagePostInfo GetPostInfoWithAttachments(PostpramsInfo postPramsInfo, out List<ShowtopicPageAttachmentInfo> attachmentList)
        {
            attachmentList = new List<ShowtopicPageAttachmentInfo>();
            //得到帖子对应主题的所有附件,因为ACCESS不支持存储过程,故此方法在ACCESS版中做了特殊处理
            IDataReader attachmentReader;
            IDataReader reader = DatabaseProvider.GetInstance().GetSinglePost(out attachmentReader, postPramsInfo, PostTables.GetPostTableId(postPramsInfo.Tid));
            //Access版运行此处逻辑
            bool isAccess = false;
            if (attachmentReader == null)
                attachmentReader = reader;
            else
                isAccess = true;

            while (attachmentReader.Read())
                attachmentList.Add(Attachments.LoadSingleAttachmentInfo(attachmentReader));
            //bool next = false;
            //Access版运行此处逻辑
            if (!isAccess)
            {
                reader.NextResult();
            }
            ShowtopicPagePostInfo postInfo = null;
            if (reader.Read())
                postInfo = LoadSingleShowtopicPagePostInfo(reader);

            reader.Close();

            if (!attachmentReader.IsClosed)
                attachmentReader.Close();

            return postInfo;
        }
开发者ID:Vinna,项目名称:DeepInSummer,代码行数:38,代码来源:Posts.cs


示例11: GetLastPostList

		/// <summary>
		/// 获得最后回复的帖子列表
		/// </summary>
		/// <param name="_postpramsinfo">参数列表</param>
		/// <returns>帖子列表</returns>
		public DataTable GetLastPostList(PostpramsInfo _postpramsinfo, string posttablename)
		{
			IDataParameter[] prams = {
									  DbHelper.MakeInParam("@tid",(DbType)SqlDbType.Int,4,_postpramsinfo.Tid),
									  DbHelper.MakeInParam("@postnum",(DbType)SqlDbType.Int,4,_postpramsinfo.Pagesize),
									  DbHelper.MakeInParam("@posttablename",(DbType)SqlDbType.VarChar,20,posttablename)
								  };
			DataTable dt = DbHelper.ExecuteDataset(CommandType.StoredProcedure, string.Format("{0}getlastpostlist", BaseConfigs.GetTablePrefix), prams).Tables[0];

			return dt;
		}
开发者ID:Vinna,项目名称:DeepInSummer,代码行数:16,代码来源:DataProvider.cs


示例12: SaveUserInfo_Click


//.........这里部分代码省略.........
                }
                else
                {
                    base.RegisterStartupScript( "", "<script>alert('用户扩展金币不能为空或大于7位 !');</script>");
                    return;
                }

                if (Utils.IsNumeric(extcredits6.Text.Replace("-", "")))
                {
                    __userinfo.Extcredits6 = float.Parse(extcredits6.Text);
                }
                else
                {
                    base.RegisterStartupScript( "", "<script>alert('用户扩展金币不能为空或大于7位 !');</script>");
                    return;
                }

                if (Utils.IsNumeric(extcredits7.Text.Replace("-", "")))
                {
                    __userinfo.Extcredits7 = float.Parse(extcredits7.Text);
                }
                else
                {
                    base.RegisterStartupScript( "", "<script>alert('用户扩展金币不能为空或大于7位 !');</script>");
                    return;
                }

                if (Utils.IsNumeric(extcredits8.Text.Replace("-", "")))
                {
                    __userinfo.Extcredits8 = float.Parse(extcredits8.Text);
                }
                else
                {
                    base.RegisterStartupScript( "", "<script>alert('用户扩展金币不能为空或大于7位 !');</script>");
                    return;
                }


                //用户扩展信息
                __userinfo.Website = website.Text;
                __userinfo.Icq = icq.Text;
                __userinfo.Qq = qq.Text;
                __userinfo.Yahoo = yahoo.Text;
                __userinfo.Msn = msn.Text;
                __userinfo.Skype = skype.Text;
                __userinfo.Location = location.Text;
                __userinfo.Customstatus = customstatus.Text;
                __userinfo.Avatar = avatar.Text;
                __userinfo.Avatarheight = Convert.ToInt32(avatarheight.Text);
                __userinfo.Avatarwidth = Convert.ToInt32(avatarwidth.Text);
                __userinfo.Bio = bio.Text;
                if (signature.Text.Length > UserGroups.GetUserGroupInfo(__userinfo.Groupid).Maxsigsize)
                {
                    errorInfo = "更新的签名长度超过 " + UserGroups.GetUserGroupInfo(__userinfo.Groupid).Maxsigsize + " 字符的限制,未能更新。";
                }
                else
                {
                    __userinfo.Signature = signature.Text;
                    //签名UBB转换HTML
                    PostpramsInfo _postpramsinfo = new PostpramsInfo();
                    _postpramsinfo.Showimages = UserGroups.GetUserGroupInfo(__userinfo.Groupid).Allowsigimgcode;
                    _postpramsinfo.Sdetail = signature.Text;
                    __userinfo.Sightml = UBB.UBBToHTML(_postpramsinfo);
                }

                __userinfo.Realname = realname.Text;
                __userinfo.Idcard = idcard.Text;
                __userinfo.Mobile = mobile.Text;
                __userinfo.Phone = phone.Text;
                __userinfo.Medals = DNTRequest.GetString("medalid");

                if (IsEditUserName.Checked)
                {
                    AdminUsers.UserNameChange(__userinfo, ViewState["username"].ToString());
                }

                if (AdminUsers.UpdateUserAllInfo(__userinfo))
                {
                    if (userName.Text != ViewState["username"].ToString())
                    {
                        AdminUsers.UserNameChange(__userinfo, ViewState["username"].ToString());
                    }
                    AdminVistLogs.InsertLog(this.userid, this.username, this.usergroupid, this.grouptitle, this.ip, "后台编辑用户", "用户名:" + userName.Text);
                    if (errorInfo == "")
                    {
                        base.RegisterStartupScript("PAGE", "window.location.href='global_usergrid.aspx?condition=" + DNTRequest.GetString("condition") + "';");
                    }
                    else
                    {
                        base.RegisterStartupScript("PAGE", "alert('" + errorInfo + "');window.location.href='global_usergrid.aspx?condition=" + DNTRequest.GetString("condition") + "';");
                    }
                }
                else
                {
                    base.RegisterStartupScript( "", "<script>alert('操作失败');window.location.href='global_usergrid.aspx?condition=" + DNTRequest.GetString("condition") + "';</script>");
                }
            }

            #endregion
        }
开发者ID:ichari,项目名称:ichari,代码行数:101,代码来源:global_edituser.aspx.cs


示例13: GetPagedLastPostList

        /// <summary>
        /// 获得最后回复的帖子列表
        /// </summary>
        /// <param name="_postpramsinfo">参数列表</param>
        /// <returns>帖子列表</returns>
        public DataTable GetPagedLastPostList(PostpramsInfo postParmsInfo, string postTableName)
        {
            DbParameter[] parms = {
                                       DbHelper.MakeInParam("@tid",(DbType)SqlDbType.Int,4,postParmsInfo.Tid),
                                   };
            string where = "";
            if (postParmsInfo.Pageindex > 1)
                where = string.Format(" AND p.[pid] < (SELECT MIN([pid]) FROM (SELECT TOP {0} [{1}].[pid] FROM [{1}] WHERE [{1}].[tid][email protected] AND [{1}].[invisible]<=0 AND [{1}].layer<>0 ORDER BY [{1}].[pid] DESC) AS tblTmp)",
                                        (postParmsInfo.Pageindex - 1) * postParmsInfo.Pagesize,
                                        postTableName,
                                        BaseConfigs.GetTablePrefix);

            string commandText = string.Format("SELECT TOP {0} p.[pid], p.[fid], p.[layer], p.[posterid], p.[title], p.[message], p.[postdatetime], p.[attachment], p.[poster], p.[posterid], p.[invisible], p.[usesig], p.[htmlon], p.[smileyoff], p.[parseurloff], p.[bbcodeoff], p.[rate], p.[ratetimes], u.[username], u.[email], u.[showemail], uf.[avatar], uf.[avatarwidth], uf.[avatarheight], uf.[sightml] AS [signature], uf.[location], uf.[customstatus] FROM [{1}] p LEFT JOIN [{2}users] u ON u.[uid]=p.[posterid] LEFT JOIN [{2}userfields] uf ON uf.[uid]=u.[uid] WHERE p.[tid][email protected] AND p.[invisible]=0 AND p.layer<>0 {3} ORDER BY p.[pid] DESC",
                                                postParmsInfo.Pagesize,
                                                postTableName, BaseConfigs.GetTablePrefix,
                                                where);
            return DbHelper.ExecuteDataset(CommandType.Text, commandText, parms).Tables[0];
        }
开发者ID:simazhao,项目名称:discuz-nt,代码行数:23,代码来源:PostManage.cs


示例14: GetPostList

        /// <summary>
        /// 获取指定条件的帖子DataSet
        /// </summary>
        /// <param name="_postpramsinfo">参数列表</param>
        /// <returns>指定条件的帖子DataSet</returns>
        public static List<ShowtopicPagePostInfo> GetPostList(PostpramsInfo postpramsInfo, out List<ShowtopicPageAttachmentInfo> attachList, bool isModer)
        {
            Discuz.Cache.DNTCache cache = Discuz.Cache.DNTCache.GetCacheService();
            List<ShowtopicPagePostInfo> postList = null;

            MemCachedConfigInfo mcci = MemCachedConfigs.GetConfig();

            //只有在应用memcached的情况下才可以使用主题缓存
            if (mcci != null && mcci.ApplyMemCached && postpramsInfo.Pageindex <= cachedPageNumber)
            {
                postList = cache.RetrieveObject("/Forum/ShowTopic_" + postpramsInfo.Tid + "/Page_" + postpramsInfo.Pageindex) as List<ShowtopicPagePostInfo>;
                postpramsInfo.Pagesize = GeneralConfigs.GetConfig().Ppp;//如果开启时,则不再使用用户自己的帖子分页设置
            }

            attachList = new List<ShowtopicPageAttachmentInfo>();
            if (postList == null || postList.Count == 0)
            {
                postList = Data.Posts.GetPostList(postpramsInfo);
                int adCount = Advertisements.GetInPostAdCount("", postpramsInfo.Fid);

                foreach (ShowtopicPagePostInfo postInfo in postList)
                {
                    LoadExtraPostInfo(postInfo, adCount);
                }

                if (postList.Count == 0)
                    return postList;

                //当存在帖子信息时则缓存相应数据
                if (mcci != null && mcci.ApplyMemCached && postpramsInfo.Pageindex <= cachedPageNumber)
                {
                    Discuz.Cache.ICacheStrategy ics = new ForumCacheStrategy();
                    ics.TimeOut = 60;
                    cache.LoadCacheStrategy(ics);
                    cache.AddObject("/Forum/ShowTopic_" + postpramsInfo.Tid + "/Page_" + postpramsInfo.Pageindex, postList);
                    cache.LoadDefaultCacheStrategy();
                }
            }
            //进行相应帖子信息设置
            string pidList = GetPidListWithAttach(postList);
            attachList = Attachments.GetAttachmentList(postpramsInfo, pidList);
            ParsePostListExtraInfo(postpramsInfo, attachList, isModer, postList);

            return postList;
        }
开发者ID:wenysky,项目名称:dnt31-lite,代码行数:50,代码来源:Posts.cs


示例15: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                int pertask = DNTRequest.GetInt("pertask", 0);
                int lastnumber = DNTRequest.GetInt("lastnumber", 0);
                int startvalue = DNTRequest.GetInt("startvalue", 0);
                int endvalue = DNTRequest.GetInt("endvalue", 0);
                string resultmessage = "";
                switch (Request.Params["opname"])
                {
                    case "UpdatePostSP":
                        AdminForumStats.UpdatePostSP(pertask, ref lastnumber);
                        resultmessage = lastnumber.ToString();
                        break;
                    case "UpdateMyPost":
                        AdminForumStats.UpdateMyPost(pertask, ref lastnumber);
                        resultmessage = lastnumber.ToString();
                        break;
                    case "ReSetFourmTopicAPost":
                        //AdminForumStats.ReSetFourmTopicAPost(pertask, ref lastnumber);
                        AdminForumStats.ReSetFourmTopicAPost();
                        resultmessage = "-1";
                        break;
                    case "ReSetUserDigestPosts":
                        //AdminForumStats.ReSetUserDigestPosts(pertask, ref lastnumber);
                        //resultmessage = lastnumber.ToString();
                        AdminForumStats.ReSetUserDigestPosts();
                        resultmessage = "-1";
                        break;
                    case "ReSetUserPosts":
                        AdminForumStats.ReSetUserPosts(pertask, ref lastnumber);
                        resultmessage = lastnumber.ToString();
                        break;
                    case "ReSetTopicPosts":
                        AdminForumStats.ReSetTopicPosts(pertask, ref lastnumber);
                        resultmessage = lastnumber.ToString();
                        break;
                    case "ReSetFourmTopicAPost_StartEnd":
                        AdminForumStats.ReSetFourmTopicAPost(startvalue, endvalue);
                        resultmessage = "1";
                        break;
                    case "ReSetUserDigestPosts_StartEnd":
                        AdminForumStats.ReSetUserDigestPosts(startvalue, endvalue);
                        resultmessage = "1";
                        break;
                    case "ReSetUserPosts_StartEnd":
                        AdminForumStats.ReSetUserPosts(startvalue, endvalue);
                        resultmessage = "1";
                        break;
                    case "ReSetTopicPosts_StartEnd":
                        AdminForumStats.ResetLastRepliesInfoOfTopics(startvalue, endvalue);
                        resultmessage = "1";
                        break;
                    case "ftptest":
                        FTPs ftps = new FTPs();
                        string message = "";
                        bool ok = ftps.TestConnect(DNTRequest.GetString("serveraddress"), DNTRequest.GetInt("serverport", 0), DNTRequest.GetString("username"),
                            DNTRequest.GetString("password"), DNTRequest.GetInt("timeout", 0), DNTRequest.GetString("uploadpath"), ref message);
                        resultmessage = ok ? "ok" : "Զ�̸������ò��Գ��ִ���\n������" + message;
                        break;
                    case "setapp":
                        APIConfigInfo aci = APIConfigs.GetConfig();
                        aci.Enable = DNTRequest.GetString("allowpassport") == "1";
                        APIConfigs.SaveConfig(aci);
                        resultmessage = "ok";
                        break;
                    case "location":
                        string city = DNTRequest.GetString("city");
                        resultmessage = "ok";
                        DataTable dt = MallPluginProvider.GetInstance().GetLocationsTable();
                        foreach (DataRow dr in dt.Rows)
                        {
                            if (dr["country"].ToString() == DNTRequest.GetString("country") && dr["state"].ToString() == DNTRequest.GetString("state") && dr["city"].ToString() == city)
                            {
                               resultmessage = "<img src='../images/false.gif' title='" + city + "�Ѿ�����!'>";
                                break;
                            }
                        }
                        break;
                    case "goodsinfo":
                        int goodsid = DNTRequest.GetInt("goodsid", 0);
                        Goodsinfo goodsinfo = MallPluginProvider.GetInstance().GetGoodsInfo(goodsid);
                        if (goodsinfo == null)
                        {
                            resultmessage = "��Ʒ������!";
                            break;
                        }
                        //GoodsattachmentinfoCollection attachmentinfos = GoodsAttachments.GetGoodsAttachmentsByGoodsid(goodsinfo.Goodsid);
                        //string img = "";
                        //if (attachmentinfos != null)
                        //{
                        //    img = attachmentinfos[0].Filename;
                        //}
                        PostpramsInfo param = new PostpramsInfo();
                        param.Allowhtml = 1;
                        param.Showimages = 1;
                        param.Sdetail = goodsinfo.Message;
                        resultmessage = "<table width='100%'><tr><td>" + UBB.UBBToHTML(param) + "</td></tr></table>";
                        break;
//.........这里部分代码省略.........
开发者ID:simazhao,项目名称:discuz-nt,代码行数:101,代码来源:global_ajaxcall.aspx.cs


示例16: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                int pertask = DNTRequest.GetInt("pertask", 0);
                int lastnumber = DNTRequest.GetInt("lastnumber", 0);
                int startvalue = DNTRequest.GetInt("startvalue", 0);
                int endvalue = DNTRequest.GetInt("endvalue", 0);
                string resultmessage = "";
                switch (Request.Params["opname"])
                {
                    case "UpdatePostSP":
                        AdminForumStats.UpdatePostSP(pertask, ref lastnumber);
                        resultmessage = lastnumber.ToString();
                        break;
                    case "UpdateMyPost":
                        AdminForumStats.UpdateMyPost(pertask, ref lastnumber);
                        resultmessage = lastnumber.ToString();
                        break;
                    case "ReSetFourmTopicAPost":
                        //AdminForumStats.ReSetFourmTopicAPost(pertask, ref lastnumber);
                        AdminForumStats.ReSetFourmTopicAPost();
                        resultmessage = "-1";
                        break;
                    case "ReSetUserDigestPosts":
                        //AdminForumStats.ReSetUserDigestPosts(pertask, ref lastnumber);
                        //resultmessage = lastnumber.ToString();
                        AdminForumStats.ReSetUserDigestPosts();
                        resultmessage = "-1";
                        break;
                    case "ReSetUserPosts":
                        AdminForumStats.ReSetUserPosts(pertask, ref lastnumber);
                        resultmessage = lastnumber.ToString();
                        break;
                    case "ReSetTopicPosts":
                        AdminForumStats.ReSetTopicPosts(pertask, ref lastnumber);
                        resultmessage = lastnumber.ToString();
                        break;
                    case "ReSetFourmTopicAPost_StartEnd":
                        AdminForumStats.ReSetFourmTopicAPost(startvalue, endvalue);
                        resultmessage = "1";
                        break;
                    case "ReSetUserDigestPosts_StartEnd":
                        AdminForumStats.ReSetUserDigestPosts(startvalue, endvalue);
                        resultmessage = "1";
                        break;
                    case "ReSetUserPosts_StartEnd":
                        AdminForumStats.ReSetUserPosts(startvalue, endvalue);
                        resultmessage = "1";
                        break;
                    case "ReSetTopicPosts_StartEnd":
                        AdminForumStats.ResetLastRepliesInfoOfTopics(startvalue, endvalue);
                        resultmessage = "1";
                        break;
                    case "ftptest":
                        FTPs ftps = new FTPs();
                        string message = "";
                        bool ok = ftps.TestConnect(DNTRequest.GetString("serveraddress"), DNTRequest.GetInt("serverport", 0), DNTRequest.GetString("username"), 
                            DNTRequest.GetString("password"), DNTRequest.GetInt("timeout", 0), DNTRequest.GetString("uploadpath"), ref message);
                        resultmessage = ok ? "ok" : "远程附件设置测试出现错误!\n描述:" + message;
                        break;
                    case "setapp":
                        APIConfigInfo aci = APIConfigs.GetConfig();
                        aci.Enable = DNTRequest.GetString("allowpassport") == "1";
                        APIConfigs.SaveConfig(aci);
                        resultmessage = "ok";
                        break;
                    case "location":
                        string city = DNTRequest.GetString("city");
                        resultmessage = "ok";
                        DataTable dt = MallPluginProvider.GetInstance().GetLocationsTable();
                        foreach (DataRow dr in dt.Rows)
                        {
                            if (dr["country"].ToString() == DNTRequest.GetString("country") && dr["state"].ToString() == DNTRequest.GetString("state") && dr["city"].ToString() == city)
                            {
                               resultmessage = "<img src='../images/false.gif' title 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Entity.TopicInfo类代码示例发布时间:2022-05-24
下一篇:
C# Entity.PostInfo类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap