Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //Dieses UCP Wurde von SinTex Geschrieben//Die Webseite findest du Unter www.tt-rl.com
- //Das Copyright darf Nicht Entfernt werden//Sollte dies der Fall sein so werden Konsequenzen gezogen
- include("config.php");
- session_start();
- error_reporting(0);
- $submit = $_POST['submit'];
- $username = sanitize($_POST['username']);
- $password = sanitize($_POST['password']);
- if ($submit)
- {
- if ($username && $password)
- {
- $query = mysql_query("SELECT Nickname, Passwort, Salt FROM players WHERE Nickname = '$username'");
- if (mysql_num_rows($query) == 1)
- {
- while ($row = mysql_fetch_assoc($query))
- {
- $dbusername = $row['Nickname'];
- $dbpassword = $row['Passwort'];
- $dbsalt = $row['Salt'];
- }
- $query2 = mysql_query("SELECT id FROM players WHERE `Passwort` = TO_BASE64('$password') AND Nickname = '$username'");
- if (mysql_num_rows($query2) == 1)
- {
- $data = mysql_query("SELECT tbans FROM players WHERE Nickname = '$username'");
- $value = mysql_fetch_array($data);
- if ($value['baned'] == 1)
- {
- header('location: locked-error.php');
- }
- else
- {
- $_SESSION['username'] = $dbusername;
- echo header('location: home.php');
- }
- }
- else
- {
- echo "<script>alert('Das von Ihnen eingegebene Passwort war nicht korrekt.');</script>";
- echo "<script>window.location.href='index.php';</script>";
- }
- }
- else
- {
- echo "<script>alert('Dieser Benutzeraccount existiert nicht.');</script>";
- echo "<script>window.location.href='index.php';</script>";
- }
- }
- else
- {
- echo "<script>alert('Sie haben nichts eingegeben.');</script>";
- echo "<script>window.location.href='index.php';</script>";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement