<!DOCTYPE html>
<!--

    Author:        Twily                                 2015 - 2017
    Website:       http://twily.info/
    Compatibility: Mozilla Firefox, Internet Explorer, Google Chrome

    Sources:
    http://stackoverflow.com/questions/33454533/cant-scroll-to-top-of-flex-item-that-is-overflowing-container

-->
<html>
<head>
<title>Backdoor</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<meta name="viewport" content="width=512" />

<!--<link id="favicon" rel="shortcut icon" href="http://twily.info/favicon.ico" />-->
<!--<link rel="stylesheet" type="text/css" href="./css/style.css?v=1" />-->
<link rel="stylesheet" type="text/css" href="./css/common.css?v=3" />
<link rel="stylesheet" type="text/css" href="./css/main.css?v=3" />
<style type="text/css">
html,body {
    margin: 0; padding: 0; overflow: auto; font-size: 12pt;
    font-family: "Droid Sans", "Liberation Sans", "DejaVu Sans", "Segoe UI", Sans;
    background: #17181A; color: #AAABAD;
    width: 100%; height: 100%; margin: 0; padding: 0;
}
* { box-sizing: border-box; }
*:focus { outline: none !important; }

a:link, a:visited { color: #606163; text-decoration: none; }
a:hover, a:active { color: #EA75BC; }

/*.tbl { display: table; width: 100%; height: 100%; }
.tr { display: table-row; }
.td { display: table-cell; vertical-align: top; border: 1px solid #27282B; }*/


#flex { width: 100%; height: 100%; display: flex; position: absolute; z-index: 9; }
#wrap { padding: 64px; margin: auto; display: inline-block; position: relative; background: #27282B; color: #CECFD1; }

</style>

<!--<script type="text/javascript" src="./js/main.js?v=1"></script>-->
<script type="text/javascript">
var $=function(id) { return document.getElementById(id); };

var enableLS=true;
if(typeof(Storage)!="undefined") {
    enableLS=true;
}

var remstate=0;
function remtoggle() {
    if(enableLS) {
        remstate=localStorage.getItem("remember");
        if(remstate==1) {
            // toggle off
            localStorage.setItem("remember",0);
            localStorage.setItem("username","");
            localStorage.setItem("password","");
            remstate=0;
        } else {
            // toggle on
            localStorage.setItem("remember",1);
            localStorage.setItem("username",$('user').value);
            localStorage.setItem("password",$('pass').value);
            remstate=1;
        }
    }
}

function remsync() {
    if(remstate==1) {
        localStorage.setItem("username",$('user').value);
        localStorage.setItem("password",$('pass').value);
    }
}

function init() {
    if(enableLS) {
        remstate=localStorage.getItem("remember");
        if(remstate==1) {
            $('user').value=localStorage.getItem("username");
            $('pass').value=localStorage.getItem("password");
            $('remember').checked=true;
        }
    }
}

</script>
</head>
<body onload="init();">


<div id="flex">
<div id="wrap">

<form action="./gate.php" method="post">
    <label for="user" style="color: #606163;">Username:</label>
    <br />
    <input type="text" value="" name="user" id="user" onchange="remsync();" />
    <br />
    <br />
    <label for="pass" style="color: #606163;">Password:</label>
    <br />
    <input type="password" value="" name="pass" id="pass" onchange="remsync();" />
    <br />
    <br />
    <input type="checkbox" name="remember" id="remember" onclick="remtoggle();" />
    <label for="remember">Remember me</label>
    <br />
    <br />
    <input type="submit" value="Login" style="float: right;" />
</form>

</div>
</div>


</body>
</html>
