コード例 #1
0
        private void UpdateUserGroupInf_Click(object sender, EventArgs e)
        {
            #region 更新系统管理组信息

            if (this.CheckCookie())
            {
                userGroupInfo                  = AdminUserGroups.AdminGetUserGroupInfo(DNTRequest.GetInt("groupid", -1));
                userGroupInfo.System           = 0;
                userGroupInfo.Type             = 0;
                userGroupInfo.Readaccess       = Convert.ToInt32(readaccess.Text);
                userGroupInfo.Allowviewstats   = 0;
                userGroupInfo.Allownickname    = 0;
                userGroupInfo.Allowhtml        = 0;
                userGroupInfo.Allowcstatus     = 0;
                userGroupInfo.Allowuseblog     = 0;
                userGroupInfo.Allowinvisible   = 0;
                userGroupInfo.Allowtransfer    = 0;
                userGroupInfo.Allowmultigroups = 0;
                userGroupInfo.Reasonpm         = 0;

                //if (radminid.SelectedValue == "0") //当未选取任何管理模板时
                //{
                //    Discuz.Forum.AdminGroups.DeleteAdminGroupInfo((short)userGroupInfo.Groupid);
                //    userGroupInfo.Radminid = 0;
                //}

                Users.UpdateUserAdminIdByGroupId(userGroupInfo.Radminid, userGroupInfo.Groupid);
                userGroupInfo.Grouptitle         = groupTitle.Text;
                userGroupInfo.Creditshigher      = Convert.ToInt32(creditshigher.Text);
                userGroupInfo.Creditslower       = Convert.ToInt32(creditslower.Text);
                userGroupInfo.Stars              = Convert.ToInt32(stars.Text);
                userGroupInfo.Color              = color.Text;
                userGroupInfo.Groupavatar        = groupavatar.Text;
                userGroupInfo.Maxprice           = Convert.ToInt32(maxprice.Text);
                userGroupInfo.Maxpmnum           = Convert.ToInt32(maxpmnum.Text);
                userGroupInfo.Maxsigsize         = Convert.ToInt32(maxsigsize.Text);
                userGroupInfo.Maxattachsize      = Convert.ToInt32(maxattachsize.Text);
                userGroupInfo.Maxsizeperday      = Convert.ToInt32(maxsizeperday.Text);
                userGroupInfo.Maxspaceattachsize = Convert.ToInt32(maxspaceattachsize.Text);
                userGroupInfo.Maxspacephotosize  = Convert.ToInt32(maxspacephotosize.Text);
                userGroupInfo.Attachextensions   = attachextensions.GetSelectString(",");

                usergrouppowersetting.GetSetting(ref userGroupInfo);

                if (AdminUserGroups.UpdateUserGroupInfo(userGroupInfo))
                {
                    Discuz.Cache.DNTCache.GetCacheService().RemoveObject("/Forum/UserGroupList");
                    Discuz.Cache.DNTCache.GetCacheService().RemoveObject("/Forum/AdminGroupList");
                    AdminVistLogs.InsertLog(this.userid, this.username, this.usergroupid, this.grouptitle, this.ip, "后台更新系统组", "组ID:" + DNTRequest.GetInt("groupid", -1));
                    base.RegisterStartupScript("PAGE", "window.location.href='global_sysadminusergroupgrid.aspx';");
                }
                else
                {
                    base.RegisterStartupScript("", "<script>alert('操作失败');window.location.href='global_sysadminusergroupgrid.aspx';</script>");
                }
            }

            #endregion
        }
コード例 #2
0
 protected void SaveCombinationInfo_Click(object sender, EventArgs e)
 {
     #region 保存相册配置
     config.Enablealbum = int.Parse(EnableAlbum.SelectedValue);
     GeneralConfigs.Serialiaze(config, Server.MapPath("../../config/general.config"));
     if (Utils.IsNumeric(maxalbumcount.Text.ToString()) == true && Utils.IsInt(maxalbumcount.Text.ToString()) == true)
     {
         if (config.Enablealbum == 1)
         {
             AlbumConfigInfo albumconfiginfo = new AlbumConfigInfo();
             albumconfiginfo.MaxAlbumCount = maxalbumcount.Text;
             AlbumConfigs.SaveConfig(albumconfiginfo);
             //保存组照片最大空间
             DataTable dt = DatabaseProvider.GetInstance().GetUserGroupMaxspacephotosize();
             foreach (DataRow dr in dt.Rows)
             {
                 if (!Utils.IsInt(DNTRequest.GetString("maxspacephotosize" + dr["groupid"].ToString()).ToString()))
                 {
                     base.RegisterStartupScript("", "<script>alert('输入错误,相册大小只能是0或者正整数');window.location.href='album_config.aspx';</script>");
                     return;
                 }
                 int photosize = DNTRequest.GetInt("maxspacephotosize" + dr["groupid"].ToString(), 0);
                 Discuz.Entity.UserGroupInfo __usergroupinfo = AdminUserGroups.AdminGetUserGroupInfo(Convert.ToInt32(dr["groupid"].ToString()));
                 __usergroupinfo.Maxspacephotosize = photosize;
                 AdminUserGroups.UpdateUserGroupInfo(__usergroupinfo);
             }
         }
         Discuz.Cache.DNTCache.GetCacheService().RemoveObject("/Forum/UserGroupList");
         Response.Redirect("album_config.aspx");
     }
     else
     {
         base.RegisterStartupScript("", "<script>alert('相册数上限输入错误,请检查');window.location.href='album_config.aspx';</script>");
         return;
     }
     #endregion
 }
