using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class landing_login : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        WebApp.CheckSiteLanguageCookie();
        
        Session.Clear(); 

        if (IhBoxSystemtConfiguration.InitialConfigurationStatus == SystemInitialConfigurationStatus.Configured)
        {
            string action = (String.IsNullOrEmpty(Request.QueryString["action"])) ? null : (Request.QueryString["action"]).ToUpper();
            switch (action)
            {                    
                case "RESET_PASSWORD":
                    login_panel.Style.Add("display", "none");
                    reset_password_panel.Style.Add("display", "block");
                    login_link.Style.Add("display", "block");
                    forgot_password_link.Style.Add("display", "none");
                    break;
                case "FORGOT_PASSWORD":
                    login_panel.Style.Add("display", "none");
                    forgot_password_panel.Style.Add("display", "block");
                    login_link.Style.Add("display", "block");
                    forgot_password_link.Style.Add("display", "none");
                    break;
                case "LOGIN_WITH_DOMAIN":
                    login_panel.Style.Add("display", "none");
                    login_with_domain_panel.Style.Add("display", "block"); 
                    login_link.Style.Add("display", "block");
                    forgot_password_link.Style.Add("display", "none");
                    break;
            }
        }
        else
        {
            Response.Redirect(ResolveUrl("~/landing/initConfig/initConfig.aspx"));
        }
    }
}