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

C# Entity.UserGroupInfo类代码示例

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

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



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

示例1: AddUserGroupInfo

		/// <summary>
		/// 添加用户组信息
		/// </summary>
        /// <param name="userGroupInfo"></param>
		/// <returns></returns>
		public static bool AddUserGroupInfo(UserGroupInfo userGroupInfo)
		{
			try
			{
				int Creditshigher = userGroupInfo.Creditshigher;
				int Creditslower = userGroupInfo.Creditslower;
                DataTable dt = Discuz.Data.UserGroups.GetUserGroupByCreditsHigherAndLower(Creditshigher, Creditslower);
                if (dt.Rows.Count > 0)
                    return false;

				if (userGroupInfo.Radminid == 0 && !SystemCheckCredits("add", ref Creditshigher, ref Creditslower, 0))
					return false;

                userGroupInfo.Creditshigher = Creditshigher;
                userGroupInfo.Creditslower = Creditslower;
                Data.UserGroups.CreateUserGroup(userGroupInfo);
                Data.OnlineUsers.AddOnlineList(userGroupInfo.Grouptitle);

                Caches.ReSetAdminGroupList();
                Caches.ReSetUserGroupList();
				return true;
			}
			catch
			{
				return false;
			}
		}
开发者ID:ChalmerLin,项目名称:dnt_v3.6.711,代码行数:32,代码来源:AdminUserGroups.cs


示例2: PostAuthority

     /// <summary>
     /// 发帖权限控制
     /// </summary>
     /// <param name="forum">版块信息</param>
     /// <param name="usergroupinfo">当前用户的用户组信息</param>
     /// <param name="userId">当前用户Id</param>
     /// <returns></returns>
     public static bool PostAuthority(ForumInfo forum, UserGroupInfo userGroupInfo, int userId, ref string msg)
     {
         if (!Forums.AllowPostByUserID(forum.Permuserlist, userId)) //判断当前用户在当前版块发主题权限
         {
             if (string.IsNullOrEmpty(forum.Postperm))//权限设置为空时,根据用户组权限判断
             {
                 // 验证用户是否有发表主题的权限
                 if (userGroupInfo.Allowpost != 1)
                 {
                     msg = "您当前的身份 \"" + userGroupInfo.Grouptitle + "\" 没有发表主题的权限";
                     return false;
                 }
 
             }
             else//权限设置不为空时,根据板块权限判断
             {
                 if (!Forums.AllowPost(forum.Postperm, userGroupInfo.Groupid))
                 {
                     msg = "您没有在该版块发表主题的权限";
                     return false;
                 }
             }
         }
         return true;
     }
开发者ID:ZeroneBit,项目名称:dnt3_src,代码行数:32,代码来源:UserAuthority.cs


示例3: PassFriendship

        /// <summary>
        /// 通过好友的请求信息
        /// </summary>
        /// <param name="fromUid">请求人ID</param>
        /// <param name="toUid">被请求人ID</param>
        /// <param name="toUserGroupInfo">被请求人用户组信息</param>
        /// <param name="groupId">被请求人将请求人划分的好友组,0表示不分组</param>
        /// <returns></returns>
        public static PassFriendshipEnum PassFriendship(int fromUid, int toUid, UserGroupInfo toUserGroupInfo, int groupId)
        {
            if (fromUid <= 0 || toUid <= 0 || fromUid == toUid)
                return PassFriendshipEnum.MessageError;

            FriendshipRequestInfo requestInfo = GetUserFriendRequestInfo(fromUid, toUid);

            if (requestInfo == null || requestInfo.FromUid == 0 || requestInfo.ToUid == 0 || requestInfo.ToUid == requestInfo.FromUid)
                return PassFriendshipEnum.MessageError;

            //如果用户之间已经是好友了
            if (IsFriendshipExist(requestInfo.FromUid, requestInfo.ToUid) == IsFriendshipExistEnum.Exist)
                return PassFriendshipEnum.FriendshipAlreadyExists;

            if (Friendship.GetUserFriendsCount(toUid) >= toUserGroupInfo.MaxFriendsCount)
                return PassFriendshipEnum.ToUserFriendshipOverflow;

            UserGroupInfo fromUserGroupInfo = UserGroups.GetUserGroupInfo(Users.GetShortUserInfo(fromUid).Groupid);

            if (Friendship.GetUserFriendsCount(fromUid) >= fromUserGroupInfo.MaxFriendsCount)
                return PassFriendshipEnum.FromUserFriendshipOverflow;

            if (Data.Friendship.PassFriendship(requestInfo, groupId) == (int)PassFriendshipEnum.Success)
                return PassFriendshipEnum.Success;

            return PassFriendshipEnum.MessageError;
        }
