<commit_before>/* Yet Another Forum.NET
 * Copyright (C) 2006-2008 <NAME>
 * http://www.yetanotherforum.net/
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
using System;
using System.Collections.Generic;
using YAF.Classes.Utils;

namespace YAF.Controls
{
	/// <summary>
	/// Summary description for AdminMenu.
	/// </summary>
	public class AdminMenu : BaseControl
	{
		public AdminMenu()
		{

		}
	
		protected override void Render(System.Web.UI.HtmlTextWriter writer) 
		{	
			writer.WriteLine(@"<table width=""100%"" cellspacing=""0"" cellpadding=""0""><tr>");
			writer.WriteLine(@"<td width=""10%"" valign=""top"">");

			writer.WriteLine(@"<table class=""content"" width=""100%"" cellspacing=""0"" cellpadding=""0""><tr><td class=""post"" valign=""top"">");
			writer.WriteLine(@"<table width=""100%"" cellspacing=""0"" cellpadding=""0"">");
			
			if (PageContext.IsHostAdmin) 
			{
				// host admin -- create host admin menu...
				string [,] hostAdminLinks =
				{
					{"Host Settings",YafBuildLink.GetLink( ForumPages.admin_hostsettings)},
					{"Boards",YafBuildLink.GetLink( ForumPages.admin_boards)}
				};

				writer.Write( createMenu( "Host Admin", "header2", "post", ref hostAdminLinks ) );
			}

			// create the admin menu...
			string [,] adminLinks =
			{
				{"Admin Index",YafBuildLink.GetLink( ForumPages.admin_admin)},
				{"Board Settings",YafBuildLink.GetLink( ForumPages.admin_boardsettings)},
				{"Forums",YafBuildLink.GetLink( ForumPages.admin_forums)},
				{"Banned IP",YafBuildLink.GetLink( ForumPages.admin_bannedip)},
				{"Smilies",YafBuildLink.GetLink( ForumPages.admin_smilies)},
				{"Replace Words",YafBuildLink.GetLink( ForumPages.admin_replacewords)},
        {"File Extensions",YafBuildLink.GetLink( ForumPages.admin_extensions)},
				{"BBCode Extensions",YafBuildLink.GetLink(ForumPages.admin_bbcode)}
			};

			writer.Write(createMenu( "Admin", "header2", "post", ref adminLinks ));

			// create the groups and users menu...
			string [,] groupsAndUsersLinks =
			{
				{"Access Masks",YafBuildLink.GetLink( ForumPages.admin_accessmasks)},
				{"Roles",YafBuildLink.GetLink( ForumPages.admin_groups)},
				{"Users",YafBuildLink.GetLink( ForumPages.admin_users)},
				{"Ranks",YafBuildLink.GetLink( ForumPages.admin_ranks)},
				{"Medals",YafBuildLink.GetLink( ForumPages.admin_medals)},
				{"Mail",YafBuildLink.GetLink( ForumPages.admin_mail)}
			};

			writer.Write(createMenu( "Users and Roles", "header2", "post", ref groupsAndUsersLinks ));

			// create maintenance menu...
			string [,] maintenanceLinks =
			{
				{"Prune Topics",YafBuildLink.GetLink( ForumPages.admin_prune)},
				{"Private Messages",YafBuildLink.GetLink( ForumPages.admin_pm)},
				{"Attachments",YafBuildLink.GetLink( ForumPages.admin_attachments)},				
				{"Event Log",YafBuildLink.GetLink( ForumPages.admin_eventlog)}				
			};

			writer.Write( createMenu( "Maintenance", "header2", "post", ref maintenanceLinks ) );

			if ( PageContext.IsHostAdmin )
			{
				// create database menu
				string [,] dbLinks =
				{
					{"Reindex DB",YafBuildLink.GetLink( ForumPages.admin_reindex)},
					{"Run SQL Code",YafBuildLink.GetLink( ForumPages.admin_runsql)}
				};
<commit_msg>Changed wording for consistency to "Run SQL Query"<commit_after>/* Yet Another Forum.NET
 * Copyright (C) 2006-2008 <NAME>
 * http://www.yetanotherforum.net/
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
using System;
using System.Collections.Generic;
using YAF.Classes.Utils;

namespace YAF.Controls
{
	/// <summary>
	/// Summary description for AdminMenu.
	/// </summary>
	public class AdminMenu : BaseControl
	{
		public AdminMenu()
		{

		}
	
		protected override void Render(System.Web.UI.HtmlTextWriter writer) 
		{	
			writer.WriteLine(@"<table width=""100%"" cellspacing=""0"" cellpadding=""0""><tr>");
			writer.WriteLine(@"<td width=""10%"" valign=""top"">");

			writer.WriteLine(@"<table class=""content"" width=""100%"" cellspacing=""0"" cellpadding=""0""><tr><td class=""post"" valign=""top"">");
			writer.WriteLine(@"<table width=""100%"" cellspacing=""0"" cellpadding=""0"">");
			
			if (PageContext.IsHostAdmin) 
			{
				// host admin -- create host admin menu...
				string [,] hostAdminLinks =
				{
					{"Host Settings",YafBuildLink.GetLink( ForumPages.admin_hostsettings)},
					{"Boards",YafBuildLink.GetLink( ForumPages.admin_boards)}
				};

				writer.Write( createMenu( "Host Admin", "header2", "post", ref hostAdminLinks ) );
			}

			// create the admin menu...
			string [,] adminLinks =
			{
				{"Admin Index",YafBuildLink.GetLink( ForumPages.admin_admin)},
				{"Board Settings",YafBuildLink.GetLink( ForumPages.admin_boardsettings)},
				{"Forums",YafBuildLink.GetLink( ForumPages.admin_forums)},
				{"Banned IP",YafBuildLink.GetLink( ForumPages.admin_bannedip)},
				{"Smilies",YafBuildLink.GetLink( ForumPages.admin_smilies)},
				{"Replace Words",YafBuildLink.GetLink( ForumPages.admin_replacewords)},
        {"File Extensions",YafBuildLink.GetLink( ForumPages.admin_extensions)},
				{"BBCode Extensions",YafBuildLink.GetLink(ForumPages.admin_bbcode)}
			};

			writer.Write(createMenu( "Admin", "header2", "post", ref adminLinks ));

			// create the groups and users menu...
			string [,] groupsAndUsersLinks =
			{
				{"Access Masks",YafBuildLink.GetLink( ForumPages.admin_accessmasks)},
				{"Roles",YafBuildLink.GetLink( ForumPages.admin_groups)},
				{"Users",YafBuildLink.GetLink( ForumPages.admin_users)},
				{"Ranks",YafBuildLink.GetLink( ForumPages.admin_ranks)},
				{"Medals",YafBuildLink.GetLink( ForumPages.admin_medals)},
				{"Mail",YafBuildLink.GetLink( ForumPages.admin_mail)}
			};

			writer.Write(createMenu( "Users and Roles", "header2", "post", ref groupsAndUsersLinks ));

			// create maintenance menu...
			string [,] maintenanceLinks =
			{
				{"Prune Topics",YafBuildLink.GetLink( ForumPages.admin_prune)},
				{"Private Messages",YafBuildLink.GetLink( ForumPages.admin_pm)},
				{"Attachments",YafBuildLink.GetLink( ForumPages.admin_attachments)},				
				{"Event Log",YafBuildLink.GetLink( ForumPages.admin_eventlog)}				
			};

			writer.Write( createMenu( "Maintenance", "header2", "post", ref maintenanceLinks ) );

			if ( PageContext.IsHostAdmin )
			{
				// create database menu
				string [,] dbLinks =
				{
					{"Reindex DB",YafBuildLink.GetLink( ForumPages.admin_reindex)},
					{"Run SQL Query",YafBuildLink.GetLink( ForumPages.admin_runsql)}
				};

{'fraction_non_alphanumeric': 0.14183123877917414, 'fraction_numerical': 0.011284944857655809, 'mean_word_length': 4.283875338753387, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2993345', 'n_tokens_mistral': 2767, 'n_tokens_neox': 2347, 'n_words': 581}