コード例 #3
0
        private void UpdateUserGroupInf_Click(object sender, EventArgs e)
        {
            #region 更新管理组信息

            if (this.CheckCookie())
            {
                Hashtable ht = new Hashtable();
                ht.Add("附件最大尺寸", maxattachsize.Text);
                ht.Add("每天最大附件总尺寸", maxsizeperday.Text);
                ht.Add("个人空间附件总尺寸", maxspaceattachsize.Text);
                ht.Add("相册空间总尺寸", maxspacephotosize.Text);

                foreach (DictionaryEntry de in ht)
                {
                    if (!Utils.IsInt(de.Value.ToString()))
                    {
                        base.RegisterStartupScript("", "<script>alert('输入错误," + de.Key.ToString() + "只能是0或者正整数');window.location.href='global_editadminusergroup.aspx';</script>");
                        return;
                    }
                }
                userGroupInfo            = AdminUserGroups.AdminGetUserGroupInfo(DNTRequest.GetInt("groupid", -1));
                userGroupInfo.System     = 0;
                userGroupInfo.Type       = 0;
                userGroupInfo.Readaccess = Convert.ToInt32(readaccess.Text);

                int selectradminid = Convert.ToInt32(radminid.SelectedValue);
                //对于当前用户组中,有管理权限的,则设置管理权限
                if (selectradminid > 0 && selectradminid <= 3)
                {
                    adminGroupInfo          = new AdminGroupInfo();
                    adminGroupInfo.Admingid = (short)userGroupInfo.Groupid;
                    //插入相应的管理组
                    adminGroupInfo.Alloweditpost     = BoolToByte(admingroupright.Items[0].Selected);
                    adminGroupInfo.Alloweditpoll     = BoolToByte(admingroupright.Items[1].Selected);
                    adminGroupInfo.Allowstickthread  = (byte)Convert.ToInt16(allowstickthread.SelectedValue);
                    adminGroupInfo.Allowmodpost      = 0;
                    adminGroupInfo.Allowdelpost      = BoolToByte(admingroupright.Items[2].Selected);
                    adminGroupInfo.Allowmassprune    = BoolToByte(admingroupright.Items[3].Selected);
                    adminGroupInfo.Allowrefund       = 0;
                    adminGroupInfo.Allowcensorword   = 0;;
                    adminGroupInfo.Allowviewip       = BoolToByte(admingroupright.Items[4].Selected);
                    adminGroupInfo.Allowbanip        = 0;
                    adminGroupInfo.Allowedituser     = BoolToByte(admingroupright.Items[5].Selected);
                    adminGroupInfo.Allowmoduser      = 0;
                    adminGroupInfo.Allowbanuser      = 0;
                    adminGroupInfo.Allowpostannounce = 0;
                    adminGroupInfo.Allowviewlog      = BoolToByte(admingroupright.Items[6].Selected);
                    adminGroupInfo.Disablepostctrl   = BoolToByte(admingroupright.Items[7].Selected);
                    adminGroupInfo.Allowviewrealname = BoolToByte(admingroupright.Items[8].Selected);
                    adminGroupInfo.Allowbanuser      = BoolToByte(admingroupright.Items[9].Selected);
                    adminGroupInfo.Allowbanip        = BoolToByte(admingroupright.Items[10].Selected);
                    adminGroupInfo.Allowmodpost      = BoolToByte(admingroupright.Items[11].Selected);
                    adminGroupInfo.Allowpostannounce = BoolToByte(admingroupright.Items[12].Selected);

                    Discuz.Forum.AdminGroups.SetAdminGroupInfo(adminGroupInfo, userGroupInfo.Groupid);
                    userGroupInfo.Radminid = selectradminid;
                }
                else
                {
                    userGroupInfo.Radminid = 0;
                }

                AdminGroups.ChangeUserAdminidByGroupid(userGroupInfo.Radminid, userGroupInfo.Groupid);

                userGroupInfo.Grouptitle         = groupTitle.Text;
                userGroupInfo.Creditshigher      = Convert.ToInt32(creditshigher.Text);
                userGroupInfo.Creditslower       = Convert.ToInt32(creditslower.Text);
                userGroupInfo.Stars              = Convert.ToInt32(stars.Text);
                userGroupInfo.Color              = color.Text;
                userGroupInfo.Groupavatar        = groupavatar.Text;
                userGroupInfo.Maxprice           = Convert.ToInt32(maxprice.Text);
                userGroupInfo.Maxpmnum           = Convert.ToInt32(maxpmnum.Text);
                userGroupInfo.Maxsigsize         = Convert.ToInt32(maxsigsize.Text);
                userGroupInfo.Maxattachsize      = Convert.ToInt32(maxattachsize.Text);
                userGroupInfo.Maxsizeperday      = Convert.ToInt32(maxsizeperday.Text);
                userGroupInfo.Maxspaceattachsize = Convert.ToInt32(maxspaceattachsize.Text);
                userGroupInfo.Maxspacephotosize  = Convert.ToInt32(maxspacephotosize.Text);
                //userGroupInfo.MaxFriendsCount = Convert.ToInt32(maxfriendscount.Text);
                userGroupInfo.Attachextensions = attachextensions.GetSelectString(",");

                usergrouppowersetting.GetSetting(ref userGroupInfo);


                if (AdminUserGroups.UpdateUserGroupInfo(userGroupInfo))
                {
                    #region 是否允许接收举报信息和管理图片评论
                    GeneralConfigInfo configInfo = GeneralConfigs.GetConfig();
                    //是否允许接收举报信息
                    int groupid = userGroupInfo.Groupid;
                    if (admingroupright.Items[13].Selected)
                    {
                        if (("," + configInfo.Reportusergroup + ",").IndexOf("," + groupid + ",") == -1)
                        {
                            if (configInfo.Reportusergroup == "")
                            {
                                configInfo.Reportusergroup = groupid.ToString();
                            }
                            else
                            {
                                configInfo.Reportusergroup += "," + groupid.ToString();
                            }
                        }
                    }
                    else
                    {
                        string tempstr = "";
                        foreach (string report in configInfo.Reportusergroup.Split(','))
                        {
                            if (report != groupid.ToString())
                            {
                                if (tempstr == "")
                                {
                                    tempstr = report;
                                }
                                else
                                {
                                    tempstr += "," + report;
                                }
                            }
                        }
                        configInfo.Reportusergroup = tempstr;
                    }
                    //是否允许管理图片评论
                    if (AlbumPluginProvider.GetInstance() != null)
                    {
                        if (admingroupright.Items[admingroupright.Items.Count - 1].Selected)
                        {
                            if (("," + configInfo.Photomangegroups + ",").IndexOf("," + groupid + ",") == -1)
                            {
                                if (configInfo.Photomangegroups == "")
                                {
                                    configInfo.Photomangegroups = groupid.ToString();
                                }
                                else
                                {
                                    configInfo.Photomangegroups += "," + groupid.ToString();
                                }
                            }
                        }
                        else
                        {
                            string tempstr = "";
                            foreach (string photomangegroup in configInfo.Photomangegroups.Split(','))
                            {
                                if (photomangegroup != groupid.ToString())
                                {
                                    if (tempstr == "")
                                    {
                                        tempstr = photomangegroup;
                                    }
                                    else
                                    {
                                        tempstr += "," + photomangegroup;
                                    }
                                }
                            }
                            configInfo.Photomangegroups = tempstr;
                        }
                    }

                    GeneralConfigs.Serialiaze(configInfo, Server.MapPath("../../config/general.config"));
                    #endregion
                    Discuz.Cache.DNTCache.GetCacheService().RemoveObject("/Forum/UserGroupList");

                    AdminVistLogs.InsertLog(this.userid, this.username, this.usergroupid, this.grouptitle, this.ip, "后台更新管理组", "组名:" + groupTitle.Text);
                    base.RegisterStartupScript("PAGE", "window.location.href='global_adminusergroupgrid.aspx';");
                }
                else
                {
                    base.RegisterStartupScript("", "<script>alert('操作失败');window.location.href='global_adminusergroupgrid.aspx';</script>");
                }
            }

            #endregion
        }
コード例 #4
0
        private void UpdateUserGroupInf_Click(object sender, EventArgs e)
        {
            #region 更新特殊用户组信息

            if (this.CheckCookie())
            {
                __usergroupinfo            = AdminUserGroups.AdminGetUserGroupInfo(DNTRequest.GetInt("groupid", -1));
                __usergroupinfo.System     = 0;
                __usergroupinfo.Type       = 0;
                __usergroupinfo.Readaccess = Convert.ToInt32(readaccess.Text);

                int selectradminid = radminid.SelectedValue == "0" ? -1 : Convert.ToInt32(radminid.SelectedValue);
                __usergroupinfo.Radminid = selectradminid;

                if (selectradminid.ToString() != ViewState["radminid"].ToString())
                {
                    //DbHelper.ExecuteNonQuery("UPDATE [" + BaseConfigs.GetTablePrefix + "users] SET [adminid]=" + __usergroupinfo.Radminid + " WHERE [groupid]=" + __usergroupinfo.Groupid);
                    DatabaseProvider.GetInstance().ChangeUserAdminidByGroupid(__usergroupinfo.Radminid, __usergroupinfo.Groupid);
                }

                //__usergroupinfo.Allowvisit = BoolToInt(usergroupright.Items[0].Selected);
                //__usergroupinfo.Allowpost = BoolToInt(usergroupright.Items[1].Selected);
                //__usergroupinfo.Allowreply = BoolToInt(usergroupright.Items[2].Selected);
                //__usergroupinfo.Allowpostpoll = BoolToInt(usergroupright.Items[3].Selected);
                //__usergroupinfo.Allowdirectpost = 1;
                //__usergroupinfo.Allowgetattach = BoolToInt(usergroupright.Items[4].Selected);
                //__usergroupinfo.Allowpostattach = BoolToInt(usergroupright.Items[5].Selected);
                //__usergroupinfo.Allowvote = BoolToInt(usergroupright.Items[6].Selected);
                //__usergroupinfo.Allowmultigroups = 0;
                //__usergroupinfo.Allowsearch = Convert.ToInt32(allowsearch.SelectedValue);
                //__usergroupinfo.Allowcstatus = 0;
                //__usergroupinfo.Allowuseblog = 0;
                //__usergroupinfo.Allowinvisible = 0;
                //__usergroupinfo.Allowtransfer = 0;
                //__usergroupinfo.Allowsetreadperm = BoolToInt(usergroupright.Items[7].Selected);
                //__usergroupinfo.Allowsetattachperm = BoolToInt(usergroupright.Items[8].Selected);
                //__usergroupinfo.Allowhidecode = BoolToInt(usergroupright.Items[9].Selected);
                //__usergroupinfo.Allowhtml = 0;
                //__usergroupinfo.Allowcusbbcode = BoolToInt(usergroupright.Items[10].Selected);
                //__usergroupinfo.Allownickname = 0;
                //__usergroupinfo.Allowsigbbcode = BoolToInt(usergroupright.Items[11].Selected);
                //__usergroupinfo.Allowsigimgcode = BoolToInt(usergroupright.Items[12].Selected);
                //__usergroupinfo.Allowviewpro = BoolToInt(usergroupright.Items[13].Selected);
                //__usergroupinfo.Allowviewstats = 0;
                //__usergroupinfo.Disableperiodctrl = BoolToInt(usergroupright.Items[14].Selected);
                //__usergroupinfo.Reasonpm = 0;

                //__usergroupinfo.Allowavatar = Convert.ToInt16(allowavatar.SelectedValue);
                __usergroupinfo.Grouptitle = groupTitle.Text;

                __usergroupinfo.Stars            = Convert.ToInt32(stars.Text);
                __usergroupinfo.Color            = color.Text;
                __usergroupinfo.Groupavatar      = groupavatar.Text;
                __usergroupinfo.Maxprice         = Convert.ToInt32(maxprice.Text);
                __usergroupinfo.Maxpmnum         = Convert.ToInt32(maxpmnum.Text);
                __usergroupinfo.Maxsigsize       = Convert.ToInt32(maxsigsize.Text);
                __usergroupinfo.Maxattachsize    = Convert.ToInt32(maxattachsize.Text);
                __usergroupinfo.Maxsizeperday    = Convert.ToInt32(maxsizeperday.Text);
                __usergroupinfo.Attachextensions = attachextensions.GetSelectString(",");

                //GeneralConfigInfo __configinfo = GeneralConfigs.Deserialize(Server.MapPath("../../config/general.config"));
                usergrouppowersetting.GetSetting(ref __usergroupinfo);
                if (AdminUserGroups.UpdateUserGroupInfo(__usergroupinfo))
                {
                    //GeneralConfigs.Serialiaze(__configinfo, Server.MapPath("../../config/general.config"));
                    Discuz.Cache.DNTCache.GetCacheService().RemoveObject("/Forum/UserGroupList");
                    UserGroups.GetUserGroupList();
                    AdminVistLogs.InsertLog(this.userid, this.username, this.usergroupid, this.grouptitle, this.ip, "后台删除特殊用户组", "组ID:" + DNTRequest.GetInt("groupid", -1));
                    base.RegisterStartupScript("PAGE", "window.location.href='global_usergroupspecialgrid.aspx';");
                }
                else
                {
                    if (AdminUserGroups.opresult != "")
                    {
                        base.RegisterStartupScript("", "<script>alert('操作失败,原因:" + AdminUserGroups.opresult + "');window.location.href='global_usergroupspecialgrid.aspx';</script>");
                    }
                    else
                    {
                        base.RegisterStartupScript("", "<script>alert('操作失败');window.location.href='global_usergroupspecialgrid.aspx';</script>");
                    }
                }
            }

            #endregion
        }