开发者ID:ChalmerLin,项目名称:dnt_v3.6.711,代码行数:35,代码来源:Friendship.cs


示例4: CreateNewFriendshipRequest

        /// <summary>
        /// 创建好友请求信息
        /// </summary>
        /// <param name="friendshipRequestInfo">好友请求信息</param>
        /// <param name="userGroupInfo">当前用户用户组信息</param>
        /// <returns></returns>
        public static CreateNewFriendshipRequestEnum CreateNewFriendshipRequest(FriendshipRequestInfo friendshipRequestInfo, UserGroupInfo userGroupInfo)
        {
            if (friendshipRequestInfo.FromUid <= 0 || friendshipRequestInfo.ToUid <= 0 || friendshipRequestInfo.FromUid == friendshipRequestInfo.ToUid)
                return CreateNewFriendshipRequestEnum.MessageError;
            //如果用户之间已经是好友或者用户之间已经有一方请求的
            IsFriendshipExistEnum existResult = IsFriendshipExist(friendshipRequestInfo.FromUid, friendshipRequestInfo.ToUid);

            if (existResult == IsFriendshipExistEnum.Exist)
                return CreateNewFriendshipRequestEnum.FriendshipAlreadyExists;

            if (existResult == IsFriendshipExistEnum.RequestExist)
                return CreateNewFriendshipRequestEnum.RequestAlreadyExists;

            if (GetUserFriendsCount(friendshipRequestInfo.FromUid) >= userGroupInfo.MaxFriendsCount)
                return CreateNewFriendshipRequestEnum.UserFriendshipOverflow;

            if (Data.Friendship.CreateNewFriendshipRequest(friendshipRequestInfo) == (int)CreateNewFriendshipRequestEnum.Success)
            {
                int olId = OnlineUsers.GetOlidByUid(friendshipRequestInfo.ToUid);

                if (olId > 0)//如果被请求用户在线,则更新其在线状态
                    OnlineUsers.UpdateNewFriendsRequest(olId, 1);

                return CreateNewFriendshipRequestEnum.Success;
            }

            return CreateNewFriendshipRequestEnum.MessageError;
        }
开发者ID:ChalmerLin,项目名称:dnt_v3.6.711,代码行数:34,代码来源:Friendship.cs


示例5: 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


示例6: LoadUserGroupInf

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

            userGroupInfo = AdminUserGroups.AdminGetUserGroupInfo(groupid);

            groupTitle.Text = Utils.RemoveFontTag(userGroupInfo.Grouptitle);

            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();
            maxspaceattachsize.Text = userGroupInfo.Maxspaceattachsize.ToString();
            maxspacephotosize.Text = userGroupInfo.Maxspacephotosize.ToString();
            //maxfriendscount.Text = userGroupInfo.MaxFriendsCount.ToString();

            radminid.SelectedValue = userGroupInfo.Radminid == -1 ? "0" : userGroupInfo.Radminid.ToString();
            ViewState["radminid"] = userGroupInfo.Radminid;

            //DataTable dt = DbHelper.ExecuteDataset("Select id,extension  From [" + BaseConfigs.GetTablePrefix + "attachtypes]  Order By [id] ASC").Tables[0];
            DataTable dt = Attachments.GetAttachmentType();
            attachextensions.SetSelectByID(userGroupInfo.Attachextensions.Trim());

            //设置用户权限组初始化信息
            //if (__usergroupinfo.Allowvisit == 1) usergroupright.Items[0].Selected = true;
            //if (__usergroupinfo.Allowpost == 1) usergroupright.Items[1].Selected = true;
            //if (__usergroupinfo.Allowreply == 1) usergroupright.Items[2].Selected = true;
            //if (__usergroupinfo.Allowpostpoll == 1) usergroupright.Items[3].Selected = true;
            //if (__usergroupinfo.Allowgetattach == 1) usergroupright.Items[4].Selected = true;
            //if (__usergroupinfo.Allowpostattach == 1) usergroupright.Items[5].Selected = true;
            //if (__usergroupinfo.Allowvote == 1) usergroupright.Items[6].Selected = true;
            //if (__usergroupinfo.Allowsetreadperm == 1) usergroupright.Items[7].Selected = true;
            //if (__usergroupinfo.Allowsetattachperm == 1) usergroupright.Items[8].Selected = true;
            //if (__usergroupinfo.Allowhidecode == 1) usergroupright.Items[9].Selected = true;
            //if (__usergroupinfo.Allowcusbbcode == 1) usergroupright.Items[10].Selected = true;
            //if (__usergroupinfo.Allowsigbbcode == 1) usergroupright.Items[11].Selected = true;
            //if (__usergroupinfo.Allowsigimgcode == 1) usergroupright.Items[12].Selected = true;
            //if (__usergroupinfo.Allowviewpro == 1) usergroupright.Items[13].Selected = true;
            //if (__usergroupinfo.Disableperiodctrl == 1) usergroupright.Items[14].Selected = true;

            //if (__usergroupinfo.Allowsearch.ToString() == "0") allowsearch.Items[0].Selected = true;
            //if (__usergroupinfo.Allowsearch.ToString() == "1") allowsearch.Items[1].Selected = true;
            //if (__usergroupinfo.Allowsearch.ToString() == "2") allowsearch.Items[2].Selected = true;

            //if (__usergroupinfo.Allowavatar >= 0) allowavatar.Items[__usergroupinfo.Allowavatar].Selected = true;

            usergrouppowersetting.Bind(userGroupInfo);
            if (userGroupInfo.System == 1) DeleteUserGroupInf.Enabled = false;

            #endregion
        }
开发者ID:Vinna,项目名称:DeepInSummer,代码行数:56,代码来源:global_editusergroupspecial.aspx.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 = 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


示例8: PostAuthority

        /// <summary>
        /// 发帖权限控制
        /// </summary>
        /// <param name="forum">版块信息</param>
        /// <param name="usergroupinfo">当前用户的用户组信息</param>
        /// <param name="userId">当前用户Id</param>
        /// <returns></returns>
        public static bool PostAuthority(ForumInfo forum, UserGroupInfo userGroupInfo, int userId, ref string msg)
        {
            if (!Forums.AllowPostByUserID(forum.Permuserlist, userId)) //判断当前用户在当前版块发主题权限
            {
                if (string.IsNullOrEmpty(forum.Postperm))//权限设置为空时,根据用户组权限判断
                {
                    // 验证用户是否有发表主题的权限
                    if (userGroupInfo.Allowpost != 1)
                    {
                        msg = "您当前的身份 \"" + userGroupInfo.Grouptitle + "\" 没有发表主题的权限";
                        return false;
                    }

                }
                else//权限设置不为空时,根据板块权限判断
                {
                    if (!Forums.AllowPost(forum.Postperm, userGroupInfo.Groupid))
                    {
                        msg = "您没有在该版块发表主题的权限";
                        return false;
                    }
                }
            }
            //当用户拥有发帖权限但版块只允许发布特殊主题时,需要判断用户是否能发布特殊主题
            if (forum.Allowspecialonly > 0)
            {
                //当版块设置了只允许特殊主题,但又没有开启任何特殊主题类型,则相当于关闭了版块的发主题功能
                if (forum.Allowpostspecial <= 0)
                {
                    msg = "您没有在该版块发表特殊主题的权限";
                    return false;
                }

                if ((forum.Allowpostspecial & 1) == 1 && userGroupInfo.Allowpostpoll != 1)
                    msg = "您当前的身份 \"" + userGroupInfo.Grouptitle + "\" 没有发布投票的权限";
                else
                    return true;

                if ((forum.Allowpostspecial & 4) == 4 && userGroupInfo.Allowbonus != 1)
                    msg = "您当前的身份 \"" + userGroupInfo.Grouptitle + "\" 没有发布悬赏的权限";
                else
                    return true;

                if ((forum.Allowpostspecial & 16) == 16 && userGroupInfo.Allowdebate != 1)
                    msg = "您当前的身份 \"" + userGroupInfo.Grouptitle + "\" 没有发起辩论的权限";
                else
                    return true;

                return false;
            }
            return true;
        }
