Login iframe wurde erstellt.

This commit is contained in:
ja
2021-10-06 13:05:07 +02:00
parent 6a30061240
commit c5c53c0216
6 changed files with 424 additions and 1 deletions

41
css/login/Changepw.css Normal file
View File

@@ -0,0 +1,41 @@
body {
font-family: 'Poppins', sans-serif;
background: #fafafa;
background-image: url(../../images/road.jpg);
background-position: center center;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
background-color: #fff;
}
#txt_Pw_WH:invalid {
background-color: indianred;
border-color: red;
color: red;
}
#txt_Pw_WH:valid {
background-color: lightgreen;
border-color: forestgreen;
color: forestgreen;
}
#tbl_main {
font-family: Arial;
font-size: 11px;
border: 1px solid gray
}
#content_container {
display: flex;
justify-content: center;
align-items: center;
width: 1024px;
height: 800px;
margin: 0 auto;
margin-top: auto;
}
.container-fluid {
width: 262px;
height: 216px;
background-color: rgba(255,255,255,0.5);
}

122
login/ChangePW.aspx Normal file
View File

@@ -0,0 +1,122 @@
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ChangePW.aspx.vb" Inherits="login_ChangePW" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ import Namespace="MySql.Data.MySqlClient"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>VERAG Spedition AG Passwort vergessen</title>
<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="../css/login/ForgotPW.css"/>
<link rel="stylesheet" type="text/css" href="../css/example.css"/>
<script type="text/javascript">
function FocusOnInput() {
document.getElementById("UserID").focus();
}
</script>
<script type="text/javascript">
// Vergebe den Event-Handler
document.onkeydown = handleKeyEvent;
// Funktion, die den Event verarbeitet
function handleKeyEvent(e) {
// MSIE nimmt das Event-Objekt aus window.event, DOM-kompatible Browser aus dem e-Funktionsparameter
if (!e) e = window.event;
// keyCode muss 70 sein und ctrlKey true
if (e.keyCode == 68 && e.ctrlKey) {
alert('Strg+D wurde gedrückt');
//topup
}
}
</script>
<!-- <script type="text/javascript" src="../js/toptions/top_up-min.js"></script> -->
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="../css/main.css">
<![endif]-->
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="../css/main.css">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="../css/main.css">
<![endif]-->
<!--[if lte IE 5.5999]>
<link rel="stylesheet" type="text/css" href="../css/main.css">
<![endif]-->
<!--[if gte IE 5.5]>
<link rel="stylesheet" type="text/css" href="../css/main.css">
<![endif]-->
<script type = "text/javascript">
function goBack()
{
window.history.back()
}
</script>
<style>
</style>
</head>
<body>
<div id="content_container">
<div class="container-fluid">
<form id="form1" runat="server">
<table id="tbl_main" cellpadding="0">
<tr style="background-color:#fff; color:#003680;height:30px;">
<td>
<asp:Label ID="Label1" runat="server" style="background-color:#003680" ForeColor="White" Text="Passwortwechsel:" Font-Size="Large"></asp:Label>
</td>
</tr>
<tr style="background-color:#fff; color:#003680;height:30px;">
<td>
<asp:Label ID="lbl_PWEingabe" runat="server" Text="Bitte neues Passwort eingeben:"></asp:Label>
</td>
</tr>
<tr style="background-color:#fff; color:#003680;height:30px;">
<td>
<asp:TextBox id="txt_Pw" runat="server" TextMode="Password" Font-Names="Verdana" ></asp:TextBox>
</td>
</tr>
<tr style="background-color:#fff; color:#003680;height:fit-content;">
<td>
<asp:RequiredFieldValidator ID="reqPassw1txt" runat="server" ErrorMessage="Bitte Passwort eingeben!" ControlToValidate="txt_Pw" Display="Dynamic"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ControlToValidate="txt_Pw" runat="server" ID="RegularExpressionValidator1" ValidationGroup="TXT_val" ValidationExpression="[0-9]{7}" Display="Dynamic" ErrorMessage="Falsche Eingabe!" SetFocusOnError="true"></asp:RegularExpressionValidator>
</td>
</tr>
<tr style="background-color:#fff; color:#003680;height:30px;">
<td>
<asp:Label ID="lbl_PW_WH_Eingabe" runat="server" Text="Bitte neues Passwort wiederholen:"></asp:Label>
</td>
</tr>
<tr style="background-color:#fff; color:#003680;height:30px;">
<td>
<asp:TextBox id="txt_Pw_WH" OnTextChanged="txt_Pw_WH_TextChanged" runat="server" TextMode="Password" Font-Names="Verdana"></asp:TextBox>
</td>
</tr>
<tr style="background-color:#fff; color:#003680;height:fit-content;">
<td>
<asp:CompareValidator ID="confirmPasswordReq" runat="server" ControlToCompare="txt_Pw" ControlToValidate="txt_Pw_WH" ErrorMessage="Password does not match." Display="Dynamic"></asp:CompareValidator>
<asp:RequiredFieldValidator ID="reqPasswtxt" runat="server" ErrorMessage="Bitte Passwort wiederholen!" ControlToValidate="txt_Pw_WH" Display="Dynamic"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ControlToValidate="txt_Pw_WH" runat="server" ID="regexval_txt_KdNrAuftrag" ValidationGroup="TXT_val" ValidationExpression="[0-9]{7}" Display="Dynamic" ErrorMessage="Falsche Eingabe!" SetFocusOnError="true"></asp:RegularExpressionValidator>
</td>
</tr>
<tr style="background-color:#fff; color:#003680;height:30px;">
<td>
<asp:Button ID="btn_submitpw" runat="server" Text="Passwort wechseln" OnClick="btn_submitpw_Click"/>
</td>
</tr>
</table>
</form>
</div>
</div>
</body>
</html>

