Exemplo n.º 1
0
        public IActionResult EditSettings(CMSDatabase db, SettingsModel model, HttpContext context)
        {
            ConfigurationHandler configurationHandler = context.RequestServices.GetRequiredService <ConfigurationHandler>();

            configurationHandler.ChangeConfigFile(model);
            if (!string.IsNullOrEmpty(model.ProductBlockTemplate))
            {
                IHostingEnvironment env = context.RequestServices.GetRequiredService <IHostingEnvironment>();
                string pathToTemplate   = env.GetProductBlockTemplateFullPath();
                string oldTemplate      = OtherFunctions.GetFileContent(pathToTemplate);
                if (!model.ProductBlockTemplate.Equals(oldTemplate, StringComparison.Ordinal))
                {
                    using (StreamWriter writer = new StreamWriter(pathToTemplate))
                    {
                        writer.Write(model.ProductBlockTemplate);
                    }
                    string[] additions =
                    {
                        "@using Treynessen.Functions;",
                        "@using Treynessen.Database.Entities;",
                        "@addTagHelper Treynessen.TagHelpers.ImageTagHelper, StoreCMS"
                    };
                    string cshtmlTemplate = TemplatesManagementFunctions.SourceToCSHTML(
                        db: db,
                        source: model.ProductBlockTemplate,
                        modelType: "ProductPage",
                        env: env,
                        skipChunkName: null,
                        additions: additions
                        );
                    using (StreamWriter writer = new StreamWriter(env.GetProductBlockCshtmlFullPath()))
                    {
                        writer.Write(cshtmlTemplate);
                    }
                }
            }
            LogManagementFunctions.AddAdminPanelLog(
                db: db,
                context: context,
                info: (context.Items["LogLocalization"] as IAdminPanelLogLocalization)?.SettingsEdited
                );
            return(StatusCode(200));
        }
Exemplo n.º 2
0
        public IActionResult GetUserLog(int?userID, DateTime?currentLogDate, HttpContext context)
        {
            if (!userID.HasValue || !currentLogDate.HasValue)
            {
                return(Content(string.Empty));
            }
            IHostingEnvironment env = context.RequestServices.GetRequiredService <IHostingEnvironment>();
            string pathToLogsFolder = $"{env.GetLogsFolderFullPath()}{userID.Value}/";

            if (!System.IO.Directory.Exists(pathToLogsFolder))
            {
                return(Content(string.Empty));
            }
            Regex  fileNameRegex = new Regex(@"(?<Type1>\d{1,2}).(?<Type2>\d{1,2}).(?<Type3>\d{4}).xml$");
            string fileName      = null;

            try
            {
                DateTime fileDate = (from pathToLog in System.IO.Directory.GetFiles(pathToLogsFolder)
                                     let match = fileNameRegex.Match(pathToLog)
                                                 where match.Success
                                                 let date = new DateTime(Convert.ToInt32(match.Groups[3].Value), Convert.ToInt32(match.Groups[2].Value), Convert.ToInt32(match.Groups[1].Value))
                                                            where currentLogDate.Value.CompareTo(date) == 1
                                                            select date).Max();
                fileName = $"{fileDate.Day}.{fileDate.Month}.{fileDate.Year}";
                context.Response.Headers.Add("file-date", $"{fileDate.Year}-{fileDate.Month}-{fileDate.Day}");
            }
            catch (InvalidOperationException)
            {
                return(Content(string.Empty));
            }
            string        logData        = OtherFunctions.GetFileContent($"{pathToLogsFolder}{fileName}.xml");
            StringBuilder contentBuilder = new StringBuilder();

            contentBuilder.Append($"<p class=\"date\">{fileName}:</p>");
            Regex logRegex = new Regex("<event time=\"(?<Type1>.*)\"><detail>(?<Type2>.*)</detail></event>");

            foreach (var match in logRegex.Matches(logData) as IEnumerable <Match> )
            {
                contentBuilder.Append($"<p class=\"log\"><b>{match.Groups[1].Value}</b> - {match.Groups[2].Value}</p>\n");
            }
            return(Content(contentBuilder.ToString()));
        }
Exemplo n.º 3
0
        public IActionResult EditScriptFile(string path)
        {
            Regex regex = new Regex(@"^((\w|-|_)+)(>(\w|-|_)+)*\.js$");

            if (!regex.IsMatch(path))
            {
                return(Redirect($"{HttpContext.Request.Path}?pageID={(int)AdminPanelPages.FileManager}"));
            }
            HttpContext.Items["PathToFile"] = path;
            IHostingEnvironment env = HttpContext.RequestServices.GetService <IHostingEnvironment>();

            HttpContext.Items["pageID"] = AdminPanelPages.EditScript;
            string scriptFileFullName = path.Substring(path.LastIndexOf('>') + 1);

            path = path.Substring(0, path.Length - scriptFileFullName.Length);
            if (!string.IsNullOrEmpty(path))
            {
                path = path.Replace('>', '/');
                if (!path[path.Length - 1].Equals('/'))
                {
                    path = path.Insert(path.Length, "/");
                }
            }
            path = $"{env.GetStorageFolderFullPath()}{path}";
            string pathToFile = path + scriptFileFullName;

            if (!System.IO.File.Exists(pathToFile) || !FileManagerManagementFunctions.HasAccessToFolder(path, env))
            {
                return(Redirect($"{HttpContext.Request.Path}?pageID={(int)AdminPanelPages.FileManager}"));
            }
            string     scriptFileContent = OtherFunctions.GetFileContent(pathToFile);
            StyleModel model             = new StyleModel {
                FileName = scriptFileFullName.Substring(0, scriptFileFullName.Length - 3), FileContent = scriptFileContent
            };

            return(View("FileManager/EditScriptFile", model));
        }
Exemplo n.º 4
0
        public static void DeleteChunk(CMSDatabase db, int?itemID, HttpContext context, out bool successfullyDeleted)
        {
            if (!itemID.HasValue)
            {
                successfullyDeleted = false;
                return;
            }
            Chunk chunk = db.Chunks.FirstOrDefault(t => t.ID == itemID);

            if (chunk == null)
            {
                successfullyDeleted = false;
                return;
            }
            IHostingEnvironment env = context.RequestServices.GetRequiredService <IHostingEnvironment>();
            string pathToChunkFile  = $"{env.GetChunksFolderFullPath()}{chunk.Name}.cshtml";

            if (File.Exists(pathToChunkFile))
            {
                File.Delete(pathToChunkFile);
            }
            db.Chunks.Remove(chunk);
            db.SaveChanges();
            successfullyDeleted = true;
            LogManagementFunctions.AddAdminPanelLog(
                db: db,
                context: context,
                info: $"{chunk.Name} (ID-{chunk.ID.ToString()}): {(context.Items["LogLocalization"] as IAdminPanelLogLocalization)?.ChunkDeleted}"
                );

            // Получаем список чанков и шаблонов, использующих данный чанк и делаем перерендер
            var templates  = db.Templates.AsNoTracking().Where(t => t.TemplateSource.Contains($"[#{chunk.Name}]")).ToList();
            var chunks     = db.Chunks.AsNoTracking().Where(tc => tc.TemplateSource.Contains($"[#{chunk.Name}]")).ToList();
            var renderTask = Task.Run(() =>
            {
                foreach (var t in templates)
                {
                    string _cshtmlContent = TemplatesManagementFunctions.SourceToCSHTML(
                        db: db,
                        source: t.TemplateSource,
                        modelType: "Page",
                        env: env,
                        skipChunkName: null
                        );
                    TemplatesManagementFunctions.WriteCshtmlContentToFile(env.GetTemplatesFolderFullPath(), t.Name, _cshtmlContent);
                }
            });

            foreach (var c in chunks)
            {
                string _cshtmlContent = TemplatesManagementFunctions.SourceToCSHTML(
                    db: db,
                    source: c.TemplateSource,
                    modelType: "Page",
                    env: env,
                    skipChunkName: c.Name
                    );
                TemplatesManagementFunctions.WriteCshtmlContentToFile(env.GetChunksFolderFullPath(), c.Name, _cshtmlContent);
            }

            string productBlockFileContent = OtherFunctions.GetFileContent(env.GetProductBlockTemplateFullPath());

            if (productBlockFileContent.Contains($"[#{chunk.Name}]"))
            {
                string[] additions =
                {
                    "@using Treynessen.Functions;",
                    "@using Treynessen.Database.Entities;",
                    "@addTagHelper Treynessen.TagHelpers.ImageTagHelper, StoreCMS"
                };
                string productBlockCshtmlTemplate = TemplatesManagementFunctions.SourceToCSHTML(
                    db: db,
                    source: productBlockFileContent,
                    modelType: "ProductPage",
                    env: env,
                    skipChunkName: null,
                    additions: additions
                    );
                using (StreamWriter writer = new StreamWriter(env.GetProductBlockCshtmlFullPath()))
                {
                    writer.Write(productBlockCshtmlTemplate);
                }
            }

            renderTask.Wait();
        }
Exemplo n.º 5
0
        public static void EditChunk(CMSDatabase db, int?itemID, TemplateModel model, HttpContext context, out bool successfullyCompleted)
        {
            if (!itemID.HasValue || model == null)
            {
                successfullyCompleted = false;
                return;
            }
            Chunk editableChunk = db.Chunks.AsNoTracking().FirstOrDefault(t => t.ID == itemID);

            if (editableChunk == null)
            {
                successfullyCompleted = false;
                return;
            }
            Chunk editedChunk = TemplatesManagementFunctions.TemplateModelToITemplate <Chunk>(model, context);

            if (editedChunk == null)
            {
                successfullyCompleted = false;
                return;
            }
            if (editedChunk.Name.Equals("_ViewImports", StringComparison.OrdinalIgnoreCase))
            {
                editedChunk.Name = "view_imports";
            }
            IHostingEnvironment env = context.RequestServices.GetService <IHostingEnvironment>();

            editedChunk.ID           = itemID.Value;
            editedChunk.TemplatePath = env.GetChunksFolderShortPath();
            TemplatesManagementFunctions.SetUniqueITemplateName(db, editedChunk);
            editedChunk.TemplatePath += $"{editedChunk.Name}.cshtml";
            db.Chunks.Update(editedChunk);
            db.SaveChanges();
            successfullyCompleted = true;
            LogManagementFunctions.AddAdminPanelLog(
                db: db,
                context: context,
                info: $"{editableChunk.Name} (ID-{editableChunk.ID.ToString()}): {(context.Items["LogLocalization"] as IAdminPanelLogLocalization)?.ChunkEdited}"
                );

            // Изменяем cshtml файл, если изменилось имя шаблона и/или код шаблона
            bool changedName           = !editedChunk.Name.Equals(editableChunk.Name, StringComparison.Ordinal);
            bool changedTemplateSource = !editedChunk.TemplateSource.Equals(editableChunk.TemplateSource, StringComparison.Ordinal);

            if (changedName && changedTemplateSource)
            {
                string pathToOldFileName = $"{env.GetChunksFolderFullPath()}{editableChunk.Name}.cshtml";
                if (File.Exists(pathToOldFileName))
                {
                    File.Delete(pathToOldFileName);
                }
                string cshtmlContent = TemplatesManagementFunctions.SourceToCSHTML(
                    db: db,
                    source: editedChunk.TemplateSource,
                    modelType: "Page",
                    env: env,
                    skipChunkName: editedChunk.Name
                    );
                TemplatesManagementFunctions.WriteCshtmlContentToFile(env.GetChunksFolderFullPath(), editedChunk.Name, cshtmlContent);
            }
            else if (changedName)
            {
                string pathToOldFileName = $"{env.GetChunksFolderFullPath()}{editableChunk.Name}.cshtml";
                if (File.Exists(pathToOldFileName))
                {
                    File.Move(pathToOldFileName, $"{env.GetChunksFolderFullPath()}{editedChunk.Name}.cshtml");
                }
                else
                {
                    string cshtmlContent = TemplatesManagementFunctions.SourceToCSHTML(
                        db: db,
                        source: editedChunk.TemplateSource,
                        modelType: "Page",
                        env: env,
                        skipChunkName: editedChunk.Name
                        );
                    TemplatesManagementFunctions.WriteCshtmlContentToFile(env.GetChunksFolderFullPath(), editedChunk.Name, cshtmlContent);
                }
            }
            else if (changedTemplateSource)
            {
                string cshtmlContent = TemplatesManagementFunctions.SourceToCSHTML(
                    db: db,
                    source: editedChunk.TemplateSource,
                    modelType: "Page",
                    env: env,
                    skipChunkName: editedChunk.Name
                    );
                TemplatesManagementFunctions.WriteCshtmlContentToFile(env.GetChunksFolderFullPath(), editedChunk.Name, cshtmlContent);
            }

            // Если изменилось название чанка, то получаем список шаблонов и чанков, которые использовали или теперь используют данный чанк
            // и делаем их перерендер
            if (changedName)
            {
                var templates = db.Templates.AsNoTracking()
                                .Where(t => t.TemplateSource.Contains($"[#{editableChunk.Name}]") || t.TemplateSource.Contains($"[#{editedChunk.Name}]"))
                                .ToList();
                var chunks = db.Chunks.AsNoTracking()
                             .Where(tc => tc.ID != itemID.Value &&
                                    (tc.TemplateSource.Contains($"[#{editableChunk.Name}]") || tc.TemplateSource.Contains($"[#{editedChunk.Name}]")))
                             .ToList();
                var renderTask = Task.Run(() =>
                {
                    foreach (var t in templates)
                    {
                        string cshtmlContent = TemplatesManagementFunctions.SourceToCSHTML(
                            db: db,
                            source: t.TemplateSource,
                            modelType: "Page",
                            env: env,
                            skipChunkName: null
                            );
                        TemplatesManagementFunctions.WriteCshtmlContentToFile(env.GetTemplatesFolderFullPath(), t.Name, cshtmlContent);
                    }
                });
                foreach (var c in chunks)
                {
                    string cshtmlContent = TemplatesManagementFunctions.SourceToCSHTML(
                        db: db,
                        source: c.TemplateSource,
                        modelType: "Page",
                        env: env,
                        skipChunkName: c.Name
                        );
                    TemplatesManagementFunctions.WriteCshtmlContentToFile(env.GetChunksFolderFullPath(), c.Name, cshtmlContent);
                }

                string productBlockFileContent = OtherFunctions.GetFileContent(env.GetProductBlockTemplateFullPath());
                if (changedName && productBlockFileContent.Contains($"[#{editableChunk.Name}]"))
                {
                    string[] additions =
                    {
                        "@using Treynessen.Functions;",
                        "@using Treynessen.Database.Entities;",
                        "@addTagHelper Treynessen.TagHelpers.ImageTagHelper, StoreCMS"
                    };
                    string productBlockCshtmlTemplate = TemplatesManagementFunctions.SourceToCSHTML(
                        db: db,
                        source: productBlockFileContent,
                        modelType: "ProductPage",
                        env: env,
                        skipChunkName: null,
                        additions: additions
                        );
                    using (StreamWriter writer = new StreamWriter(env.GetProductBlockCshtmlFullPath()))
                    {
                        writer.Write(productBlockCshtmlTemplate);
                    }
                }

                renderTask.Wait();
            }
        }