开发者ID:khaliyo,项目名称:DiscuzNT,代码行数:59,代码来源:UserAuthority.cs


示例9: 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


示例10: Bind

        public void Bind(UserGroupInfo usergroupinfo)
        {
            if (usergroupinfo.Allowsearch.ToString() == "0") allowsearch.Items[0].Selected = true;
            if (usergroupinfo.Allowsearch.ToString() == "1") allowsearch.Items[1].Selected = true;
            if (usergroupinfo.Allowsearch.ToString() == "2") allowsearch.Items[2].Selected = true;

            //if (usergroupinfo.Allowavatar >= 0) allowavatar.Items[usergroupinfo.Allowavatar].Selected = true;
            reasonpm.Items[usergroupinfo.Reasonpm].Selected = true;

            if (usergroupinfo.Allowvisit == 1) usergroupright.Items[0].Selected = true; //是否允许访问论坛
            if (usergroupinfo.Allowpost == 1) usergroupright.Items[1].Selected = true; //是否允许发帖
            if (usergroupinfo.Allowreply == 1) usergroupright.Items[2].Selected = true; //是否允许回复
            if (usergroupinfo.Allowpostpoll == 1) usergroupright.Items[3].Selected = true; //是否允许发起投票
            if (usergroupinfo.Allowvote == 1) usergroupright.Items[4].Selected = true; //是否允许参与投票
            if (usergroupinfo.Allowpostattach == 1) usergroupright.Items[5].Selected = true; //是否发布附件
            if (usergroupinfo.Allowgetattach == 1) usergroupright.Items[6].Selected = true; //是否允许下载附件
            if (usergroupinfo.Allowsetreadperm == 1) usergroupright.Items[7].Selected = true; //是否允许设置主题阅读积分权限
            if (usergroupinfo.Allowsetattachperm == 1) usergroupright.Items[8].Selected = true; //是否允许设置附件阅读积分限制
            if (usergroupinfo.Allowhidecode == 1) usergroupright.Items[9].Selected = true; //是否允许使用hide代码
            if (usergroupinfo.Allowcusbbcode == 1) usergroupright.Items[10].Selected = true; //是否允许使用Discuz!NT代码
            if (usergroupinfo.Allowsigbbcode == 1) usergroupright.Items[11].Selected = true; //签名是否支持Discuz!NT代码
            if (usergroupinfo.Allowsigimgcode == 1) usergroupright.Items[12].Selected = true; //签名是否支持图片代码
            if (usergroupinfo.Allowviewpro == 1) usergroupright.Items[13].Selected = true; //是否允许查看用户资料
            if (usergroupinfo.Disableperiodctrl == 1) usergroupright.Items[14].Selected = true; //是否不受时间段限制
            if (usergroupinfo.Allowdebate == 1) usergroupright.Items[15].Selected = true; //是否允许辩论
            if (usergroupinfo.Allowbonus == 1) usergroupright.Items[16].Selected = true; //是否允许悬赏
            if (usergroupinfo.Allowviewstats == 1) usergroupright.Items[17].Selected = true; //是否允许查看统计数据
            if (usergroupinfo.Allowdiggs == 1) usergroupright.Items[18].Selected = true; //是否允许辩论支持
            if (usergroupinfo.Allowhtmltitle == 1) usergroupright.Items[19].Selected = true;//是否允许html标题
            if (usergroupinfo.Allowhtml == 1) usergroupright.Items[20].Selected = true; //是否允许html
            if (usergroupinfo.ModNewTopics == 1) usergroupright.Items[21].Selected = true;//发主题是否需要审核
            if (usergroupinfo.ModNewPosts == 1) usergroupright.Items[22].Selected = true;//发回复是否需要审核
            if (usergroupinfo.Ignoreseccode == 1) usergroupright.Items[23].Selected = true;//是否允许忽略检测验证码
            if (MallPluginProvider.GetInstance() != null && usergroupinfo.Allowtrade == 1) usergroupright.Items[usergroupright.Items.Count - 1].Selected = true; //是否允许交易

            string strScript = "<script type='text/javascript'>\r\nfunction insertBonusPrice()\r\n{\r\n\t";
            strScript += "\r\n\tvar tdelement = document.getElementById('" + usergroupright.ClientID + "_16').parentNode;";
            strScript += "\r\n\ttdelement.innerHTML += '&nbsp;最低悬赏价格:<input type=\"text\" name=\"minbonusprice\" id=\"minbonusprice\" class=\"FormBase\" onblur=\"this.className=\\'FormBase\\';\" onfocus=\"this.className=\\'FormFocus\\';\" size=\"4\" maxlength=\"5\" value=\"" + usergroupinfo.Minbonusprice + "\"" + (usergroupinfo.Allowbonus == 0 ? " disabled=\"disabled \"" : "") + " />'";
            strScript += "\r\n\ttdelement.innerHTML += '&nbsp;最高悬赏价格:<input type=\"text\" name=\"maxbonusprice\" id=\"maxbonusprice\" class=\"FormBase\" onblur=\"this.className=\\'FormBase\\';\" onfocus=\"this.className=\\'FormFocus\\';\" size=\"4\" maxlength=\"5\" value=\"" + usergroupinfo.Maxbonusprice + "\"" + (usergroupinfo.Allowbonus == 0 ? " disabled=\"disabled \"" : "") + " />'";
            strScript += "\r\n}\r\ninsertBonusPrice();\r\n</script>\r\n";
            outscript.Text = strScript;
            usergroupright.Items[16].Attributes.Add("onclick", "bonusPriceSet(this.checked)");
        }