コード例 #5
0
        public void Submit_Click(object sender, EventArgs e)
        {
            config.Enablespace = int.Parse(EnableSpace.SelectedValue);
            GeneralConfigs.Serialiaze(config, Server.MapPath("../../config/general.config"));
            if (!Utils.IsInt(Postcount.Text))
            {
                base.RegisterStartupScript("", "<script>alert('论坛发帖数超过输入错误,请检查');window.location.href='space_spaceapplysetting.aspx';</script>");
                return;
            }
            if (!Utils.IsInt(Digestcount.Text))
            {
                base.RegisterStartupScript("", "<script>alert('论坛精华帖数输入错误,请检查');window.location.href='space_spaceapplysetting.aspx';</script>");
                return;
            }
            if (!Utils.IsInt(Score.Text))
            {
                base.RegisterStartupScript("", "<script>alert('论坛用户积分输入错误,请检查');window.location.href='space_spaceapplysetting.aspx';</script>");
                return;
            }


            if (config.Enablespace == 1)
            {
                XmlDocument xmlDoc   = new XmlDocument();
                string      filePath = Server.MapPath("../../config/space.config");
                xmlDoc.Load(filePath);
                XmlNode root = xmlDoc.SelectSingleNode("SpaceActiveConfigInfo");
                XmlNodeInnerTextVisitor rootvisitor = new XmlNodeInnerTextVisitor();
                rootvisitor.SetNode(root);
                rootvisitor["AllowPostcount"]   = allowPostcount.Checked ? "1" : "0";
                rootvisitor["Postcount"]        = Postcount.Text;
                rootvisitor["AllowDigestcount"] = allowDigestcount.Checked ? "1" : "0";
                rootvisitor["Digestcount"]      = Digestcount.Text;
                rootvisitor["AllowScore"]       = allowScore.Checked ? "1" : "0";
                rootvisitor["Score"]            = Score.Text;
                rootvisitor["AllowUsergroups"]  = allowUserGroup.Checked ? "1" : "0";
                string groupList = "";
                for (int i = 0; i < UserGroup.Items.Count; i++)
                {
                    if (UserGroup.Items[i].Selected)
                    {
                        groupList += UserGroup.Items[i].Value + ",";
                    }
                }
                if (groupList == "")
                {
                    rootvisitor["Usergroups"] = "";
                }
                else
                {
                    rootvisitor["Usergroups"] = groupList.Substring(0, groupList.Length - 1);
                }
                rootvisitor["ActiveType"] = ActiveType.SelectedValue;
                xmlDoc.Save(filePath);
                //保存个人空间最大附件空间
                DataTable dt = DatabaseProvider.GetInstance().GetUserGroupMaxspaceattachsize();
                foreach (DataRow dr in dt.Rows)
                {
                    if (!Utils.IsInt(DNTRequest.GetString("maxspaceattachsize" + dr["groupid"].ToString()).ToString()))
                    {
                        base.RegisterStartupScript("", "<script>alert('输入错误,空间附件最大空间只能是0或者正整数');window.location.href='space_spaceapplysetting.aspx';</script>");
                        return;
                    }

                    int attachsize = DNTRequest.GetInt("maxspaceattachsize" + dr["groupid"].ToString(), 0);
                    Discuz.Entity.UserGroupInfo __usergroupinfo = AdminUserGroups.AdminGetUserGroupInfo(Convert.ToInt32(dr["groupid"].ToString()));
                    __usergroupinfo.Maxspaceattachsize = attachsize;
                    AdminUserGroups.UpdateUserGroupInfo(__usergroupinfo);
                }
                Discuz.Cache.DNTCache.GetCacheService().RemoveObject("/Forum/UserGroupList");
            }
            Response.Redirect("space_spaceapplysetting.aspx");
        }
コード例 #6
0
        private void UpdateUserGroupInf_Click(object sender, EventArgs e)
        {
            #region 更新用户组信息

            if (this.CheckCookie())
            {
                Hashtable ht = new Hashtable();
                ht.Add("附件最大尺寸", maxattachsize.Text);
                ht.Add("每天最大附件总尺寸", maxsizeperday.Text);
                ht.Add("个人空间附件总尺寸", maxspaceattachsize.Text);
                ht.Add("相册空间总尺寸", maxspacephotosize.Text);

                foreach (DictionaryEntry de in ht)
                {
                    if (!Utils.IsInt(de.Value.ToString()))
                    {
                        base.RegisterStartupScript("", "<script>alert('输入错误," + de.Key.ToString() + "只能是0或者正整数');window.location.href='global_editusergroup.aspx';</script>");
                        return;
                    }
                }

                if (creditshigher.Enabled == true)
                {
                    if (Convert.ToInt32(creditshigher.Text) < Convert.ToInt32(ViewState["creditshigher"].ToString()) || Convert.ToInt32(creditslower.Text) > Convert.ToInt32(ViewState["creditslower"].ToString()))
                    {
                        base.RegisterStartupScript("", "<script>alert('操作失败, 您所输入的积分上下限范围应在" + ViewState["creditshigher"].ToString() + "至" + ViewState["creditslower"].ToString() + "之间');</script>");
                        return;
                    }
                }

                userGroupInfo            = AdminUserGroups.AdminGetUserGroupInfo(DNTRequest.GetInt("groupid", -1));
                userGroupInfo.System     = 0;
                userGroupInfo.Type       = 0;
                userGroupInfo.Readaccess = Convert.ToInt32(readaccess.Text);
                usergrouppowersetting.GetSetting(ref userGroupInfo);
                userGroupInfo.Grouptitle = groupTitle.Text;

                userGroupInfo.Creditshigher = Convert.ToInt32(creditshigher.Text);
                userGroupInfo.Creditslower  = Convert.ToInt32(creditslower.Text);

                if (userGroupInfo.Creditshigher >= userGroupInfo.Creditslower)
                {
                    base.RegisterStartupScript("", "<script>alert('操作失败, 积分下限必须小于积分上限');</script>");
                    return;
                }
                if (userGroupInfo.Allowbonus == 1 && (userGroupInfo.Minbonusprice >= userGroupInfo.Maxbonusprice))
                {
                    base.RegisterStartupScript("", "<script>alert('操作失败, 最低悬赏价格必须小于最高悬赏价格');</script>");
                    return;
                }

                userGroupInfo.Stars              = Convert.ToInt32(stars.Text);
                userGroupInfo.Color              = color.Text;
                userGroupInfo.Groupavatar        = groupavatar.Text;
                userGroupInfo.Maxprice           = Convert.ToInt32(maxprice.Text);
                userGroupInfo.Maxpmnum           = Convert.ToInt32(maxpmnum.Text);
                userGroupInfo.Maxsigsize         = Convert.ToInt32(maxsigsize.Text);
                userGroupInfo.Maxattachsize      = Convert.ToInt32(maxattachsize.Text);
                userGroupInfo.Maxsizeperday      = Convert.ToInt32(maxsizeperday.Text);
                userGroupInfo.Maxspaceattachsize = Convert.ToInt32(maxspaceattachsize.Text);
                userGroupInfo.Maxspacephotosize  = Convert.ToInt32(maxspacephotosize.Text);
                userGroupInfo.Attachextensions   = attachextensions.GetSelectString(",");
                //userGroupInfo.MaxFriendsCount = Convert.ToInt32(maxfriendscount.Text);

                if (AdminUserGroups.UpdateUserGroupInfo(userGroupInfo))
                {
                    Discuz.Cache.DNTCache.GetCacheService().RemoveObject("/Forum/UserGroupList");
                    Discuz.Forum.UserGroups.GetUserGroupList();
                    AdminVistLogs.InsertLog(this.userid, this.username, this.usergroupid, this.grouptitle, this.ip, "后台更新用户组", "组ID:" + DNTRequest.GetInt("groupid", -1));
                    base.RegisterStartupScript("PAGE", "window.location.href='global_usergroupgrid.aspx';");
                }
                else
                {
                    if (AdminUserGroups.opresult != "")
                    {
                        base.RegisterStartupScript("", "<script>alert('操作失败,原因:" + AdminUserGroups.opresult + "');window.location.href='global_usergroupgrid.aspx';</script>");
                    }
                    else
                    {
                        base.RegisterStartupScript("", "<script>alert('操作失败');window.location.href='global_usergroupgrid.aspx';</script>");
                    }
                }
            }

            #endregion
        }