Exemplo n.º 6
0
        public static void AddChunk(CMSDatabase db, TemplateModel model, HttpContext context, out bool successfullyCompleted)
        {
            Chunk chunk = TemplatesManagementFunctions.TemplateModelToITemplate <Chunk>(model, context);

            if (chunk == null)
            {
                successfullyCompleted = false;
                return;
            }
            IHostingEnvironment env = context.RequestServices.GetService <IHostingEnvironment>();

            if (chunk.Name.Equals("_ViewImports", System.StringComparison.OrdinalIgnoreCase))
            {
                chunk.Name = "view_imports";
            }
            chunk.TemplatePath = env.GetChunksFolderShortPath();
            TemplatesManagementFunctions.SetUniqueITemplateName(db, chunk);
            chunk.TemplatePath += $"{chunk.Name}.cshtml";
            string cshtmlContent = TemplatesManagementFunctions.SourceToCSHTML(
                db: db,
                source: chunk.TemplateSource,
                modelType: "Page",
                env: env,
                skipChunkName: chunk.Name
                );

            TemplatesManagementFunctions.WriteCshtmlContentToFile(
                pathToTemplatesFolder: env.GetChunksFolderFullPath(),
                templateName: chunk.Name,
                chstmlContent: cshtmlContent
                );
            db.Chunks.Add(chunk);
            db.SaveChanges();
            model.ID = chunk.ID;
            successfullyCompleted = true;
            LogManagementFunctions.AddAdminPanelLog(
                db: db,
                context: context,
                info: $"{chunk.Name} (ID-{chunk.ID.ToString()}): {(context.Items["LogLocalization"] as IAdminPanelLogLocalization)?.ChunkAdded}"
                );

            // Получаем список шаблонов и чанков, которые содержат данный чанк
            var templates = db.Templates.AsNoTracking().Where(t => t.TemplateSource.Contains($"[#{chunk.Name}]")).ToList();
            var chunks    = db.Chunks.AsNoTracking().Where(tc => tc.ID != chunk.ID && (tc.TemplateSource.Contains($"[#{chunk.Name}]"))).ToList();
            // Делаем рендер, содержащих данный чанк, шаблонов и чанков
            var renderTask = Task.Run(() =>
            {
                foreach (var t in templates)
                {
                    string _cshtmlContent = TemplatesManagementFunctions.SourceToCSHTML(
                        db: db,
                        source: t.TemplateSource,
                        modelType: "Page",
                        env: env,
                        skipChunkName: null
                        );
                    TemplatesManagementFunctions.WriteCshtmlContentToFile(env.GetTemplatesFolderFullPath(), t.Name, _cshtmlContent);
                }
            });

            foreach (var c in chunks)
            {
                string _cshtmlContent = TemplatesManagementFunctions.SourceToCSHTML(
                    db: db,
                    source: c.TemplateSource,
                    modelType: "Page",
                    env: env,
                    skipChunkName: c.Name
                    );
                TemplatesManagementFunctions.WriteCshtmlContentToFile(env.GetChunksFolderFullPath(), c.Name, _cshtmlContent);
            }

            // Если шаблон блока товара содержит текущий чанк, то делаем его перерендер
            string productBlockFileContent = OtherFunctions.GetFileContent(env.GetProductBlockTemplateFullPath());

            if (productBlockFileContent.Contains($"[#{chunk.Name}]"))
            {
                string[] additions =
                {
                    "@using Treynessen.Functions;",
                    "@using Treynessen.Database.Entities;",
                    "@addTagHelper Treynessen.TagHelpers.ImageTagHelper, StoreCMS"
                };
                string productBlockCshtmlTemplate = TemplatesManagementFunctions.SourceToCSHTML(
                    db: db,
                    source: productBlockFileContent,
                    modelType: "ProductPage",
                    env: env,
                    skipChunkName: null,
                    additions: additions
                    );
                using (StreamWriter writer = new StreamWriter(env.GetProductBlockCshtmlFullPath()))
                {
                    writer.Write(productBlockCshtmlTemplate);
                }
            }
            renderTask.Wait();
        }
