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

C# Entity.AdminGroupInfo类代码示例

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

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



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

示例1: ShowPage

        protected override void ShowPage()
        {
            pagetitle = "用户控制面板";

            if (!IsLogin()) return; 
           
            score1 = ((decimal)user.Extcredits1).ToString();
            score2 = ((decimal)user.Extcredits2).ToString();
            score3 = ((decimal)user.Extcredits3).ToString();
            score4 = ((decimal)user.Extcredits4).ToString();
            score5 = ((decimal)user.Extcredits5).ToString();
            score6 = ((decimal)user.Extcredits6).ToString();
            score7 = ((decimal)user.Extcredits7).ToString();
            score8 = ((decimal)user.Extcredits8).ToString();

            if (!IsErr() && useradminid > 0)
                admingroupinfo = AdminGroups.GetAdminGroupInfo(usergroupid);

            StringBuilder sbAttachmentTypeSelect = new StringBuilder();
            if (!Utils.StrIsNullOrEmpty(usergroupinfo.Attachextensions))
                sbAttachmentTypeSelect.AppendFormat("[id] in ({0})", usergroupinfo.Attachextensions);

            usergroupattachtype = Attachments.GetAttachmentTypeString(sbAttachmentTypeSelect.ToString());
            newnoticecount = Notices.GetNewNoticeCountByUid(userid);

            //if (user.Avatar.Trim().ToLower().StartsWith("http://"))
            //{
            //    avatarurl = user.Avatar;
            //    avatartype = 2;
            //    avatarwidth = user.Avatarwidth;
            //    avatarheight = user.Avatarheight;
            //}
            //else if (user.Avatar.ToLower().Trim().StartsWith(@"avatars\common\"))
            //    avatartype = 0;
        }
开发者ID:khaliyo,项目名称:DiscuzNT,代码行数:35,代码来源:usercp.aspx.cs


示例2: CreateAdminGroupInfo

        /// <summary>
        /// 创建一个新的管理组信息
        /// </summary>
        /// <param name="__admingroupsInfo">要添加的管理组信息</param>
        /// <returns>更改记录数</returns>
        public static int CreateAdminGroupInfo(AdminGroupInfo admingroupsInfo)
        {
            Discuz.Cache.DNTCache.GetCacheService().RemoveObject("/Forum/UserGroupList");
            Discuz.Cache.DNTCache.GetCacheService().RemoveObject("/Forum/AdminGroupList");

            return Discuz.Data.AdminGroups.CreateAdminGroupInfo(admingroupsInfo);
        }
开发者ID:wenysky,项目名称:dnt31-lite,代码行数:12,代码来源:AdminGroups.cs


示例3: LoadUserGroupInf

        public void LoadUserGroupInf(int groupid)
        {
            #region 加载相关组信息

            __usergroupinfo = AdminUserGroups.AdminGetUserGroupInfo(groupid);

            groupTitle.Text = Utils.RemoveFontTag(__usergroupinfo.Grouptitle);
            creditshigher.Text = __usergroupinfo.Creditshigher.ToString();
            creditslower.Text = __usergroupinfo.Creditslower.ToString();
            stars.Text = __usergroupinfo.Stars.ToString();
            color.Text = __usergroupinfo.Color;
            groupavatar.Text = __usergroupinfo.Groupavatar;
            readaccess.Text = __usergroupinfo.Readaccess.ToString();
            maxprice.Text = __usergroupinfo.Maxprice.ToString();
            maxpmnum.Text = __usergroupinfo.Maxpmnum.ToString();
            maxsigsize.Text = __usergroupinfo.Maxsigsize.ToString();
            maxattachsize.Text = __usergroupinfo.Maxattachsize.ToString();
            maxsizeperday.Text = __usergroupinfo.Maxsizeperday.ToString();

            if (groupid > 0 && groupid <= 3) radminid.Enabled = false;

            radminid.SelectedValue = __usergroupinfo.Radminid.ToString();

            attachextensions.SetSelectByID(__usergroupinfo.Attachextensions.Trim());

            //设置用户权限组初始化信息
            __admingroupinfo = AdminUserGroups.AdminGetAdminGroupInfo(__usergroupinfo.Groupid);
            usergrouppowersetting.Bind(__usergroupinfo);

            if (__admingroupinfo != null)
            {
                //设置管理权限组初始化信息
                admingroupright.SelectedIndex = -1;
                admingroupright.Items[0].Selected = __admingroupinfo.Alloweditpost == 1;
                admingroupright.Items[1].Selected = __admingroupinfo.Alloweditpoll == 1;
                admingroupright.Items[2].Selected = __admingroupinfo.Allowdelpost == 1;
                admingroupright.Items[3].Selected = __admingroupinfo.Allowmassprune == 1;
                admingroupright.Items[4].Selected = __admingroupinfo.Allowviewip == 1;
                admingroupright.Items[5].Selected = __admingroupinfo.Allowedituser == 1;
                admingroupright.Items[6].Selected = __admingroupinfo.Allowviewlog == 1;
                admingroupright.Items[7].Selected = __admingroupinfo.Disablepostctrl == 1;
                admingroupright.Items[8].Selected = __admingroupinfo.Allowviewrealname == 1;
                admingroupright.Items[9].Selected = __admingroupinfo.Allowbanuser == 1;
                admingroupright.Items[10].Selected = __admingroupinfo.Allowbanip == 1;
                GeneralConfigInfo configinfo = GeneralConfigs.Deserialize(Server.MapPath("../../config/general.config"));
                admingroupright.Items[11].Selected = ("," + configinfo.Reportusergroup + ",").IndexOf("," + groupid + ",") != -1; //是否允许接收举报信息
                admingroupright.Items[12].Selected = ("," + configinfo.Photomangegroups + ",").IndexOf("," + groupid + ",") != -1;//是否允许管理图片评论
                if (__admingroupinfo.Allowstickthread.ToString() != "") allowstickthread.SelectedValue = __admingroupinfo.Allowstickthread.ToString();

            }

            if (radminid.SelectedValue == "1")
            {
                allowstickthread.Enabled = false;
                allowstickthread.SelectedValue = "3";
            }

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


示例4: ShowPage

        protected override void ShowPage()
        {
            pagetitle = "查看用户信息";

            if (usergroupinfo.Allowviewpro != 1)
            {
                AddErrLine(string.Format("您当前的身份 \"{0}\" 没有查看用户资料的权限", usergroupinfo.Grouptitle));
                if (userid < 1)
                    needlogin = true;

                return;
            }

            if (DNTRequest.GetString("username").Trim() == "" && DNTRequest.GetString("userid").Trim() == "")
            {
                AddErrLine("错误的URL链接");
                return;
            }


            int id = DNTRequest.GetInt("userid", -1);
            if (id == -1)
                id = Users.GetUserId(Utils.UrlDecode(DNTRequest.GetString("username")));

            if (id == -1)
            {
                AddErrLine("该用户不存在");
                return;
            }

            user = Users.GetUserInfo(id);
            if (user == null)
            {
                AddErrLine("该用户不存在");
                return;
            }

            //用户设定Email保密时,清空用户的Email属性以避免被显示
            if (user.Showemail != 1 && id != userid)
                user.Email = "";

            //获取积分机制和用户组信息,底层有缓存
            score = Scoresets.GetValidScoreName();
            group = UserGroups.GetUserGroupInfo(user.Groupid);
            admininfo = AdminUserGroups.AdminGetAdminGroupInfo(usergroupid);
            score1 = ((decimal)user.Extcredits1).ToString();
            score2 = ((decimal)user.Extcredits2).ToString();
            score3 = ((decimal)user.Extcredits3).ToString();
            score4 = ((decimal)user.Extcredits4).ToString();
            score5 = ((decimal)user.Extcredits5).ToString();
            score6 = ((decimal)user.Extcredits6).ToString();
            score7 = ((decimal)user.Extcredits7).ToString();
            score8 = ((decimal)user.Extcredits8).ToString();
        }
开发者ID:ZeroneBit,项目名称:dnt3_src,代码行数:54,代码来源:userinfo.aspx.cs


示例5: GetAdminGroupList

 /// <summary>
 /// 获得到指定管理组信息
 /// </summary>
 /// <returns>管理组信息</returns>
 public static AdminGroupInfo[] GetAdminGroupList()
 {
     DataTable dt = DatabaseProvider.GetInstance().GetAdminGroupList();
     AdminGroupInfo[] admingroupArray = new AdminGroupInfo[dt.Rows.Count];
     int Index = 0;
     foreach (DataRow dr in dt.Rows)
     {
         admingroupArray[Index] = LoadAdminGroupInfo(dr);
         Index++;
     }
     dt.Dispose();
     return admingroupArray;
 }
开发者ID:khaliyo,项目名称:DiscuzNT,代码行数:17,代码来源:AdminGroups.cs


示例6: SetAdminGroupInfo

 /// <summary>
 /// 设置管理组信息
 /// </summary>
 /// <param name="__admingroupsInfo">管理组信息</param>
 /// <returns>更改记录数</returns>
 public static int SetAdminGroupInfo(AdminGroupInfo admingroupsInfo, int userGroupId)
 {
     //当已有记录时
     if (AdminGroups.GetAdminGroupInfo(userGroupId) != null)
     {
         //更新相应的管理组
         return Discuz.Data.AdminGroups.SetAdminGroupInfo(admingroupsInfo);
     }
     else
     { //建立相应的用户组
         return CreateAdminGroupInfo(admingroupsInfo);
     }
 }
开发者ID:ZeroneBit,项目名称:dnt3_src,代码行数:18,代码来源:AdminGroups.cs


示例7: ShowPage

		protected override void ShowPage()
		{
			pagetitle = "查看用户信息";
			
			if (usergroupinfo.Allowviewpro != 1)
			{
				AddErrLine(string.Format("您当前的身份 \"{0}\" 没有查看用户资料的权限", usergroupinfo.Grouptitle));
                if (userid < 1)
                    needlogin = true;
				return;
			}

			if (DNTRequest.GetString("username").Trim() == "" && DNTRequest.GetString("userid").Trim() == "")
			{
				AddErrLine("错误的URL链接");
				return;
			}

			int id = DNTRequest.GetInt("userid", -1);
			
			if (id == -1)
			{
				id = Discuz.Forum.Users.GetUserID(Utils.UrlDecode(DNTRequest.GetString("username")));
			}

			if (id == -1)
			{
				AddErrLine("该用户不存在");
				return;
			}

			user = Discuz.Forum.Users.GetUserInfo(id);
			if (user == null)
			{
				AddErrLine("该用户不存在");
				return;
			}

			//用户设定Email保密时,清空用户的Email属性以避免被显示
			if (user.Showemail != 1)
			{
				user.Email = "";
			}
			//获取金币机制和用户组信息,底层有缓存
            score = Scoresets.GetValidScoreName();
			group = UserGroups.GetUserGroupInfo(user.Groupid);
            admininfo = AdminUserGroups.AdminGetAdminGroupInfo(usergroupid);
            
		}
开发者ID:ichari,项目名称:ichari,代码行数:49,代码来源:userinfo.aspx.cs


示例8: GetAdminGroupList

        /// <summary>
        /// 获得到指定管理组信息
        /// </summary>
        /// <returns>管理组信息</returns>
        public static AdminGroupInfo[] GetAdminGroupList()
        {
            Discuz.Cache.DNTCache cache = Discuz.Cache.DNTCache.GetCacheService();
            AdminGroupInfo[] admingroupArray = cache.RetrieveObject("/AdminGroupList") as AdminGroupInfo[];
            if (admingroupArray == null)
            {
                DataTable dt = DatabaseProvider.GetInstance().GetAdminGroupList();
                admingroupArray = new AdminGroupInfo[dt.Rows.Count];
                AdminGroupInfo admingroup;
                int Index = 0;
                foreach (DataRow dr in dt.Rows)
                {
                    admingroup = new AdminGroupInfo();
                    admingroup.Admingid = short.Parse(dr["admingid"].ToString());
                    admingroup.Alloweditpost = byte.Parse(dr["alloweditpost"].ToString());
                    admingroup.Alloweditpoll = byte.Parse(dr["alloweditpoll"].ToString());
                    admingroup.Allowstickthread = byte.Parse(dr["allowstickthread"].ToString());
                    admingroup.Allowmodpost = byte.Parse(dr["allowmodpost"].ToString());
                    admingroup.Allowdelpost = byte.Parse(dr["allowdelpost"].ToString());
                    admingroup.Allowmassprune = byte.Parse(dr["allowmassprune"].ToString());
                    admingroup.Allowrefund = byte.Parse(dr["allowrefund"].ToString());
                    admingroup.Allowcensorword = byte.Parse(dr["allowcensorword"].ToString());
                    admingroup.Allowviewip = byte.Parse(dr["allowviewip"].ToString());
                    admingroup.Allowbanip = byte.Parse(dr["allowbanip"].ToString());
                    admingroup.Allowedituser = byte.Parse(dr["allowedituser"].ToString());
                    admingroup.Allowmoduser = byte.Parse(dr["allowmoduser"].ToString());
                    admingroup.Allowbanuser = byte.Parse(dr["allowbanuser"].ToString());
                    admingroup.Allowpostannounce = byte.Parse(dr["allowpostannounce"].ToString());
                    admingroup.Allowviewlog = byte.Parse(dr["allowviewlog"].ToString());
                    admingroup.Disablepostctrl = byte.Parse(dr["disablepostctrl"].ToString());
                    admingroupArray[Index] = admingroup;
                    Index++;
                }

                cache.AddObject("/AdminGroupList", admingroupArray);

                dt.Dispose();
            }
            return admingroupArray;
        }
开发者ID:ichari,项目名称:ichari,代码行数:44,代码来源:AdminGroups.cs


示例9: LoadAdminGroupInfo

 private static AdminGroupInfo LoadAdminGroupInfo(DataRow dr)
 {
     AdminGroupInfo admingroup = new AdminGroupInfo();
     admingroup.Admingid = short.Parse(dr["admingid"].ToString());
     admingroup.Alloweditpost = byte.Parse(dr["alloweditpost"].ToString());
     admingroup.Alloweditpoll = byte.Parse(dr["alloweditpoll"].ToString());
     admingroup.Allowstickthread = byte.Parse(dr["allowstickthread"].ToString());
     admingroup.Allowmodpost = byte.Parse(dr["allowmodpost"].ToString());
     admingroup.Allowdelpost = byte.Parse(dr["allowdelpost"].ToString());
     admingroup.Allowmassprune = byte.Parse(dr["allowmassprune"].ToString());
     admingroup.Allowrefund = byte.Parse(dr["allowrefund"].ToString());
     admingroup.Allowcensorword = byte.Parse(dr["allowcensorword"].ToString());
     admingroup.Allowviewip = byte.Parse(dr["allowviewip"].ToString());
     admingroup.Allowbanip = byte.Parse(dr["allowbanip"].ToString());
     admingroup.Allowedituser = byte.Parse(dr["allowedituser"].ToString());
     admingroup.Allowmoduser = byte.Parse(dr["allowmoduser"].ToString());
     admingroup.Allowbanuser = byte.Parse(dr["allowbanuser"].ToString());
     admingroup.Allowpostannounce = byte.Parse(dr["allowpostannounce"].ToString());
     admingroup.Allowviewlog = byte.Parse(dr["allowviewlog"].ToString());
     admingroup.Disablepostctrl = byte.Parse(dr["disablepostctrl"].ToString());
     admingroup.Allowviewrealname = byte.Parse(dr["allowviewrealname"].ToString());
     return admingroup;
 }
开发者ID:khaliyo,项目名称:DiscuzNT,代码行数:23,代码来源:AdminGroups.cs


示例10: SetAdminGroupInfo

 /// <summary>
 /// ���ù�������Ϣ
 /// </summary>
 /// <param name="__admingroupsInfo">��������Ϣ</param>
 /// <returns>���ļ�¼��</returns>
 public int SetAdminGroupInfo(AdminGroupInfo admingroupsInfo)
 {
     DbParameter[] parms = {
                                DbHelper.MakeInParam("@admingid",DbType.Int16,2,admingroupsInfo.Admingid),
                                DbHelper.MakeInParam("@alloweditpost",DbType.Byte,1,admingroupsInfo.Alloweditpost),
                                DbHelper.MakeInParam("@alloweditpoll",DbType.Byte,1,admingroupsInfo.Alloweditpoll),
                                DbHelper.MakeInParam("@allowstickthread",DbType.Byte,1,admingroupsInfo.Allowstickthread),
                                DbHelper.MakeInParam("@allowmodpost",DbType.Byte,1,admingroupsInfo.Allowmodpost),
                                DbHelper.MakeInParam("@allowdelpost",DbType.Byte,1,admingroupsInfo.Allowdelpost),
                                DbHelper.MakeInParam("@allowmassprune",DbType.Byte,1,admingroupsInfo.Allowmassprune),
                                DbHelper.MakeInParam("@allowrefund",DbType.Byte,1,admingroupsInfo.Allowrefund),
                                DbHelper.MakeInParam("@allowcensorword",DbType.Byte,1,admingroupsInfo.Allowcensorword),
                                DbHelper.MakeInParam("@allowviewip",DbType.Byte,1,admingroupsInfo.Allowviewip),
                                DbHelper.MakeInParam("@allowbanip",DbType.Byte,1,admingroupsInfo.Allowbanip),
                                DbHelper.MakeInParam("@allowedituser",DbType.Byte,1,admingroupsInfo.Allowedituser),
                                DbHelper.MakeInParam("@allowmoduser",DbType.Byte,1,admingroupsInfo.Allowmoduser),
                                DbHelper.MakeInParam("@allowbanuser",DbType.Byte,1,admingroupsInfo.Allowbanuser),
                                DbHelper.MakeInParam("@allowpostannounce",DbType.Byte,1,admingroupsInfo.Allowpostannounce),
                                DbHelper.MakeInParam("@allowviewlog",DbType.Byte,1,admingroupsInfo.Allowviewlog),
                                DbHelper.MakeInParam("@disablepostctrl",DbType.Byte,1,admingroupsInfo.Disablepostctrl),
                                DbHelper.MakeInParam("@allowviewrealname",DbType.Byte,1,admingroupsInfo.Allowviewrealname)
                            };
     return DbHelper.ExecuteNonQuery(CommandType.StoredProcedure, BaseConfigs.GetTablePrefix + "updateadmingroup", parms);
 }
开发者ID:wenysky,项目名称:sqlite4dnt,代码行数:29,代码来源:UserManage.cs


示例11: DoOperations

        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();
                                    // 收件箱
//.........这里部分代码省略.........
开发者ID:wenysky,项目名称:dnt31-lite,代码行数:101,代码来源:goodsadmin.cs


示例12: NormalValidate

        /// <summary>
        /// 常规项验证
        /// </summary>
        /// <param name="admininfo"></param>
        /// <param name="postmessage"></param>
        private void NormalValidate(AdminGroupInfo admininfo, string postmessage, ShortUserInfo user)
        {
            if (ForumUtils.IsCrossSitePost())
            {
                AddErrLine("您的请求来路不正确,无法提交。如果您安装了某种默认屏蔽来路信息的个人防火墙软件(如 Norton Internet Security),请设置其不要禁止来路信息后再试。");
                return;
            }

            if (forum.Applytopictype == 1 && forum.Postbytopictype == 1 && !Utils.StrIsNullOrEmpty(topictypeselectoptions))
            {
                if (DNTRequest.GetString("typeid").Trim().Equals(""))
                    AddErrLine("主题类型不能为空");
                //检测所选主题分类是否有效
                if (!Forums.IsCurrentForumTopicType(DNTRequest.GetString("typeid").Trim(), forum.Topictypes))
                    AddErrLine("错误的主题类型");
            }
            if (Utils.StrIsNullOrEmpty(DNTRequest.GetString("title")))
                AddErrLine("标题不能为空");
            else if (DNTRequest.GetString("title").IndexOf(" ") != -1)
                AddErrLine("标题不能包含全角空格符");
            else if (DNTRequest.GetString("title").Length > 60)
                AddErrLine("标题最大长度为60个字符,当前为 " + DNTRequest.GetString("title").Length + " 个字符");

            if (Utils.StrIsNullOrEmpty(postmessage.Replace(" ", "")))
                AddErrLine("内容不能为空");

            if (admininfo != null && admininfo.Disablepostctrl != 1)
            {
                if (postmessage.Length < config.Minpostsize)
                    AddErrLine("您发表的内容过少, 系统设置要求帖子内容不得少于 " + config.Minpostsize.ToString() + " 字多于 " + config.Maxpostsize.ToString() + " 字");
                else if (postmessage.Length > config.Maxpostsize)
                    AddErrLine("您发表的内容过多, 系统设置要求帖子内容不得少于 " + config.Minpostsize.ToString() + " 字多于 " + config.Maxpostsize.ToString() + " 字");
            }

            //新用户广告强力屏蔽检查
            if ((config.Disablepostad == 1) && useradminid < 1)  //如果开启新用户广告强力屏蔽检查或是游客
            {
                if ((config.Disablepostadpostcount != 0 && user.Posts <= config.Disablepostadpostcount) ||
                    (config.Disablepostadregminute != 0 && DateTime.Now.AddMinutes(-config.Disablepostadregminute) <= Convert.ToDateTime(user.Joindate)))
                {
                    foreach (string regular in config.Disablepostadregular.Replace("\r", "").Split('\n'))
                    {
                        if (Posts.IsAD(regular, DNTRequest.GetString("title"), postmessage))
                            AddErrLine("发帖失败,内容中似乎有广告信息,请检查标题和内容,如有疑问请与管理员联系");
                    }
                }
            }
        }
开发者ID:ZeroneBit,项目名称:dnt3_src,代码行数:53,代码来源:posttopic.aspx.cs


示例13: ShowPage

        private string condition = ""; //查询条件
       

        protected override void ShowPage()
        {
            if (config.Enablemall == 0) //未启用交易模式
            {
                AddErrLine("系统未开启交易模式, 当前页面暂时无法访问!");
                return;
            }
            else
                goodscategoryfid = Discuz.Mall.GoodsCategories.GetGoodsCategoryWithFid();

            forumnav = "";
            forumallowrss = 0;
            if (categoryid <= 0)
            {
                AddErrLine("无效的商品分类ID");
                return;
            }

            if (config.Enablemall == 2) //开启高级模式
            {
                AddLinkRss("mallgoodslist.aspx?categoryid=" + categoryid, "商品列表");
                AddErrLine("当前页面在开启商城(高级)模式下无法访问, 系统将会重定向到商品列表页面!");
                return;
            }

            goodscategoryinfo = GoodsCategories.GetGoodsCategoryInfoById(categoryid);
            if (goodscategoryinfo != null && goodscategoryinfo.Categoryid > 0)
            {
                forumid = GoodsCategories.GetCategoriesFid(goodscategoryinfo.Categoryid);
            }
            else 
            {
                AddErrLine("无效的商品分类ID");
                return;
            }

            ///得到广告列表
            ///头部
            headerad = Advertisements.GetOneHeaderAd("", forumid);
            footerad = Advertisements.GetOneFooterAd("", forumid);
            pagewordad = Advertisements.GetPageWordAd("", forumid);
            doublead = Advertisements.GetDoubleAd("", forumid);
            floatad = Advertisements.GetFloatAd("", forumid);
            mediaad = Advertisements.GetMediaAd(templatepath, "", forumid);

            disablepostctrl = 0;
            if (userid > 0 && useradminid > 0)
                admingroupinfo = AdminGroups.GetAdminGroupInfo(usergroupid);

            if (admingroupinfo != null)
                this.disablepostctrl = admingroupinfo.Disablepostctrl;

            if (forumid == -1)
            {
                AddLinkRss("tools/rss.aspx", "最新商品");
                AddErrLine("无效的商品分类ID");
                return;
            }
            else
            {
                forum = Forums.GetForumInfo(forumid);
                // 检查是否具有版主的身份
                if (useradminid > 0)
                    ismoder = Moderators.IsModer(useradminid, userid, forumid);

                #region 对搜索条件进行检索

                string orderStr = "goodsid";

                if (DNTRequest.GetString("search").Trim() != "") //进行指定查询
                {
                    //所在城市信息
                    cond = DNTRequest.GetInt("locus_2", -1);                    
                    if (cond < 1)
                        condition = "";
                    else
                    {
                        locus = Locations.GetLocusByLID(cond);
                        condition = "AND [lid] = " + cond;
                    }

                    //排序的字段
                    order = DNTRequest.GetInt("order", -1);
                    switch (order)
                    {
                        case 2:
                            orderStr = "expiration"; //到期日
                            break;
                        case 1:
                            orderStr = "price"; //商品价格
                            break;
                        default:
                            orderStr = "goodsid";
                            break;
                    }

                    if (DNTRequest.GetInt("direct", -1) == 0)
//.........这里部分代码省略.........
开发者ID:wenysky,项目名称:dnt31-lite,代码行数:101,代码来源:showgoodslist.cs


示例14: CheckPostTimeSpan

        public static bool CheckPostTimeSpan(UserGroupInfo userGroupInfo, AdminGroupInfo admininfo, OnlineUserInfo olUserInfo, ShortUserInfo shortUserInfo, ref string msg)
        {
            // 如果当前用户非管理员并且论坛设定了禁止发帖时间段,当前时间如果在其中的一个时间段内,不允许用户发帖
            if (olUserInfo.Adminid != 1 && userGroupInfo.Disableperiodctrl != 1)
            {
                string visittime = "";
                if (Scoresets.BetweenTime(GeneralConfigs.GetConfig().Postbanperiods, out visittime))
                {
                    msg = "在此时间段( " + visittime + " )内用户不可以发帖";
                    return false;
                }
            }

            if (admininfo == null || admininfo.Disablepostctrl != 1)
            {
                int Interval = Utils.StrDateDiffSeconds(olUserInfo.Lastposttime, GeneralConfigs.GetConfig().Postinterval);
                if (Interval < 0)
                {
                    msg = "系统规定发帖间隔为" + GeneralConfigs.GetConfig().Postinterval.ToString() + "秒, 您还需要等待 " + (Interval * -1).ToString() + " 秒";
                    return false;
                }
                else if (olUserInfo.Userid != -1)
                {
                    //ShortUserInfo shortUserInfo = Discuz.Data.Users.GetShortUserInfo(olUserInfo.Userid);
                    string joindate = (shortUserInfo != null) ? shortUserInfo.Joindate : "";
                    if (joindate == "")
                    {
                        msg = "您的用户资料出现错误";
                        return false;
                    }
                    Interval = Utils.StrDateDiffMinutes(joindate, GeneralConfigs.GetConfig().Newbiespan);
                    if (Interval < 0)
                    {
                        msg = "系统规定新注册用户必须要在" + GeneralConfigs.GetConfig().Newbiespan.ToString() + "分钟后才可以发帖, 您还需要等待 " + (Interval * -1).ToString() + " 分钟";
                        return false;
                    }
                }
            }
            return true;
        }
开发者ID:khaliyo,项目名称:DiscuzNT,代码行数:40,代码来源:UserAuthority.cs


示例15: SetPostInfo

        /// <summary>
        /// 验证帖子信息
        /// </summary>
        /// <param name="admininfo"></param>
        /// <param name="user"></param>
        /// <param name="ishtmlon"></param>
        private void SetPostInfo(AdminGroupInfo admininfo, ShortUserInfo user, bool ishtmlon)
        {
            if (postinfo.Layer == 0 && forum.Applytopictype == 1 && forum.Postbytopictype == 1 && topictypeselectoptions != string.Empty)
            {
                if (Utils.StrIsNullOrEmpty(DNTRequest.GetString("typeid")) || DNTRequest.GetString("typeid").Trim() == "0")
                {
                    AddErrLine("主题类型不能为空");
                    return;
                }

                if (!Forums.IsCurrentForumTopicType(DNTRequest.GetString("typeid").Trim(), forum.Topictypes))
                {
                    AddErrLine("错误的主题类型");
                    return;
                }
            }

            //这段代码有什么作用,和下面的SetAttachmentInfo方法做的事情是否有重复?能否拿掉?
            ///删除附件
            if (DNTRequest.GetInt("isdeleteatt", 0) == 1)
            {
                if (DNTRequest.GetFormInt("aid", 0) > 0 && Attachments.DeleteAttachment(DNTRequest.GetFormInt("aid", 0)) > 0)
                {
                    attachmentlist = Attachments.GetAttachmentListByPid(postinfo.Pid);
                    attachmentcount = Attachments.GetAttachmentCountByPid(postinfo.Pid);
                }
                AddLinkCss(BaseConfigs.GetForumPath + "templates/" + templatepath + "/editor.css", "css");
                // 帖子内容
                message = postinfo.Message;
                ispost = false;

                return;
            }
            //
            #region 检查标题和内容信息
            if (string.IsNullOrEmpty(postTitle.Trim().Replace(" ", "")) && postinfo.Layer == 0)
                AddErrLine("标题不能为空");
            else if (postTitle.Length > 60)
                AddErrLine("标题最大长度为60个字符,当前为 " + postTitle.Length.ToString() + " 个字符");

            //string postmessage = DNTRequest.GetString("message");
            if (postMessage.Equals("") || postMessage.Replace(" ", "").Equals(""))
                AddErrLine("内容不能为空");

            if (admininfo != null && disablepostctrl != 1)
            {
                if (postMessage.Length < config.Minpostsize)
                    AddErrLine("您发表的内容过少, 系统设置要求帖子内容不得少于 " + config.Minpostsize.ToString() + " 字多于 " + config.Maxpostsize.ToString() + " 字");
                else if (postMessage.Length > config.Maxpostsize)
                    AddErrLine("您发表的内容过多, 系统设置要求帖子内容不得少于 " + config.Minpostsize.ToString() + " 字多于 " + config.Maxpostsize.ToString() + " 字");
            }

            //新用户广告强力屏蔽检查
            if ((config.Disablepostad == 1) && useradminid < 1)  //如果开启新用户广告强力屏蔽检查或是游客
            {
                if ((config.Disablepostadpostcount != 0 && user.Posts <= config.Disablepostadpostcount) ||
                    (config.Disablepostadregminute != 0 && DateTime.Now.AddMinutes(-config.Disablepostadregminute) <= Convert.ToDateTime(user.Joindate)))
                {
                    foreach (string regular in config.Disablepostadregular.Replace("\r", "").Split('\n'))
                    {
                        if (Posts.IsAD(regular, postTitle, postMessage))
                        {
                            AddErrLine("发帖失败,内容中有不符合新用户强力广告屏蔽规则的字符,请检查标题和内容,如有疑问请与管理员联系");
                            return;
                        }
                    }
                }
            }

            #endregion
            string[] pollitem = Utils.SplitString(DNTRequest.GetString("PollItemname"), "\r\n");
            int topicprice = 0;
            string tmpprice = DNTRequest.GetString("topicprice");

            if (postinfo.Layer == 0)
            {

                #region 投票信息
                //string[] pollitem = Utils.SplitString(DNTRequest.GetString("PollItemname"), "\r\n");

                if (!Utils.StrIsNullOrEmpty(DNTRequest.GetString("updatepoll")) && topic.Special == 1)
                {
                    pollinfo.Multiple = DNTRequest.GetInt("multiple", 0);

                    // 验证用户是否有发布投票的权限
                    if (usergroupinfo.Allowpostpoll != 1)
                    {
                        AddErrLine("您当前的身份 \"" + usergroupinfo.Grouptitle + "\" 没有发布投票的权限");
                        return;
                    }

                    if (pollitem.Length < 2)
                        AddErrLine("投票项不得少于2个");
                    else if (pollitem.Length > config.Maxpolloptions)
//.........这里部分代码省略.........
开发者ID:ChalmerLin,项目名称:dnt_v3.6.711,代码行数:101,代码来源:editpost.aspx.cs


示例16: UpdateUserGroupInf_Click

        private void UpdateUserGroupInf_Click(object sender, EventArgs e)
        {
            #region ���¹�������Ϣ

            if (this.CheckCookie())
            {

                Hashtable ht = new Hashtable();
                ht.Add("�������ߴ�", maxattachsize.Text);
                ht.Add("ÿ���� 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Entity.ForumInfo类代码示例发布时间:2022-05-24
下一篇:
C# Xml.XmlDocumentExtender类代码示例发布时间: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