using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using System.Xml;
using System.Data;
using System.IO;

namespace QuintoCaminoV2
{
    public partial class Template : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!(Page.IsPostBack))
            {
                AdministrarMenu(Session["idUsuario"]);
              
            }
        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
           
           
            
        }


        public void AdministrarMenu(object Session)
        {
            if (Session == null)
            {
                hp_Perfil.Visible = false;
                hp_administrar.Visible = false;
                lnkCerrarSesion.Visible = false;
                lnkbtnMiscursos.Visible = false;
            }
            else
            {
                lnkbtnMiscursos.Visible = true;
                hp_Perfil.Visible = true;
                hp_administrar.Visible = true;
                lnkCerrarSesion.Visible = true;

                hp_session.Visible = false;
                hp_registrarse.Visible = false;
            }

        }

        protected void lnkIniciaSesion_Click(object sender, EventArgs e)
        {
            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "myModal", "$('#myModal').modal();", true);
        }

        protected void LinkButton1_Click(object sender, EventArgs e)
        {

        }

       
        protected void lnkCerrarSesion_Click(object sender, EventArgs e)
        {
            FormsAuthentication.SignOut();
            Session.Abandon();
            Session.Clear();
            Response.Redirect("~/");
        }
    }
}