コード例 #7
0
        private void UpdateUserGroupInf_Click(object sender, EventArgs e)
        {
            #region 更新管理组信息

            if (this.CheckCookie())
            {
                __usergroupinfo            = AdminUserGroups.AdminGetUserGroupInfo(DNTRequest.GetInt("groupid", -1));
                __usergroupinfo.System     = 0;
                __usergroupinfo.Type       = 0;
                __usergroupinfo.Readaccess = Convert.ToInt32(readaccess.Text);

                if (radminid.SelectedValue == "0") //当未选取任何管理模板时
                {
                    AdminGroups.DeleteAdminGroupInfo((short)__usergroupinfo.Groupid);
                    __usergroupinfo.Radminid = 0;
                }
                else //当选取相应的管理模板时
                {
                    int selectradminid = Convert.ToInt32(radminid.SelectedValue);
                    ///对于当前用户组中,有管理权限的,则设置管理权限
                    if (selectradminid > 0 && selectradminid <= 3)
                    {
                        __admingroupinfo          = new AdminGroupInfo();
                        __admingroupinfo.Admingid = (short)__usergroupinfo.Groupid;

                        //插入相应的管理组
                        __admingroupinfo.Alloweditpost     = BoolToByte(admingroupright.Items[0].Selected);
                        __admingroupinfo.Alloweditpoll     = BoolToByte(admingroupright.Items[1].Selected);
                        __admingroupinfo.Allowstickthread  = (byte)Convert.ToInt16(allowstickthread.SelectedValue);
                        __admingroupinfo.Allowmodpost      = 0;
                        __admingroupinfo.Allowdelpost      = BoolToByte(admingroupright.Items[2].Selected);
                        __admingroupinfo.Allowmassprune    = BoolToByte(admingroupright.Items[3].Selected);
                        __admingroupinfo.Allowrefund       = 0;
                        __admingroupinfo.Allowcensorword   = 0;;
                        __admingroupinfo.Allowviewip       = BoolToByte(admingroupright.Items[4].Selected);
                        __admingroupinfo.Allowbanip        = 0;
                        __admingroupinfo.Allowedituser     = BoolToByte(admingroupright.Items[5].Selected);
                        __admingroupinfo.Allowmoduser      = 0;
                        __admingroupinfo.Allowbanuser      = 0;
                        __admingroupinfo.Allowpostannounce = 0;
                        __admingroupinfo.Allowviewlog      = BoolToByte(admingroupright.Items[6].Selected);
                        __admingroupinfo.Disablepostctrl   = BoolToByte(admingroupright.Items[7].Selected);
                        __admingroupinfo.Allowviewrealname = BoolToByte(admingroupright.Items[8].Selected);
                        __admingroupinfo.Allowbanuser      = BoolToByte(admingroupright.Items[9].Selected);
                        __admingroupinfo.Allowbanip        = BoolToByte(admingroupright.Items[10].Selected);

                        //当已有记录时
                        if (DatabaseProvider.GetInstance().GetAdmingid(__usergroupinfo.Groupid).Rows.Count > 0)
                        {
                            //更新相应的管理组
                            AdminGroups.SetAdminGroupInfo(__admingroupinfo);
                        }
                        else
                        { //建立相应的用户组
                            AdminGroups.CreateAdminGroupInfo(__admingroupinfo);
                        }
                        __usergroupinfo.Radminid = selectradminid;
                    }
                    else
                    {
                        __usergroupinfo.Radminid = 0;
                    }
                }

                DatabaseProvider.GetInstance().ChangeUserAdminidByGroupid(__usergroupinfo.Radminid, __usergroupinfo.Groupid);

                __usergroupinfo.Grouptitle       = groupTitle.Text;
                __usergroupinfo.Creditshigher    = Convert.ToInt32(creditshigher.Text);
                __usergroupinfo.Creditslower     = Convert.ToInt32(creditslower.Text);
                __usergroupinfo.Stars            = Convert.ToInt32(stars.Text);
                __usergroupinfo.Color            = color.Text;
                __usergroupinfo.Groupavatar      = groupavatar.Text;
                __usergroupinfo.Maxprice         = Convert.ToInt32(maxprice.Text);
                __usergroupinfo.Maxpmnum         = Convert.ToInt32(maxpmnum.Text);
                __usergroupinfo.Maxsigsize       = Convert.ToInt32(maxsigsize.Text);
                __usergroupinfo.Maxattachsize    = Convert.ToInt32(maxattachsize.Text);
                __usergroupinfo.Maxsizeperday    = Convert.ToInt32(maxsizeperday.Text);
                __usergroupinfo.Attachextensions = attachextensions.GetSelectString(",");

                usergrouppowersetting.GetSetting(ref __usergroupinfo);


                if (AdminUserGroups.UpdateUserGroupInfo(__usergroupinfo))
                {
                    #region 是否允许接收举报信息和管理图片评论
                    GeneralConfigInfo configinfo = GeneralConfigs.Deserialize(Server.MapPath("../../config/general.config"));
                    //是否允许接收举报信息
                    int groupid = __usergroupinfo.Groupid;
                    if (admingroupright.Items[11].Selected)
                    {
                        if (("," + configinfo.Reportusergroup + ",").IndexOf("," + groupid + ",") == -1)
                        {
                            if (configinfo.Reportusergroup == "")
                            {
                                configinfo.Reportusergroup = groupid.ToString();
                            }
                            else
                            {
                                configinfo.Reportusergroup += "," + groupid.ToString();
                            }
                        }
                    }
                    else
                    {
                        string tempstr = "";
                        foreach (string report in configinfo.Reportusergroup.Split(','))
                        {
                            if (report != groupid.ToString())
                            {
                                if (tempstr == "")
                                {
                                    tempstr = report;
                                }
                                else
                                {
                                    tempstr += "," + report;
                                }
                            }
                        }
                        configinfo.Reportusergroup = tempstr;
                    }

                    GeneralConfigs.Serialiaze(configinfo, AppDomain.CurrentDomain.BaseDirectory + "config/general.config");
                    #endregion
                    Discuz.Cache.DNTCache.GetCacheService().RemoveObject("/Forum/UserGroupList");
                    Discuz.Cache.DNTCache.GetCacheService().RemoveObject("/Forum/AdminGroupList");

                    AdminVistLogs.InsertLog(this.userid, this.username, this.usergroupid, this.grouptitle, this.ip, "后台更新管理组", "组名:" + groupTitle.Text);
                    base.RegisterStartupScript("PAGE", "window.location.href='global_adminusergroupgrid.aspx';");
                }
                else
                {
                    base.RegisterStartupScript("", "<script>alert('操作失败');window.location.href='global_adminusergroupgrid.aspx';</script>");
                }
            }

            #endregion
        }
