This blob has been accessed 334 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);
- }
- }
- $_POST = stripslashes_array($_POST);
- }
- ?>
- <style>
- body {
- color: #666666;
- margin: 10px;
- padding: 0px;
- text-align: left;
- font-family: <?php
- if (file_exists("data/fonts/body.txt")) {
- $font_body = file_get_contents("data/fonts/body.txt");
- echo "{$font_body},";
- }
- ?> arial, 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: <?php
- if (file_exists("data/fonts/input.txt")) {
- $font_input = file_get_contents("data/fonts/input.txt");
- echo "{$font_input},";
- }
- ?> arial, 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 ($_POST['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 ($_POST['username'] != file_get_contents("data/username.txt")) {
- if (file_exists("data/members/active/{$_POST['username']}") and file_exists("data/bb.txt")) {
- $login_username = $_POST['username'];
- $login_password = file_get_contents("data/members/active/{$_POST['username']}/password.txt");
- $last_login = "data/members/active/{$_POST['username']}/bb-last.txt";
- $logins = "data/members/active/{$_POST['username']}/bb-logins.txt";
- }
- }
- /* Fun with crypt! */
- $crypt_password = sha1($_POST['password']);
- $crypt_password = md5($crypt_password);
- $crypt_password = crypt($crypt_password, $crypt_password);
- if ($login_username != $_POST['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'] = $_POST['username'];
- $_SESSION['user_agent'] = $_SERVER['HTTP_USER_AGENT'];
- 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>';
- }
- ?>