Exemplo n.º 7
0
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
#line 8 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"

            Layout = "CommonPage";
            User user = Context.Items["User"] as User;
            Context.Items["PageName"] = localization.PageName;
            AccessLevelConfiguration accessLevelConfiguration = Context.Items["AccessLevelConfiguration"] as AccessLevelConfiguration;
            Context.Items["PageStyle"] = "/styles/admin_panel/settings.css";
            Template[] templates            = Context.Items["Templates"] as Template[];
            int?       searchPageTemplateId = null;
            try
            {
                searchPageTemplateId = Convert.ToInt32(configuration.GetConfigValue("SearchPageSettings:SearchPageTemplateId"));
                searchPageTemplateId = templates.FirstOrDefault(t => t.ID == searchPageTemplateId.Value) != null ? searchPageTemplateId : null;
            }
            catch (FormatException) { }
            int?pageNotFoundTemplateId = null;
            try
            {
                pageNotFoundTemplateId = Convert.ToInt32(configuration.GetConfigValue("PageNotFoundSettings:PageNotFoundTemplateId"));
                pageNotFoundTemplateId = templates.FirstOrDefault(t => t.ID == pageNotFoundTemplateId.Value) != null ? pageNotFoundTemplateId : null;
            }
            catch (FormatException) { }
            List <KeyValuePair <AdminPanelPages, IHtmlContent> > settingList = new List <KeyValuePair <AdminPanelPages, IHtmlContent> >()
            {
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.MainPage, Html.Raw(localization.AccessLevelToAdminPanel)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.GetVisitors, Html.Raw(localization.AccessLevelToGetVisitors)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.GetVisitorActions, Html.Raw(localization.AccessLevelToGetVisitorActions)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.Pages, Html.Raw(localization.AccessLevelToPages)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.AddPage, Html.Raw(localization.AccessLevelToAddPage)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.EditPage, Html.Raw(localization.AccessLevelToEditPage)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.DeletePage, Html.Raw(localization.AccessLevelToDeletePage)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.Categories, Html.Raw(localization.AccessLevelToCategories)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.AddCategory, Html.Raw(localization.AccessLevelToAddCategory)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.EditCategory, Html.Raw(localization.AccessLevelToEditCategory)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.DeleteCategory, Html.Raw(localization.AccessLevelToDeleteCategory)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.CategoryProducts, Html.Raw(localization.AccessLevelToCategoryProducts)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.AddProduct, Html.Raw(localization.AccessLevelToAddProduct)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.EditProduct, Html.Raw(localization.AccessLevelToEditProduct)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.DeleteProduct, Html.Raw(localization.AccessLevelToDeleteProduct)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.ProductImages, Html.Raw(localization.AccessLevelToProductImages)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.AddProductImage, Html.Raw(localization.AccessLevelToAddProductImage)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.DeleteProductImage, Html.Raw(localization.AccessLevelToDeleteProductImage)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.Redirections, Html.Raw(localization.AccessLevelToRedirections)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.AddRedirection, Html.Raw(localization.AccessLevelToAddRedirection)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.EditRedirection, Html.Raw(localization.AccessLevelToEditRedirection)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.DeleteRedirection, Html.Raw(localization.AccessLevelToDeleteRedirection)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.Templates, Html.Raw(localization.AccessLevelToTemplates)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.AddTemplate, Html.Raw(localization.AccessLevelToAddTemplate)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.EditTemplate, Html.Raw(localization.AccessLevelToEditTemplate)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.DeleteTemplate, Html.Raw(localization.AccessLevelToDeleteTemplate)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.Chunks, Html.Raw(localization.AccessLevelToChunks)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.AddChunk, Html.Raw(localization.AccessLevelToAddChunk)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.EditChunk, Html.Raw(localization.AccessLevelToEditChunk)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.DeleteChunk, Html.Raw(localization.AccessLevelToDeleteChunk)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.FileManager, Html.Raw(localization.AccessLevelToFileManager)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.UploadFile, Html.Raw(localization.AccessLevelToUploadFile)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.CreateFolder, Html.Raw(localization.AccessLevelToCreateFolder)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.CreateStyle, Html.Raw(localization.AccessLevelToCreateStyle)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.CreateScript, Html.Raw(localization.AccessLevelToCreateScript)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.EditStyle, Html.Raw(localization.AccessLevelToEditStyle)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.EditScript, Html.Raw(localization.AccessLevelToEditScript)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.DeleteFileOrFolder, Html.Raw(localization.AccessLevelToDeleteFileOrFolder)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.Users, Html.Raw(localization.AccessLevelToUsers)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.AddUser, Html.Raw(localization.AccessLevelToAddUser)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.EditUser, Html.Raw(localization.AccessLevelToEditUser)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.DeleteUser, Html.Raw(localization.AccessLevelToDeleteUser)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.UserTypes, Html.Raw(localization.AccessLevelToUserTypes)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.AddUserType, Html.Raw(localization.AccessLevelToAddUserType)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.EditUserType, Html.Raw(localization.AccessLevelToEditUserType)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.DeleteUserType, Html.Raw(localization.AccessLevelToDeleteUserType)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.SynonymsForStrings, Html.Raw(localization.AccessLevelToSynonymsForStrings)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.AddSynonymForString, Html.Raw(localization.AccessLevelToAddSynonymForString)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.EditSynonymForString, Html.Raw(localization.AccessLevelToEditSynonymForString)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.DeleteSynonymForString, Html.Raw(localization.AccessLevelToDeleteSynonymForString)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.UserProfile, Html.Raw(localization.AccessLevelToUserProfile)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.EditUserData, Html.Raw(localization.AccessLevelToEditUserData)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.GetUserLog, Html.Raw(localization.AccessLevelToGetUserLog)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.Settings, Html.Raw(localization.AccessLevelToSettings)),
                new KeyValuePair <AdminPanelPages, IHtmlContent>(AdminPanelPages.EditSettings, Html.Raw(localization.AccessLevelToEditSettings))
            };
            List <IHtmlContent> accessLevels = new List <IHtmlContent>()
            {
                Html.Raw($"1 - {localization.VeryLowAccessLevel}"),
                Html.Raw($"2 - {localization.LowAccessLevel}"),
                Html.Raw($"3 - {localization.MiddleAccessLevel}"),
                Html.Raw($"4 - {localization.HighAccessLevel}"),
                Html.Raw($"5 - {localization.VeryHighAccessLevel}")
            };

