This commit is contained in:
@@ -27,6 +27,9 @@ Partial Class LogIn
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
'"187.158.96.163" es la de mi casa
|
||||
'If (Context.Session("UsuarioSIG") IsNot Nothing) OrElse Not User.Identity.IsAuthenticated Then
|
||||
|
||||
'End If
|
||||
Dim iplist As String() = New String() {"", ""}
|
||||
If HttpContext.Current.Request.ServerVariables("REMOTE_ADDR").ToString().Contiene(iplist) Then
|
||||
Response.Redirect("http://www.adsistemas.mx/login.aspx") 'si alguien lo ve es correcto la pagina vieja de adsistemas
|
||||
@@ -172,6 +175,10 @@ Partial Class LogIn
|
||||
End Property
|
||||
Dim BtnLogIn_Clickenter As Integer = 0
|
||||
Protected Sub BtnLogIn_Click(ByVal sender As Object, ByVal e As EventArgs) 'Handles CmdLogIn.Click
|
||||
Dim ReturnUrl As String = "/"
|
||||
If Request("ReturnUrl") IsNot Nothing Then
|
||||
ReturnUrl = Request("ReturnUrl").ToString()
|
||||
End If
|
||||
If BtnLogIn_Clickenter = 0 Then 'esta variable se recicla con cada postaback
|
||||
BtnLogIn_Clickenter = 1
|
||||
Dim ObjUsuario As New ClsSisUsuarios
|
||||
@@ -197,19 +204,22 @@ Partial Class LogIn
|
||||
|
||||
If Usuario.CvePlataforma = 6 And Usuario.CveRol = 10 Then
|
||||
'PLATAFORMA PORTAL CLIENTE
|
||||
FormsAuthentication.RedirectFromLoginPage(_sessionid, False)
|
||||
Response.Redirect("/PortalCliente/PortalCliente.aspx", True)
|
||||
'FormsAuthentication.RedirectFromLoginPage(_sessionid, False)
|
||||
'Response.Redirect("/PortalCliente/PortalCliente.aspx", True)
|
||||
|
||||
ReturnUrl = "/PortalCliente/PortalCliente.aspx"
|
||||
ElseIf Usuario.CvePlataforma = 7 And Usuario.CveRol = 11 Then
|
||||
'PLATAFORMA PORTAL PROVEEDOR
|
||||
FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario), False)
|
||||
Response.Redirect("/PortalProveedor/PortalProveedor.aspx", True)
|
||||
'FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario), False)
|
||||
'Response.Redirect("/PortalProveedor/PortalProveedor.aspx", True)
|
||||
|
||||
ReturnUrl = "/PortalProveedor/PortalProveedor.aspx"
|
||||
ElseIf Usuario.CveRol = 1200 And Usuario.Acceso > 0 Then
|
||||
'PLATAFORMA GPS
|
||||
Usuario.CvePlataforma = 3
|
||||
FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario), False)
|
||||
|
||||
Response.Redirect("/PortalGPS/InicioGPS.aspx", True)
|
||||
'FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario), False)
|
||||
'Response.Redirect("/PortalGPS/InicioGPS.aspx", True)
|
||||
ReturnUrl = "/PortalGPS/InicioGPS.aspx"
|
||||
Else
|
||||
'PLATAFORMA SIG
|
||||
CType(Session("UsuarioSIG"), Usuario).CvePlataforma = 1
|
||||
@@ -219,11 +229,16 @@ Partial Class LogIn
|
||||
If dt.Rows.Count > 1 Then
|
||||
Usuario.MultipleEmpresa = True
|
||||
End If
|
||||
FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario), False)
|
||||
'FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario), False)
|
||||
End If
|
||||
End If
|
||||
dt.Dispose()
|
||||
End If
|
||||
|
||||
Dim cookie = FormsAuthentication.GetAuthCookie(Encripta(Usuario.CveUsuario), False)
|
||||
Response.Cookies.Add(cookie)
|
||||
'RegistraScript(String.Format("iniciaSesion('{0}')", ReturnUrl.Replace("'", "\'")))
|
||||
Response.Redirect(ReturnUrl, True)
|
||||
Else
|
||||
Alert("El usuario no esta autorizado en este equipo, favor de contactar al administrador de usuarios.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user