Login handles donate & code system

This commit is contained in:
Matt Pass
2014-11-04 12:56:36 +00:00
parent af19a5b825
commit 94310226b4

View File

@@ -18,7 +18,7 @@ echo $ICEcoder["password"] == "" && !$ICEcoder["multiUser"] ? "Setup" : "Login";
<link rel="icon" type="image/png" href="../favicon.png">
</head>
<body onLoad="document.settingsUpdate.<?php echo $ICEcoder["multiUser"] ? "username" : "password";?>.focus()">
<body onLoad="document.settingsUpdate.<?php echo $ICEcoder["multiUser"] && !isset($_GET["get"]) ? "username" : "password";?>.focus()">
<div class="screenContainer" style="background-color: #141414">
<div class="screenVCenter">
@@ -26,7 +26,25 @@ echo $ICEcoder["password"] == "" && !$ICEcoder["multiUser"] ? "Setup" : "Login";
<img src="../images/ice-coder.png" alt="ICEcoder">
<div class="version" style="margin-bottom: 22px">v <?php echo $ICEcoder["versionNo"];?></div>
<form name="settingsUpdate" action="login.php" method="POST">
<?php if ($ICEcoder["multiUser"]) {echo ' <input type="text" name="username" class="password"><br><br>'.PHP_EOL;};?>
<?php
if (isset($_GET["get"]) && $_GET["get"]=="code") {
?>
<span style="color: #fff"><h1>Thanks for trialling ICEcoder!</h1><b>The trial period has now ended, 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
@@ -42,6 +60,7 @@ echo $ICEcoder["password"] == "" && !$ICEcoder["multiUser"] ? "Setup" : "Login";
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>