diff --git a/css/login/ForgotPW.css b/css/login/ForgotPW.css index e662217..3fb359f 100644 --- a/css/login/ForgotPW.css +++ b/css/login/ForgotPW.css @@ -47,12 +47,6 @@ margin-top:40px; } -#lbl_Ueberschrift { - background-color: #003680; - font-size: 2.55em; - color: #fff; -} - .txt_design { color: #003680; font-size: 1.65em; diff --git a/login/Change_PW.aspx b/login/Change_PW.aspx index 97614fe..e1dc58e 100644 --- a/login/Change_PW.aspx +++ b/login/Change_PW.aspx @@ -78,31 +78,34 @@ background-color: #fff; overflow-y: clip; overflow-x: clip; - max-width:390px; + max-width: 390px; } + h1 { color: #043381; font-size: 22px; } + h2 { color: #043381; font-size: 30px; } - #content_container { + + #content_container { display: flex; justify-content: center; align-items: center; width: 390px; height: 613px; margin: 0 auto; - margin-left:10%; + margin-left: 10%; } - .container-fluid { - width: 390px; - background-color: rgba(255,255,255,0.5); - height: 613px; - top:50%; + .container-fluid { + width: 390px; + background-color: rgba(255,255,255,0.5); + height: 613px; + top: 50%; bottom: -4px; left: -195px; right: 520px; @@ -115,18 +118,19 @@ border: 1px solid gray; width: 300px; height: 613px; - margin-top:80px; + margin-top: 80px; } - #btn_submitpw_M{ + + #btn_submitpw_M { background-color: #003680; color: #fff; width: 325px; height: 32px; margin-bottom: 0px; - margin-left:-15px; + margin-left: -15px; padding-inline: 2px 2px; padding: -10px 0px 10px 1px; - font-weight:600; + font-weight: 600; } #lbl_Ueberschrift_M { @@ -231,43 +235,35 @@ - + @@ -316,41 +312,38 @@
-
- +
- +
- The Password has to contain at least: + The Password has to contain:
-
    +
    • - 1 Uppercase + 1 Upper- and 1 lowercase letter
    • - +
    • - 1 Downcase + one special letter
    • - and one special letter -
    • -
    • - at an minimal length of 4 and an maximal + between 4 and 30 characters
    -
      -
    • - length of 30 characters. -
    • -
- +
+ - -
- +
- + + diff --git a/login/Change_PW.aspx.vb b/login/Change_PW.aspx.vb index c66055b..b6cf68a 100644 --- a/login/Change_PW.aspx.vb +++ b/login/Change_PW.aspx.vb @@ -207,57 +207,57 @@ Partial Class login_Change_PW End If If regexval_txt_Pw.IsValid = True Then - Using con As New SqlConnection(ConnectionString) - Using cmd As New SqlCommand("UPDATE [VERAG_HOMEPAGE].[dbo].[Users] SET [Password]=@Password WHERE [Username]=@Username AND [UserId]=@UserId") - ' cmd.CommandType = CommandType.StoredProcedure - cmd.Parameters.AddWithValue("@Username", usrname) - cmd.Parameters.AddWithValue("@Password", tempstr) - cmd.Parameters.AddWithValue("@UserId", UsrID) - cmd.Connection = con - con.Open() - If String.IsNullOrEmpty(usrname) = False Then - cmd.ExecuteNonQuery() - btn_submitpw.Visible = True - Else - VERAG_VARIABLES.seterrorcount(25) - lbl_messagetext.Text = VERAG_VARIABLES.geterrornumb() + "Fehler bei der Behebung des Passwortwechsels." - End If - End Using - con.Close() + Using cmd As New SqlCommand("UPDATE [VERAG_HOMEPAGE].[dbo].[Users] SET [Password]=@Password WHERE [Username]=@Username AND [UserId]=@UserId") + ' cmd.CommandType = CommandType.StoredProcedure + cmd.Parameters.AddWithValue("@Username", usrname) + cmd.Parameters.AddWithValue("@Password", txt_Pw_WH.Text) + cmd.Parameters.AddWithValue("@UserId", UsrID) + cmd.Connection = con + con.Open() + If String.IsNullOrEmpty(usrname) = False Then + cmd.ExecuteNonQuery() + btn_submitpw.Visible = True + Else + VERAG_VARIABLES.seterrorcount(25) + 'lbl_messagetext.Text = VERAG_VARIABLES.geterrornumb() + "Fehler bei der Behebung des Passwortwechsels." + End If + End Using + con.Close() End Using - Else - VERAG_VARIABLES.seterrorcount(22) - lbl_messagetext_M.ForeColor = Drawing.Color.Red - lbl_messagetext_M.Text = VERAG_VARIABLES.geterrornumb() + "Error bei der Validierung des Kennwortes." End If - Catch ex As Exception - lbl_messagetext.Text = ex.Message - End Try - Msg = "PW erfolgreich geändert!" - Style = vbOKOnly + vbInformation + vbDefaultButton1 - Title = "Information" - regexval_txt_Pw.ForeColor = Drawing.Color.Green - regexval_txt_Pw.Text = "Passwort wurde erfolgreich geändert!" - 'MsgBox(Msg, Style, Title) - ' If MsgBox(Msg, Style, Title).Ok Then - 'Response.Redirect("login_FLEX.aspx") - 'End If + Else + VERAG_VARIABLES.seterrorcount(22) + 'lbl_messagetext_M.ForeColor = Drawing.Color.Red + 'lbl_messagetext_M.Text = VERAG_VARIABLES.geterrornumb() + "Error bei der Validierung des Kennwortes." + End If + Catch ex As Exception + lbl_messagetext.Text = ex.Message + End Try + Msg = "PW erfolgreich geändert!" + Style = vbOKOnly + vbInformation + vbDefaultButton1 + Title = "Information" + regexval_txt_Pw.ForeColor = Drawing.Color.Green + regexval_txt_Pw.Text = "Passwort wurde erfolgreich geändert!" + 'MsgBox(Msg, Style, Title) + ' If MsgBox(Msg, Style, Title).Ok Then + 'Response.Redirect("login_FLEX.aspx") + 'End If ElseIf tempstr = "Error01" Then - regexval_txt_Pw.ForeColor = Drawing.Color.MediumVioletRed - VERAG_VARIABLES.seterrorcount(2) - regexval_txt_Pw.Text = VERAG_VARIABLES.geterrornumb + "Passwort konnte nicht erfolgreich geändert werden!" - ' Msg = "PW nicht erfolgreich geändert!" - ' Style = vbAbortRetryIgnore + vbCritical + vbDefaultButton1 - ' Title = "Error" - 'MsgBox(Msg, Style, Title) - 'If MsgBox(Msg, Style, Title).Retry Then - 'Response.Redirect(Request.RawUrl) - 'ElseIf MsgBox(Msg, Style, Title).Abort Then - ' Response.Redirect("../newPageJulius_Sidebar.aspx") - 'ElseIf MsgBox(Msg, Style, Title).Ignore Then - ' Try - ' Catch ex As Exception - ' End Try + regexval_txt_Pw.ForeColor = Drawing.Color.MediumVioletRed + VERAG_VARIABLES.seterrorcount(2) + 'regexval_txt_Pw.Text = VERAG_VARIABLES.geterrornumb + "Passwords could not be found!" + ' Msg = "PW nicht erfolgreich geändert!" + ' Style = vbAbortRetryIgnore + vbCritical + vbDefaultButton1 + ' Title = "Error" + 'MsgBox(Msg, Style, Title) + 'If MsgBox(Msg, Style, Title).Retry Then + 'Response.Redirect(Request.RawUrl) + 'ElseIf MsgBox(Msg, Style, Title).Abort Then + ' Response.Redirect("../newPageJulius_Sidebar.aspx") + 'ElseIf MsgBox(Msg, Style, Title).Ignore Then + ' Try + ' Catch ex As Exception + ' End Try End If End Sub Protected Sub txt_Pw_WH_TextChanged(sender As Object, e As EventArgs) @@ -267,7 +267,7 @@ Partial Class login_Change_PW ' btn_submitpw.Enabled = True Else lbl_messagetext.ForeColor = Drawing.Color.Red - lbl_messagetext.Text = "Passwörter stimmen nicht überein." + lbl_messagetext.Text = "No matching Passwords found!" 'btn_submitpw.Enabled = False End If End Sub @@ -301,7 +301,7 @@ Partial Class login_Change_PW 'btn_submitpw_M.Enabled = True Else lbl_messagetext_M.ForeColor = Drawing.Color.Red - lbl_messagetext_M.Text = "Passwörter stimmen nicht überein." + lbl_messagetext_M.Text = "No matching Passwords found. Try again!" 'btn_submitpw.Enabled = False End If End Sub @@ -327,40 +327,36 @@ Partial Class login_Change_PW 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 regexval_txt_Pw_WH.IsValid Then - Using con As New SqlConnection(ConnectionString) - ' Using cmd As New SqlCommand("Validate_User") - Using cmd As New SqlCommand("SELECT UserId,Username,Password FROM [VERAG_HOMEPAGE].[dbo].[Users] WHERE Username=@Username AND UserId=@UserId And UserId=@UserId") - ' cmd.CommandType = CommandType.StoredProcedure - Dim usrname As String = VERAG_PROG_ALLGEMEIN.cCryptography.Decrypt(Request.QueryString("Par2")).ToString - Dim UsrID As String = VERAG_PROG_ALLGEMEIN.cCryptography2.Decrypt(Request.QueryString("Par3")).ToString - Dim THEUsrID As String = VERAG_PROG_ALLGEMEIN.cCryptography.Decrypt(Request.QueryString("Par4")).ToString - cmd.Parameters.AddWithValue("@Username", usrname) - cmd.Parameters.AddWithValue("@UserId", UsrID) - cmd.Connection = con - con.Open() - ' userId = Convert.ToInt32(cmd.ExecuteScalar()) - Dim dr As SqlDataReader = cmd.ExecuteReader() - If dr.HasRows Then - dr.Read() - If String.Equals(txt_Pw_M.Text, dr("Password").ToString) = False Or String.Equals(txt_Pw_WH_M.Text, dr("Password").ToString) = False Then - tempstr = txt_Pw_M.Text - Else - lbl_messagetext_M.ForeColor = Drawing.Color.Red - lbl_messagetext_M.Text = "Die gewählten Passwörter dürfen nicht dem alten entsprechen!" - End If + Using con As New SqlConnection(ConnectionString) + ' Using cmd As New SqlCommand("Validate_User") + Using cmd As New SqlCommand("SELECT UserId,Username,Password FROM [VERAG_HOMEPAGE].[dbo].[Users] WHERE Username=@Username AND UserId=@UserId And UserId=@UserId") + ' cmd.CommandType = CommandType.StoredProcedure + Dim usrname As String = VERAG_PROG_ALLGEMEIN.cCryptography.Decrypt(Request.QueryString("Par2")).ToString + Dim UsrID As String = VERAG_PROG_ALLGEMEIN.cCryptography2.Decrypt(Request.QueryString("Par3")).ToString + Dim THEUsrID As String = VERAG_PROG_ALLGEMEIN.cCryptography.Decrypt(Request.QueryString("Par4")).ToString + cmd.Parameters.AddWithValue("@Username", usrname) + cmd.Parameters.AddWithValue("@UserId", UsrID) + cmd.Connection = con + con.Open() + ' userId = Convert.ToInt32(cmd.ExecuteScalar()) + Dim dr As SqlDataReader = cmd.ExecuteReader() + If dr.HasRows Then + dr.Read() + If String.Equals(txt_Pw_M.Text, dr("Password").ToString, StringComparison.CurrentCulture) = False Or String.Equals(txt_Pw_WH_M.Text, dr("Password").ToString, StringComparison.CurrentCulture) = False Then + tempstr = txt_Pw_M.Text + Else + lbl_messagetext_M.ForeColor = Drawing.Color.Red + lbl_messagetext_M.Text = "The Passwords have to differ from the older ones." End If - dr.Close() - End Using - con.Close() + End If + dr.Close() End Using - Else - tempstr = "Error2" - End If + con.Close() + End Using Else - tempstr = "Error01" + tempstr = "Error01" End If - If String.Equals(txt_Pw_WH_M.Text, tempstr) = True AndAlso String.Equals(txt_Pw_M.Text, tempstr) = True AndAlso String.IsNullOrEmpty(txt_Pw.Text) = True And String.IsNullOrEmpty(txt_Pw_WH.Text) = True And String.Equals(tempstr, "Error01") = False And String.Equals(tempstr, "Error02") = False Then + If String.Equals(txt_Pw_WH_M.Text, tempstr) = True AndAlso String.Equals(txt_Pw_M.Text, tempstr) = True AndAlso String.IsNullOrEmpty(txt_Pw.Text) = True And String.IsNullOrEmpty(txt_Pw_WH.Text) = True And String.Equals(tempstr, "Error01") = False Then Try ConnectionString = "" Dim usrname As String = VERAG_PROG_ALLGEMEIN.cCryptography.Decrypt(Request.QueryString("Par2")).ToString @@ -384,7 +380,7 @@ Partial Class login_Change_PW If String.Equals(usrname, VERAG_PROG_ALLGEMEIN.cCryptography2.Decrypt("Par2"), CompareMethod.Text) = True Then cmd.ExecuteNonQuery() regexval_txt_Pw_M.ForeColor = Drawing.Color.Green - regexval_txt_Pw_M.Text = "Passwort wurde erfolgreich geändert!" + regexval_txt_Pw_M.Text = "Passwort has been changed successfully!" End If End Using con.Close() @@ -401,7 +397,7 @@ Partial Class login_Change_PW ElseIf tempstr = "Error01" Then regexval_txt_Pw_M.ForeColor = Drawing.Color.MediumVioletRed VERAG_VARIABLES.seterrorcount(2) - regexval_txt_Pw_M.Text = VERAG_VARIABLES.geterrornumb + "Passwort konnte nicht erfolgreich geändert werden!" + 'regexval_txt_Pw_M.Text = VERAG_VARIABLES.geterrornumb + "Passwort konnte nicht erfolgreich geändert werden!" ' Msg = "PW nicht erfolgreich geändert!" ' Style = vbAbortRetryIgnore + vbCritical + vbDefaultButton1 ' Title = "Error" diff --git a/login/ForgotPW.aspx b/login/ForgotPW.aspx index ac7530d..d0c2662 100644 --- a/login/ForgotPW.aspx +++ b/login/ForgotPW.aspx @@ -93,15 +93,11 @@ font-family: Arial; font-size: 11px; border: 1px solid gray; - width: 295px; - height: 713px; - margin-left:2px; - } - #lbl_Ueberschrift_M { - background-color: #003680; - font-size: 1.85em; - color: #fff; + width: 395px; + height: 713px; + } + #lbl_login_M { background-color: #003680; font-size: 2em; @@ -290,12 +286,12 @@
+ + + +
+ +
- The Password has to contain at least: + The Password has to contain:
  • - 1 Uppercase + 1 Upper- and 1 lowercase letter
  • - +
  • - 1 Downcase + one special letter
  • - and one special letter -
  • -
  • - at an minimal length of 4 and an maximal + between 4 and 30 characters
  • -