25
login/ChangePW.aspx.vb Normal file
View File

@@ -0,0 +1,25 @@

Partial Class login_ChangePW
Inherits System.Web.UI.Page
Protected Sub Page_Load(sender As Object, e As EventArgs)
btn_submitpw.Enabled = False
End Sub
Protected Sub txt_Pw_WH_TextChanged(sender As Object, e As EventArgs)
If reqPasswtxt.IsValid AndAlso reqPassw1txt.IsValid AndAlso confirmPasswordReq.IsValid Then
btn_submitpw.Enabled = True
Else
btn_submitpw.Enabled = False
End If
End Sub
Protected Sub btn_submitpw_Click(sender As Object, e As EventArgs)
Dim tempstr As String = ""
If txt_Pw.Text = tempstr Then
End If
End Sub
End Class

View File

@@ -0,0 +1,174 @@
<%@ Page Language="VB" Debug="true" AutoEventWireup="false" CodeFile="login_FLEX_iFrame.aspx.vb" Inherits="login_login_TEST"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ import Namespace="MySql.Data.MySqlClient"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>VERAG Spedition AG Login</title>
<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="../css/style.css"/>
<script type="text/javascript">
function FocusOnInput() {
document.getElementById("UserID").focus();
}
</script>
<script type="text/javascript">
// Vergebe den Event-Handler
document.onkeydown = handleKeyEvent;
// Funktion, die den Event verarbeitet
function handleKeyEvent(e) {
// MSIE nimmt das Event-Objekt aus window.event, DOM-kompatible Browser aus dem e-Funktionsparameter
if (!e) e = window.event;
// keyCode muss 70 sein und ctrlKey true
if (e.keyCode == 68 && e.ctrlKey) {
alert('Strg+D wurde gedrückt');
//topup
}
}
</script>
<!-- <script type="text/javascript" src="../js/toptions/top_up-min.js"></script> -->
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="../css/main.css">
<![endif]-->
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="../css/main.css">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="../css/main.css">
<![endif]-->
<!--[if lte IE 5.5999]>
<link rel="stylesheet" type="text/css" href="../css/main.css">
<![endif]-->
<!--[if gte IE 5.5]>
<link rel="stylesheet" type="text/css" href="../css/main.css">
<![endif]-->
<script type = "text/javascript">
function goBack()
{
window.history.back()
}
</script>
</head>
<body onload="FocusOnInput()" style="background-image:none">
<div class="container-fluid">
<form id="form1" runat="server">
<asp:Login ID = "Login1" runat = "server" OnAuthenticate= "ValidateUser" ClientIDMode="AutoID" DestinationPageUrl="../Customers/CustomsAviso.aspx" >
<LayoutTemplate>
<table cellpadding="0" style="font-family:Arial;font-size:11px;border:1px solid gray">
<!-- <tr style=" background-image: linear-gradient(to right, #003680 , #0055cc);color:#fff;height:30px;font-size:12px">
<td align="center" colspan="2" style="color:#fff;font-kerning:auto;font-weight:700;">Bitte melden Sie sich an:</td>
</tr> -->
<tr style=" background-color:#fff; color:#003680; height:30px;font-size:12px">
<td align="center" colspan="2" style="color:#003680;font-kerning:auto;font-weight:700;">
<asp:Label ID="Label1" runat="server" Text="Login" style="color:#003680;font-size:1.420901320901321em"></asp:Label></td>
</tr>
<tr>
<td align="right">
<asp:Label ID="CustomerIDLabel" runat="server" AssociatedControlID="CustomerID" required="true">Kundennummer:</asp:Label>
</td>
<td>
<asp:TextBox ID="CustomerID" runat="server" TextMode="Number"></asp:TextBox>
<asp:RequiredFieldValidator ID="CustomerIDrequired" runat="server" ControlToValidate="CustomerID" ErrorMessage="Die Kundennummer ist erforderlich." ToolTip="Die Kundennummer ist erforderlich." ValidationGroup="Login1">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName" required="true">Benutzername:</asp:Label>
</td>
<td>
<asp:TextBox ID="UserName" runat="server" TextMode="SingleLine"></asp:TextBox>
<asp:RequiredFieldValidator ID="UserNamerequired" runat="server" ControlToValidate="UserName" ErrorMessage="Der Benutzername ist erforderlich." ToolTip="Der Benutzername ist erforderlich." ValidationGroup="Login1">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password" required="true">Kennwort:</asp:Label>
</td>
<td>
<asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="Passwordrequired" runat="server" ControlToValidate="Password" ErrorMessage="Das Kennwort ist erforderlich." ToolTip="Das Kennwort ist erforderlich." ValidationGroup="Login1">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
<asp:CheckBox ID="RememberMe" runat="server" Text="Anmeldedaten speichern." />
</td>
</tr>
<tr>
<td align="center" colspan="2" style="color:Red;">
<asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
</td>
</tr>
<tr>
<td align="left" colspan="2">
<br/> <asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Login" ValidationGroup="Login1" target="_top" OnClientClick="bust2()"/>
</td>
<tr>
<td align="middle" colspan="2">
<asp:LinkButton ID="LinkButton1" runat="server" target="_top" OnClientClick="bust2()">Admin-Login</asp:LinkButton>
</td>
</tr>
<tr>
<td align="left" colspan="2">
<a ID="LinkButton2" runat="server" target="_top" href="ForgotPW.aspx">Passwort Vergessen</a>
</td>
</td>
</tr>
</table>
</LayoutTemplate>
</asp:Login>
</form>
</div>
<script type="text/javascript">
function bust2() {
if (top.location == self) {
var zipphone2_1 = getElementById("#CustomerID").val();
var zipphone2_2 = getElementById("#UserName").val();
var zipphone2_3 = getElementById("#Password").val();
alert("send:" + zipphone2_1)
alert("send:" + zipphone2_2)
alert("send:" + zipphone2_3)
//parent.location.replace('../Customers/Welcome.aspx');
top.location = '../Customers/Welcome.aspx';
}
}
</script>
<script type="text/javascript">
function bust1() {
if (top.location != self) {
var zipphone2_1 = getElementById("#CustomerID").val();
var zipphone2_2 = getElementById("#UserName").val();
var zipphone2_3 = getElementById("#Password").val();
alert("send:" + zipphone2_1)
alert("send:" + zipphone2_2)
alert("send:" + zipphone2_3)
parent.location.replace('../Customers/Welcome.aspx');
// top.location = '../newpageJulius_Sidebar.aspx';
}
}
</script>
<script type="text/javascript">
function reloadpage() {
window.parent.location.reload();
}
</script>
</body>
</html>

