Logout Button wurde gefixed

This commit is contained in:
ja
2021-09-16 14:45:29 +02:00
parent 773c15e9e6
commit 64c3227b33
6 changed files with 86 additions and 43 deletions

View File

@@ -29,9 +29,7 @@
<%@ import Namespace="MySql.Data.MySqlClient" %> <%@ import Namespace="MySql.Data.MySqlClient" %>
<script runat="server"> <script runat="server">
Sub Page_Load() Handles Me.Load Sub Page_Load() Handles Me.Load
'Login-Validierung 'Login-Validierung
If Not Me.Page.User.Identity.IsAuthenticated Then If Not Me.Page.User.Identity.IsAuthenticated Then
FormsAuthentication.RedirectToLoginPage() FormsAuthentication.RedirectToLoginPage()
@@ -66,7 +64,6 @@
' Response.Redirect("~{login/login.aspx")' ' Response.Redirect("~{login/login.aspx")'
'End If ' 'End If '
End Sub End Sub
' Public ReadOnly Property CurrentCity() As String ' Public ReadOnly Property CurrentCity() As String
' Get ' Get
' Return "asd" ' Return "asd"
@@ -156,18 +153,15 @@
navParent = "admin.aspx" navParent = "admin.aspx"
imgPath = "../" imgPath = "../"
End If End If
Dim curentMenuId As String = "1" Dim curentMenuId As String = "1"
If Not Request.QueryString("menuID") Is Nothing Then If Not Request.QueryString("menuID") Is Nothing Then
curentMenuId = Request.QueryString("menuID") curentMenuId = Request.QueryString("menuID")
End If End If
If Not Request.QueryString("lan") Is Nothing Then If Not Request.QueryString("lan") Is Nothing Then
laenderkuerzel = Request.QueryString("lan") laenderkuerzel = Request.QueryString("lan")
End If End If
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
Dim LT As New VERAG_PROG_ALLGEMEIN.cLanguageText_LIST("HOMEPAGE", "LOGIN", "STATUS", "") Dim LT As New VERAG_PROG_ALLGEMEIN.cLanguageText_LIST("HOMEPAGE", "LOGIN", "STATUS", "")
Dim V_LST As New VERAG_PROG_ALLGEMEIN.cVermerkeCodes_LIST Dim V_LST As New VERAG_PROG_ALLGEMEIN.cVermerkeCodes_LIST
Dim lan = "DE" Dim lan = "DE"
@@ -190,6 +184,7 @@
ElseIf laenderkuerzel = "TR" And lan3 = "0" Then ElseIf laenderkuerzel = "TR" And lan3 = "0" Then
flagpath = "images/flags/flagge_TR.gif" flagpath = "images/flags/flagge_TR.gif"
End If End If
%> %>
<li class="wrapper"> <li class="wrapper">
<!-- Sidebar --> <!-- Sidebar -->
@@ -275,7 +270,7 @@
<ul style="list-style: none;"class="collapse list-unstyled" id="UserSubmenu1"> <ul style="list-style: none;"class="collapse list-unstyled" id="UserSubmenu1">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
<li><button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal" style="text-decoration: none;background-color:#fff;color:#043381;text-align:left;border:none;font-size:16px;white-space: nowrap; height:20px"><img src="../images/Icons/main/gear_blue.png"; style="width:15px; height:15px;color:#043381;background-color:#fff;margin-right:6px;" />Profil bearbeiten</button> </li> <li><button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal" style="text-decoration: none;background-color:#fff;color:#043381;text-align:left;border:none;font-size:16px;white-space: nowrap; height:20px"><img src="../images/Icons/main/gear_blue.png"; style="width:15px; height:15px;color:#043381;background-color:#fff;margin-right:6px;" />Profil bearbeiten</button> </li>
<li><button type="button" class="btn btn-primary" id="LogoutButton1" href="../login/Logout.aspx" style="text-decoration: none;background-color:#fff;color:#043381;text-align:left;border:none;font-size:16px;width:200px;z-index:1032;margin-left:-16px"><img src="../images/Icons/main/Logout.svg.png"; style="font-size:14px;width:20px; height:20px;color:#043381;background-color:#fff; margin-right:6px;"/>Logout</button></li> <li><a type="button" class="btn btn-primary" href="../login/Logout.aspx" style="text-decoration: none;background-color:#fff;color:#043381;text-align:left;border:none;font-size:16px;width:200px;z-index:1032;margin-left:-16px"><img src="../images/Icons/main/Logout.svg.png"; style="font-size:14px;width:20px; height:20px;color:#043381;background-color:#fff; margin-right:6px;"/>Logout</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@@ -461,7 +456,7 @@
</button> </button>
<ul class="dropdown-content" id="dropdownmenuecont" style="width:210px;right:-198px;top:45px;z-index:1032;margin-right:-2px;"> <ul class="dropdown-content" id="dropdownmenuecont" style="width:210px;right:-198px;top:45px;z-index:1032;margin-right:-2px;">
<li><button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal" style="text-decoration: none;background-color:#fff;color:#043381;z-index:1032;text-align:left;margin-left:-16px;border:none;font-size:16px;white-space: nowrap; width:200px"><img src="../images/Icons/main/gear_blue.png"; style="font-size:14px;width:15px; height:15px;color:#043381;background-color:#fff;margin-right:6px;" />Profil bearbeiten</button></li> <li><button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal" style="text-decoration: none;background-color:#fff;color:#043381;z-index:1032;text-align:left;margin-left:-16px;border:none;font-size:16px;white-space: nowrap; width:200px"><img src="../images/Icons/main/gear_blue.png"; style="font-size:14px;width:15px; height:15px;color:#043381;background-color:#fff;margin-right:6px;" />Profil bearbeiten</button></li>
<li><button type="button" class="btn btn-primary" id="LogoutButton1" style="text-decoration: none;background-color:#fff;color:#043381;text-align:left;border:none;font-size:16px;width:200px;z-index:1032;margin-left:-16px;width:200px"><img src="../images/Icons/main/Logout.svg.png"; style="font-size:14px;width:20px; height:20px;color:#043381;background-color:#fff; margin-right:6px;"/>Logout</button></li> <li><a type="button" class="btn btn-primary" href="../login/Logout.aspx" style="text-decoration: none;background-color:#fff;color:#043381;text-align:left;border:none;font-size:16px;width:200px;z-index:1032;margin-left:-16px;width:200px"><img src="../images/Icons/main/Logout.svg.png"; style="font-size:14px;width:20px; height:20px;color:#043381;background-color:#fff; margin-right:6px;"/>Logout</a></li>
<!-- <div class="dropdown-divider"></div>--> <!-- <div class="dropdown-divider"></div>-->
</ul></div> </ul></div>

