<html>
<head>
<title>View Contact Forms</title>
<style>
.container { width:100%; padding:32px; }  body { font-family:sans-serif;
</style>
</head>
<body>
<div class="container">
<?
$password = 'Varinos123!';
$given_pass = $_POST['password'];
$form_code = '<form action="?" method="POST"><input type="password" name="password"><input type="submit" value="Log in"></form>';
if($given_pass == $password) { ?>
<h1>Form Submissions</h1><p>To view most recent submissions, <a href='#bottom'>scroll to bottom</a></p></br>
<? echo "<pre>" . file_get_contents('submissions.txt') . "</pre>"; ?>
<span id="bottom">&nbsp;</span>
<? } elseif (!empty($given_pass) && $given_pass != $password) { echo "Incorrect Password" . $form_code; } else { echo "Enter Password" . $form_code; } ?>
</div>  
</body>
</html>