#line default
#line hidden
            BeginContext(9001, 99, true);
            WriteLiteral("<script src=\"/scripts/admin_panel/insert_tab.js\"></script>\r\n            <form id=\"save-settings\">\r\n");
            EndContext();
#line 98 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            if (SecurityFunctions.HasAccessTo(AdminPanelPages.EditSettings, user, Context))
            {
#line default
#line hidden
                BeginContext(9217, 50, true);
                WriteLiteral("                <input type=\"hidden\" name=\"pageID\"");
                EndContext();
                BeginWriteAttribute("value", " value=\"", 9267, "\"", 9311, 1);
#line 100 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                WriteAttributeValue("", 9275, (int)AdminPanelPages.EditSettings, 9275, 36, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(9312, 65, true);
                WriteLiteral(">\r\n                <input id=\"save-settings-button\" type=\"submit\"");
                EndContext();
                BeginWriteAttribute("value", " value=\"", 9377, "\"", 9419, 1);
#line 101 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                WriteAttributeValue("", 9385, Html.Raw(localization.SaveButton), 9385, 34, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(9420, 110, true);
                WriteLiteral(">\r\n                <script>\r\n                    function responseHandler() {\r\n                        alert(\'");
                EndContext();
                BeginContext(9531, 36, false);
#line 104 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                Write(Html.Raw(localization.SettingsSaved));

#line default
#line hidden
                EndContext();
                BeginContext(9567, 386, true);
                WriteLiteral(@"');
                        location.reload();
                    }
                    document.getElementById('save-settings-button').addEventListener('click', createSendDataEventHandler('POST', 'save-settings', responseHandler));
                    document.getElementById('ProductBlockTemplate').addEventListener('keydown', insertTabEventHandler);
                </script>
");
                EndContext();
#line 110 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            }


#line default
#line hidden
            BeginContext(10022, 65, true);
            WriteLiteral("                <table>\r\n                    <tr><td colspan=\"2\">");
            EndContext();
            BeginContext(10088, 46, false);
#line 113 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            Write(Html.Raw(localization.ForcedGarbageCollection));

#line default
#line hidden
            EndContext();
            BeginContext(10134, 66, true);
            WriteLiteral("</td></tr>\r\n                    <tr>\r\n                        <td>");
            EndContext();
            BeginContext(10201, 33, false);
#line 115 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            Write(Html.Raw(localization.ValueToRun));

#line default
#line hidden
            EndContext();
            BeginContext(10234, 2, true);
            WriteLiteral(" (");
            EndContext();
            BeginContext(10237, 41, false);
#line 115 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            Write(Html.Raw(localization.InputZeroToDisable));

#line default
#line hidden
            EndContext();
            BeginContext(10278, 8, true);
            WriteLiteral(")</td>\r\n");
            EndContext();
#line 116 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            if (SecurityFunctions.HasAccessTo(AdminPanelPages.EditSettings, user, Context))
            {
#line default
#line hidden
                BeginContext(10419, 127, true);
                WriteLiteral("                        <td class=\"without-padding\"><input type=\"number\" name=\"SettingsModel.ValueToRunForcedGarbageCollection\"");
                EndContext();
                BeginWriteAttribute("value", " value=\"", 10546, "\"", 10639, 1);
#line 118 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                WriteAttributeValue("", 10554, Html.Raw(configuration.GetConfigValue("ForcedGarbageCollectionSettings:ValueToRun")), 10554, 85, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginWriteAttribute("placeholder", " placeholder=\"", 10640, "\"", 10694, 1);
#line 118 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                WriteAttributeValue("", 10654, Html.Raw(localization.ValueInMegabytes), 10654, 40, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(10695, 8, true);
                WriteLiteral("></td>\r\n");
                EndContext();
#line 119 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            }
            else
            {
#line default
#line hidden
                BeginContext(10787, 72, true);
                WriteLiteral("                        <td class=\"without-padding\"><input type=\"number\"");
                EndContext();
                BeginWriteAttribute("value", " value=\"", 10859, "\"", 10944, 1);
#line 122 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                WriteAttributeValue("", 10867, Html.Raw(configuration.GetConfigValue("ForcedGarbageCollection:ValueToRun")), 10867, 77, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(10945, 17, true);
                WriteLiteral(" disabled></td>\r\n");
                EndContext();
#line 123 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            }

#line default
#line hidden
            BeginContext(10989, 57, true);
            WriteLiteral("                        </tr>\r\n                </table>\r\n");
            EndContext();
            BeginContext(11090, 65, true);
            WriteLiteral("                <table>\r\n                    <tr><td colspan=\"2\">");
            EndContext();
            BeginContext(11156, 43, false);
#line 128 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            Write(Html.Raw(localization.CategoryPageSettings));

#line default
#line hidden
            EndContext();
            BeginContext(11199, 66, true);
            WriteLiteral("</td></tr>\r\n                    <tr>\r\n                        <td>");
            EndContext();
            BeginContext(11266, 45, false);
#line 130 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            Write(Html.Raw(localization.NumberOfProductsOnPage));

#line default
#line hidden
            EndContext();
            BeginContext(11311, 7, true);
            WriteLiteral("</td>\r\n");
            EndContext();
#line 131 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            if (SecurityFunctions.HasAccessTo(AdminPanelPages.EditSettings, user, Context))
            {
#line default
#line hidden
                BeginContext(11451, 116, true);
                WriteLiteral("                        <td class=\"without-padding\"><input type=\"number\" name=\"SettingsModel.NumberOfProductsOnPage\"");
                EndContext();
                BeginWriteAttribute("value", " value=\"", 11567, "\"", 11661, 1);
#line 133 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                WriteAttributeValue("", 11575, Html.Raw(configuration.GetConfigValue("CategoryPageSettings:NumberOfProductsOnPage")), 11575, 86, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(11662, 8, true);
                WriteLiteral("></td>\r\n");
                EndContext();
#line 134 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            }
            else
            {
#line default
#line hidden
                BeginContext(11754, 72, true);
                WriteLiteral("                        <td class=\"without-padding\"><input type=\"number\"");
                EndContext();
                BeginWriteAttribute("value", " value=\"", 11826, "\"", 11920, 1);
#line 137 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                WriteAttributeValue("", 11834, Html.Raw(configuration.GetConfigValue("CategoryPageSettings:NumberOfProductsOnPage")), 11834, 86, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(11921, 17, true);
                WriteLiteral(" disabled></td>\r\n");
                EndContext();
#line 138 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            }

#line default
#line hidden
            BeginContext(11965, 81, true);
            WriteLiteral("                    </tr>\r\n                    <tr>\r\n                        <td>");
            EndContext();
            BeginContext(12047, 42, false);
#line 141 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            Write(Html.Raw(localization.PaginationStyleName));

#line default
#line hidden
            EndContext();
            BeginContext(12089, 7, true);
            WriteLiteral("</td>\r\n");
            EndContext();
#line 142 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            if (SecurityFunctions.HasAccessTo(AdminPanelPages.EditSettings, user, Context))
            {
#line default
#line hidden
                BeginContext(12229, 111, true);
                WriteLiteral("                        <td class=\"without-padding\"><input type=\"text\" name=\"SettingsModel.PaginationStyleName\"");
                EndContext();
                BeginWriteAttribute("value", " value=\"", 12340, "\"", 12431, 1);
#line 144 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                WriteAttributeValue("", 12348, Html.Raw(configuration.GetConfigValue("CategoryPageSettings:PaginationStyleName")), 12348, 83, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(12432, 8, true);
                WriteLiteral("></td>\r\n");
                EndContext();
#line 145 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            }
            else
            {
#line default
#line hidden
                BeginContext(12524, 70, true);
                WriteLiteral("                        <td class=\"without-padding\"><input type=\"text\"");
                EndContext();
                BeginWriteAttribute("value", " value=\"", 12594, "\"", 12685, 1);
#line 148 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                WriteAttributeValue("", 12602, Html.Raw(configuration.GetConfigValue("CategoryPageSettings:PaginationStyleName")), 12602, 83, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(12686, 17, true);
                WriteLiteral(" disabled></td>\r\n");
                EndContext();
#line 149 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            }

#line default
#line hidden
            BeginContext(12730, 53, true);
            WriteLiteral("                    </tr>\r\n                </table>\r\n");
            EndContext();
            BeginContext(12830, 53, true);
            WriteLiteral("                <table>\r\n                    <tr><td>");
            EndContext();
            BeginContext(12884, 38, false);
#line 154 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            Write(Html.Raw(localization.ProductTemplate));

#line default
#line hidden
            EndContext();
            BeginContext(12922, 12, true);
            WriteLiteral("</td></tr>\r\n");
            EndContext();
#line 155 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            if (SecurityFunctions.HasAccessTo(AdminPanelPages.EditSettings, user, Context))
            {
#line default
#line hidden
                BeginContext(13059, 130, true);
                WriteLiteral("                    <tr><td class=\"without-padding\"><textarea id=\"ProductBlockTemplate\" name=\"SettingsModel.ProductBlockTemplate\">");
                EndContext();
                BeginContext(13190, 78, false);
#line 157 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                Write(Html.Raw(OtherFunctions.GetFileContent(env.GetProductBlockTemplateFullPath())));

#line default
#line hidden
                EndContext();
                BeginContext(13268, 23, true);
                WriteLiteral("</textarea></td></tr>\r\n");
                EndContext();
#line 158 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            }
            else
            {
#line default
#line hidden
                BeginContext(13363, 71, true);
                WriteLiteral("                    <tr><td class=\"without-padding\"><textarea disabled>");
                EndContext();
                BeginContext(13435, 78, false);
#line 161 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                Write(Html.Raw(OtherFunctions.GetFileContent(env.GetProductBlockTemplateFullPath())));

#line default
#line hidden
                EndContext();
                BeginContext(13513, 23, true);
                WriteLiteral("</textarea></td></tr>\r\n");
                EndContext();
#line 162 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            }

#line default
#line hidden
            BeginContext(13559, 26, true);
            WriteLiteral("                </table>\r\n");
            EndContext();
            BeginContext(13627, 65, true);
            WriteLiteral("                <table>\r\n                    <tr><td colspan=\"2\">");
            EndContext();
            BeginContext(13693, 41, false);
#line 166 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            Write(Html.Raw(localization.SearchPageSettings));

#line default
#line hidden
            EndContext();
            BeginContext(13734, 87, true);
            WriteLiteral("</td></tr>\r\n                    <tr class=\"with-padding\">\r\n                        <td>");
            EndContext();
            BeginContext(13822, 41, false);
#line 168 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            Write(Html.Raw(localization.SearchPageTemplate));

#line default
#line hidden
            EndContext();
            BeginContext(13863, 117, true);
            WriteLiteral("</td>\r\n                        <td>\r\n                            <select name=\"SettingsModel.SearchPageTemplateId\">\r\n");
            EndContext();
#line 171 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            if (searchPageTemplateId.HasValue)
            {
#line default
#line hidden
                BeginContext(14084, 40, true);
                WriteLiteral("                                <option>");
                EndContext();
                BeginContext(14125, 38, false);
#line 173 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                Write(Html.Raw(localization.WithoutTemplate));

#line default
#line hidden
                EndContext();
                BeginContext(14163, 11, true);
                WriteLiteral("</option>\r\n");
                EndContext();
#line 174 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            }
            else
            {
#line default
#line hidden
                BeginContext(14282, 49, true);
                WriteLiteral("                                <option selected>");
                EndContext();
                BeginContext(14332, 38, false);
#line 177 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                Write(Html.Raw(localization.WithoutTemplate));

#line default
#line hidden
                EndContext();
                BeginContext(14370, 11, true);
                WriteLiteral("</option>\r\n");
                EndContext();
#line 178 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            }

#line default
#line hidden
            BeginContext(14416, 28, true);
            WriteLiteral("                            ");
            EndContext();
#line 179 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            foreach (var t in templates)
            {
                if (searchPageTemplateId.HasValue && t.ID == searchPageTemplateId.Value)
                {
#line default
#line hidden
                    BeginContext(14647, 39, true);
                    WriteLiteral("                                <option");
                    EndContext();
                    BeginWriteAttribute("value", " value=\"", 14686, "\"", 14699, 1);
#line 183 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                    WriteAttributeValue("", 14694, t.ID, 14694, 5, false);

#line default
#line hidden
                    EndWriteAttribute();
                    BeginContext(14700, 10, true);
                    WriteLiteral(" selected>");
                    EndContext();
                    BeginContext(14711, 16, false);
#line 183 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                    Write(Html.Raw(t.Name));

#line default
#line hidden
                    EndContext();
                    BeginContext(14727, 11, true);
                    WriteLiteral("</option>\r\n");
                    EndContext();
#line 184 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                }
                else
                {
#line default
#line hidden
                    BeginContext(14846, 39, true);
                    WriteLiteral("                                <option");
                    EndContext();
                    BeginWriteAttribute("value", " value=\"", 14885, "\"", 14898, 1);
#line 187 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                    WriteAttributeValue("", 14893, t.ID, 14893, 5, false);

#line default
#line hidden
                    EndWriteAttribute();
                    BeginContext(14899, 1, true);
                    WriteLiteral(">");
                    EndContext();
                    BeginContext(14901, 16, false);
#line 187 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                    Write(Html.Raw(t.Name));

#line default
#line hidden
                    EndContext();
                    BeginContext(14917, 11, true);
                    WriteLiteral("</option>\r\n");
                    EndContext();
#line 188 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                }
            }

#line default
#line hidden
            BeginContext(14994, 151, true);
            WriteLiteral("                            </select>\r\n                        </td>\r\n                    </tr>\r\n                    <tr>\r\n                        <td>");
            EndContext();
            BeginContext(15146, 54, false);
#line 194 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            Write(Html.Raw(localization.MaxNumberOfSymbolsInSearchQuery));

#line default
#line hidden
            EndContext();
            BeginContext(15200, 7, true);
            WriteLiteral("</td>\r\n");
            EndContext();
#line 195 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            if (SecurityFunctions.HasAccessTo(AdminPanelPages.EditSettings, user, Context))
            {
#line default
#line hidden
                BeginContext(15340, 125, true);
                WriteLiteral("                        <td class=\"without-padding\"><input type=\"number\" name=\"SettingsModel.MaxNumberOfSymbolsInSearchQuery\"");
                EndContext();
                BeginWriteAttribute("value", " value=\"", 15465, "\"", 15566, 1);
#line 197 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                WriteAttributeValue("", 15473, Html.Raw(configuration.GetConfigValue("SearchPageSettings:MaxNumberOfSymbolsInSearchQuery")), 15473, 93, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(15567, 8, true);
                WriteLiteral("></td>\r\n");
                EndContext();
#line 198 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            }
            else
            {
#line default
#line hidden
                BeginContext(15659, 72, true);
                WriteLiteral("                        <td class=\"without-padding\"><input type=\"number\"");
                EndContext();
                BeginWriteAttribute("value", " value=\"", 15731, "\"", 15832, 1);
#line 201 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                WriteAttributeValue("", 15739, Html.Raw(configuration.GetConfigValue("SearchPageSettings:MaxNumberOfSymbolsInSearchQuery")), 15739, 93, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(15833, 17, true);
                WriteLiteral(" disabled></td>\r\n");
                EndContext();
#line 202 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            }

#line default
#line hidden
            BeginContext(15877, 53, true);
            WriteLiteral("                    </tr>\r\n                </table>\r\n");
            EndContext();
            BeginContext(15975, 65, true);
            WriteLiteral("                <table>\r\n                    <tr><td colspan=\"2\">");
            EndContext();
            BeginContext(16041, 43, false);
#line 207 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            Write(Html.Raw(localization.PageNotFoundSettings));

#line default
#line hidden
            EndContext();
            BeginContext(16084, 87, true);
            WriteLiteral("</td></tr>\r\n                    <tr class=\"with-padding\">\r\n                        <td>");
            EndContext();
            BeginContext(16172, 43, false);
#line 209 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            Write(Html.Raw(localization.PageNotFoundTemplate));

#line default
#line hidden
            EndContext();
            BeginContext(16215, 119, true);
            WriteLiteral("</td>\r\n                        <td>\r\n                            <select name=\"SettingsModel.PageNotFoundTemplateId\">\r\n");
            EndContext();
#line 212 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            if (pageNotFoundTemplateId.HasValue)
            {
#line default
#line hidden
                BeginContext(16440, 40, true);
                WriteLiteral("                                <option>");
                EndContext();
                BeginContext(16481, 38, false);
#line 214 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                Write(Html.Raw(localization.WithoutTemplate));

#line default
#line hidden
                EndContext();
                BeginContext(16519, 11, true);
                WriteLiteral("</option>\r\n");
                EndContext();
#line 215 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            }
            else
            {
#line default
#line hidden
                BeginContext(16638, 49, true);
                WriteLiteral("                                <option selected>");
                EndContext();
                BeginContext(16688, 38, false);
#line 218 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                Write(Html.Raw(localization.WithoutTemplate));

#line default
#line hidden
                EndContext();
                BeginContext(16726, 11, true);
                WriteLiteral("</option>\r\n");
                EndContext();
#line 219 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            }

#line default
#line hidden
            BeginContext(16772, 28, true);
            WriteLiteral("                            ");
            EndContext();
#line 220 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            foreach (var t in templates)
            {
                if (pageNotFoundTemplateId.HasValue && t.ID == pageNotFoundTemplateId.Value)
                {
#line default
#line hidden
                    BeginContext(17007, 39, true);
                    WriteLiteral("                                <option");
                    EndContext();
                    BeginWriteAttribute("value", " value=\"", 17046, "\"", 17059, 1);
#line 224 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                    WriteAttributeValue("", 17054, t.ID, 17054, 5, false);

#line default
#line hidden
                    EndWriteAttribute();
                    BeginContext(17060, 10, true);
                    WriteLiteral(" selected>");
                    EndContext();
                    BeginContext(17071, 16, false);
#line 224 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                    Write(Html.Raw(t.Name));

#line default
#line hidden
                    EndContext();
                    BeginContext(17087, 11, true);
                    WriteLiteral("</option>\r\n");
                    EndContext();
#line 225 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                }
                else
                {
#line default
#line hidden
                    BeginContext(17206, 39, true);
                    WriteLiteral("                                <option");
                    EndContext();
                    BeginWriteAttribute("value", " value=\"", 17245, "\"", 17258, 1);
#line 228 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                    WriteAttributeValue("", 17253, t.ID, 17253, 5, false);

#line default
#line hidden
                    EndWriteAttribute();
                    BeginContext(17259, 1, true);
                    WriteLiteral(">");
                    EndContext();
                    BeginContext(17261, 16, false);
#line 228 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                    Write(Html.Raw(t.Name));

#line default
#line hidden
                    EndContext();
                    BeginContext(17277, 11, true);
                    WriteLiteral("</option>\r\n");
                    EndContext();
#line 229 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                }
            }

#line default
#line hidden
            BeginContext(17354, 123, true);
            WriteLiteral("                            </select>\r\n                        </td>\r\n                    </tr>\r\n                </table>\r\n");
            EndContext();
            BeginContext(17514, 65, true);
            WriteLiteral("                <table>\r\n                    <tr><td colspan=\"2\">");
            EndContext();
            BeginContext(17580, 42, false);
#line 237 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            Write(Html.Raw(localization.AccessLevelSettings));

#line default
#line hidden
            EndContext();
            BeginContext(17622, 12, true);
            WriteLiteral("</td></tr>\r\n");
            EndContext();
#line 238 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            foreach (var s in settingList)
            {
#line default
#line hidden
#line 240 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"

                int settingAccessLevel = (int)accessLevelConfiguration.GetAccessLevelInfoTo(s.Key.ToString());

#line default
#line hidden
                BeginContext(17879, 75, true);
                WriteLiteral("                    <tr class=\"with-padding\">\r\n                        <td>");
                EndContext();
                BeginContext(17955, 7, false);
#line 243 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                Write(s.Value);

#line default
#line hidden
                EndContext();
                BeginContext(17962, 37, true);
                WriteLiteral("</td>\r\n                        <td>\r\n");
                EndContext();
#line 245 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                if (SecurityFunctions.HasAccessTo(AdminPanelPages.EditSettings, user, Context))
                {
#line default
#line hidden
                    BeginContext(18132, 35, true);
                    WriteLiteral("                            <select");
                    EndContext();
                    BeginWriteAttribute("name", " name=\"", 18167, "\"", 18220, 2);
                    WriteAttributeValue("", 18174, "SettingsModel.AccessSettings.", 18174, 29, true);
#line 247 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                    WriteAttributeValue("", 18203, s.Key.ToString(), 18203, 17, false);

#line default
#line hidden
                    EndWriteAttribute();
                    BeginContext(18221, 3, true);
                    WriteLiteral(">\r\n");
                    EndContext();
#line 248 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                    for (int i = 1; i <= accessLevels.Count; ++i)
                    {
                        if (i == settingAccessLevel)
                        {
#line default
#line hidden
                            BeginContext(18428, 39, true);
                            WriteLiteral("                                <option");
                            EndContext();
                            BeginWriteAttribute("value", " value=\"", 18467, "\"", 18477, 1);
#line 252 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                            WriteAttributeValue("", 18475, i, 18475, 2, false);

#line default
#line hidden
                            EndWriteAttribute();
                            BeginContext(18478, 10, true);
                            WriteLiteral(" selected>");
                            EndContext();
                            BeginContext(18489, 19, false);
#line 252 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                            Write(accessLevels[i - 1]);

#line default
#line hidden
                            EndContext();
                            BeginContext(18508, 11, true);
                            WriteLiteral("</option>\r\n");
                            EndContext();
#line 253 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                        }
                        else
                        {
#line default
#line hidden
                            BeginContext(18627, 39, true);
                            WriteLiteral("                                <option");
                            EndContext();
                            BeginWriteAttribute("value", " value=\"", 18666, "\"", 18676, 1);
#line 256 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                            WriteAttributeValue("", 18674, i, 18674, 2, false);

#line default
#line hidden
                            EndWriteAttribute();
                            BeginContext(18677, 1, true);
                            WriteLiteral(">");
                            EndContext();
                            BeginContext(18679, 19, false);
#line 256 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                            Write(accessLevels[i - 1]);

#line default
#line hidden
                            EndContext();
                            BeginContext(18698, 11, true);
                            WriteLiteral("</option>\r\n");
                            EndContext();
#line 257 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                        }
                    }

#line default
#line hidden
                    BeginContext(18775, 39, true);
                    WriteLiteral("                            </select>\r\n");
                    EndContext();
#line 260 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                }
                else
                {
#line default
#line hidden
                    BeginContext(18927, 36, false);
#line 263 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                    Write(accessLevels[settingAccessLevel - 1]);

#line default
#line hidden
                    EndContext();
#line 263 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
                    ;
                }

#line default
#line hidden
                BeginContext(18993, 58, true);
                WriteLiteral("                        </td>\r\n                    </tr>\r\n");
                EndContext();
#line 267 "C:\Users\79622\Desktop\Github\StoreCMS\StoreCMS\Views\AdminPanel\Settings.cshtml"
            }

#line default
#line hidden
            BeginContext(19074, 45, true);
            WriteLiteral("                </table>\r\n            </form>");
            EndContext();
        }