コード例 #8
0
        private void UpdateUserGroupInf_Click(object sender, EventArgs e)
        {
            #region 更新特殊用户组信息

            if (this.CheckCookie())
            {
                Hashtable ht = new Hashtable();
                ht.Add("附件最大尺寸", maxattachsize.Text);
                ht.Add("每天最大附件总尺寸", maxsizeperday.Text);
                ht.Add("个人空间附件总尺寸", maxspaceattachsize.Text);
                ht.Add("相册空间总尺寸", maxspacephotosize.Text);

                foreach (DictionaryEntry de in ht)
                {
                    if (!Utils.IsInt(de.Value.ToString()))
                    {
                        base.RegisterStartupScript("", "<script>alert('输入错误," + de.Key.ToString() + "只能是0或者正整数');window.location.href='global_usergroupspecialgrid.aspx';</script>");
                        return;
                    }
                }


                userGroupInfo            = AdminUserGroups.AdminGetUserGroupInfo(DNTRequest.GetInt("groupid", -1));
                userGroupInfo.System     = 0;
                userGroupInfo.Type       = 0;
                userGroupInfo.Readaccess = Convert.ToInt32(readaccess.Text);

                int selectradminid = radminid.SelectedValue == "0" ? -1 : Convert.ToInt32(radminid.SelectedValue);
                userGroupInfo.Radminid = selectradminid;

                if (selectradminid.ToString() != ViewState["radminid"].ToString())
                {
                    Users.UpdateUserAdminIdByGroupId(userGroupInfo.Radminid, userGroupInfo.Groupid);
                }

                userGroupInfo.Grouptitle         = groupTitle.Text;
                userGroupInfo.Stars              = Convert.ToInt32(stars.Text);
                userGroupInfo.Color              = color.Text;
                userGroupInfo.Groupavatar        = groupavatar.Text;
                userGroupInfo.Maxprice           = Convert.ToInt32(maxprice.Text);
                userGroupInfo.Maxpmnum           = Convert.ToInt32(maxpmnum.Text);
                userGroupInfo.Maxsigsize         = Convert.ToInt32(maxsigsize.Text);
                userGroupInfo.Maxattachsize      = Convert.ToInt32(maxattachsize.Text);
                userGroupInfo.Maxsizeperday      = Convert.ToInt32(maxsizeperday.Text);
                userGroupInfo.Maxspaceattachsize = Convert.ToInt32(maxspaceattachsize.Text);
                userGroupInfo.Maxspacephotosize  = Convert.ToInt32(maxspacephotosize.Text);
                //userGroupInfo.MaxFriendsCount = Convert.ToInt32(maxfriendscount.Text);
                userGroupInfo.Attachextensions = attachextensions.GetSelectString(",");

                usergrouppowersetting.GetSetting(ref userGroupInfo);
                if (AdminUserGroups.UpdateUserGroupInfo(userGroupInfo))
                {
                    Discuz.Cache.DNTCache.GetCacheService().RemoveObject("/Forum/UserGroupList");
                    Discuz.Forum.UserGroups.GetUserGroupList();
                    AdminVistLogs.InsertLog(this.userid, this.username, this.usergroupid, this.grouptitle, this.ip, "后台删除特殊用户组", "组ID:" + DNTRequest.GetInt("groupid", -1));
                    base.RegisterStartupScript("PAGE", "window.location.href='global_usergroupspecialgrid.aspx';");
                }
                else
                {
                    if (AdminUserGroups.opresult != "")
                    {
                        base.RegisterStartupScript("", "<script>alert('操作失败,原因:" + AdminUserGroups.opresult + "');window.location.href='global_usergroupspecialgrid.aspx';</script>");
                    }
                    else
                    {
                        base.RegisterStartupScript("", "<script>alert('操作失败');window.location.href='global_usergroupspecialgrid.aspx';</script>");
                    }
                }
            }

            #endregion
        }
