Beispiel #1
0
        public IActionResult AdminPanel(AdminPanelPages pageID, int?itemID, string path, IFormFile uploadedFile)
        {
            AccessLevelConfiguration accessLevelConfiguration = HttpContext.RequestServices.GetService <AccessLevelConfiguration>();

            HttpContext.Items["AccessLevelConfiguration"] = accessLevelConfiguration;
            User user = SecurityFunctions.CheckCookies(db, HttpContext);

            if (!SecurityFunctions.HasAccessTo(pageID, user, HttpContext))
            {
                return(RedirectToAction(nameof(AdminPanel)));
            }

            HttpContext.Items["User"]            = user;
            HttpContext.Items["LogLocalization"] = localization;

            switch (pageID)
            {
            case AdminPanelPages.AddProductImage:
                ImagesManagementFunctions.UploadProductImageToServer(db, uploadedFile, itemID, HttpContext, out bool successfullyUploadedImage);
                if (successfullyUploadedImage)
                {
                    return(StatusCode(200));
                }
                else
                {
                    return(StatusCode(415));
                }

            case AdminPanelPages.UploadFile:
                FileManagerManagementFunctions.UploadFileToServer(db, path, uploadedFile, HttpContext, out bool successfullyUploadedFile);
                if (successfullyUploadedFile)
                {
                    return(StatusCode(200));
                }
                else
                {
                    return(StatusCode(415));
                }

            default:
                return(RedirectToAction(nameof(AdminPanel)));
            }
        }
Beispiel #2
0
        public IActionResult AdminPanel(Model model)
        {
            // Проверяем кукисы пользователя на наличие информации о предыдущем входе
            // Если кукисы некорректны, либо вышло время возможного бездействия, то
            // отправляем пользователя на логин форму
            User user = SecurityFunctions.CheckCookies(db, HttpContext);

            if (user == null)
            {
                return(LoginForm());
            }
            // Создаем объект для проверки уровней доступа и передаем его в контейнер Items
            // Объект AccessLevelConfiguration используется в методе HasAccessTo(...)
            // Передача в контейнер обязательна, т.к. эти методы вызываются не только внутри контроллера,
            // но и внутри представлений
            AccessLevelConfiguration accessLevelConfiguration = HttpContext.RequestServices.GetService <AccessLevelConfiguration>();

            HttpContext.Items["AccessLevelConfiguration"] = accessLevelConfiguration;
            if (!SecurityFunctions.HasAccessTo(AdminPanelPages.MainPage, user, HttpContext))
            {
                return(LoginForm());
            }
            if (model.PageId.HasValue && model.PageId.Value == AdminPanelPages.UserActions)
            {
                if (!SecurityFunctions.HasAccessTo(AdminPanelPages.GetUserLog, user, HttpContext))
                {
                    model.PageId = AdminPanelPages.MainPage;
                }
            }
            else
            {
                if (!SecurityFunctions.HasAccessTo(model.PageId, user, HttpContext))
                {
                    model.PageId = AdminPanelPages.MainPage;
                }
            }

            HttpContext.Items["User"] = user;

            switch (model.PageId)
            {
            case AdminPanelPages.Pages:
                return(Pages());

            case AdminPanelPages.AddPage:
                return(AddPage());

            case AdminPanelPages.EditPage:
                return(EditPage(model.itemID));

            case AdminPanelPages.Categories:
                return(Categories());

            case AdminPanelPages.AddCategory:
                return(AddCategory());

            case AdminPanelPages.EditCategory:
                return(EditCategory(model.itemID));

            case AdminPanelPages.CategoryProducts:
                return(CategoryProducts(model.itemID));

            case AdminPanelPages.AddProduct:
                return(AddProduct(model.itemID));

            case AdminPanelPages.EditProduct:
                return(EditProduct(model.itemID));

            case AdminPanelPages.ProductImages:
                return(ProductImages(model.itemID));

            case AdminPanelPages.Redirections:
                return(Redirections());

            case AdminPanelPages.Templates:
                return(Templates());

            case AdminPanelPages.AddTemplate:
                return(AddTemplate());

            case AdminPanelPages.EditTemplate:
                return(EditTemplate(model.itemID));

            case AdminPanelPages.Chunks:
                return(Chunks());

            case AdminPanelPages.AddChunk:
                return(AddChunk());

            case AdminPanelPages.EditChunk:
                return(EditChunk(model.itemID));

            case AdminPanelPages.FileManager:
                return(FileManager(model.Path));

            case AdminPanelPages.EditStyle:
                return(EditCssFile(model.Path));

            case AdminPanelPages.EditScript:
                return(EditScriptFile(model.Path));

            case AdminPanelPages.Users:
                return(Users());

            case AdminPanelPages.UserActions:
                return(UserActions(model.itemID));

            case AdminPanelPages.UserTypes:
                return(UserTypes());

            case AdminPanelPages.SynonymsForStrings:
                return(SynonymsForStrings());

            case AdminPanelPages.UserProfile:
                return(UserProfile());

            case AdminPanelPages.Settings:
                return(Settings());

            case AdminPanelPages.GetVisitors:
                return(GetVisitors());

            case AdminPanelPages.GetVisitorActions:
                return(GetVisitorActions(model.itemID));

            case AdminPanelPages.GetUserLog:
                return(GetUserLog(model.itemID, model.CurrentLogDate, HttpContext));

            default:
                return(MainPage());
            }
        }
        public IActionResult AdminPanel(Model model, LoginFormModel loginFormModel)
        {
            HttpContext.Items["LogLocalization"] = localization;
            User user = null;

            if (model.PageId == AdminPanelPages.LoginForm)
            {
                if (SecurityFunctions.IsValidLoginFormData(db, loginFormModel, HttpContext, out user))
                {
                    DatabaseInteraction.AddConnectedUser(db, user, HttpContext);
                    return(StatusCode(200));
                }
                else
                {
                    return(StatusCode(401));
                }
            }

            AccessLevelConfiguration accessLevelConfiguration = HttpContext.RequestServices.GetService <AccessLevelConfiguration>();

            HttpContext.Items["AccessLevelConfiguration"] = accessLevelConfiguration;
            user = SecurityFunctions.CheckCookies(db, HttpContext);
            if (!SecurityFunctions.HasAccessTo(model.PageId, user, HttpContext))
            {
                return(RedirectToAction(nameof(AdminPanel)));
            }

            HttpContext.Items["User"] = user;

            switch (model.PageId)
            {
            case AdminPanelPages.AddPage:
                model.PageModel.PageType = PagesManagement.PageType.Usual;
                DatabaseInteraction.AddPage(db, model.PageModel, HttpContext, out bool pageAdded);
                if (pageAdded)
                {
                    string createdPageUrl = $"{HttpContext.Request.Scheme}://{HttpContext.Request.Host}{HttpContext.Request.Path}?pageID={(int)AdminPanelPages.EditPage}&itemID={model.PageModel.ID}";
                    HttpContext.Response.Headers.Add("location", createdPageUrl);
                    return(StatusCode(201));
                }
                else
                {
                    return(StatusCode(422));
                }

            case AdminPanelPages.EditPage:
                model.PageType = PagesManagement.PageType.Usual;
                DatabaseInteraction.EditPage(db, model, HttpContext, out bool pageEdited);
                if (pageEdited)
                {
                    return(StatusCode(200));
                }
                else
                {
                    return(StatusCode(422));
                }

            case AdminPanelPages.AddCategory:
                model.PageModel.PageType = PagesManagement.PageType.Category;
                DatabaseInteraction.AddPage(db, model.PageModel, HttpContext, out bool categoryAdded);
                if (categoryAdded)
                {
                    string createdCategoryUrl = $"{HttpContext.Request.Scheme}://{HttpContext.Request.Host}{HttpContext.Request.Path}?pageID={(int)AdminPanelPages.EditCategory}&itemID={model.PageModel.ID}";
                    HttpContext.Response.Headers.Add("location", createdCategoryUrl);
                    return(StatusCode(201));
                }
                else
                {
                    return(StatusCode(422));
                }

            case AdminPanelPages.EditCategory:
                model.PageType = PagesManagement.PageType.Category;
                DatabaseInteraction.EditPage(db, model, HttpContext, out bool categoryEdited);
                if (categoryEdited)
                {
                    return(StatusCode(200));
                }
                else
                {
                    return(StatusCode(422));
                }

            case AdminPanelPages.AddProduct:
                DatabaseInteraction.AddProduct(db, model.PageModel, model.itemID, HttpContext, out bool productAdded);
                if (productAdded)
                {
                    string createdProductUrl = $"{HttpContext.Request.Scheme}://{HttpContext.Request.Host}{HttpContext.Request.Path}?pageID={(int)AdminPanelPages.EditProduct}&itemID={model.PageModel.ID}";
                    HttpContext.Response.Headers.Add("location", createdProductUrl);
                    return(StatusCode(201));
                }
                else
                {
                    return(StatusCode(422));
                }

            case AdminPanelPages.EditProduct:
                DatabaseInteraction.EditProduct(db, model.PageModel, model.itemID, HttpContext, out bool productEdited);
                if (productEdited)
                {
                    return(StatusCode(200));
                }
                else
                {
                    return(StatusCode(422));
                }

            case AdminPanelPages.AddRedirection:
                DatabaseInteraction.AddRedirection(db, model.RedirectionModel, HttpContext, out bool redirectionAdded);
                if (redirectionAdded)
                {
                    return(StatusCode(201));
                }
                else
                {
                    return(StatusCode(422));
                }

            case AdminPanelPages.EditRedirection:
                DatabaseInteraction.EditRedirection(db, model.itemID, model.RedirectionModel, HttpContext, out bool redirectionEdited);
                if (redirectionEdited)
                {
                    return(StatusCode(200));
                }
                else
                {
                    return(StatusCode(422));
                }

            case AdminPanelPages.AddTemplate:
                DatabaseInteraction.AddTemplate(db, model.TemplateModel, HttpContext, out bool templateAdded);
                if (templateAdded)
                {
                    string createdTemplateUrl = $"{HttpContext.Request.Scheme}://{HttpContext.Request.Host}{HttpContext.Request.Path}?pageID={(int)AdminPanelPages.EditTemplate}&itemID={model.TemplateModel.ID}";
                    HttpContext.Response.Headers.Add("location", createdTemplateUrl);
                    return(StatusCode(201));
                }
                else
                {
                    return(StatusCode(422));
                }

            case AdminPanelPages.EditTemplate:
                DatabaseInteraction.EditTemplate(db, model.itemID, model.TemplateModel, HttpContext, out bool templateEdited);
                if (templateEdited)
                {
                    return(StatusCode(200));
                }
                else
                {
                    return(StatusCode(422));
                }

            case AdminPanelPages.AddChunk:
                DatabaseInteraction.AddChunk(db, model.TemplateModel, HttpContext, out bool chunkAdded);
                if (chunkAdded)
                {
                    string createdChunkUrl = $"{HttpContext.Request.Scheme}://{HttpContext.Request.Host}{HttpContext.Request.Path}?pageID={(int)AdminPanelPages.EditChunk}&itemID={model.TemplateModel.ID}";
                    HttpContext.Response.Headers.Add("location", createdChunkUrl);
                    return(StatusCode(201));
                }
                else
                {
                    return(StatusCode(422));
                }

            case AdminPanelPages.EditChunk:
                DatabaseInteraction.EditChunk(db, model.itemID, model.TemplateModel, HttpContext, out bool chunkEdited);
                if (chunkEdited)
                {
                    return(StatusCode(200));
                }
                else
                {
                    return(StatusCode(422));
                }

            case AdminPanelPages.CreateFolder:
                FileManagerManagementFunctions.CreateFolder(db, model.Path, model.Name, HttpContext, out bool folderCreated);
                if (folderCreated)
                {
                    return(StatusCode(201));
                }
                else
                {
                    return(StatusCode(422));
                }

            case AdminPanelPages.CreateStyle:
                FileManagerManagementFunctions.CreateCssFile(db, model.Path, model.Name, HttpContext, out bool styleFileCreated);
                if (styleFileCreated)
                {
                    return(StatusCode(201));
                }
                else
                {
                    return(StatusCode(422));
                }

            case AdminPanelPages.CreateScript:
                FileManagerManagementFunctions.CreateScriptFile(db, model.Path, model.Name, HttpContext, out bool scriptFileCreated);
                if (scriptFileCreated)
                {
                    return(StatusCode(201));
                }
                else
                {
                    return(StatusCode(422));
                }

            case AdminPanelPages.EditStyle:
                FileManagerManagementFunctions.EditCssFile(db, model.Path, model.StyleModel, HttpContext, out string editedStylePath, out bool cssFileEdited);
                if (cssFileEdited)
                {
                    string editedCssFileUrl = $"{HttpContext.Request.Scheme}://{HttpContext.Request.Host}{HttpContext.Request.Path}?pageID={(int)AdminPanelPages.EditStyle}&path={editedStylePath}";
                    HttpContext.Response.Headers.Add("location", editedCssFileUrl);
                    return(StatusCode(200));
                }
                else
                {
                    return(StatusCode(422));
                }

            case AdminPanelPages.EditScript:
                FileManagerManagementFunctions.EditScriptFile(db, model.Path, model.StyleModel, HttpContext, out string editedScriptPath, out bool scriptFileEdited);
                if (scriptFileEdited)
                {
                    string editedScriptFileUrl = $"{HttpContext.Request.Scheme}://{HttpContext.Request.Host}{HttpContext.Request.Path}?pageID={(int)AdminPanelPages.EditScript}&path={editedScriptPath}";
                    HttpContext.Response.Headers.Add("location", editedScriptFileUrl);
                    return(StatusCode(200));
                }
                else
                {
                    return(StatusCode(422));
                }

            case AdminPanelPages.AddUser:
                DatabaseInteraction.AddUser(db, model.UserModel, HttpContext, out int userAdditionStatusCode);
                return(StatusCode(userAdditionStatusCode));

            case AdminPanelPages.EditUser:
                DatabaseInteraction.EditUser(db, model.itemID, model.UserModel, HttpContext, out int userEditionStatusCode);
                return(StatusCode(userEditionStatusCode));

            case AdminPanelPages.AddUserType:
                DatabaseInteraction.AddUserType(db, model.UserTypeModel, HttpContext, out bool userTypeAdded);
                if (userTypeAdded)
                {
                    return(StatusCode(201));
                }
                else
                {
                    return(StatusCode(422));
                }

            case AdminPanelPages.EditUserType:
                DatabaseInteraction.EditUserType(db, model.itemID, model.UserTypeModel, HttpContext, out bool userTypeEdited);
                if (userTypeEdited)
                {
                    return(StatusCode(200));
                }
                else
                {
                    return(StatusCode(422));
                }

            case AdminPanelPages.AddSynonymForString:
                DatabaseInteraction.AddSynonymForString(db, model.SynonymForStringModel, HttpContext, out bool synonymForStringAdded);
                if (synonymForStringAdded)
                {
                    return(StatusCode(201));
                }
                else
                {
                    return(StatusCode(422));
                }

            case AdminPanelPages.EditSynonymForString:
                DatabaseInteraction.EditSynonymForString(db, model.itemID, model.SynonymForStringModel, HttpContext, out bool synonymForStringEdited);
                if (synonymForStringEdited)
                {
                    return(StatusCode(200));
                }
                else
                {
                    return(StatusCode(422));
                }

            case AdminPanelPages.EditUserData:
                DatabaseInteraction.EditUserData(db, model.UserModel, HttpContext, out int userDataEditionStatusCode);
                return(StatusCode(userDataEditionStatusCode));

            case AdminPanelPages.EditSettings:
                return(EditSettings(db, model.SettingsModel, HttpContext));

            default:
                return(RedirectToAction(nameof(AdminPanel)));
            }
        }
        public IActionResult AdminPanel(AdminPanelPages pageID, int?itemID, int?imageID, string path)
        {
            AccessLevelConfiguration accessLevelConfiguration = HttpContext.RequestServices.GetService <AccessLevelConfiguration>();

            HttpContext.Items["AccessLevelConfiguration"] = accessLevelConfiguration;
            User user = SecurityFunctions.CheckCookies(db, HttpContext);

            if (pageID == AdminPanelPages.Exit)
            {
                DatabaseInteraction.Exit(db, user, HttpContext, out int exitStatusCode);
                return(StatusCode(exitStatusCode));
            }
            if (!SecurityFunctions.HasAccessTo(pageID, user, HttpContext))
            {
                return(RedirectToAction(nameof(AdminPanel)));
            }

            HttpContext.Items["User"]            = user;
            HttpContext.Items["LogLocalization"] = localization;

            switch (pageID)
            {
            case AdminPanelPages.DeletePage:
                DatabaseInteraction.DeletePage(db, PageType.Usual, itemID, HttpContext, out bool pageDeleted);
                if (pageDeleted)
                {
                    return(StatusCode(200));
                }
                else
                {
                    return(StatusCode(404));
                }

            case AdminPanelPages.DeleteCategory:
                DatabaseInteraction.DeletePage(db, PageType.Category, itemID, HttpContext, out bool categoryDeleted);
                if (categoryDeleted)
                {
                    return(StatusCode(200));
                }
                else
                {
                    return(StatusCode(404));
                }

            case AdminPanelPages.DeleteProduct:
                DatabaseInteraction.DeleteProduct(db, itemID, HttpContext, out bool productDeleted);
                if (productDeleted)
                {
                    return(StatusCode(200));
                }
                else
                {
                    return(StatusCode(404));
                }

            case AdminPanelPages.DeleteProductImage:
                ImagesManagementFunctions.DeleteProductImage(db, itemID, imageID, HttpContext, out bool productImageDeleted);
                if (productImageDeleted)
                {
                    return(StatusCode(200));
                }
                else
                {
                    return(StatusCode(404));
                }

            case AdminPanelPages.DeleteRedirection:
                DatabaseInteraction.DeleteRedirection(db, itemID, HttpContext, out bool redirectionDeleted);
                if (redirectionDeleted)
                {
                    return(StatusCode(200));
                }
                else
                {
                    return(StatusCode(404));
                }

            case AdminPanelPages.DeleteTemplate:
                DatabaseInteraction.DeleteTemplate(db, itemID, HttpContext, out bool templateDeleted);
                if (templateDeleted)
                {
                    return(StatusCode(200));
                }
                else
                {
                    return(StatusCode(404));
                }

            case AdminPanelPages.DeleteChunk:
                DatabaseInteraction.DeleteChunk(db, itemID, HttpContext, out bool chunkDeleted);
                if (chunkDeleted)
                {
                    return(StatusCode(200));
                }
                else
                {
                    return(StatusCode(404));
                }

            case AdminPanelPages.DeleteFileOrFolder:
                FileManagerManagementFunctions.DeleteFileOrFolder(db, path, HttpContext, out string redirectPath);
                if (redirectPath == null)
                {
                    return(StatusCode(404));
                }
                else
                {
                    string redirectUrl = $"{HttpContext.Request.Scheme}://{HttpContext.Request.Host}{HttpContext.Request.Path}?pageID={(int)AdminPanelPages.FileManager}&path={redirectPath}";
                    HttpContext.Response.Headers.Add("location", redirectUrl);
                    return(StatusCode(200));
                }

            case AdminPanelPages.DeleteUser:
                DatabaseInteraction.DeleteUser(db, itemID, HttpContext, out int userDeletionStatusCode);
                return(StatusCode(userDeletionStatusCode));

            case AdminPanelPages.DeleteUserType:
                DatabaseInteraction.DeleteUserType(db, itemID, HttpContext, out bool userTypeDeleted);
                if (userTypeDeleted)
                {
                    return(StatusCode(200));
                }
                else
                {
                    return(StatusCode(404));
                }

            case AdminPanelPages.DeleteSynonymForString:
                DatabaseInteraction.DeleteSynonymForString(db, itemID, HttpContext, out bool synonymForStringDeleted);
                if (synonymForStringDeleted)
                {
                    return(StatusCode(200));
                }
                else
                {
                    return(StatusCode(404));
                }

            default:
                return(RedirectToAction(nameof(AdminPanel)));
            }
        }
        #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();
        }