Files
MoonPro.net/MP-ADM/forceUser.aspx.cs
T
2018-10-27 11:58:26 +02:00

46 lines
1.2 KiB
C#

using System;
public partial class forceUser : System.Web.UI.Page
{
protected string _nextPage
{
get
{
string pagina = SteamWare.memLayer.ML.StringSessionObj("nextPage");
if (pagina == "")
{
pagina = "menu.aspx";
}
return pagina;
}
}
protected void Page_Load(object sender, EventArgs e)
{
Mod_login1.modoLogin = SteamWare.loginMode.forceUser;
}
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
Mod_login1.Login_ok += new EventHandler(Mod_login1_Login_ok);
Mod_login1.Login_Error += new EventHandler(Mod_login1_Login_Error);
}
void Mod_login1_Login_Error(object sender, EventArgs e)
{
//Response.Redirect("./unauthorized.aspx");
}
void Mod_login1_Login_ok(object sender, EventArgs e)
{
Response.Redirect(_nextPage);
}
protected override void OnUnload(EventArgs e)
{
base.OnUnload(e);
Mod_login1.Login_ok -= new EventHandler(Mod_login1_Login_ok);
Mod_login1.Login_Error -= new EventHandler(Mod_login1_Login_Error);
}
}