This blob has been accessed 311 times via Git panel.
- <?php
- session_start();
- session_regenerate_id();
- header("Cache-control: private");
- ?>
- <style>
- body
- {
- color: #666666;
- margin: 10px;
- padding: 0px;
- text-align: left;
- font-family: verdana, helvetica, sans-serif;
- background-color: #FFFFFF;
- }
- p
- {
- font-size: 11px;
- }
- a
- {
- font-weight: bold;
- text-decoration: none;
- }
- a:link, a:visited
- {
- color: #666666;
- }
- a:hover
- {
- color: #336699;
- }
- a:active {
- color: #336699;
- }
- .input {
- color: #666666;
- background: #ffffff;
- border: #999999 solid 1px;
- width: 125px;
- font-family: verdana,helvetica,sans-serif;
- font-size: 11px;
- }
- </style>
- <form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
- <input autocomplete=off class=input type=text name=username>
- <input autocomplete=off class=input type=password name=password>
- <input class=input type=submit value=login>
- </form>
- <?php
- $login_username = file_get_contents("data/username.txt");
- $login_password = file_get_contents("data/password.txt");
- /* Fun with crypt! */
- $crypt_password = sha1($_REQUEST['password']);
- $crypt_password = md5($crypt_password);
- $crypt_password = crypt($crypt_password, $crypt_password);
- if ($login_username != $_REQUEST['username'] || $login_password != $crypt_password) {
- $_SESSION = array();
- session_destroy();
- echo '<p>Enter your login credentials above or click <a href=index.php>here</a> to go to the index page.</p>';
- }
- $_SESSION['logged_in'] = $_REQUEST['username'];
- if (isset($_SESSION['logged_in'])) {
- echo '<p>You are now logged in as ' . $_SESSION['logged_in'] . '. Click <a href=index.php>here</a> to continue.</p>';
- }
- ?>