开发者ID:Vinna,项目名称:DeepInSummer,代码行数:43,代码来源:usergrouppowersetting.ascx.cs


示例11: 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();

            DataTable dt = UserGroups.GetUserGroupExceptGroupid(groupid);
            if (dt.Rows.Count == 0)
            {
                creditshigher.Enabled = false;
                creditslower.Enabled = false;
            }

            ViewState["creditshigher"] = userGroupInfo.Creditshigher.ToString();
            ViewState["creditslower"] = 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();
            maxspaceattachsize.Text = userGroupInfo.Maxspaceattachsize.ToString();
            maxspacephotosize.Text = userGroupInfo.Maxspacephotosize.ToString();
            //maxfriendscount.Text = userGroupInfo.MaxFriendsCount.ToString();


            dt = Attachments.GetAttachmentType();
            attachextensions.SetSelectByID(userGroupInfo.Attachextensions.Trim());
            //绑定权限信息
            usergrouppowersetting.Bind(userGroupInfo);

            if (userGroupInfo.System == 1) DeleteUserGroupInf.Enabled = false;

            #endregion
        }
开发者ID:Vinna,项目名称:DeepInSummer,代码行数:43,代码来源:global_editusergroup.aspx.cs


示例12: BindAttachment

        /// <summary>
        /// 绑定附件数组中的参数,返回新上传的附件个数
        /// </summary>
        /// <param name="attachmentInfo">提交的附件列表</param>
        /// <param name="topicId">当前主题id</param>
        /// <param name="postId">当前帖子id</param>
        /// <param name="userId">当前用户id</param>
        /// <param name="userGroupInfo">当前用户用户组</param>
        /// <returns></returns>
        public static int BindAttachment(AttachmentInfo[] attachmentInfo, int topicId, int postId, int userId, UserGroupInfo userGroupInfo)
        {
            //附件阅读权限
            //string[] readperm = String.IsNullOrEmpty(DNTRequest.GetString("readperm")) ? null : DNTRequest.GetString("readperm").Split(',');
            //string[] attachdesc = DNTRequest.GetString("attachdesc") == null ? null : DNTRequest.GetString("attachdesc").Split(',');
            //string[] localid = DNTRequest.GetString("localid") == null ? null : DNTRequest.GetString("localid").Split(',');
            ////附件价格
            //string[] attachprice = DNTRequest.GetString("attachprice") == null ? null : DNTRequest.GetString("attachprice").Split(',');

            int newAttachCount = 0;
            int i_readperm = 0;

            for (int i = 0; i < attachmentInfo.Length; i++)
            {
                if (attachmentInfo[i] == null)
                    continue;

                if (attachmentInfo[i].Pid == 0)//如果附件pid=0,就代表它是新上传的附件
                    newAttachCount++;
                string aid = attachmentInfo[i].Aid.ToString();
                attachmentInfo[i].Uid = userId;
                attachmentInfo[i].Tid = topicId;
                attachmentInfo[i].Pid = postId;
                attachmentInfo[i].Postdatetime = Utils.GetDateTime();
                attachmentInfo[i].Readperm = 0;
                //attachmentInfo[i].Attachprice = attachprice != null ? UserGroups.CheckUserGroupMaxPrice(userGroupInfo, Utils.StrToInt(attachprice[i], 0)) : 0;
                int attachprice = Utils.StrToInt(DNTRequest.GetString("attachprice_" + aid),0);
                attachmentInfo[i].Attachprice = attachprice == 0 ? 0 : UserGroups.CheckUserGroupMaxPrice(userGroupInfo, attachprice);
                int readperm = Utils.StrToInt(DNTRequest.GetString("readperm_" + aid), 0);
                if (readperm != 0)
                {
                    i_readperm = readperm;
                    //当为最大阅读仅限(255)时
                    i_readperm = i_readperm > 255 ? 255 : i_readperm;
                    attachmentInfo[i].Readperm = i_readperm;
                }
                //if (attachdesc != null && !attachdesc[i].Equals(""))
                    attachmentInfo[i].Description = Utils.HtmlEncode(DNTRequest.GetString("attachdesc_" + aid));
            }
            return newAttachCount;
        }
开发者ID:simazhao,项目名称:discuz-nt,代码行数:50,代码来源:Attachments.cs


示例13: 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();

            DataTable dt = DatabaseProvider.GetInstance().GetUserGroupExceptGroupid(groupid);
            if (dt.Rows.Count == 0)
            {
                creditshigher.Enabled = false;
                creditslower.Enabled = false;
            }

            ViewState["creditshigher"] = __usergroupinfo.Creditshigher.ToString();
            ViewState["creditslower"] = __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();

            dt = DatabaseProvider.GetInstance().GetAttchType().Tables[0];
            attachextensions.SetSelectByID(__usergroupinfo.Attachextensions.Trim());
            //绑定权限信息
            usergrouppowersetting.Bind(__usergroupinfo);

            if (__usergroupinfo.System == 1) DeleteUserGroupInf.Enabled = false;

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


示例14: GetSetting

        public void GetSetting(ref UserGroupInfo usergroupinfo)
        {
            usergroupinfo.Allowsearch = Convert.ToInt32(allowsearch.SelectedValue);
            usergroupinfo.Allowavatar = Convert.ToInt32(allowavatar.SelectedValue);
            usergroupinfo.Reasonpm = Convert.ToInt32(reasonpm.SelectedValue);

            usergroupinfo.Allowvisit = usergroupright.Items[0].Selected ? 1 : 0; //是否允许访问论坛
            usergroupinfo.Allowpost = usergroupright.Items[1].Selected ? 1 : 0; //是否允许发帖
            usergroupinfo.Allowreply = usergroupright.Items[2].Selected ? 1 : 0; //是否允许回复
            usergroupinfo.Allowpostpoll = usergroupright.Items[3].Selected ? 1 : 0; //是否允许发起投票
            usergroupinfo.Allowvote = usergroupright.Items[4].Selected ? 1 : 0; //是否允许参与投票
            usergroupinfo.Allowpostattach = usergroupright.Items[5].Selected ? 1 : 0; //是否发布附件
            usergroupinfo.Allowgetattach = usergroupright.Items[6].Selected ? 1 : 0; //是否允许下载附件
            usergroupinfo.Allowsetreadperm = usergroupright.Items[7].Selected ? 1 : 0; //是否允许设置主题阅读金币权限
            usergroupinfo.Allowsetattachperm = usergroupright.Items[8].Selected ? 1 : 0; //是否允许设置附件阅读金币限制
            usergroupinfo.Allowhidecode = usergroupright.Items[9].Selected ? 1 : 0; //是否允许使用hide代码
            usergroupinfo.Allowcusbbcode = usergroupright.Items[10].Selected ? 1 : 0; //是否允许使用Discuz!NT代码
            usergroupinfo.Allowsigbbcode = usergroupright.Items[11].Selected ? 1 : 0; //签名是否支持Discuz!NT代码
            usergroupinfo.Allowsigimgcode = usergroupright.Items[12].Selected ? 1 : 0; //签名是否支持图片代码
            usergroupinfo.Allowviewpro = usergroupright.Items[13].Selected ? 1 : 0; //是否允许查看用户资料
            usergroupinfo.Disableperiodctrl = usergroupright.Items[14].Selected ? 1 : 0; //是否不受时间段限制

            usergroupinfo.Allowdebate = usergroupright.Items[15].Selected ? 1 : 0; //是否允许辩论
            usergroupinfo.Allowbonus = usergroupright.Items[16].Selected ? 1 : 0; //是否允许悬赏
            //如果勾选允许悬赏
            if (usergroupright.Items[16].Selected)
            {
                usergroupinfo.Minbonusprice = DNTRequest.GetInt("minbonusprice", 0);
                usergroupinfo.Maxbonusprice = DNTRequest.GetInt("maxbonusprice", 0);
            }
            else
            {
                usergroupinfo.Minbonusprice = 0;
                usergroupinfo.Maxbonusprice = 0;
            }
            usergroupinfo.Allowviewstats = usergroupright.Items[17].Selected ? 1 : 0; //是否允许查看统计数据
            usergroupinfo.Allowdiggs = usergroupright.Items[18].Selected ? 1 : 0;   //是否允许辩论支持
        }
