Files
ICEcoder/lib/login.php
Matt Pass 2897c75a3d Login screen fades in quickly
Same colour BG, fade in login screen after 50ms delay over 100ms
transition and trial bar begins animation quicker (150ms instead of
500ms)
2014-11-26 09:38:55 +00:00

80 lines
5.1 KiB
PHP

<?php
include("headers.php");
include("settings.php");
$t = $text['login'];
?>
<!DOCTYPE html>
<html>
<head>
<title>ICEcoder <?php
echo $ICEcoder["versionNo"]." : ";
echo $ICEcoder["password"] == "" && !$ICEcoder["multiUser"] ? "Setup" : "Login";
?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" type="text/css" href="ice-coder.css">
<link rel="icon" type="image/png" href="../favicon.png">
</head>
<body style="background-color: #141414" onLoad="<?php if (!isset($_GET["get"])) {$inputFocus = $ICEcoder["multiUser"] ? "username" : "password"; echo "document.settingsUpdate.".$inputFocus.".focus(); ";}; ?>setTimeout(function(){document.getElementById('screenContainer').style.opacity=1},50);if (document.getElementById('trialBarRemaining')) {setTimeout(function(){document.getElementById('trialBarRemaining').style.width = '<?php echo $tRemainingPerc*170;?>px';},150)}">
<div class="screenContainer" id="screenContainer" style="background-color: #141414; opacity: 0; transition: opacity 0.1s ease-out">
<div class="screenVCenter">
<div class="screenCenter">
<img src="../images/ice-coder.png" alt="ICEcoder">
<div class="version" style="margin-bottom: 22px">v <?php echo $ICEcoder["versionNo"];?></div>
<?php if (generateHash(strClean($ICEcoder['licenseEmail']),$ICEcoder['licenseCode'])!=$ICEcoder['licenseCode'] && !isset($_GET['get']) && !isset($_POST['code'])) {?>
<div class="trialBarContainer"><div class="trialBarRemaining" id="trialBarRemaining"></div><br>
<div class="trialBarText"><?php echo $tDaysRemaining;?> days left - <a href="login.php?get=code&csrf=<?php echo $_SESSION["csrf"];?>">Unlock now</a></div>
</div>
<?php ;}; ?>
<form name="settingsUpdate" action="login.php" method="POST">
<?php
if (isset($_GET["get"]) && $_GET["get"]=="code") {
?>
<span style="color: #fff"><h1>Thanks for trialling ICEcoder!</h1><b>Please donate on the website to continue using it.</b><br><br>
<h2>Step 1: Donate</h2><br><br>
<a href="https://icecoder.net/?display=trialDonateScreen" target="_blank" style="background: #097695; color: #fff; padding: 10px; text-decoration: none; font-size: 17px; font-weight: bold; border-radius: 4px; cursor: pointer">Donate $5</a><br><br><br>
<h2>Step 2: Enter email address &amp; code</h2><br>
<?php if (isset($_GET["success"]) && $_GET["success"]=="no") {echo "Sorry, that doesn't seem to be correct.<br>Please check your emailed details and try again.<br><br>";};?>
<?php if ($ICEcoder["multiUser"]) {echo ' <input type="text" name="username" value="Username" onfocus="origValue=\'Username\';if(this.value==origValue){this.value=\'\';};" onblur="if(this.value==\'\'){this.value=origValue;};" class="password"><br><br>'.PHP_EOL;};?>
<input type="email" name="email" value="Email" onfocus="origValue='Email';if(this.value==origValue){this.value='';};" onblur="if(this.value==''){this.value=origValue;};" class="password"><br><br>
<input type="text" name="code" value="Code" onfocus="origValue='Code';if(this.value==origValue){this.value='';};" onblur="if(this.value==''){this.value=origValue;};" class="password"><br><br>
<input type="submit" name="submit" value="Unlock ICEcoder" style="background: #097695; color: #fff; border: 0; padding: 10px; text-decoration: none; font-size: 17px; font-weight: bold; border-radius: 4px; cursor: pointer"><br><br><br>
Future development relies on your donation, to keep making awesome new features.<br><br>
Many thanks.</span>
<?php
} else {
if (isset($_GET["message"]) && $_GET["message"]=="trialDonateThanks") {echo '<span style="color: #fff"><b>Thank you very much for your donation!</b><br><br>Your details have been accepted and<br>ICEcoder is now fully unlocked.</span><br><br><br>';};
if ($ICEcoder["multiUser"]) {echo ' <input type="text" name="username" class="password"><br><br>'.PHP_EOL;};
?>
<input type="password" name="password" class="password"><br><br>
<input type="submit" name="submit" value="<?php if ($ICEcoder["multiUser"] && $ICEcoderSettings["enableRegistration"]) {echo $t['set password']." / ".$t['login'];} else {echo $ICEcoder["password"] == "" ? $t['set password'] : $t['login'];}; ?>" class="button">
<?php
if(empty($_SERVER['HTTPS'])) {
echo '<div class="text">Using over non-https connection.<br>SSL is recommended!</div>';
}
if($ICEcoder["multiUser"] && $ICEcoderSettings["enableRegistration"]){
echo '<div class="text"><a href="javascript:alert(\''.$t['To disable registration...'].'\')">'.$t['Registration mode enabled'].'</a></div>';
}
?>
<?php
if ($ICEcoder["password"] == "" || $ICEcoder["multiUser"]) {
echo '<div class="text"><input type="checkbox" name="checkUpdates" value="true" checked> '.$t['auto-check for updates'].'</div>';
}
if (!$ICEcoder["multiUser"]) { echo '<div class="text"><a href="javascript:alert(\''.$t['To put into...'].'\')">'.$t['multi-user'].'?</a></div>';};
}
?>
<input type="hidden" name="csrf" value="<?php echo $_SESSION["csrf"]; ?>">
</form>
</div>
</div>
</div>
</body>
</html>