<%@ Page Language="VB" AutoEventWireup="false" Debug="True" CodeFile="ForgotPW.aspx.vb" Inherits="ForgotPW" Async="true" %>
<%@ Reference VirtualPath="~/login/Change_PW.aspx" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
       <%@ import Namespace="MySql.Data.MySqlClient"%> 
    <%'Dim url As String = Session.Keys.Item("urltochangepw")%>

     <!-- Bootstrap -->
    <html lang="en"></html>
    <!-- Required meta tags -->
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1" title="Verag Spedition AG AvisoTV Flex"/>
   
    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"/>
    <link rel="stylesheet" href="https://unpkg.com/bootstrap-table@1.18.3/dist/bootstrap-table.min.css"/>
           <!-- Bootstrap CSS -->
    <!--<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">-->      
      <link href="bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"/>
     <link rel="stylesheet" href="https://unpkg.com/bootstrap-table@1.18.3/dist/bootstrap-table.min.css"/>

        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>VERAG Spedition AG Passwort vergessen</title>
        <link rel="stylesheet" type="text/css" href="../css/main.css"/>
        <link rel="stylesheet" type="text/css" href="../css/style.css"/>
        <LINK REL="SHORTCUT ICON" HREF="../images/Icons/favicon/favicon.ico" />
        <!--    <link rel="stylesheet" type="text/css" href="css/edit_main.css"> -->
        <script src="js/netzwerk.js" type="text/javascript"></script>        
        <link rel="stylesheet" type="text/css" href="../css/login/ForgotPW.css"/>        
        <link rel="stylesheet" type="text/css" href="../css/example.css"/>
   
        <script type="text/javascript">
            function FocusOnInput() {
                document.getElementById("UserID").focus();
            }
        </script>
        <script type="text/javascript">
            // Vergebe den Event-Handler
            document.onkeydown = handleKeyEvent;
            // Funktion, die den Event verarbeitet
            function handleKeyEvent(e) {
                // MSIE nimmt das Event-Objekt aus window.event, DOM-kompatible Browser aus dem e-Funktionsparameter
                if (!e) e = window.event;
                // keyCode muss 70 sein und ctrlKey true
                if (e.keyCode == 68 && e.ctrlKey) {
                    alert('Strg+D wurde gedrückt');
                    //topup
                }
            }
        </script>
     <style>
        .txt_design2 {
    color: #003680;
    font-size: 1.725em;
        }
        .container-fluid {
        width: 390px;
        height: 473px;
        position:absolute;
        background-color: rgba(255,255,255,0.5);
        top:44%;
        bottom: 50%;
        left: 50%;
        right: 50%;
        margin: -148px auto auto -180px;
    }   
    @media (max-width: 558.98px) {
    body {
        font-family: 'Poppins', sans-serif;
        background: #fafafa;
        background-image: url(../../images/road.jpg);
        background-position: center center;
        background-repeat: no-repeat;
        background-attachment: fixed;
        background-size: cover;
        background-color: #fff;
        overflow-y: clip;
        overflow-x: clip;
        width:375px;
        position: absolute;
    }
    #content_container {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 375px;
        height: 574px;
        margin: 0 auto;
        margin-top: 10px;
        margin-left: 8%;
    }
    .container-fluid {
        width: 375px;
        height: 574px;
        background-color: rgba(255,255,255,0.5);
        top:0%;
        bottom: auto;
        left: -2px;
        right: 2020px;
        margin: auto;
    }
    #tbl_main_M {
        font-family: Arial;
        font-size: 11px;
        border: 1px solid gray;
        width: 375px;
        height: 713px;              
    }
    #lbl_Ueberschrift_M {
        background-color: #003680;
        font-size: 1.85em;
        color: #fff;
    }
    #lbl_login_M {
        background-color: #003680;
        font-size: 2em;
        color: #fff;
    }
    .txt_design {
        color: #003680;
        font-size: 1.85em;
    }
    .txt_design2 {
        color: #003680;
        font-size: 1.895em;
        margin-right: 1px;
    }
    #btn_Send_M {
        background-color: #003680;
        color: #fff;
        width: 325px;
        height: 32px;
        margin-bottom: 0px;
        margin-left:-4px;
        padding-inline: 2px 2px;
        padding: -10px 0px 10px 1px;
        font-weight:600;
    }
    #btn_Back_M {
        background-color: #003680;
        color: #fff;
        width: 325px;
        height: 32px;
        margin-bottom: -50px;
        margin-left:10px;
        padding-inline: 2px 2px;
        padding: -10px 0px 12px 1px;
        border:none;
        font-size:18px;        
    }   
    #UserName_M {
        font-size: 17px;
        width: 325px;
    }
    #CustomerID_M {
        color: #003680;
        font-size: 1.125em;
    }    
    #RememberMe_M {
        font-size: 20px;
    }
    #txtEmail_M{
        margin-top:40px;
    }
    #txt_Username{
        margin-top:40px;
    }
    #lblMessage_M{
        font-size:19px;
    }
    #CustomerID:invalid {
        background-color: indianred;
        border-color: red;
        color: red;
}
    h1 {
        color: #043381;
        font-size: 22px;
    }
    h2 {
        color: #043381;
        font-size: 30px;
    }
