-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
59 lines (52 loc) · 2.32 KB
/
index.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
50
51
52
53
54
55
56
57
58
59
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Meta tags -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Christian's xkcd Password Generator</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Font Awesome -->
<script src="https://use.fontawesome.com/edf8d2d607.js"></script>
<!-- PHP Logic -->
<?php require 'logic.php'; ?>
</head>
<body>
<div class="container">
<h1 class="text-center">Christian's xkcd Password Generator</h1>
<br>
<!-- Password Generated -->
<p class="text-center lead"><mark><?php echo $password; ?></mark></p>
<!-- End of Password Generated -->
<br>
<div class="row">
<div class="col-xs-8 col-xs-offset-2">
<!-- Form -->
<form action="index.php" method="GET">
<div class="form-group <?php if (isset($errorClass)) { echo $errorClass; } ?>">
<label>Number of words (#)</label>
<input class="form-control" type="text" name="num_of_words" placeholder="Maximum 9">
<?php if (isset($errorMessage)) { echo $errorMessage; } ?>
</div>
<div class="checkbox">
<label>
<input type="checkbox" name="add_number" value="on"> Add a number
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" name="add_symbol" value="on"> Add a symbol
</label>
</div>
<button type="submit" class="btn btn-success btn-md btn-block">Get a new password!</button>
</form>
<!-- End of Form -->
</div>
</div>
<br>
<p class="text-center"><a href="http://xkcd.com/936/"><i class="fa fa-key" aria-hidden="true"></i></a></p>
</div>
</body>
</html>