-
    -
  • - length of 30 characters. -
  • -
+
-
- +
- +
+
@@ -369,7 +360,11 @@ - + + -
- +
- +
- +
+ + +
@@ -377,10 +372,7 @@
- -
diff --git a/login/ForgotPW.aspx.vb b/login/ForgotPW.aspx.vb index 4b94fac..ecd9f66 100644 --- a/login/ForgotPW.aspx.vb +++ b/login/ForgotPW.aspx.vb @@ -62,13 +62,13 @@ Partial Class ForgotPW regexval_txt_Email_2.Validate() If regexval_txt_Email_2.IsValid = True Then email = txtEmail.Text - lblMessage.ForeColor = Drawing.Color.Lime + lblMessage.ForeColor = Drawing.Color.Green lblMessage.Text = "E-mail Addresse ist validiert.." End If Else regexval_txt_Email.Validate() If regexval_txt_Email.IsValid = True Then - lblMessage.ForeColor = Drawing.Color.Lime + lblMessage.ForeColor = Drawing.Color.Green lblMessage.Text = "E-mail Adresse ist korrekt." email = txtEmail.Text End If @@ -98,7 +98,7 @@ Partial Class ForgotPW Else username = txt_Username.Text isusrnmright = True - check_UserName_regex.ForeColor = Drawing.Color.Lime + check_UserName_regex.ForeColor = Drawing.Color.Green check_UserName_regex.ErrorMessage = "Ein korrekter Benutzername ist eingegeben worden." End If End If @@ -147,7 +147,7 @@ Partial Class ForgotPW ElseIf String.IsNullOrEmpty(txt_Username.Text) = True Then check_UserName_regex.MatchTimeout = 3000 VERAG_VARIABLES.seterrorcount(5) - check_UserName_regex.ErrorMessage = VERAG_VARIABLES.geterrornumb + "Kein passender Benutzername wurde in der Datenbank gefunden!" + check_UserName_regex.ErrorMessage = "Kein passender Benutzername wurde in der Datenbank gefunden!" isusrnmright = False Try check_UserName_regex.Validate() @@ -164,7 +164,7 @@ Partial Class ForgotPW lblMessage.ForeColor = Color.Red isemailright = False VERAG_VARIABLES.seterrorcount(6) - lblMessage.Text = VERAG_VARIABLES.geterrornumb + "Die eingegebene E-Mail passt nicht zum Datenbankeintrag. Bitte erneut versuchen." + lblMessage.Text = "Die eingegebene E-Mail passt nicht zum Datenbankeintrag. Bitte erneut versuchen." Else lblMessage_M.ForeColor = Color.Red isemailright = False diff --git a/login/login_FLEX.aspx b/login/login_FLEX.aspx index d080f23..5050b0a 100644 --- a/login/login_FLEX.aspx +++ b/login/login_FLEX.aspx @@ -115,7 +115,7 @@ align-items: center; width: 395px; height: 613px; - margin: 0 auto auto -2px; + margin: 0 auto auto -2px 0px; margin-top: 0px; } @@ -125,9 +125,9 @@ background-color: rgba(255,255,255,0.5); top:50%; bottom: auto; - left: -192px; + left: -132px; right: 520px; - margin: auto auto auto -2px; + margin: auto auto auto 45px; } #tbl_main_M { font-family: Arial; @@ -135,7 +135,7 @@ border: 1px solid gray; width: 295px; height: 613px; - margin: auto auto auto -2px; + margin: 5px auto auto 0px; } #lbl_Ueberschrift_M { background-color: #003680; @@ -274,7 +274,7 @@ @@ -325,10 +325,10 @@
-
- +
+
@@ -356,10 +356,10 @@
- +
- + - I forgot my password + I forgot my password