コード例 #9
0
        private void UpdateUserGroupInf_Click(object sender, EventArgs e)
        {
            #region 更新用户组信息

            if (this.CheckCookie())
            {
                if (creditshigher.Enabled == true)
                {
                    if (Convert.ToInt32(creditshigher.Text) < Convert.ToInt32(ViewState["creditshigher"].ToString()) || Convert.ToInt32(creditslower.Text) > Convert.ToInt32(ViewState["creditslower"].ToString()))
                    {
                        base.RegisterStartupScript("", "<script>alert('操作失败, 您所输入的金币上下限范围应在" + ViewState["creditshigher"].ToString() + "至" + ViewState["creditslower"].ToString() + "之间');</script>");
                        return;
                    }
                }

                __usergroupinfo            = AdminUserGroups.AdminGetUserGroupInfo(DNTRequest.GetInt("groupid", -1));
                __usergroupinfo.System     = 0;
                __usergroupinfo.Type       = 0;
                __usergroupinfo.Readaccess = Convert.ToInt32(readaccess.Text);
                usergrouppowersetting.GetSetting(ref __usergroupinfo);
                __usergroupinfo.Grouptitle = groupTitle.Text;

                __usergroupinfo.Creditshigher = Convert.ToInt32(creditshigher.Text);
                __usergroupinfo.Creditslower  = Convert.ToInt32(creditslower.Text);

                if (__usergroupinfo.Creditshigher >= __usergroupinfo.Creditslower)
                {
                    base.RegisterStartupScript("", "<script>alert('操作失败, 金币下限必须小于金币上限');</script>");
                    return;
                }
                if (__usergroupinfo.Allowbonus == 1 && (__usergroupinfo.Minbonusprice >= __usergroupinfo.Maxbonusprice))
                {
                    base.RegisterStartupScript("", "<script>alert('操作失败, 最低悬赏价格必须小于最高悬赏价格');</script>");
                    return;
                }

                __usergroupinfo.Stars            = Convert.ToInt32(stars.Text);
                __usergroupinfo.Color            = color.Text;
                __usergroupinfo.Groupavatar      = groupavatar.Text;
                __usergroupinfo.Maxprice         = Convert.ToInt32(maxprice.Text);
                __usergroupinfo.Maxpmnum         = Convert.ToInt32(maxpmnum.Text);
                __usergroupinfo.Maxsigsize       = Convert.ToInt32(maxsigsize.Text);
                __usergroupinfo.Maxattachsize    = Convert.ToInt32(maxattachsize.Text);
                __usergroupinfo.Maxsizeperday    = Convert.ToInt32(maxsizeperday.Text);
                __usergroupinfo.Attachextensions = attachextensions.GetSelectString(",");

                if (AdminUserGroups.UpdateUserGroupInfo(__usergroupinfo))
                {
                    Discuz.Cache.DNTCache.GetCacheService().RemoveObject("/Forum/UserGroupList");
                    UserGroups.GetUserGroupList();
                    AdminVistLogs.InsertLog(this.userid, this.username, this.usergroupid, this.grouptitle, this.ip, "后台更新用户组", "组ID:" + DNTRequest.GetInt("groupid", -1));
                    base.RegisterStartupScript("PAGE", "window.location.href='global_usergroupgrid.aspx';");
                }
                else
                {
                    if (AdminUserGroups.opresult != "")
                    {
                        base.RegisterStartupScript("", "<script>alert('操作失败,原因:" + AdminUserGroups.opresult + "');window.location.href='global_usergroupgrid.aspx';</script>");
                    }
                    else
                    {
                        base.RegisterStartupScript("", "<script>alert('操作失败');window.location.href='global_usergroupgrid.aspx';</script>");
                    }
                }
            }

            #endregion
        }
