Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* Security */
- if(!defined(SecurityPHP))
- {
- die("
- <!doctype HTML>
- <html>
- <head>
- <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
- <title>Hex Admin - 401</title>
- </head>
- <body>
- <center style=\"width: 100%; height: 50px; top: 0; bottom: 0; left: 0; right: 0; margin: auto; position: absolute;\"><b>Hex Admin<br> 401</b><br><br><i>You're not allowed here.</center>
- </body>
- </html>
- ");
- }
- /* End of Security */
- if(isset($_POST['login']))
- {
- $username=$_POST['username'];
- $password=$_POST['password'];
- $username = stripslashes($username);
- $password = stripslashes($password);
- $username = mysql_real_escape_string($username);
- $password = mysql_real_escape_string($password);
- $password = md5($password);
- if(MySQLQueryUserPass($username, $password) == 1)
- {
- $_SESSION["admin"]["loggedin"] = $username;
- header("Location: /admin/security");
- }
- else
- {
- echo "<script> alert(\"Details doesn't match.\");</script>";
- }
- }
- ?>
- <!doctype HTML>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>MinBie Admin Panel</title>
- <link href="login.css" rel="stylesheet">
- </head>
- <body>
- <div class="container">
- <form class="form-signin" method="POST">
- <h2 class="text-center" style="color:#fff">MinBie Admin Panel</h2>
- <input type="text" class="form-control" placeholder="Username" name="username" autofocus>
- <input type="password" class="form-control" placeholder="Password" name="password">
- <button class="btn btn-lg btn-danger btn-block" type="submit" name="login">Sign in</button>
- </form>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement