HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/RMourik/bassol.nl/wwwroot/CMSAdminControls/UI/UniSelector/SelectionDialog.aspx.cs
using System;
using System.Collections;

using CMS.Helpers;
using CMS.UIControls;
using CMS.ExtendedControls;

public partial class CMSAdminControls_UI_UniSelector_SelectionDialog : CMSModalPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        // Try to get parameters...
        string identifier = QueryHelper.GetString("params", null);
        Hashtable parameters = (Hashtable)WindowHelper.GetItem(identifier);

        CurrentMaster.PanelContent.RemoveCssClass("dialog-content");

        // ... and validate hash
        if ((QueryHelper.ValidateHash("hash", "selectedvalue")) && (parameters != null))
        {
            selectionDialog.LocalizeItems = QueryHelper.GetBoolean("localize", true);
            // Load resource prefix
            string resourcePrefix = ValidationHelper.GetString(parameters["ResourcePrefix"], "general");

            // Set the page title
            string titleText = GetString(resourcePrefix + ".selectitem|general.selectitem");

            PageTitle.TitleText = titleText;
            Page.Title = titleText;

            var selectionMode = (SelectionModeEnum)parameters["SelectionMode"];

            // Show the OK button if needed
            switch (selectionMode)
            {
                case SelectionModeEnum.Multiple:
                case SelectionModeEnum.MultipleTextBox:
                case SelectionModeEnum.MultipleButton:
                    {
                        SetSaveJavascript("return US_Submit();");
                        SetSaveResourceString("general.select");
                    }
                    break;
            }
        }
        else
        {
            // Redirect to error page
            URLHelper.Redirect(ResolveUrl("~/CMSMessages/Error.aspx?title=" + ResHelper.GetString("dialogs.badhashtitle") + "&text=" + ResHelper.GetString("dialogs.badhashtext")));
        }
    }
}