Änderungen Css und login logiken
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0 auto;
|
||||
margin-top: 0px;
|
||||
margin-top: 250px;
|
||||
}
|
||||
|
||||
.container-fluid {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
}
|
||||
#content_container {
|
||||
position: absolute;
|
||||
display: 690pc;
|
||||
display: 690px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
@@ -35,7 +35,7 @@
|
||||
bottom: auto;
|
||||
left: -20%;
|
||||
right: 520px;
|
||||
margin: auto;
|
||||
margin: 15% auto auto auto;
|
||||
}
|
||||
#tbl_main {
|
||||
font-family: Arial;
|
||||
|
||||
@@ -51,11 +51,14 @@ Partial Class ForgotPW
|
||||
If Boolemail_desktop_notempty = True Then
|
||||
regexval_txt_Email.Validate()
|
||||
If regexval_txt_Email.IsValid = True Then
|
||||
Boolemail_desktop_regex = True
|
||||
Boolemail_desktop_regexdomain = True
|
||||
Boolemail_mobile_regex = False
|
||||
Boolemail_mobile_regexdomain = False
|
||||
End If
|
||||
regexval_txt_Email_2.Validate()
|
||||
If regexval_txt_Email_2.IsValid = True Then
|
||||
Boolemail_desktop_regex = True
|
||||
Boolemail_mobile_regex = False
|
||||
End If
|
||||
If Boolemail_desktop_notempty = True AndAlso Boolemail_desktop_regexdomain = True AndAlso Boolemail_desktop_regex = True Then
|
||||
email = txtEmail.Text
|
||||
Else
|
||||
@@ -76,7 +79,7 @@ Partial Class ForgotPW
|
||||
email = txtEmail.Text
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
valreqtxtusername.Validate()
|
||||
If valreqtxtusername.IsValid = True Then
|
||||
Booluser_desktop_notempty = True
|
||||
@@ -99,43 +102,49 @@ Partial Class ForgotPW
|
||||
If String.IsNullOrEmpty(txtEmail_M.Text) = False And String.IsNullOrEmpty(txt_Username_M.Text) = False And String.IsNullOrEmpty(txtEmail.Text) = True And String.IsNullOrEmpty(txt_Username.Text) = True Then
|
||||
valreqtxtEmail_M.Enabled = True
|
||||
regexval_2_txt_Email_M.Enabled = True
|
||||
valreqtxtusername_M.Enabled = True
|
||||
regexval_txt_Email.Enabled = False
|
||||
regexval_txt_Email_2.Enabled = False
|
||||
valreqtxtusername.Enabled = False
|
||||
valreqtxtusername_M.Enabled = True
|
||||
|
||||
valreqtxtEmail_M.Validate()
|
||||
|
||||
If valreqtxtEmail_M.IsValid = True Then
|
||||
Boolemail_mobile_notempty = True
|
||||
Boolemail_desktop_notempty = False
|
||||
If Boolemail_mobile_regexdomain = True Then
|
||||
If Boolemail_mobile_notempty = True Then
|
||||
regexval_2_txt_Email_M.Validate()
|
||||
If regexval_2_txt_Email_M.IsValid = True Then
|
||||
Boolemail_mobile_regexdomain = True
|
||||
Boolemail_desktop_regexdomain = False
|
||||
If Boolemail_mobile_regexdomain = True Then
|
||||
regexval_2_txt_Email_M.Validate()
|
||||
If regexval_2_txt_Email_M.IsValid = True Then
|
||||
Boolemail_mobile_regex = True
|
||||
Boolemail_desktop_regex = False
|
||||
If Boolemail_mobile_notempty = True AndAlso Boolemail_mobile_regexdomain = True AndAlso Boolemail_mobile_regex = True Then
|
||||
email = txtEmail_M.Text
|
||||
Else
|
||||
regexval_txt_Email_M.IsValid = True
|
||||
Boolemail_mobile_regex = True
|
||||
Boolemail_desktop_regex = False
|
||||
If Boolemail_mobile_regexdomain = True Then
|
||||
email = txtEmail_M.Text
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
ElseIf valreqtxtEmail_M.IsValid = False Then
|
||||
Boolemail_mobile_regexdomain = False
|
||||
valreqtxtEmail.ErrorMessage = "Annotation: The given Domain is not the company domain."
|
||||
regexval_txt_Email.Validate()
|
||||
Boolemail_mobile_regex = True
|
||||
Boolemail_desktop_regex = False
|
||||
End If
|
||||
If Boolemail_mobile_notempty = True AndAlso Boolemail_mobile_regexdomain = True AndAlso Boolemail_mobile_regex = True Then
|
||||
email = txtEmail.Text
|
||||
Else
|
||||
regexval_txt_Email_2.IsValid = True
|
||||
Boolemail_mobile_regex = True
|
||||
Boolemail_desktop_regex = False
|
||||
If Boolemail_mobile_regexdomain = True Then
|
||||
If Boolemail_mobile_regex = True AndAlso Boolemail_mobile_regexdomain = False Then
|
||||
regexval_txt_Email_2.IsValid = True
|
||||
email = txtEmail_M.Text
|
||||
End If
|
||||
End If
|
||||
ElseIf valreqtxtEmail_M.IsValid = False Then
|
||||
Boolemail_mobile_regexdomain = False
|
||||
valreqtxtEmail.ErrorMessage = "Annotation: The given Domain is not the company domain."
|
||||
regexval_txt_Email.Validate()
|
||||
Boolemail_mobile_regex = True
|
||||
If Boolemail_mobile_regex = True AndAlso Boolemail_mobile_regexdomain = False Then
|
||||
regexval_txt_Email_2.IsValid = True
|
||||
email = txtEmail.Text
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
valreqtxtusername_M.Validate()
|
||||
valreqtxtusername_M.Validate()
|
||||
If valreqtxtusername_M.IsValid = True Then
|
||||
Booluser_mobile_notempty = True
|
||||
Booluser_desktop_notempty = False
|
||||
@@ -151,24 +160,24 @@ Partial Class ForgotPW
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'Erweiterte Degub Msg-Box
|
||||
'MsgBox("Userdaten in App" + Environment.NewLine + email + Environment.NewLine + username + Environment.NewLine + "Userdaten desktop" + txt_Username.Text + Environment.NewLine + txtEmail.Text + Environment.NewLine + "Userdaten Mobil:" + Environment.NewLine + txtEmail_M.Text + Environment.NewLine + txt_Username_M.Text)
|
||||
If String.IsNullOrEmpty(email) = False And String.IsNullOrEmpty(tokenname) = True And String.IsNullOrEmpty(password) = True And String.IsNullOrEmpty(username) = False And String.IsNullOrEmpty(userID) = True Then
|
||||
If HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = True
|
||||
'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
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
|
||||
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
|
||||
|
||||
Using con As New SqlConnection(ConnectionString)
|
||||
If HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = True
|
||||
'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
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
|
||||
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
|
||||
End If
|
||||
Using con As New SqlConnection(ConnectionString)
|
||||
' Using cmd As New SqlCommand("Validate_User")
|
||||
Using cmd As New SqlCommand("SELECT Username,Password,Email,KundenNr FROM [VERAG_HOMEPAGE].[dbo].[Users] WHERE Username=@Username")
|
||||
Using cmd As New SqlCommand("SELECT Username,Password,Email,KundenNr FROM [VERAG_HOMEPAGE].[dbo].[Users] WHERE Username=@Username AND Email=@Email")
|
||||
' cmd.CommandType = CommandType.StoredProcedure
|
||||
cmd.Parameters.AddWithValue("@Username", username)
|
||||
cmd.Connection = con
|
||||
@@ -182,34 +191,24 @@ Partial Class ForgotPW
|
||||
userID = VERAG_PROG_ALLGEMEIN.cCryptography2.Encrypt(dr("KundenNr").ToString())
|
||||
Try
|
||||
If txt_Username.Text = dr("Username").ToString() AndAlso String.IsNullOrEmpty(txt_Username_M.Text) = True And String.IsNullOrEmpty(VERAG_PROG_ALLGEMEIN.cCryptography2.Decrypt(userID)) = False Then
|
||||
check_UserName_regex_M.Enabled = False
|
||||
check_UserName_regex.Enabled = True
|
||||
check_UserName_regex.IsValid = True
|
||||
username = txt_Username.Text
|
||||
|
||||
ElseIf txt_Username_M.Text = dr("Username").ToString() AndAlso txt_Username.Text = String.Empty And String.IsNullOrEmpty(VERAG_PROG_ALLGEMEIN.cCryptography2.Decrypt(userID)) = False Then
|
||||
check_UserName_regex.Enabled = False
|
||||
check_UserName_regex_M.Enabled = True
|
||||
If check_UserName_regex_M.IsValid = True Then
|
||||
username = txt_Username_M.Text
|
||||
End If
|
||||
username = txt_Username_M.Text
|
||||
ElseIf String.IsNullOrEmpty(txt_Username_M.Text) = True AndAlso String.IsNullOrEmpty(txtEmail.Text) = True And String.IsNullOrEmpty(VERAG_PROG_ALLGEMEIN.cCryptography2.Decrypt(userID)) = False Then
|
||||
check_UserName_regex_M.MatchTimeout = 3000
|
||||
check_UserName_regex_M.ErrorMessage = "No valid Username found in out database!"
|
||||
check_UserName_regex_M.IsValid = False
|
||||
ElseIf String.IsNullOrEmpty(txt_Username.Text) = False Then
|
||||
check_UserName_regex.MatchTimeout = 3000
|
||||
check_UserName_regex_M.MatchTimeout = 3000
|
||||
check_UserName_regex_M.ErrorMessage = "No valid Username found in out database!"
|
||||
check_UserName_regex_M.IsValid = False
|
||||
ElseIf String.IsNullOrEmpty(txt_Username.Text) = False Then
|
||||
check_UserName_regex.MatchTimeout = 3000
|
||||
check_UserName_regex.ErrorMessage = "No valid Username found in out database!"
|
||||
check_UserName_regex.IsValid = False
|
||||
End If
|
||||
If (txtEmail.Text = dr("Email").ToString() AndAlso String.IsNullOrEmpty(txtEmail_M.Text) = True) And String.IsNullOrEmpty(VERAG_PROG_ALLGEMEIN.cCryptography2.Decrypt(userID)) = False Then
|
||||
regexval_txt_Email_M.Enabled = False
|
||||
regexval_txt_Email.Enabled = True
|
||||
regexval_txt_Email.Validate()
|
||||
email = txtEmail.Text
|
||||
lblMessage.ForeColor = Color.Green
|
||||
lblMessage.Text = "The given e-mail exists in our database."
|
||||
ElseIf (txtEmail_M.Text = dr("Email").ToString() AndAlso String.IsNullOrEmpty(txtEmail.Text) = True) And String.IsNullOrEmpty(VERAG_PROG_ALLGEMEIN.cCryptography2.Decrypt(userID)) = False Then
|
||||
regexval_txt_Email_M.Validate()
|
||||
email = txtEmail_M.Text
|
||||
lblMessage_M.ForeColor = Color.Green
|
||||
lblMessage_M.Text = "The given e-mail exists in our database."
|
||||
@@ -286,7 +285,7 @@ Partial Class ForgotPW
|
||||
lblMessage.Text = "The form has not been filled completeley."
|
||||
End If
|
||||
Catch Exc As Exception
|
||||
lblMessage.Text = "Error08: No iput found."
|
||||
lblMessage.Text = "Error08: No input found."
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -284,21 +284,21 @@
|
||||
<tr style="color:#003680; height:46px;">
|
||||
<td align="left" colspan="2">
|
||||
<asp:TextBox ID="CustomerID" CssClass="bg-UID-icon" runat="server" required="true" ValidationGroup="Login" Width="320" Placeholder="User-ID" style="margin-left: 22px" Font-Size="1.25em"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="CustomerIDrequired" runat="server" ControlToValidate="CustomerID" ForeColor="Red" style="font-size:16px" SetFocusOnError="true" ValidationGroup="Login" ErrorMessage="Please enter the User-ID."></asp:RequiredFieldValidator>
|
||||
<asp:RegularExpressionValidator ID="valid_getNumberInput" ControlToValidate="CustomerID" style="font-size:16px" ForeColor="Red" ValidationGroup="Login" runat="server" Display="Dynamic" SetFocusOnError="false" ErrorMessage="The User-ID is not valid." ValidationExpression="[0-9]{4,10}"></asp:RegularExpressionValidator>
|
||||
<asp:RequiredFieldValidator ID="CustomerIDrequired" runat="server" ControlToValidate="CustomerID" ForeColor="Red" style="font-size:17px" SetFocusOnError="true" ValidationGroup="Login" ErrorMessage="Please enter the User-ID."></asp:RequiredFieldValidator>
|
||||
<asp:RegularExpressionValidator ID="valid_getNumberInput" ControlToValidate="CustomerID" style="font-size:17px" ForeColor="Red" ValidationGroup="Login" runat="server" Display="Dynamic" SetFocusOnError="false" ErrorMessage="The User-ID is not valid." ValidationExpression="[0-9]{4,10}"></asp:RegularExpressionValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="color:#003680; height:46px;">
|
||||
<td align="left" colspan="2">
|
||||
<asp:TextBox ID="UserName" runat="server" CssClass="bg-user-icon" TextMode="SingleLine" Width = "320" ValidationGroup="Login" required="true" Font-Size="1.25em" style="margin-left:22px;color:#003680" Placeholder="Username" ></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="UserNamerequired" ForeColor="Red" style="font-size:19px" runat="server" ControlToValidate="UserName" SetFocusOnError="true" ErrorMessage="Please enter the Username." ToolTip="The Username is required." ValidationGroup="Login"></asp:RequiredFieldValidator>
|
||||
<asp:RequiredFieldValidator ID="UserNamerequired" ForeColor="Red" style="font-size:17px" runat="server" ControlToValidate="UserName" SetFocusOnError="true" ErrorMessage="Please enter the Username." ToolTip="The Username is required." ValidationGroup="Login"></asp:RequiredFieldValidator>
|
||||
<asp:RegularExpressionValidator ID="check_UserName_regex" ControlToValidate="UserName" style="font-size:16px" ForeColor="Red" ValidationGroup="Login" runat="server" Display="Dynamic" SetFocusOnError="true" ErrorMessage="Username does not meet the requirements." ValidationExpression="^([a-zA-Z1-9]{4,30})$"></asp:RegularExpressionValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="color:#003680; height:46px;">
|
||||
<td align="left" colspan="2">
|
||||
<asp:TextBox ID="Password" runat="server" CssClass="bg-key-icon" TextMode="Password" required="true" Width = "320" Font-Size="1.25em" ValidationGroup="Login" MaxLength="30" AutoCompleteType="Disabled" CausesValidation="true" style="margin-left:22px;color:#003680" Placeholder="Password"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="Passwordrequired" runat="server" ControlToValidate="Password" Font-Size="16" ToolTip="Please enter the Password." ValidationGroup="Login" SetFocusOnError="true" ErrorMessage="Password is needed to authenticate."></asp:RequiredFieldValidator>
|
||||
<asp:RequiredFieldValidator ID="Passwordrequired" runat="server" ControlToValidate="Password" Font-Size="17px" ToolTip="Please enter the Password." ValidationGroup="Login" SetFocusOnError="true" ErrorMessage="Password is needed to authenticate."></asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="color:#003680; height:55px;">
|
||||
@@ -311,7 +311,6 @@
|
||||
<asp:CheckBox ID="RememberMe" runat="server" ValidationGroup="Login" Text="Remember me." style="margin-left:22px;"/>
|
||||
</td>
|
||||
<td align="right" colspan="4">
|
||||
|
||||
<a id="LinkButton2" runat="server" target="_top" href="ForgotPW.aspx" style="margin-left:-154px;margin-right:-42px">I forgot my password</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -124,6 +124,7 @@ Partial Class login_FLEX
|
||||
Protected Sub LoginButton_Click(sender As Object, e As EventArgs)
|
||||
Validate("Login")
|
||||
If Page.IsValid() Then
|
||||
MsgBox("Wow1")
|
||||
Dim cb As CheckBox = Page.FindControl("RememberMe")
|
||||
If cb.Checked = True Then
|
||||
FormsAuthentication.SetAuthCookie(Login1.UserName, True)
|
||||
@@ -132,12 +133,14 @@ Partial Class login_FLEX
|
||||
End If
|
||||
Response.Redirect("../Customers/CustomsAviso.aspx")
|
||||
Else
|
||||
MsgBox("Error1")
|
||||
Response.Redirect("login_FLEX.aspx")
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub LoginButton_M_Click(sender As Object, e As EventArgs)
|
||||
Validate("Login_M")
|
||||
If Page.IsValid() Then
|
||||
MsgBox("Wow2")
|
||||
Dim cb As CheckBox = Page.FindControl("RememberMe_M")
|
||||
If cb.Checked = True Then
|
||||
FormsAuthentication.SetAuthCookie(Login1.UserName, True)
|
||||
@@ -146,6 +149,7 @@ Partial Class login_FLEX
|
||||
End If
|
||||
Response.Redirect("../Customers/CustomsAviso.aspx")
|
||||
Else
|
||||
MsgBox("Error2")
|
||||
Response.Redirect("login_FLEX.aspx")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user