View File

@@ -41,6 +41,7 @@
<h3>Hier finden Sie Informationen zu den aktuellen Aufträgen.</h3> <h3>Hier finden Sie Informationen zu den aktuellen Aufträgen.</h3>
</div> </div>
<%Try <%Try
VERAG_PROG_ALLGEMEIN.cAllgemein.ERR_OP_GLOBAL = VERAG_PROG_ALLGEMEIN.ERROR_OP.SHOW VERAG_PROG_ALLGEMEIN.cAllgemein.ERR_OP_GLOBAL = VERAG_PROG_ALLGEMEIN.ERROR_OP.SHOW
'Dim AD As New VERAG_PROG_ALLGEMEIN.cAdressen(799124) 'Dim AD As New VERAG_PROG_ALLGEMEIN.cAdressen(799124)
Dim VERAGSQL = New VERAG_PROG_ALLGEMEIN.SQL Dim VERAGSQL = New VERAG_PROG_ALLGEMEIN.SQL
@@ -132,7 +133,6 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div style="height:/*24px*/1.873536299765808vh"></div> <div style="height:/*24px*/1.873536299765808vh"></div>
@@ -165,7 +165,6 @@
</div> </div>
</div></div></div> </div></div></div>
</div> </div>
<br /><br /><br /> <br /><br /><br />
<% End If <% End If
End If End If
@@ -173,9 +172,6 @@
Catch ex As Exception Catch ex As Exception
Response.Write(ex.Message & ex.StackTrace) Response.Write(ex.Message & ex.StackTrace)
End Try %> End Try %>
<div></div></div> <div></div></div>
<%-- <div class="footer_menu"> <%-- <div class="footer_menu">
<div class="footer_menu_content"> <div class="footer_menu_content">
@@ -200,7 +196,6 @@
<script type='text/javascript'> <script type='text/javascript'>
$(document).ready(function () { $(document).ready(function () {
$("#container2").hide(); $("#container2").hide();
$('#<%=RadioButtonList1.ClientID %> input[type="radio"]').change(function () { $('#<%=RadioButtonList1.ClientID %> input[type="radio"]').change(function () {
if ($(this).val() == "Freigabe") { if ($(this).val() == "Freigabe") {
$("#container2").show(); $("#container2").show();

View File

@@ -5,13 +5,40 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server"> <head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" title="VERAG Logout"/>
<link rel="stylesheet" type="text/css" href="/css/navbarsidebar.css"/>
<link rel="stylesheet" type="text/css" href="css/main.css"/>
<link rel="stylesheet" type="text/css" href="css/style.css"/>
<link rel="shortcut icon" href="images/Icons/favicon/favicon.ico" />
<!-- <link rel="stylesheet" type="text/css" href="css/edit_main.css"> -->
<script src="js/netzwerk.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css"/>
<link rel="stylesheet" type="text/css" href="../stylesheets/example.css"/>
</head> </head>
<body> <body>
<form id="form1" runat="server"> <form id="form1" runat="server">
<div> <div>
<%If Me.Page.User.Identity.IsAuthenticated = False Then %>
<h1>Du wurdest erfolgreich ausgeloggt.</h1>
<button type="button" id="btn_backtostart" class="btn btn-primary">Zurück zur Startseite!</button>
<%Else %>
<h1>Du bist noch eingeloggt <%=Me.User.Identity.Name %>.</h1>
<%End If %>
</div> </div>
</form> </form>
<script type="text/javascript" src="../js/toptions/top_up-min.js"></script>
<script type="text/javascript" src="../js/scrollscript.js"></script>
<!-- JQUERY Script fuer Modal-->
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!-- jQuery CDN - Slim version (=without AJAX) -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<!-- Popper.JS -->
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script>
</body> </body>
</html> </html>

View File

@@ -1,14 +1,33 @@
 
Imports System.Web.Configuration
Partial Class login_Logout Partial Class login_Logout
Inherits System.Web.UI.Page Inherits System.Web.UI.Page
Protected Sub Page_Load(sender As Object, e As EventArgs)
Dim sessionname
Sub Page_Load() Handles Me.Load
FormsAuthentication.SignOut() FormsAuthentication.SignOut()
Dim sessionname = Session.Item("lastpage").ToString Session.Abandon()
Session.Clear() 'clear session
Session.Abandon() 'Abandon session 'clear authentication cookie
Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1)) Dim cookie1 As HttpCookie = New HttpCookie(FormsAuthentication.FormsCookieName, "")
Response.Cache.SetCacheability(HttpCacheability.NoCache) cookie1.Expires = DateTime.Now.AddYears(-1)
Response.Cache.SetNoStore() Response.Cookies.Add(cookie1)
Response.Redirect(sessionname)
'clear session cookie (Not necessary for your current problem but i would recommend you do it anyway)
Dim sessionStateSection As New SessionStateSection
sessionStateSection = WebConfigurationManager.GetSection("system.web/sessionState")
Dim cookie2 As HttpCookie = New HttpCookie(sessionStateSection.CookieName, "")
cookie2.Expires = DateTime.Now.AddYears(-1)
Response.Cookies.Add(cookie2)
Response.Redirect("../newpageJulius_Sidebar.aspx")
End Sub
Protected Sub btn_backtostart_Click(sender As Object, e As EventArgs)
Response.Redirect("../newpageJulius_Sidebar.aspx")
End Sub End Sub
End Class End Class

View File

@@ -370,7 +370,6 @@
navParent = "admin.aspx" navParent = "admin.aspx"
imgPath = "../" imgPath = "../"
End If End If
Dim curentMenuId As String = "1" Dim curentMenuId As String = "1"
If Not Request.QueryString("menuID") Is Nothing Then If Not Request.QueryString("menuID") Is Nothing Then
curentMenuId = Request.QueryString("menuID") curentMenuId = Request.QueryString("menuID")
@@ -431,8 +430,7 @@
If cells >= 3 Then If cells >= 3 Then
%></tr><tr> %></tr><tr>
<% cells = 0 <% cells = 0
End If End If %>
%>
<div class="dropdown-divider"></div> <div class="dropdown-divider"></div>
<!--<td><a href="<%'= navParent%>?menuID=<%'= nav3.id%>&lan=<%'= laenderkuerzel %>"><%'= nav3.bezeichnung %></a></td> --> <!--<td><a href="<%'= navParent%>?menuID=<%'= nav3.id%>&lan=<%'= laenderkuerzel %>"><%'= nav3.bezeichnung %></a></td> -->
<a class="dropdown-item" href="<%= navParent%>?menuID=<%= nav3.id%>&lan=<%= laenderkuerzel %>"><%= nav3.bezeichnung %></a> <a class="dropdown-item" href="<%= navParent%>?menuID=<%= nav3.id%>&lan=<%= laenderkuerzel %>"><%= nav3.bezeichnung %></a>

View File

@@ -1,15 +1,24 @@
 
Imports System.Web.Configuration
Partial Class _Default Partial Class _Default
Inherits System.Web.UI.Page Inherits System.Web.UI.Page
Protected Sub LogoutButton_Click(sender As Object, e As EventArgs) Protected Sub LogoutButton_Click(sender As Object, e As EventArgs)
FormsAuthentication.SignOut() FormsAuthentication.SignOut()
Session.Abandon()
Session.Clear() 'clear session 'clear authentication cookie
Session.Abandon() 'Abandon session Dim cookie1 As HttpCookie = New HttpCookie(FormsAuthentication.FormsCookieName, "")
Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1)) cookie1.Expires = DateTime.Now.AddYears(-1)
Response.Cache.SetCacheability(HttpCacheability.NoCache) Response.Cookies.Add(cookie1)
Response.Cache.SetNoStore()
Session.Add("lastpage", "../newpageJulius_Sidebar.aspx") 'clear session cookie (Not necessary for your current problem but i would recommend you do it anyway)
Dim sessionStateSection As New SessionStateSection
sessionStateSection = WebConfigurationManager.GetSection("system.web/sessionState")
Dim cookie2 As HttpCookie = New HttpCookie(sessionStateSection.CookieName, "")
cookie2.Expires = DateTime.Now.AddYears(-1)
Response.Cookies.Add(cookie2)
Response.Redirect("login/Logout.aspx") Response.Redirect("login/Logout.aspx")
End Sub End Sub
End Class End Class