View File

@@ -0,0 +1,61 @@
Imports System.Data.SqlClient
Imports System.Data
Partial Class login_login_TEST
Inherits System.Web.UI.Page
Dim CustomerIDTextBox As TextBox
Protected Sub ValidateUser(sender As Object, e As EventArgs)
Dim userId As Integer = 0
' cDBFunctions.GetNewOpenConnection()
Dim ConnectionString = ""
If HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then
'ConnectionString = "Server=DEVELOPER\DEVSQL;Database=VERAG_HOMEPAGE;Uid=sa;Pwd=BmWr501956"
ConnectionString = "Server=DEVELOPER\DEVSQL;Database=VERAG_HOMEPAGE;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;"
Else
ConnectionString = "Server=DEVELOPER.verag.ost.dmn\DEVSQL;Database=VERAG_HOMEPAGE;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;"
'ConnectionString = "Server=db593295684.db.1and1.com;Database=db593295684;Uid=dbo593295684;Pwd=atilla#2;"
End If
' Dim constr As String = ConfigurationManager.ConnectionStrings("constr").ConnectionString
Using con As New SqlConnection(ConnectionString)
' Using cmd As New SqlCommand("Validate_User")
Using cmd As New SqlCommand("SELECT COUNT(*) FROM [VERAG_HOMEPAGE].[dbo].[Users] WHERE Username=@Username AND Password=@Password")
' cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.AddWithValue("@Username", Login1.UserName)
cmd.Parameters.AddWithValue("@Password", Login1.Password)
cmd.Connection = con
con.Open()
' userId = Convert.ToInt32(cmd.ExecuteScalar())
Dim dr As SqlDataReader = cmd.ExecuteReader()
If dr.HasRows Then
dr.Read()
'MsgBox(dr.Item(0).ToString())
Select Case dr.Item(0)
Case 0
Login1.FailureText = "Username and/or password is incorrect."
Exit Select
Case -2
Login1.FailureText = "Account has not been activated."
Exit Select
Case Else
FormsAuthentication.RedirectFromLoginPage(User.Identity.Name, True)
Session.Add("test", Login1.UserName)
CustomerIDTextBox = Login1.FindControl("CustomerID")
Session.Add("CustomerID", CustomerIDTextBox.Text)
Session.Add("PW", Login1.Password)
'FormsAuthentication.SetAuthCookie(Login1.UserName, True)
'Response.Redirect("../Customers/CustomsAviso.aspx")
Exit Select
End Select
End If
dr.Close()
con.Close()
End Using
End Using
End Sub
Protected Sub LoginButton_Click(sender As Object, e As EventArgs)
End Sub
End Class

View File

@@ -550,7 +550,7 @@
</a> -->
<asp:LoginView ID="LoginView1" runat="server" ClientIDMode="AutoID">
<AnonymousTemplate>
<iframe name="frame1" sandbox="allow-same-origin allow-top-navigation allow-scripts allow-popups allow-forms" src="/login/login_FLEX.aspx" runat="server" seamless="seamless" style="width:300px;height:300px;overflow:no-content;background-image:none;" scrolling="no" />
<iframe name="frame1" sandbox="allow-same-origin allow-top-navigation allow-scripts allow-popups allow-forms" src="/login/login_FLEX_iFrame.aspx" runat="server" style="width:300px;height:300px; overflow:hidden;background-image:none;" scrolling="no" />
<div id="loadingMessage1">Loading...</div>
</AnonymousTemplate>
<LoggedInTemplate>