<?php
require("class.loginPad.php");
$kp = new loginPad("17081936"); // Instanciation with the access code
if(isset($_POST["submit"])) {
if($kp->isGoodInput()) {
// header("location: access.php"); // Access to the right page
// header("location: one-file.zip"); // Download a file
// ... Or other action...
echo "<!DOCTYPE html>\n";
echo "<html>\n\n";
echo "<head>\n";
echo "<title>Authorized page</title>\n";
echo "<style type=\"text/css\">\n";
echo "body { font-family:arial; font-size:1em }\n";
echo "</style>\n";
echo "</head>\n\n";
echo "<body>\n";
echo "<h1>Correct code</h1>\n";
echo "<p>The code is correct. You can do what you want :\n";
echo "<ul>\n";
echo "<li> display a new page,</li>\n";
echo "<li> delete a record,</li>\n";
echo "<li> start a download,</li>\n";
echo "<li> etc.</li>\n";
echo "</ul>\n";
echo "</body>\n\n";
echo "</html>\n";
die();
}
}
?><!DOCTYPE html>
<html>
<head>
<title>Test page</title>
<style type="text/css">
p { font-family:arial; font-size:1em }
a { text-decoration:none }
a:hover { color:red }
</style>
</head>
<body>
<p>
Click on the keys to enter the access code and validate<br/>
with the Send button (or cancel with the Clear button)<br/>
NB: The code is 17081936 (birthday of <a href="https://en.wikipedia.org/wiki/Margaret_Hamilton_(software_engineer)" target="_blank">Margaret Hamilton</a>)
</p>
<?php $kp->writeKeypad(); ?>
</body>
</html>
|