This blob has been accessed 207 times via Git panel.
- <?php
- session_start();
- session_regenerate_id();
- header("Cache-control: private");
- error_reporting(E_ERROR);
- if (get_magic_quotes_gpc()) {
- function stripslashes_array($data) {
- if (is_array($data)){
- foreach ($data as $key => $value){
- $data[$key] = stripslashes_array($value);
- }
- return $data;
- }
- else{
- return stripslashes($data);
- }
- }
- $_REQUEST = stripslashes_array($_REQUEST);
- }
- ?>
- <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
- if ($_REQUEST['username'] == file_get_contents("data/username.txt")) {
- $login_username = file_get_contents("data/username.txt");
- $login_password = file_get_contents("data/password.txt");
- $last_login = "data/lastlog.txt";
- $logins = "data/logins.txt";
- }
- if ($_REQUEST['username'] != file_get_contents("data/username.txt")) {
- if (file_exists("data/members/active/{$_REQUEST['username']}") and file_exists("data/bb.txt")) {
- $login_username = $_REQUEST['username'];
- $login_password = file_get_contents("data/members/active/{$_REQUEST['username']}/password.txt");
- $last_login = "data/members/active/{$_REQUEST['username']}/bb-last.txt";
- $logins = "data/members/active/{$_REQUEST['username']}/bb-logins.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.";
- if (!file_exists("data/lite.txt") and file_exists("data/reset.txt")) {
- echo "<br>Click <a href=reset.php>here</a> if you forgot your password.";
- }
- echo "</p>";
- }
- $_SESSION['logged_in'] = $_REQUEST['username'];
- if (file_exists("data/bb.txt") and ($_SESSION['logged_in'] != file_get_contents("data/username.txt"))) {
- }
- $login_count = file_get_contents($logins);
- $login_count = $login_count + 1;
- 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>';
- }
- ?>