开发者ID:ichari,项目名称:ichari,代码行数:38,代码来源:usergrouppowersetting.ascx.cs


示例15: VisitAuthority

 /// <summary>
 /// 访问权限控制
 /// </summary>
 /// <param name="forum">访问的版块信息</param>
 /// <param name="usergroupinfo">当前用户的用户组信息</param>
 /// <param name="userId">当前用户Id</param>
 /// <returns></returns>
 public static bool VisitAuthority(ForumInfo forum, UserGroupInfo userGroupInfo, int userId, ref string msg)
 {
     if (!Forums.AllowViewByUserId(forum.Permuserlist, userId)) //判断当前用户在当前版块浏览权限
     {
         if (string.IsNullOrEmpty(forum.Viewperm))//当板块权限为空时,按照用户组权限
         {
             if (userGroupInfo.Allowvisit != 1)
             {
                 msg = "您当前的身份 \"" + userGroupInfo.Grouptitle + "\" 没有浏览该版块的权限";
                 return false;
             }
         }
         else//当板块权限不为空,按照板块权限
         {
             if (!Forums.AllowView(forum.Viewperm, userGroupInfo.Groupid))
             {
                 msg = "您没有浏览该版块的权限";
                 return false;
             }
         }
     }
     return true;
 }
开发者ID:khaliyo,项目名称:DiscuzNT,代码行数:30,代码来源:UserAuthority.cs


示例16: 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();
            maxspaceattachsize.Text = userGroupInfo.Maxspaceattachsize.ToString();
            maxspacephotosize.Text = userGroupInfo.Maxspacephotosize.ToString();

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

            if (groupid > 0 && groupid <= 3) radminid.Enabled = false;
            radminid.SelectedValue = userGroupInfo.Radminid.ToString();

            usergrouppowersetting.Bind(userGroupInfo);

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

            #endregion
        }
开发者ID:ChalmerLin,项目名称:dnt_v3.6.711,代码行数:36,代码来源:global_editsysadminusergroup.aspx.cs


示例17: GetPostMessage

 public static string GetPostMessage(UserGroupInfo usergroupinfo, AdminGroupInfo adminGroupInfo, string postmessage, bool ishtmlon)
 {
     string message;
     if (adminGroupInfo != null && adminGroupInfo.Admingid == 1)
     {
         if (usergroupinfo.Allowhtml == 0)
             message = Utils.HtmlEncode(postmessage);
         else
             message = ishtmlon ? postmessage : Utils.HtmlEncode(postmessage);
     }
     else
     {
         if (usergroupinfo.Allowhtml == 0)
             message = Utils.HtmlEncode(ForumUtils.BanWordFilter(postmessage));
         else
             message = ishtmlon ? ForumUtils.BanWordFilter(postmessage) : Utils.HtmlEncode(ForumUtils.BanWordFilter(postmessage));
     }
     return message;
 }
开发者ID:WySky,项目名称:Memo-Project,代码行数:19,代码来源:Posts.cs


示例18: UpdateUserGroupInf_Click

        private void UpdateUserGroupInf_Click(object sender, EventArgs e)
        {
        

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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