コード例 #10
0
        private void UpdateUserGroupInf_Click(object sender, EventArgs e)
        {
            #region 更新系统管理组信息

            if (this.CheckCookie())
            {
                __usergroupinfo            = AdminUserGroups.AdminGetUserGroupInfo(DNTRequest.GetInt("groupid", -1));
                __usergroupinfo.System     = 0;
                __usergroupinfo.Type       = 0;
                __usergroupinfo.Readaccess = Convert.ToInt32(readaccess.Text);

                //__usergroupinfo.Allowvisit = BoolToInt(usergroupright.Items[0].Selected);
                //__usergroupinfo.Allowpost = BoolToInt(usergroupright.Items[1].Selected);
                //__usergroupinfo.Allowreply = BoolToInt(usergroupright.Items[2].Selected);
                //__usergroupinfo.Allowpostpoll = BoolToInt(usergroupright.Items[3].Selected);
                //__usergroupinfo.Allowdirectpost = 1; //BoolToInt(usergroupright.Items[4].Selected);
                //__usergroupinfo.Allowgetattach = BoolToInt(usergroupright.Items[4].Selected);
                //__usergroupinfo.Allowpostattach = BoolToInt(usergroupright.Items[5].Selected);
                //__usergroupinfo.Allowvote = BoolToInt(usergroupright.Items[6].Selected);
                //__usergroupinfo.Allowsetreadperm = BoolToInt(usergroupright.Items[7].Selected);
                //__usergroupinfo.Allowsetattachperm = BoolToInt(usergroupright.Items[8].Selected);

                //if (__usergroupinfo.Groupid != 7)
                //{
                //    __usergroupinfo.Allowhidecode = BoolToInt(usergroupright.Items[9].Selected);
                //    __usergroupinfo.Allowcusbbcode = BoolToInt(usergroupright.Items[10].Selected);
                //    __usergroupinfo.Allowsigbbcode = BoolToInt(usergroupright.Items[11].Selected);
                //    __usergroupinfo.Allowsigimgcode = BoolToInt(usergroupright.Items[12].Selected);
                //    __usergroupinfo.Allowviewpro = BoolToInt(usergroupright.Items[13].Selected);
                //    __usergroupinfo.Disableperiodctrl = BoolToInt(usergroupright.Items[14].Selected);
                //}
                //else
                //{
                //    __usergroupinfo.Allowhidecode = 0;
                //    __usergroupinfo.Allowcusbbcode = BoolToInt(usergroupright.Items[9].Selected);
                //    __usergroupinfo.Allowsigbbcode = BoolToInt(usergroupright.Items[10].Selected);
                //    __usergroupinfo.Allowsigimgcode = BoolToInt(usergroupright.Items[11].Selected);
                //    __usergroupinfo.Allowviewpro = BoolToInt(usergroupright.Items[12].Selected);
                //    __usergroupinfo.Disableperiodctrl = BoolToInt(usergroupright.Items[13].Selected);
                //}
                //__usergroupinfo.Allowsearch = Convert.ToInt32(allowsearch.SelectedValue);


                __usergroupinfo.Allowviewstats   = 0;
                __usergroupinfo.Allownickname    = 0;
                __usergroupinfo.Allowhtml        = 0;
                __usergroupinfo.Allowcstatus     = 0;
                __usergroupinfo.Allowuseblog     = 0;
                __usergroupinfo.Allowinvisible   = 0;
                __usergroupinfo.Allowtransfer    = 0;
                __usergroupinfo.Allowmultigroups = 0;
                __usergroupinfo.Reasonpm         = 0;

                //__usergroupinfo.Allowavatar = Convert.ToInt16(allowavatar.SelectedValue);

                if (radminid.SelectedValue == "0") //当未选取任何管理模板时
                {
                    AdminGroups.DeleteAdminGroupInfo((short)__usergroupinfo.Groupid);
                    __usergroupinfo.Radminid = 0;
                }
                else //当选取相应的管理模板时
                {
                    int selectradminid = Convert.ToInt32(radminid.SelectedValue);
                    ///对于当前用户组中,有管理权限的,则设置管理权限
                    if (selectradminid > 0 && selectradminid <= 3)
                    {
                        __admingroupinfo          = new AdminGroupInfo();
                        __admingroupinfo.Admingid = (short)__usergroupinfo.Groupid;
                        //插入相应的管理组
                        __admingroupinfo.Alloweditpost     = BoolToByte(admingroupright.Items[0].Selected);
                        __admingroupinfo.Alloweditpoll     = BoolToByte(admingroupright.Items[1].Selected);
                        __admingroupinfo.Allowstickthread  = (byte)Convert.ToInt16(allowstickthread.SelectedValue);
                        __admingroupinfo.Allowmodpost      = 0;;
                        __admingroupinfo.Allowdelpost      = BoolToByte(admingroupright.Items[2].Selected);
                        __admingroupinfo.Allowmassprune    = BoolToByte(admingroupright.Items[3].Selected);
                        __admingroupinfo.Allowrefund       = 0;
                        __admingroupinfo.Allowcensorword   = 0;
                        __admingroupinfo.Allowviewip       = BoolToByte(admingroupright.Items[4].Selected);
                        __admingroupinfo.Allowbanip        = 0;
                        __admingroupinfo.Allowedituser     = BoolToByte(admingroupright.Items[5].Selected);
                        __admingroupinfo.Allowmoduser      = 0;
                        __admingroupinfo.Allowbanuser      = 0;
                        __admingroupinfo.Allowpostannounce = 0;
                        __admingroupinfo.Allowviewlog      = BoolToByte(admingroupright.Items[6].Selected);
                        __admingroupinfo.Disablepostctrl   = BoolToByte(admingroupright.Items[7].Selected);

                        //当已有记录时
                        //if (DbHelper.ExecuteDataset("SELECT [admingid]  FROM [" + BaseConfigs.GetTablePrefix + "admingroups] WHERE [admingid]=" + __usergroupinfo.Groupid.ToString()).Tables[0].Rows.Count > 0)
                        if (DatabaseProvider.GetInstance().GetAdmingid(__usergroupinfo.Groupid).Rows.Count > 0)
                        {
                            //更新相应的管理组
                            AdminGroups.SetAdminGroupInfo(__admingroupinfo);
                        }
                        else
                        { //建立相应的用户组
                            AdminGroups.CreateAdminGroupInfo(__admingroupinfo);
                        }
                        __usergroupinfo.Radminid = selectradminid;
                    }
                    else
                    {
                        __usergroupinfo.Radminid = 0;
                    }
                }

                //DbHelper.ExecuteNonQuery("UPDATE [" + BaseConfigs.GetTablePrefix + "users] SET [adminid]=" + __usergroupinfo.Radminid + " WHERE [groupid]=" + __usergroupinfo.Groupid);
                DatabaseProvider.GetInstance().ChangeUserAdminidByGroupid(__usergroupinfo.Radminid, __usergroupinfo.Groupid);
                __usergroupinfo.Grouptitle       = groupTitle.Text;
                __usergroupinfo.Creditshigher    = Convert.ToInt32(creditshigher.Text);
                __usergroupinfo.Creditslower     = Convert.ToInt32(creditslower.Text);
                __usergroupinfo.Stars            = Convert.ToInt32(stars.Text);
                __usergroupinfo.Color            = color.Text;
                __usergroupinfo.Groupavatar      = groupavatar.Text;
                __usergroupinfo.Maxprice         = Convert.ToInt32(maxprice.Text);
                __usergroupinfo.Maxpmnum         = Convert.ToInt32(maxpmnum.Text);
                __usergroupinfo.Maxsigsize       = Convert.ToInt32(maxsigsize.Text);
                __usergroupinfo.Maxattachsize    = Convert.ToInt32(maxattachsize.Text);
                __usergroupinfo.Maxsizeperday    = Convert.ToInt32(maxsizeperday.Text);
                __usergroupinfo.Attachextensions = attachextensions.GetSelectString(",");

                //GeneralConfigInfo __configinfo = GeneralConfigs.Deserialize(Server.MapPath("../../config/general.config"));
                usergrouppowersetting.GetSetting(ref __usergroupinfo);

                if (AdminUserGroups.UpdateUserGroupInfo(__usergroupinfo))
                {
                    //GeneralConfigs.Serialiaze(__configinfo, Server.MapPath("../../config/general.config"));
                    Discuz.Cache.DNTCache.GetCacheService().RemoveObject("/Forum/UserGroupList");
                    Discuz.Cache.DNTCache.GetCacheService().RemoveObject("/Forum/AdminGroupList");
                    AdminVistLogs.InsertLog(this.userid, this.username, this.usergroupid, this.grouptitle, this.ip, "后台更新系统组", "组ID:" + DNTRequest.GetInt("groupid", -1));
                    base.RegisterStartupScript("PAGE", "window.location.href='global_sysadminusergroupgrid.aspx';");
                }
                else
                {
                    base.RegisterStartupScript("", "<script>alert('操作失败');window.location.href='global_sysadminusergroupgrid.aspx';</script>");
                }
            }

            #endregion
        }