Änderungen
This commit is contained in:
@@ -77,7 +77,7 @@ Partial Class ChangePW
|
||||
tempstr = "Error01"
|
||||
End If
|
||||
|
||||
If txt_Pw.Text = tempstr And txt_Pw_WH.Text = tempstr AndAlso txt_Pw_M.Text = String.Empty And txt_Pw_WH_M.Text = String.Empty Then
|
||||
If txt_Pw.Text = tempstr And txt_Pw_WH.Text = tempstr AndAlso String.IsNullOrEmpty(txt_Pw_M.Text) = True And String.IsNullOrEmpty(txt_Pw_WH_M.Text) = True Then
|
||||
Try
|
||||
Dim ConnectionString = ""
|
||||
Dim usrname = VERAG_PROG_ALLGEMEIN.cCryptography2.Decrypt(Request.QueryString("Par2"))
|
||||
@@ -112,7 +112,7 @@ Partial Class ChangePW
|
||||
' If MsgBox(Msg, Style, Title).Ok Then
|
||||
'Response.Redirect("login_FLEX.aspx")
|
||||
'End If
|
||||
ElseIf txt_Pw_M.Text = tempstr And txt_Pw_WH_M.Text = tempstr AndAlso txt_Pw.Text = String.Empty And txt_Pw_M.Text = String.Empty Then
|
||||
ElseIf txt_Pw_M.Text = tempstr And txt_Pw_WH_M.Text = tempstr AndAlso String.IsNullOrEmpty(txt_Pw.Text) = True And String.IsNullOrEmpty(txt_Pw_M.Text) = True Then
|
||||
Try
|
||||
Dim ConnectionString = ""
|
||||
Dim usrname = VERAG_PROG_ALLGEMEIN.cCryptography2.Decrypt(Request.QueryString("Par2"))
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
<h2 style="margin-left:94px; margin-top:-4px">Fill in your data here:</h2>
|
||||
</td></tr>
|
||||
<tr><td>
|
||||
<asp:TextBox ID="txt_CustomerID" CssClass="bg-UID-icon" runat="server" required="true" ValidationGroup="val-desk" Width="265" Placeholder="Customer-ID" style="margin-left:45px;color:#003680" Font-Size="1.125em"></asp:TextBox>
|
||||
<asp:TextBox ID="txt_CustomerID" CssClass="bg-UID-icon" runat="server" ValidationGroup="val-desk" Width="265" Placeholder="Customer-ID" style="margin-left:45px;color:#003680" Font-Size="1.125em"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="CustomerIDrequired" runat="server" ControlToValidate="txt_CustomerID" ForeColor="Red" ValidationGroup="val-desk" ErrorMessage="Please enter the Customer-ID."></asp:RequiredFieldValidator>
|
||||
<asp:RegularExpressionValidator ID="valid_getNumberInput" ControlToValidate="txt_CustomerID" style="font-size:17px" ForeColor="Red" ValidationGroup="val-desk" runat="server" Display="Dynamic" SetFocusOnError="false" ErrorMessage="The Customer-ID is not valid." ValidationExpression="[0-9]{4,10}"></asp:RegularExpressionValidator>
|
||||
</td></tr>
|
||||
|
||||
@@ -283,14 +283,14 @@
|
||||
</tr>
|
||||
<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="Customer-ID" style="margin-left: 22px" Font-Size="1.25em"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="CustomerIDrequired" runat="server" ControlToValidate="CustomerID" ForeColor="Red" style="font-size:17px" SetFocusOnError="true" ValidationGroup="Login" ErrorMessage="Please enter the Customer-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 Customer-ID is not valid." ValidationExpression="[0-9]{4,10}"></asp:RegularExpressionValidator>
|
||||
<asp:TextBox ID="txt_CustomerID" CssClass="bg-UID-icon" runat="server" required="true" ValidationGroup="Login" Width="320" Placeholder="Customer-ID" style="margin-left: 22px" Font-Size="1.25em"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="CustomerIDrequired" runat="server" ControlToValidate="txt_CustomerID" ForeColor="Red" style="font-size:17px" SetFocusOnError="true" ValidationGroup="Login" ErrorMessage="Please enter the Customer-ID."></asp:RequiredFieldValidator>
|
||||
<asp:RegularExpressionValidator ID="valid_getNumberInput" ControlToValidate="txt_CustomerID" style="font-size:17px" ForeColor="Red" ValidationGroup="Login" runat="server" Display="Dynamic" SetFocusOnError="false" ErrorMessage="The Customer-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: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" 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" Font-Size="17px" 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>
|
||||
@@ -331,9 +331,9 @@
|
||||
</tr>
|
||||
<tr style="color:#003680; height:86px">
|
||||
<td align="left">
|
||||
<asp:TextBox ID="CustomerID_M" CssClass="bg-UID-icon" runat="server" required="true" ValidationGroup="Login_M" Width="325" Placeholder="Customer-ID" Font-Size="2.025em" style="margin-left: 22px;margin-top:20px;"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="CustomerID_M_required" runat="server" ControlToValidate="CustomerID_M" SetFocusOnError="false" ForeColor="Red" style="margin-left:22px;font-size:19px" ValidationGroup="Login_M" ErrorMessage="Please enter the Customer-ID."></asp:RequiredFieldValidator>
|
||||
<asp:RegularExpressionValidator ID="valid_getNumber_M_Input" ControlToValidate="CustomerID_M" ValidationGroup="Login_M" ForeColor="Red" Font-Size="20px" runat="server" style="margin-left:22px;font-size:19px" Display="Dynamic" SetFocusOnError="false" ValidationExpression="[0-9]{4,10}" ErrorMessage="The Customer-ID is not valid."></asp:RegularExpressionValidator>
|
||||
<asp:TextBox ID="txt_CustomerID_M" CssClass="bg-UID-icon" runat="server" required="true" ValidationGroup="Login_M" Width="325" Placeholder="Customer-ID" Font-Size="2.025em" style="margin-left: 22px;margin-top:20px;"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="CustomerID_M_required" runat="server" ControlToValidate="txt_CustomerID_M" SetFocusOnError="false" ForeColor="Red" style="margin-left:22px;font-size:19px" ValidationGroup="Login_M" ErrorMessage="Please enter the Customer-ID."></asp:RequiredFieldValidator>
|
||||
<asp:RegularExpressionValidator ID="valid_getNumber_M_Input" ControlToValidate="txt_CustomerID_M" ValidationGroup="Login_M" ForeColor="Red" Font-Size="20px" runat="server" style="margin-left:22px;font-size:19px" Display="Dynamic" SetFocusOnError="false" ValidationExpression="[0-9]{4,10}" ErrorMessage="The Customer-ID is not valid."></asp:RegularExpressionValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="color:#003680; height:86px;">
|
||||
|
||||
@@ -18,8 +18,8 @@ Partial Class login_FLEX
|
||||
'ConnectionString = "Server=db593295684.db.1and1.com;Database=db593295684;Uid=dbo593295684;Pwd=atilla#2;"
|
||||
End If
|
||||
|
||||
Dim tb As TextBox = form1.FindControl("UserID")
|
||||
Dim tb_M As TextBox = form1.FindControl("UserID_M")
|
||||
Dim tb As TextBox = form1.FindControl("txt_CustomerID")
|
||||
Dim tb_M As TextBox = form1.FindControl("txt_CustomerID_M")
|
||||
Dim tb2 As TextBox = form1.FindControl("UserName")
|
||||
Dim tb2_M As TextBox = form1.FindControl("UserName_M")
|
||||
Dim tb3 As TextBox = form1.FindControl("Password")
|
||||
@@ -37,19 +37,19 @@ Partial Class login_FLEX
|
||||
Dim regexusername As RegularExpressionValidator = Page.FindControl("check_UserName_regex")
|
||||
Dim regexusername_M As RegularExpressionValidator = Page.FindControl("check_UserName_M_regex")
|
||||
|
||||
Dim user_ID As String = String.Empty
|
||||
Dim Customer_ID As String = String.Empty
|
||||
Dim UserNaMe As String = String.Empty
|
||||
Dim passw As String = String.Empty
|
||||
|
||||
If reqfieldvaluserID.IsValid Then
|
||||
regexuserID.Validate()
|
||||
If regexuserID.IsValid Then
|
||||
user_ID = tb.Text
|
||||
Customer_ID = tb.Text
|
||||
End If
|
||||
ElseIf reqfieldvaluserID_M.IsValid Then
|
||||
regexusername_M.Validate()
|
||||
If regexusername_M.IsValid Then
|
||||
user_ID = tb_M.Text
|
||||
Customer_ID = tb_M.Text
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -71,7 +71,7 @@ Partial Class login_FLEX
|
||||
Using cmd As New SqlCommand("SELECT COUNT(*), UserId,Username, Password FROM [VERAG_HOMEPAGE].[dbo].[Users] WHERE Username=@Username AND Password=@Password AND Kundennr=@Kundennr")
|
||||
' cmd.CommandType = CommandType.StoredProcedure
|
||||
cmd.Parameters.AddWithValue("@Username", UserNaMe)
|
||||
cmd.Parameters.AddWithValue("UserID", user_ID)
|
||||
cmd.Parameters.AddWithValue("UserID", Customer_ID)
|
||||
cmd.Parameters.AddWithValue("@Password", passw)
|
||||
cmd.Connection = con
|
||||
con.Open()
|
||||
@@ -89,24 +89,24 @@ Partial Class login_FLEX
|
||||
Exit Select
|
||||
Case Else
|
||||
If tb.Text = dr("UserId") Then
|
||||
user_ID = dr("UserID")
|
||||
Customer_ID = dr("UserId")
|
||||
Else
|
||||
Login1.FailureText = "ID cannot be found in the database!"
|
||||
End If
|
||||
If tb2.Text = dr("Username") Then
|
||||
user_ID = dr("Username")
|
||||
Customer_ID = dr("Username")
|
||||
Else
|
||||
Login1.FailureText = "Username is not in the database!"
|
||||
End If
|
||||
If tb3.Text = dr("Password") Then
|
||||
user_ID = dr("Password")
|
||||
Customer_ID = dr("Password")
|
||||
Else
|
||||
Login1.FailureText = "Password is not in the database!"
|
||||
End If
|
||||
|
||||
Login1.FailureText = "Erfolgreich validiert."
|
||||
Session.Add("test", UserNaMe)
|
||||
Session.Add("UserID", user_ID)
|
||||
Session.Add("UserID", Customer_ID)
|
||||
Session.Add("PW", passw)
|
||||
FormsAuthentication.RedirectFromLoginPage(UserNaMe, True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user