Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- include ('include/config.php');
- include ('encrypt.php');
- if(isset($_POST['login'])) {
- $account = substr($_POST['account'], 0, 15);
- $password = substr($_POST['password'], 0, 20);
- $blowfish = encrypt($password);
- $sql = "SELECT * FROM user_auth with (nolock) where account=:account AND password=CONVERT(binary, :password) ";
- $stmt = $dbconnect->prepare($sql);
- $stmt->execute(array(':account' => $account, ':password' => $blowfish));
- if($stmt->rowCount() == 1)
- {
- $_SESSION['account'] = $account;
- $_SESSION['LoggedIn'] = TRUE;
- header("location:index.php");
- }
- else
- {
- echo "Incorrect username or password.";
- }
- }
- ?>
- <html>
- <head>
- <title>Lineage 2 Control Panel</title>
- <link rel="stylesheet" type="text/css" href="style.css" />
- </head>
- <body>
- <div class="logo"></div>
- <div class="login">
- <center>
- <form method="POST" action="" >
- <table border="0">
- <tr><td> Username</td></tr>
- <tr><td><input type="text" name="account" size="25" /></td></tr>
- <tr><td> Password</td></tr>
- <tr><td><input type="password" name="password" size="25" /></td></tr>
- <tr><td> <a href="">Forgot password?</a></td></tr>
- <tr><td><input type="submit" value="Login" name="login" /></td></tr>
- </table>
- </form>
- </center>
- </div>
- </body>
- </html>
Add Comment
Please, Sign In to add comment