Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(0);
- session_start();
- ob_start();
- include "dir/protect/global_config.php";
- if(isset($_POST['logar'])){
- $username = $_POST['username'];
- $user_password = $_POST['senha'];
- $info_valida = mysql_query("select * from `son` where `username` = '".mysql_real_escape_string($username)."' and `password` = '".mysql_real_escape_string($user_password)."'");
- if($username == "" || $user_password == "")
- {
- $error = '<div class="info">Preencha os campos</div>';
- }
- elseif(mysql_num_rows($info_valida) == 1)
- {
- $verificar = mysql_fetch_array($info_valida);
- $_SESSION["LOGADO"] = $verificar["username"];
- header("location: logado.php");
- }
- else
- {
- $error = 'Dados inválidos<br>';
- }
- }
- ?>
- <!DOCTYPE HTML">
- <html lang="pt-br">
- <head>
- <link rel="stylesheet" type="text/css" href="dir/css/main.css">
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>Son Central - SHADOW</title>
- </head>
- <body>
- <div class="wrapper">
- <div class="container">
- <h1>Son Checker</h1>
- <form class="form" method="post">
- <font id="error"><?=$error; ?></font>
- <input type="text" placeholder="Username" name="username">
- <input type="password" placeholder="Password" name="senha">
- <button type="submit" id="login-button" name="logar">Login</button>
- </form>
- </div>
- <ul class="bg-bubbles">
- <li></li>
- <li></li>
- <li></li>
- <li></li>
- <li></li>
- <li></li>
- <li></li>
- <li></li>
- <li></li>
- <li></li>
- </ul>
- </div>
- <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement