135 lines
5.7 KiB
PHP
135 lines
5.7 KiB
PHP
|
<?php
|
||
|
require_once __DIR__ . '/../startup.php';
|
||
|
|
||
|
if($flashii->loggedIn()){
|
||
|
header('Location: ./');
|
||
|
}
|
||
|
|
||
|
$redirect = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/';
|
||
|
|
||
|
print desHeader('Login to Flashii');
|
||
|
?>
|
||
|
<div class="loginPage">
|
||
|
<?php
|
||
|
if(isset($_REQUEST['chat']))
|
||
|
print '<h1 class="stylised" style="line-height: 1.8em; text-align: center;">You need to be logged in to use the chat.</h1>';
|
||
|
?>
|
||
|
<div class="loginCont">
|
||
|
<div class="loginForm">
|
||
|
<div class="head">
|
||
|
Login to Flashii
|
||
|
</div>
|
||
|
<form method="post" action="/sys/login">
|
||
|
<input type="hidden" name="redirect" value="<?=$redirect;?>" />
|
||
|
<div class="leftAlign">
|
||
|
<label for="loginUserName">Username:</label>
|
||
|
</div>
|
||
|
<div class="centreAlign">
|
||
|
<input class="inputStyling" type="text" id="loginUserName" name="username" autofocus="true" />
|
||
|
</div>
|
||
|
<div class="leftAlign">
|
||
|
<label for="loginPassword">Password:</label>
|
||
|
</div>
|
||
|
<div class="centreAlign">
|
||
|
<input class="inputStyling" type="password" id="loginPassword" name="password" />
|
||
|
</div>
|
||
|
<div class="centreAlign">
|
||
|
<input class="inputStyling" type="submit" id="loginButton" name="submit" value="Login" />
|
||
|
</div>
|
||
|
</form>
|
||
|
</div>
|
||
|
<div class="passwordForm">
|
||
|
<div class="head">
|
||
|
Lost Password
|
||
|
</div>
|
||
|
<?php /*<form method="post" action="/sys/forgotpassword">
|
||
|
<div class="leftAlign">
|
||
|
<label for="forgotUserName">Username:</label>
|
||
|
</div>
|
||
|
<div class="centreAlign">
|
||
|
<input class="inputStyling" type="text" id="forgotUserName" name="username" />
|
||
|
</div>
|
||
|
<div class="leftAlign">
|
||
|
<label for="forgotEmail">E-mail:</label>
|
||
|
</div>
|
||
|
<div class="centreAlign">
|
||
|
<input class="inputStyling" type="text" id="forgotEmail" name="email" />
|
||
|
</div>
|
||
|
<div class="centreAlign">
|
||
|
<input class="inputStyling" type="submit" name="submit" value="Request Password" />
|
||
|
</div>
|
||
|
<div class="subLinks centreAlign">
|
||
|
If you lost access to your e-mail address please <a href="/contact" class="default" target="_blank">contact us</a>.
|
||
|
</div>
|
||
|
</form>*/?>
|
||
|
<div class="subLinks centreAlign">
|
||
|
Due to limitations with our current setup we can't provide you with automatic password restoration, please <a href="/contact" class="default" target="_blank">contact the administrator</a> and have them set up a temporary password for you to use.
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="registerForm">
|
||
|
<div class="head">
|
||
|
Register on Flashii
|
||
|
</div>
|
||
|
<form id="registerForm" method="post" action="/sys/register" style="display:<?=($flashii->checkRegistered() ? 'none' : 'block');?>;">
|
||
|
<div class="leftAlign">
|
||
|
<label for="registerUserName">Username:</label>
|
||
|
</div>
|
||
|
<div class="centreAlign">
|
||
|
<input class="inputStyling" type="text" id="registerUserName" name="username" placeholder="Any character" />
|
||
|
</div>
|
||
|
<div class="leftAlign">
|
||
|
<label for="registerEmail">E-mail:</label>
|
||
|
</div>
|
||
|
<div class="centreAlign">
|
||
|
<input class="inputStyling" type="text" id="registerEmail" name="email" placeholder="Used for e.g. password retrieval" />
|
||
|
</div>
|
||
|
<div class="leftAlign">
|
||
|
<label for="registerPassword">Password:</label>
|
||
|
</div>
|
||
|
<div class="centreAlign">
|
||
|
<input class="inputStyling" type="password" id="registerPassword" name="password" placeholder="Must be at least 5 characters." />
|
||
|
</div>
|
||
|
<div class="leftAlign">
|
||
|
<label for="registerConfirmPassword">Confirm Password:</label>
|
||
|
</div>
|
||
|
<div class="centreAlign">
|
||
|
<input class="inputStyling" type="password" id="registerConfirmPassword" name="confirmpassword" placeholder="Just to make sure" />
|
||
|
</div>
|
||
|
<div class="leftAlign">
|
||
|
<label for="recaptcha_response_field">Verification:</label>
|
||
|
</div>
|
||
|
<div class="centreAlign">
|
||
|
<?=recaptcha_get_html($RECAPTCHApublickey);?>
|
||
|
</div>
|
||
|
<div class="subLinks centreAlign">
|
||
|
<input class="inputStyling" name="tos" type="checkbox" class="ignore-css" id="registerToS" /><label for="registerToS">I agree to the <a class="default" href="/r/terms" target="_blank">Terms of Service</a>.
|
||
|
</div>
|
||
|
<div class="centreAlign">
|
||
|
<input class="inputStyling" type="submit" name="submit" value="Register" />
|
||
|
</div>
|
||
|
</form>
|
||
|
<?php
|
||
|
if($flashii->checkRegistered()) {
|
||
|
?>
|
||
|
<div class="registerForm" id="registerWarn" style="display:block;">
|
||
|
<div class="centreAlign">
|
||
|
<div class="fa fa-warning fa-5x" style="display: block; margin: 10px 0 0;"></div>
|
||
|
<h1>Are you <?=$flashii->getUserdata($flashii->checkRegistered())['username'];?>?</h1>
|
||
|
<p>Making more than one account is not permitted.</p>
|
||
|
<p>If you lost your password please use the form on the bottom left but if you don't already have an account you can go ahead and click the link below to show the registration form this check is based on your IP so in some cases someone may have registered/used the site on this IP already.</p>
|
||
|
<p>If we find out that you already have an account we may question you about it, if you can give a good reason we'll let it slide otherwise we may issue a temporary ban.</p>
|
||
|
</div>
|
||
|
<div class="subLinks centreAlign">
|
||
|
<a href="javascript:;" class="default" onclick="document.getElementById('registerWarn').style.display='none';document.getElementById('registerForm').style.display='block';">Register anyway</a>.
|
||
|
</div>
|
||
|
</div>
|
||
|
<?php
|
||
|
}
|
||
|
?>
|
||
|
</div>
|
||
|
<div class="clear"></div>
|
||
|
</div>
|
||
|
<?php
|
||
|
print desFooter();
|