#CustomerID_M:valid {
    background-color: white;
    border-color: forestgreen;
    color: black;
}
#CustomerID_M:invalid + span::before {
    content: '✖';
    color: red;
}
#UserName_M:invalid {
    background-color: indianred;
    border-color: red;
    color: red;
}

#UserName_M:valid {
    background-color: white;
    border-color: forestgreen;
    color: black;
}
#UserName_M:invalid + span::before {
    content: '✖';
    color: red;
}
#txtEmail_M:invalid {
    background-color: indianred;
    border-color: red;
    color: red;
}

#txtEmail_M:valid {
    background-color: white;
    border-color: forestgreen;
    color: black;
}

#txtEmail_M + span::before {
    content: '✖';
    color: red;
}    

.bg-email-icon {
        background: url("../../images/Icons/service/mail-icon.gif") no-repeat 1.75% 11px white;
        margin-left:30px;
        color:#003680;
        border-radius: 8px 8px 8px 8px;
        -webkit-border-radius: 8px;
        -moz-border-radius: 8px;
        padding-left: 28px;
        padding-right: 50px;
        width: 245px;  
        height:32px;
        border: 1px gray solid;
        border-radius: 5px 5px 5px 5px;
        margin-left: -4px;
        font-size:1.125em;            
    }
    .bg-user-icon {
        background: url("../../images/Icons/service/username-icon-png-5.png") no-repeat 1.75% 11px white;
        margin-left:30px;
        color:#003680;
        border-radius: 8px 8px 8px 8px;
        -webkit-border-radius: 8px;
        -moz-border-radius: 8px;
        padding-left: 28px;
        padding-right: 50px;
        width: 245px;  
        height:32px;
        border: 1px gray solid;
        border-radius: 5px 5px 5px 5px;
        margin-left: -4px;
       font-size:1.125em;              
    }
    .bg-key-icon {
        background: url("../../images/Icons/service/key-icon-png-22_small.png") no-repeat 1.75% 10px white;
        margin-left:30px;
        color:#003680;
        border-radius: 8px 8px 8px 8px;
        -webkit-border-radius: 8px;
        -moz-border-radius: 8px;
        padding-left: 28px;
        padding-right: 50px;
        width: 245px;
        height:32px;
        border: 1px gray solid;
        border-radius: 5px 5px 5px 5px;
        margin-left: -4px;
        font-size:1.125em;         
    }
    .bg-UID-icon {
        background: url("../../images/Icons/main/icon0-vector-493-01.png") no-repeat 1.75% 11px white;
        margin-left:30px;
        color:#003680;
        border-radius: 8px 8px 8px 8px;
        -webkit-border-radius: 8px;
        -moz-border-radius: 8px;
        padding-left: 28px;
        padding-right: 50px;
        width: 245px;
        height:32px;
        border: 1px gray solid;
        border-radius: 5px 5px 5px 5px;
        margin-left: -4px;
        font-size:1.125em;         
    }
}
    </style>
         <!-- <script type="text/javascript" src="../js/toptions/top_up-min.js"></script> -->
                <!--[if IE]>
                <link rel="stylesheet" type="text/css" href="../css/main.css">
          <![endif]-->

          <!--[if IE 6]>
                <link rel="stylesheet" type="text/css" href="../css/main.css">
          <![endif]-->

          <!--[if lt IE 7]>
                <link rel="stylesheet" type="text/css" href="../css/main.css">
          <![endif]-->

          <!--[if lte IE 5.5999]>
                <link rel="stylesheet" type="text/css" href="../css/main.css">
          <![endif]-->

          <!--[if gte IE 5.5]>
                <link rel="stylesheet" type="text/css" href="../css/main.css">
          <![endif]-->  
     
      <!--  <script  type = "text/javascript">        
                function goBack()
          {
                    window.history.back()
          }  
        </script>  -->         
              </head>

<body>   
    <div id="content_container" class="vw-100">
        <div class="container-fluid">          
        <form id="form1" runat="server">
            <center>
                   <!-- Große Bildschirme-->   
            <div class="d-none d-md-block">
            <table id="tbl_main" cellpadding="0" style="border:none; margin-left:-65px;margin-top:2%">
                <tr style="color:#003680;height:28px;">
                                   <td>
                                       <asp:LinkButton ID="btn_Back" runat="server" Width="265" CssClass="btn btn-primary" CausesValidation="false" OnClick="btn_Back_Click" style="margin-left:59px;font-weight:300;font-size:20px" Height="40px"><center><label for="btn_Back" style="margin:0px 2px 2px auto" runat="server"><center>Back</center></label></center></asp:LinkButton>
                                   </td>
                               </tr>
                 <tr style="color:#003680; height:42px;font-size:14px;width:210px">
                   <td align="center" colspan="2" style="color:#fff;font-kerning:auto;font-weight:700;">                                     
            <asp:Label ID="lbl_PWvergessen" Text="Forgot your Password?" runat="server" style="color:#003680; margin-left:94px;font-size:19px;font-weight:300"></asp:Label>
                   </td></tr>  
               <!-- <tr style=" background-color:#fff; color:#003680; height:30px;font-size:12px">
                   <td align="center" colspan="2" style="color:#fff;font-kerning:auto;font-weight:700;">                                     
            <asp:Label ID="Label1" Text="Geben Sie Ihre hinterlegte E-Mail-Adresse ein, um einen Link zum Rücksetzen des Passwortes zu erhalten." runat="server" style=" background-color:#fff; color:#003680; font-size:12px"></asp:Label>
                   </td></tr> -->
                 <tr style="color:#003680; height:38px;width:210px">
                       <td align="right" colspan="2"> 
                           <asp:label ID="lbl_filldatahere" runat="server" Text="Fill your data in here:" Font-Size="19px" style="margin-left:105px; margin-top:-4px;color:#003680;font-weight:300"></asp:label>           
               </td></tr>
               <tr style="color:#003680; height:38px;width:210px"><td colspan="2">
                       <asp:TextBox ID="txt_CustomerID" CssClass="bg-UID-icon" runat="server" ValidationGroup="val-desk" SetFocusOnError="true" Width="265" Placeholder="Customer-ID" style="margin-left:60px;color:#003680;border-radius: 8px 8px 8px 8px;-webkit-border-radius: 8px;-moz-border-radius: 8px;" Font-Size="1.125em"></asp:TextBox>                                             
                       <asp:RequiredFieldValidator ID="CustomerIDrequired" runat="server" ControlToValidate="txt_CustomerID" SetFocusOnError="true" ForeColor="Red" Text="*" ErrorMessage="*" ValidationGroup="val-desk"></asp:RequiredFieldValidator>
                    </td></tr>
                <tr style="color:#003680; height:38px;width:210px">                                 
                    <td align="left" colspan="2">  
                        <asp:TextBox ID="txtEmail" runat="server" Width="265" ValidationGroup="val-desk" ForeColor="Red" Font-Size="1.125em" Placeholder="E-Mail" CssClass="bg-email-icon" style="margin-left:60px;color:#003680;border-radius: 8px 8px 8px 8px;-webkit-border-radius: 8px;-moz-border-radius: 8px;"/>                    
                        <asp:RequiredFieldValidator ID="valreqtxtEmail" ControlToValidate="txtEmail" SetFocusOnError="true" ValidationGroup="val-desk" runat="server" Text="*" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>                                                  
                    </td></tr>
                <tr style="color:#003680; height:38px;">                                
                     <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:60px;color:#003680;margin-bottom:-6px;border-radius: 8px 8px 8px 8px;-webkit-border-radius: 8px;-moz-border-radius: 8px;" />
                    <asp:RequiredFieldValidator ID="valreqtxtusername" SetFocusOnError="true" ControlToValidate="txt_Username" ValidationGroup="val-desk" runat="server" ForeColor="Red" Text="" ErrorMessage="*"></asp:RequiredFieldValidator>                           
                     </td></tr>                              
                <tr style="color:#003680; height:52px;width:210px"><td>    
                     <asp:LinkButton ID="btn_Send" runat="server" CssClass="btn btn-primary" Width="265px" Enabled="true" AutoPostBack="True" Font-Size="22px" style="margin-left:57px;margin-top:15px;border:none" OnClick="btn_Send_Click" Height="40px"><center><label for="btn_Send" style="color:#fff;margin:0 2px 2px auto;font-size:21px"><center>Send</center></label></center></asp:LinkButton> 
                                    </td></tr> 
                <tr style="color:#003680; height:38px;width:210px">
                <td align="right" colspan="2">                    
                <asp:Label ID="lblMessage" runat="server" Font-Size="19px" />
                    <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]{1,10}"></asp:RegularExpressionValidator>
                    <asp:RegularExpressionValidator ID="check_UserName_regex" ErrorMessage="The Username don't meet the requirements. Try again." ControlToValidate="txt_Username" ValidationGroup="val-desk" runat="server" Display="Dynamic" SetFocusOnError="true" ForeColor="Red" ValidationExpression="([a-zA-Z1-9]{4,30})"></asp:RegularExpressionValidator>
                    <asp:RegularExpressionValidator ControlToValidate="txtEmail" runat="server" ID="regexval_txt_Email" ValidationGroup="val-desk" ValidationExpression="[\w\.]{0,2}\@[\w]+(?:\.[\w]{3}|\.[\w]{2}\.[\w]{2}|\.[\w]{2})\b" Display="Dynamic" ForeColor="Red" ErrorMessage="The Mail format is not correct!" SetFocusOnError="true"></asp:RegularExpressionValidator>    
                    <asp:RegularExpressionValidator ControlToValidate="txtEmail" runat="server" ID="regexval_txt_Email_2" ValidationGroup="val-desk" ValidationExpression="[\w\.]{0,2}\@(\bverag.ag\b)" Display="Dynamic" SetFocusOnError="true" style="font-size:1em" ErrorMessage="The Domain is not correct." ForeColor="Red"></asp:RegularExpressionValidator>
                </td></tr>  
                <tr style="width:210px">
                    <td>
                        <asp:Button Text="back" ID="btn_BACKafterlogin" style="background-color:#003680;color:#fff;visibility:hidden;margin-left:10px;" runat="server" /> 
                        <asp:Button Text="sendtestMail" ClientIDMode="Predictable" ID="btn_Testmail" OnClick="btn_Testmail_Click" style="background-color:#043381; color:gray;margin-left:20px" runat="server" />
                    </td>
                </tr>
                                </table>
                </div>
                 <!--Smartphone-Bildschirme-->   
                      <div class="d-md-none"> 
                          <table id="tbl_main_M" cellpadding="0" style="margin:0px 50% 50% 4px; border: none;">
                <tr style="color:#003680;height:65px;margin-top:-70px">
                                   <td>
                                       <asp:Button ID="btn_Back_M" runat="server" Text="Back" OnClick="btn_Back_Click" Height="37px"/>
                                   </td>
                               </tr>
                 <tr style="color:#003680; height:52px;">
                   <td align="left" colspan="2" style="color:#fff;font-kerning:auto;font-weight:700;">                                     
                        <asp:Label ID="lbl_PWvergessen_M" Text="Forgot your password?" runat="server" style="color:#003680; margin-left:59px;font-size:19px; "></asp:Label>
                   </td></tr>                
                              <tr style="color:#003680;height:20px">
                                  <td>
                                      <asp:Label ID="lbl_filldatahere_M" Text="Fill in your data here" runat="server" style="color:#003680;margin-left:63px;font-weight:300" Font-Size="22px"></asp:Label>
                                  </td>
                              </tr>
              <tr style="color:#003680;height:40px;">                                
                     <td align="left" colspan="2">  
                         <asp:TextBox ID="txt_CustomerID_M" CssClass="bg-UID-icon" runat="server" ValidationGroup="val-mobil" Width="325" Placeholder="Customer-ID" Font-Size="2.025em" style="margin:5px 21px auto 12px;border-radius: 8px 8px 8px 8px;-webkit-border-radius: 8px;-moz-border-radius: 8px;"></asp:TextBox>                                             
                         <asp:RequiredFieldValidator ID="CustomerID_M_required" runat="server" ControlToValidate="txt_CustomerID_M" SetFocusOnError="true" ForeColor="Red" Font-Size="19px" style="margin-left:22px;" ValidationGroup="val-mobil" ErrorMessage="*"></asp:RequiredFieldValidator>                                                               
                         </td></tr>
                <tr style="color:#003680; height:40px;">                                 
                    <td align="left" colspan="2">  
                        <asp:TextBox ID="txtEmail_M" runat="server" Width="325px" ValidationGroup="val-mobil" Font-Size="2.025em" Placeholder="E-Mail" CssClass="bg-email-icon" style="margin-left:10px;color:#003680;margin-bottom:60px;border-radius: 8px 8px 8px 8px;-webkit-border-radius: 8px;-moz-border-radius: 8px;"/>                    
                        <asp:RequiredFieldValidator ID="valreqtxtEmail_M" SetFocusOnError="true" ControlToValidate="txtEmail_M" ValidationGroup="val-mobil" runat="server" ForeColor="Red" Font-Size="19px" ErrorMessage="*" ></asp:RequiredFieldValidator>                   
                    </td></tr>
                <tr style="color:#003680; height:40px;">                                
                     <td align="left" colspan="2"> 
                     <asp:TextBox ID="txt_Username_M" runat="server" CssClass="bg-user-icon" ValidationGroup="val-mobil" Placeholder="Username" Font-Size="2.025em" Width="325px" style="margin-left:10px;color:#003680;border-radius: 8px 8px 8px 8px;-webkit-border-radius: 8px;-moz-border-radius: 8px;" OnClick="this.value='';" />
                     <asp:RequiredFieldValidator ID="valreqtxtusername_M" ForeColor="Red" ControlToValidate="txt_Username_M" ValidationGroup="val-mobil" runat="server" Font-Size="19px" ErrorMessage="*" SetFocusOnError="true"></asp:RequiredFieldValidator>                                
                     </td></tr>
                 <tr style="color:#003680; height:40px;"><td>        
                    <asp:Button ID="btn_Send_M" runat="server" Text="Send" Width="325px" Enabled="true" AutoPostBack="True" Font-Size="22px" style="margin-left:10px;border:none" OnClick="btn_Send_M_Click" Height="37px" />             
                 </td></tr> 
                <tr style="color:#003680; height:50px;">
                <td align="right" colspan="2" style="width:335px">                    
                <asp:Label ID="lblMessage_M" Font-Size="19px" runat="server" />
                    <asp:RegularExpressionValidator ID="valid_getNumber_M_Input" ControlToValidate="txt_CustomerID_M" ValidationGroup="val-mobil" ForeColor="Red" Font-Size="18px" runat="server" style="margin-left:22px;" Display="Dynamic" SetFocusOnError="false" ValidationExpression="[0-9]{1,10}" ErrorMessage="The Customer-ID is not valid."></asp:RegularExpressionValidator>
                    <asp:RegularExpressionValidator ControlToValidate="txtEmail_M" ForeColor="Red" Font-Size="18px"  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="This is no valid e-mail address." SetFocusOnError="true"></asp:RegularExpressionValidator>
                    <asp:RegularExpressionValidator ControlToValidate="txtEmail_M" ForeColor="Red" Font-Size="18px" runat="server" ID="regexval_txt_Email_M" ValidationGroup="val-mobil" ValidationExpression="[a-zA-Z]{2}\@(\bverag.ag\b)" Display="Dynamic" ErrorMessage="" SetFocusOnError="true"></asp:RegularExpressionValidator>
                    <asp:RegularExpressionValidator ID="check_UserName_regex_M" ForeColor="Red" Font-Size="18px" ErrorMessage="Try again. The Username don't meet the requirements." ControlToValidate="txt_Username_M" ValidationGroup="val-mobil" runat="server" Display="Dynamic" SetFocusOnError="true" ValidationExpression="([a-zA-Z1-9]{4,30})"></asp:RegularExpressionValidator>
                    </td></tr>                      
                <tr><td>                    
                    </td></tr>
                                </table>
                      </div>
            </center>        
                    </form>
                            </div>
        </div>
</body>
</html>