Änderunegn
This commit is contained in:
@@ -144,7 +144,7 @@
|
||||
padding: -10px 0px 12px 1px;
|
||||
border:none;
|
||||
font-size:18px;
|
||||
font-weight: 600;
|
||||
|
||||
}
|
||||
|
||||
#UserName_M {
|
||||
@@ -240,11 +240,7 @@
|
||||
window.history.back()
|
||||
}
|
||||
</script>
|
||||
<script runat="server">
|
||||
Sub Page_Load() Handles Me.Load
|
||||
|
||||
End Sub
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -257,7 +253,7 @@
|
||||
<table id="tbl_main" cellpadding="0" style="margin:4px 4px 4px 4px; border: none;">
|
||||
<tr style="color:#003680;height:35px;">
|
||||
<td>
|
||||
<asp:Button ID="btn_Back" runat="server" Width="265" CausesValidation="false" Text="Back" PostBackUrl="~/login/login_FLEX.aspx" OnClick="btn_Back_Click" style="margin-left:49px;"/>
|
||||
<asp:Button ID="btn_Back" runat="server" Width="265" CausesValidation="false" Text="Back" PostBackUrl="~/login/login_FLEX.aspx" style="margin-left:49px;"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="color:#003680; height:32px;font-size:14px">
|
||||
@@ -288,14 +284,14 @@
|
||||
<td align="left" colspan="2">
|
||||
<asp:TextBox ID="txt_Username" runat="server" CssClass="bg-user-icon" ValidationGroup="val-desk" Placeholder="Username" Font-Size="1.125em" Width="265" style="margin-left:45px;color:#003680;margin-bottom:-6px" />
|
||||
<asp:RequiredFieldValidator ID="valreqtxtusername" ControlToValidate="txt_Username" ValidationGroup="val-desk" runat="server" Text="Require Username" ErrorMessage="Please give a Username."></asp:RequiredFieldValidator>
|
||||
<asp:RegularExpressionValidator ID="check_UserName_regex" ErrorMessage="The Username don't meet the rquirements. Try again." ControlToValidate="txt_Username" ValidationGroup="val-desk" runat="server" Display="Dynamic" SetFocusOnError="true" ValidationExpression="^([a-zA-Z1-9]{4,30})$"></asp:RegularExpressionValidator>
|
||||
<asp:RegularExpressionValidator ID="check_UserName_regex" ErrorMessage="The Username don't meet the rquirements. Try again." ControlToValidate="txt_Username" ValidationGroup="val-desk" runat="server" Display="Dynamic" SetFocusOnError="false" ForeColor="Red" ValidationExpression="([a-zA-Z1-9]{4,30})"></asp:RegularExpressionValidator>
|
||||
</td></tr>
|
||||
<tr style="color:#003680; height:10px;">
|
||||
<td align="right" colspan="2">
|
||||
<asp:Label ID="lblMessage" runat="server" />
|
||||
</td></tr>
|
||||
<tr style="color:#003680; height:30px;"><td>
|
||||
<asp:Button ID="btn_Send" Text="Send" runat="server" Width="265" Enabled="true" Font-Size="17px" style="margin-left:46px;border:none" OnClick="btn_Send_Click" />
|
||||
<asp:Button ID="btn_Send" runat="server" Text="Send" Width="300px" Enabled="true" AutoPostBack="True" Font-Size="22px" style="margin-left:22px;border:none" OnClick="btn_Send_Click" Height="37px" />
|
||||
</td></tr>
|
||||
<tr><td>
|
||||
</td></tr>
|
||||
@@ -322,7 +318,7 @@
|
||||
<tr style="color:#003680; height:40px;">
|
||||
<td align="left" colspan="2">
|
||||
<asp:TextBox ID="txtEmail_M" runat="server" Width="325px" ValidationGroup="Valtxtemail_M" Font-Size="2.025em" Placeholder="E-Mail" CssClass="bg-email-icon" style="margin-left:25px;color:#003680;margin-bottom:60px"/>
|
||||
<asp:RequiredFieldValidator ID="valreqtxtEmail_M" ControlToValidate="txtEmail_M" ValidationGroup="Valtxtemail_M" runat="server" Text="Require E-Mail Address" ></asp:RequiredFieldValidator>
|
||||
<asp:RequiredFieldValidator ID="valreqtxtEmail_M" ControlToValidate="txtEmail_M" ValidationGroup="val-mobil" runat="server" Text="Require E-Mail Address" ></asp:RequiredFieldValidator>
|
||||
<asp:RegularExpressionValidator ControlToValidate="txtEmail_M" ForeColor="Red" Font-Size="24px" runat="server" ID="regexval_txt_Email_M" ValidationGroup="val-mobil" ValidationExpression="[a-zA-Z]{2}\@(\bverag.ag\b)" Display="Dynamic" ErrorMessage="The E-Mail has not the correct domain!" SetFocusOnError="true"></asp:RegularExpressionValidator>
|
||||
<asp:RegularExpressionValidator ControlToValidate="txtEmail_M" ForeColor="Red" Font-Size="24px" runat="server" ID="regexval_2_txt_Email_M" ValidationGroup="val-mobil" ValidationExpression="[\w\.]+\@[\w]+(?:\.[\w]{3}|\.[\w]{2}\.[\w]{2}|\.[\w]{2})\b" Display="Dynamic" ErrorMessage="The E-Mail has not the correct domain!" SetFocusOnError="true"></asp:RegularExpressionValidator>
|
||||
</td></tr>
|
||||
@@ -337,7 +333,8 @@
|
||||
<asp:Label ID="lblMessage_M" Font-Size="24px" runat="server" />
|
||||
</td></tr>
|
||||
<tr style="color:#003680; height:40px;"><td>
|
||||
<asp:Button ID="btn_Send_M" Text="Send" runat="server" Width="325px" Enabled="true" Font-Size="22px" style="margin-left:22px;border:none" OnClick="btn_Send_Click" Height="37px"/>
|
||||
<asp:Button ID="btn_Send_M" runat="server" Text="Send" Width="325px" Enabled="true" AutoPostBack="True" Font-Size="22px" style="margin-left:22px;border:none" OnClick="btn_Send_Click" Height="37px" />
|
||||
|
||||
</td></tr>
|
||||
<tr><td>
|
||||
</td></tr>
|
||||
|
||||
@@ -49,6 +49,20 @@ Partial Class ForgotPW
|
||||
CustomerIDrequired.Enabled = True
|
||||
valid_getNumberInput.Enabled = True
|
||||
|
||||
CustomerIDrequired.Validate()
|
||||
If CustomerIDrequired.IsValid = True Then
|
||||
valid_getNumber_M_Input.Validate()
|
||||
If valid_getNumberInput.IsValid = True Then
|
||||
customerID = txt_CustomerID.Text
|
||||
Else
|
||||
valid_getNumberInput.ForeColor = Drawing.Color.Red
|
||||
valid_getNumberInput.ErrorMessage = "Customer-ID is not numeric or too long."
|
||||
End If
|
||||
Else
|
||||
valid_getNumberInput.ForeColor = Drawing.Color.Red
|
||||
valid_getNumberInput.ErrorMessage = "Customer-ID is not given."
|
||||
End If
|
||||
|
||||
valreqtxtusername.Validate()
|
||||
If valreqtxtusername.IsValid = True Then
|
||||
check_UserName_regex.Validate()
|
||||
@@ -61,7 +75,7 @@ Partial Class ForgotPW
|
||||
check_UserName_regex.ErrorMessage = "Valid Username has been entered."
|
||||
End If
|
||||
Else
|
||||
check_UserName_regex.ForeColor = Drawing.Color.Lime
|
||||
valreqtxtusername.ForeColor = Drawing.Color.Lime
|
||||
check_UserName_regex.ErrorMessage = "A too long Username has been entered."
|
||||
End If
|
||||
|
||||
@@ -87,23 +101,11 @@ Partial Class ForgotPW
|
||||
End If
|
||||
End If
|
||||
|
||||
CustomerIDrequired.Validate()
|
||||
If CustomerIDrequired.IsValid = True Then
|
||||
valid_getNumber_M_Input.Validate()
|
||||
If valid_getNumberInput.IsValid = True Then
|
||||
customerID = txt_CustomerID.Text
|
||||
Else
|
||||
valid_getNumberInput.ForeColor = Drawing.Color.Red
|
||||
valid_getNumberInput.ErrorMessage = "Customer-ID is not numeric or too long."
|
||||
End If
|
||||
Else
|
||||
valid_getNumberInput.ForeColor = Drawing.Color.Red
|
||||
valid_getNumberInput.ErrorMessage = "Customer-ID is not given."
|
||||
End If
|
||||
' MsgBox("3" + email + " " + username)
|
||||
End If
|
||||
'Mobil
|
||||
If String.IsNullOrEmpty(txtEmail_M.Text) = False And String.IsNullOrEmpty(txt_Username_M.Text) = False And String.IsNullOrEmpty(txt_CustomerID_M.Text) = False And String.IsNullOrEmpty(txtEmail.Text) = True And String.IsNullOrEmpty(txt_Username.Text) = True And String.IsNullOrEmpty(txt_CustomerID.Text) = True Then
|
||||
|
||||
' MsgBox("3" + email + " " + username)
|
||||
End If
|
||||
'Mobil
|
||||
If String.IsNullOrEmpty(txtEmail_M.Text) = False And String.IsNullOrEmpty(txt_Username_M.Text) = False And String.IsNullOrEmpty(txt_CustomerID_M.Text) = False And String.IsNullOrEmpty(txtEmail.Text) = True And String.IsNullOrEmpty(txt_Username.Text) = True And String.IsNullOrEmpty(txt_CustomerID.Text) = True Then
|
||||
valreqtxtusername.Enabled = False
|
||||
valreqtxtEmail.Enabled = False
|
||||
regexval_txt_Email_2.Enabled = False
|
||||
@@ -179,17 +181,17 @@ Partial Class ForgotPW
|
||||
'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(customerID) = False 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
|
||||
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)
|
||||
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 AND Email=@Email AND KundenNr=@CUSTOMERId")
|
||||
' cmd.CommandType = CommandType.StoredProcedure
|
||||
@@ -252,50 +254,50 @@ Partial Class ForgotPW
|
||||
End If
|
||||
End Using
|
||||
con.Close()
|
||||
End Using
|
||||
If Session.Item("TokenforEmail") = Nothing Then
|
||||
tokenname = genToken(username, password, email, customerID)
|
||||
Session.Add("TokenforEmail", tokenname)
|
||||
Session.Add("SessID", VERAG_PROG_ALLGEMEIN.cCryptography.Encrypt(Session.SessionID))
|
||||
Else
|
||||
tokenname = Session.Item("TokenforEmail")
|
||||
End If
|
||||
End Using
|
||||
If Session.Item("TokenforEmail") = Nothing Then
|
||||
tokenname = genToken(username, password, email, customerID)
|
||||
Session.Add("TokenforEmail", tokenname)
|
||||
Session.Add("SessID", VERAG_PROG_ALLGEMEIN.cCryptography.Encrypt(Session.SessionID))
|
||||
Else
|
||||
tokenname = Session.Item("TokenforEmail")
|
||||
End If
|
||||
|
||||
If SendEmail(username, password, email, VERAG_PROG_ALLGEMEIN.cCryptography.Decrypt(tokenname), customerID) = True Then
|
||||
'password = RandomString(New Random, 10)
|
||||
If (getDateoftoken(tokenname) = True) Then
|
||||
'Dim msgboxstyle = vbDefaultButton1 + vbOK
|
||||
'MsgBox(tokenname, msgboxstyle)
|
||||
lblMessage.ForeColor = Color.Green
|
||||
lblMessage.Text = "Token generated successfully."
|
||||
'MsgBox("Token generated successfully.")
|
||||
Else
|
||||
lblMessage.ForeColor = Color.Red
|
||||
lblMessage.Text = "Token is not valid anymore. Please generate a new one by sending a new e-mail!"
|
||||
'MsgBox("Token is not valid anymore. Please generate a new one by sending a new e-mail!")
|
||||
|
||||
If Session.Item("TokenforEmail") = Nothing Then
|
||||
tokenname = genToken(username, password, email, customerID)
|
||||
Session.Add("TokenforEmail", tokenname)
|
||||
Else
|
||||
tokenname = Session.Item("TokenforEmail")
|
||||
End If
|
||||
End If
|
||||
'SendEmail(username, password, email)
|
||||
'MsgBox("Mail would be sent successfully!")
|
||||
If SendEmail(username, password, email, VERAG_PROG_ALLGEMEIN.cCryptography.Decrypt(tokenname), customerID) = True Then
|
||||
'password = RandomString(New Random, 10)
|
||||
If (getDateoftoken(tokenname) = True) Then
|
||||
'Dim msgboxstyle = vbDefaultButton1 + vbOK
|
||||
'MsgBox(tokenname, msgboxstyle)
|
||||
lblMessage.ForeColor = Color.Green
|
||||
lblMessage.Text = "The password has been sent sucessfully on the given valid e-mail address."
|
||||
ElseIf SendEmail(username, password, email, VERAG_PROG_ALLGEMEIN.cCryptography.Decrypt(tokenname), customerID) = False Then
|
||||
'MsgBox("Mail would not be sent successfully!")
|
||||
lblMessage.Text = "Token generated successfully."
|
||||
'MsgBox("Token generated successfully.")
|
||||
Else
|
||||
lblMessage.ForeColor = Color.Red
|
||||
If String.IsNullOrWhiteSpace(username) = True Then
|
||||
lblMessage.Text = "Error10: Username not recognized Error!"
|
||||
ElseIf String.IsNullOrWhiteSpace(email) = True Then
|
||||
lblMessage.Text = "Error11: Email not recognized Error!"
|
||||
ElseIf String.IsNullOrWhiteSpace(password) = True Then
|
||||
lblMessage.Text = "An internal password searching error occured in our systems ."
|
||||
lblMessage.Text = "Token is not valid anymore. Please generate a new one by sending a new e-mail!"
|
||||
'MsgBox("Token is not valid anymore. Please generate a new one by sending a new e-mail!")
|
||||
|
||||
If Session.Item("TokenforEmail") = Nothing Then
|
||||
tokenname = genToken(username, password, email, customerID)
|
||||
Session.Add("TokenforEmail", tokenname)
|
||||
Else
|
||||
tokenname = Session.Item("TokenforEmail")
|
||||
End If
|
||||
End If
|
||||
'SendEmail(username, password, email)
|
||||
'MsgBox("Mail would be sent successfully!")
|
||||
lblMessage.ForeColor = Color.Green
|
||||
lblMessage.Text = "The password has been sent sucessfully on the given valid e-mail address."
|
||||
ElseIf SendEmail(username, password, email, VERAG_PROG_ALLGEMEIN.cCryptography.Decrypt(tokenname), customerID) = False Then
|
||||
'MsgBox("Mail would not be sent successfully!")
|
||||
lblMessage.ForeColor = Color.Red
|
||||
If String.IsNullOrWhiteSpace(username) = True Then
|
||||
lblMessage.Text = "Error10: Username not recognized Error!"
|
||||
ElseIf String.IsNullOrWhiteSpace(email) = True Then
|
||||
lblMessage.Text = "Error11: Email not recognized Error!"
|
||||
ElseIf String.IsNullOrWhiteSpace(password) = True Then
|
||||
lblMessage.Text = "An internal password searching error occured in our systems ."
|
||||
End If
|
||||
End If
|
||||
|
||||
Catch Exc As Exception
|
||||
lblMessage.Text = "Error08: No input found."
|
||||
@@ -451,4 +453,6 @@ Partial Class ForgotPW
|
||||
Return True
|
||||
End If
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
@@ -365,7 +365,7 @@
|
||||
<asp:CheckBox ID="RememberMe_M" runat="server" ValidationGroup="Login_M" style="margin-left:22px;"/><label for="RememberMe_M" id="lbl_for_chkbox_M">Remember me.</label>
|
||||
</td>
|
||||
<td align="right" colspan="2">
|
||||
<asp:LinkButton id="btn_ForgotPW_M" runat="server" target="_top" href="ForgotPW.aspx" style="margin-left:-164px;margin-right:-62px;">I forgot my password</asp:LinkButton>
|
||||
<asp:LinkButton id="btn_ForgotPW_M" runat="server" target="_top" PostBackUrl="ForgotPW.aspx" href="ForgotPW.aspx" style="margin-left:-164px;margin-right:-62px;">I forgot my password</asp:LinkButton>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="color:#003680; height:12px">
|
||||
|
||||
Reference in New Issue
Block a user