From 657b62fb2ca8e9f2b93e278765834274c1ff1ef9 Mon Sep 17 00:00:00 2001 From: ja Date: Tue, 12 Oct 2021 16:24:20 +0200 Subject: [PATCH] =?UTF-8?q?=C3=84nderungen=20design=20login=20pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Customers/CustomsAviso.aspx | 2 +- Customers/CustomsAviso.aspx.vb | 6 +-- css/login/ForgotPW.css | 41 ++++++++++---- login/ChangePW.aspx | 36 ++++++------- login/ForgotPW.aspx | 14 ++--- login/ForgotPW.aspx.vb | 98 ++++++++++++++++++---------------- login/login_FLEX.aspx | 31 ++++++----- 7 files changed, 129 insertions(+), 99 deletions(-) diff --git a/Customers/CustomsAviso.aspx b/Customers/CustomsAviso.aspx index 7fd3389..0904c8c 100644 --- a/Customers/CustomsAviso.aspx +++ b/Customers/CustomsAviso.aspx @@ -1,4 +1,4 @@ -<%@ Page Title="Aufträge VERAG" Language="VB" MasterPageFile="~/Customers/Customers.master" AutoEventWireup="false" CodeFile="CustomsAviso.aspx.vb" Inherits="Kundenbereich_Default" UnobtrusiveValidationMode="None"%> +<%@ Page Title="Aufträge VERAG" Language="VB" MasterPageFile="~/Customers/Customers.master" AutoEventWireup="false" CodeFile="CustomsAviso.aspx.vb" Inherits="CustomsAviso_Default" UnobtrusiveValidationMode="None"%> diff --git a/Customers/CustomsAviso.aspx.vb b/Customers/CustomsAviso.aspx.vb index 59f9804..3c1b288 100644 --- a/Customers/CustomsAviso.aspx.vb +++ b/Customers/CustomsAviso.aspx.vb @@ -2,7 +2,7 @@ Imports System.Data Imports System.Web.UI.HtmlControls -Partial Class Kundenbereich_Default +Partial Class CustomsAviso_Default Inherits System.Web.UI.Page Dim datevon As DateTime Dim datebis As DateTime @@ -68,8 +68,8 @@ Partial Class Kundenbereich_Default datevon = Date.Parse(pickdate1.Text) datebis = Date.Parse(pickdate2.Text) - Else - normaltable.EnableViewState = True + Else + normaltable.EnableViewState = True Dim erster = New Date(Now().Year, Now().Month, 1) Dim ersterdat = erster.Day.ToString + "." + Now().Month.ToString + "." + Now().Year.ToString pickdate1.Text = erster.Day.ToString + "." + Now().Month.ToString + "." + Now().Year.ToString diff --git a/css/login/ForgotPW.css b/css/login/ForgotPW.css index 20e82fb..86407dd 100644 --- a/css/login/ForgotPW.css +++ b/css/login/ForgotPW.css @@ -73,23 +73,46 @@ height: 35px; } -.bg-user-icon { - background: url("../../images/Icons/service/username-icon-png-5.png") no-repeat 1.75% 10px white; +.bg-email-icon { + background: url("../../images/Icons/service/mail-icon.gif") no-repeat 1.75% 11px white; padding-left: 28px; padding-right: 50px; margin-left: -4px; - width: 207px; - height: 20px; + width: 227px; + height: 19px; border: 1px gray solid; border-radius: 5px 5px 0px 0px; } -.bg-email-icon { - background: url("../../images/Icons/service/mail-icon.gif") no-repeat 1.75% 10px white; + +.bg-user-icon { + background: url("../../images/Icons/service/username-icon-png-5.png") no-repeat 1.75% 11px white; + padding-left: 28px; + padding-right: 50px; + width: 227px; + height: 28px; + border: 1px gray solid; + border-radius: 5px 5px 0px 0px; +} + +.bg-key-icon { + background: url("../../images/Icons/service/key-icon-png-22_small.png") no-repeat 1.75% 10px white; + padding-left: 28px; + padding-right: 50px; + width: 227px; + height: 28px; + border: 1px gray solid; + border-radius: 5px 5px 0px 0px; + margin-left: -4px; +} + +.bg-UID-icon { + background: url("../../images/Icons/main/icon0-vector-493-01.png") no-repeat 1.75% 11px white; padding-left: 28px; padding-right: 50px; margin-left: -4px; - width: 207px; - height: 20px; + width: 227px; + height: 28px; border: 1px gray solid; border-radius: 5px 5px 0px 0px; -} \ No newline at end of file +} + diff --git a/login/ChangePW.aspx b/login/ChangePW.aspx index bd2dd57..31d75ef 100644 --- a/login/ChangePW.aspx +++ b/login/ChangePW.aspx @@ -63,7 +63,16 @@ } @@ -74,19 +83,14 @@ - - - - + @@ -97,16 +101,12 @@ - - - + @@ -119,7 +119,7 @@
- +
- -
- + - +
- -
- + - +
- +
diff --git a/login/ForgotPW.aspx b/login/ForgotPW.aspx index 198c206..1173eeb 100644 --- a/login/ForgotPW.aspx +++ b/login/ForgotPW.aspx @@ -85,12 +85,12 @@ - + diff --git a/login/ForgotPW.aspx.vb b/login/ForgotPW.aspx.vb index 7b35e96..2c21545 100644 --- a/login/ForgotPW.aspx.vb +++ b/login/ForgotPW.aspx.vb @@ -7,39 +7,47 @@ Imports System.Data Partial Class login_ForgotPW Inherits System.Web.UI.Page - Protected Sub Page_Load(sender As Object, e As EventArgs) - End Sub + Protected Sub btn_Back_Click(sender As Object, e As EventArgs) Response.Redirect("login/login_FLEX.aspx") End Sub - Protected Sub SendEmail(sender As Object, e As EventArgs) - Dim username As String = txt_Username.Text - Dim password As String = String.Empty - Dim email As String = txtEmail.Text - Dim tokenname As String = "" + Protected Sub btn_Send_Click(sender As Object, e As EventArgs) + Dim username As String + Dim password As String + Dim email As String + Dim tokenname As String + Try + username = txt_Username.Text + password = String.Empty + email = txtEmail.Text + tokenname = "" + Catch Excep As MissingFieldException + MsgBox("Error05: " + Excep.Message) + End Try + 'cDBFunctions.GetNewOpenConnection() Dim ConnectionString = String.Empty 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 Username,Password FROM [VERAG_HOMEPAGE].[dbo].[Users] WHERE Username=@Username") - ' cmd.CommandType = CommandType.StoredProcedure - cmd.Parameters.AddWithValue("@Username", username) - cmd.Connection = con - con.Open() - 'userId = Convert.ToInt32(cmd.ExecuteScalar()) - Dim dr As SqlDataReader = cmd.ExecuteReader() - If dr.Read() Then - username = dr("Username").ToString() - password = dr("Password").ToString() + '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 Username,Password FROM [VERAG_HOMEPAGE].[dbo].[Users] WHERE Username=@Username") + ' cmd.CommandType = CommandType.StoredProcedure + cmd.Parameters.AddWithValue("@Username", username) + cmd.Connection = con + con.Open() + 'userId = Convert.ToInt32(cmd.ExecuteScalar()) + Dim dr As SqlDataReader = cmd.ExecuteReader() + If dr.Read() Then + username = dr("Username").ToString() + password = dr("Password").ToString() Try email = txtEmail.Text Catch ex As Exception @@ -55,28 +63,28 @@ Partial Class login_ForgotPW End If End Try End If - End Using - con.Close() End Using - tokenname = genToken(username, password, email) - If SendEmail(username, password, email, tokenname) = True Then - 'password = RandomString(New Random, 10) - If (getDateoftoken(tokenname) = True) Then + con.Close() + End Using + tokenname = genToken(username, password, email) + If SendEmail(username, password, email, tokenname) = True Then + 'password = RandomString(New Random, 10) + If (getDateoftoken(tokenname) = True) Then Dim msgboxstyle = vbDefaultButton1 + vbOK MsgBox(tokenname, msgboxstyle) - Else - MsgBox("token nicht mehr Gültig! Neuer wird generiert!") - tokenname = genToken(username, password, email) - End If - 'SendEmail(username, password, email) - MsgBox("Mail would be sent successfully!") - lblMessage.ForeColor = Color.Green - lblMessage.Text = "Passwort wurde erfolgreich an die angegebene E-Mail Adresse gesendet." - ElseIf SendEmail(username, password, email, tokenname) = False Then - MsgBox("Mail would not be sent successfully!") - lblMessage.ForeColor = Color.Red - lblMessage.Text = "Diese E-Mail ist nicht in unserer Datenbank vorhanden." + Else + MsgBox("token nicht mehr Gültig! Neuer wird generiert!") + tokenname = genToken(username, password, email) End If + 'SendEmail(username, password, email) + MsgBox("Mail would be sent successfully!") + lblMessage.ForeColor = Color.Green + lblMessage.Text = "Passwort wurde erfolgreich an die angegebene E-Mail Adresse gesendet." + ElseIf SendEmail(username, password, email, tokenname) = False Then + MsgBox("Mail would not be sent successfully!") + lblMessage.ForeColor = Color.Red + lblMessage.Text = "Diese E-Mail ist nicht in unserer Datenbank vorhanden." + End If End Sub 'Function RandomString(r As Random, max As Integer) As String @@ -182,6 +190,6 @@ Partial Class login_ForgotPW End Function Protected Sub txtEmail_TextChanged(sender As Object, e As EventArgs) - regexval_txt_Email.Validate() + regexval_txt_Email.ValidateRequestMode = UI.ValidateRequestMode.Enabled End Sub End Class \ No newline at end of file diff --git a/login/login_FLEX.aspx b/login/login_FLEX.aspx index 8d2c139..f45c2da 100644 --- a/login/login_FLEX.aspx +++ b/login/login_FLEX.aspx @@ -41,22 +41,21 @@ font-size: 1.725em; } .bg-email-icon { - background: url("../../images/Icons/service/mail-icon.gif") no-repeat 1.75% 10px white; + background: url("../../images/Icons/service/mail-icon.gif") no-repeat 1.75% 11px white; padding-left: 28px; - padding-right: 50px; - margin-left: -4px; - width: 207px; - height: 20px; + padding-right: 50px; + width: 227px; + height: 28px; border: 1px gray solid; border-radius: 5px 5px 0px 0px; } .bg-user-icon { - background: url("../../images/Icons/service/username-icon-png-5.png") no-repeat 1.75% 10px white; + background: url("../../images/Icons/service/username-icon-png-5.png") no-repeat 1.75% 11px white; padding-left: 28px; padding-right: 50px; - width: 207px; - height: 20px; + width: 227px; + height: 28px; border: 1px gray solid; border-radius: 5px 5px 0px 0px; } @@ -65,20 +64,20 @@ background: url("../../images/Icons/service/key-icon-png-22_small.png") no-repeat 1.75% 10px white; padding-left: 28px; padding-right: 50px; - width: 207px; - height: 20px; + width: 227px; + height: 28px; border: 1px gray solid; border-radius: 5px 5px 0px 0px; margin-left: -4px; } .bg-UID-icon { - background: url("../../images/Icons/main/icon0-vector-493-01.png") no-repeat 1.75% 10px white; + background: url("../../images/Icons/main/icon0-vector-493-01.png") no-repeat 1.75% 11px white; padding-left: 28px; padding-right: 50px; margin-left: -4px; width: 207px; - height: 20px; + height: 28px; border: 1px gray solid; border-radius: 5px 5px 0px 0px; } @@ -129,27 +128,27 @@
- +
- +
-

Passwort vergessen:

+

Daten hier eintragen:

- +
- +
@@ -118,7 +118,7 @@
- +
- +
- +
- +
- +