public static bool AllowGetAttach(string getattachperm, int usergroupid) { return(Forums.HasPerm(getattachperm, usergroupid)); }
//public static List<IXForum> GetArchiverForumIndexList(int hideprivate, int usergroupid) //{ // //List<ArchiverForumInfo> archiverForumIndexList = BBX.Data.Forums.GetArchiverForumIndexList(); // var forumList = GetForumList(); // var list = new List<IXForum>(); // var list2 = new List<IXForum>(); // var list3 = new List<IXForum>(); // foreach (IXForum item in XForum.FindAllWithCache()) // { // if (item.Visible) // { // //foreach (var current2 in forumList) // //{ // // if (Utils.InArray(current2.Fid.ToString(), item.Parentidlist)) // // { // // int arg_79_0 = current2.Status; // // } // //} // if (item.Layer == 0) // { // if (hideprivate == 0 || item.AllowView(usergroupid)) // { // list.Add(item); // } // } // else // { // if (hideprivate == 0 || item.AllowView(usergroupid)) // { // list2.Add(item); // } // } // } // } // foreach (var item in list) // { // list3.Add(item); // foreach (var elm in list2) // { // if (Utils.InArray(item.Fid.ToString().Trim(), elm.Parentidlist)) // { // list3.Add(elm); // } // } // } // return list3; //} //public static DataTable GetForumList(int fid) //{ // if (fid < 0) return new DataTable(); // //return Forums.GetSubForumListTable(fid); // var f = XForum.FindByID(fid); // if (f == null) return null; // return f.AllChilds.ToDataTable(false); //} //public static DataTable GetSubForumListTable(int fid) //{ // DataTable subForumTable = BBX.Data.Forums.GetSubForumTable(fid); // if (subForumTable != null) // { // int num = 0; // int num2 = 1; // foreach (DataRow dataRow in subForumTable.Rows) // { // if (TypeConverter.ObjectToInt(dataRow["status"]) > 0) // { // if (num2 > 1) // { // dataRow["status"] = ++num; // dataRow["colcount"] = num2; // } // else // { // if (TypeConverter.ObjectToInt(dataRow["subforumcount"]) > 0 && TypeConverter.ObjectToInt(dataRow["colcount"]) > 0) // { // num2 = dataRow["colcount"].ToString().ToInt(0); // num = num2; // dataRow["status"] = num + 1; // } // } // } // } // } // return subForumTable; //} //public static List<ForumInfo> GetSubForumList(int fid) //{ // List<ForumInfo> list = new List<ForumInfo>(); // foreach (ForumInfo current in BBX.Data.GetForumList()) // { // if (current.Parentid == fid && current.Status == 1) // { // list.Add(current); // } // } // return list; //} //public static bool AllowView(string viewperm, int usergroupid) //{ // return Forums.HasPerm(viewperm, usergroupid); //} //public static bool AllowPost(string postperm, int usergroupid) //{ // return Forums.HasPerm(postperm, usergroupid); //} public static bool AllowReply(string replyperm, int usergroupid) { return(Forums.HasPerm(replyperm, usergroupid)); }