-
Notifications
You must be signed in to change notification settings - Fork 1
/
confirm.php
49 lines (42 loc) · 1.52 KB
/
confirm.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
require __DIR__ . '/vendor/autoload.php';
use AWSCognitoApp\AWSCognitoWrapper;
$wrapper = new AWSCognitoWrapper();
$wrapper->initialize();
if(isset($_POST['action'])) {
$username = $_POST['username'] ?? '';
$confirmation = $_POST['confirmation'] ?? '';
$error = $wrapper->confirmSignup($username, $confirmation);
if(empty($error)) {
header('Location: index.php');
}
}
$username = $_GET['username'] ?? '';
?>
<html>
<head>
<title>XD18 | Credit Limits</title>
<meta charset="utf-8">
<link rel="icon" type="image/png" href="UI/favicon.ico">
<link rel="stylesheet" type="text/css" href="UI/styles/normalize.css">
<link rel="stylesheet" type="text/css" href="UI/styles/main.css">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro" rel="stylesheet">
<body>
<nav>
<ul>
<li><img src="UI/styles/logo-xero-blue.svg" alt="Xero Logo"></li>
<li style="float:right"><a href="about.php">About</a></li>
</ul>
</nav>
<p style='color: red;'><?php echo $error;?></p>
<h1>Confirm signup</h1>
<form method='post' action=''>
<p>
<input type='text' placeholder='Username' name='username' value='<?php echo $username;?>' /><br />
<input type='text' placeholder='Confirmation code' name='confirmation' /><br />
<input type='hidden' name='action' value='confirm' />
<input type='submit' value='Confirm' />
</p<>
</form>
</body>
</html>