<!doctype html>  
<head>
    <base href="<?PHP echo $this->base; ?>" /> 

    <meta charset="utf-8">

    <title>selfoss</title>
    
    <meta name="description" content="selfoss" />
    <meta name="author" content="Tobias Zeising" />

    <!--  Mobile viewport optimized: j.mp/bplateviewport -->
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1" />
    
    <!--  Add support for fullscreen Webapp on iPhone 5 -->
    <meta name="viewport" content="initial-scale=1, user-scalable=no, maximum-scale=1" media="(device-height: 568px)" />
    
    <!-- app 'behaviour' when adding link to iDevice springboard -->
    <meta name="apple-mobile-web-app-capable" content="yes" />

    <!-- Place favicon.ico & apple-touch-icon.png in the root of your domain and delete these references -->
    <link rel="shortcut icon" href="favicon.ico" />
    <link rel="apple-touch-icon" href="apple-touch-icon.png" />

    <!-- all css definitions -->
    <?PHP if(\F3::get('use_system_font')!=true) : ?>
        <link rel="stylesheet" href="css/fonts.css" />
    <?PHP endif; ?>
    <link rel="stylesheet" href="all.css" />

</head>
<body>

    <?PHP if(!isset($this->password)) : ?>
    <form action="<?PHP echo $this->base; ?>?login=1" method="post">
    <ul id="login">
        <li><h1>selfoss login</h1></li>
        <li><label><?PHP echo \F3::get('lang_login_username'); ?>:</label> <input type="text" name="username" id="username" /></li>
        <li><label><?PHP echo \F3::get('lang_login_password'); ?>:</label> <input type="password" name="password" /></li>
        <?PHP if(isset($this->error)) : ?>
        <li class="error"><?PHP echo $this->error; ?></li>
        <?PHP endif; ?>
        <li class="button"><label>&nbsp;</label><input type="submit" value="<?PHP echo \F3::get('lang_login'); ?>" /></li>
    </ul>
    </form>
    
    <?PHP else : ?>
    <form action="<?PHP echo $this->base; ?>password" method="post">
    <ul id="login">
        <li><h1>hash generator</h1></li>
        <li><label>Password:</label> <input type="password" name="password" /></li>
        <?PHP if(isset($this->hash)) : ?>
        <li class="error"><label>&nbsp;</label>Generated Password (insert this in config.ini): <input type="text" id="hash" value="<?PHP echo $this->hash; ?>" /></li>
        <?PHP endif; ?>
        <li><label>&nbsp;</label><input class="button" type="submit" value="generate password" /></li>
    </ul>
    </form>
    <?PHP endif; ?>
    
    <script src="all.js"></script>
</body>
</html>