Advertisement
Guest User

Untitled

a guest
Jun 19th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. <?php
  2. /* Security */
  3. if(!defined(SecurityPHP))
  4. {
  5. die("
  6. <!doctype HTML>
  7. <html>
  8. <head>
  9. <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
  10. <title>Hex Admin - 401</title>
  11. </head>
  12. <body>
  13. <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>
  14. </body>
  15. </html>
  16. ");
  17. }
  18. /* End of Security */
  19. if(isset($_POST['login']))
  20. {
  21. $username=$_POST['username'];
  22. $password=$_POST['password'];
  23. $username = stripslashes($username);
  24. $password = stripslashes($password);
  25. $username = mysql_real_escape_string($username);
  26. $password = mysql_real_escape_string($password);
  27. $password = md5($password);
  28. if(MySQLQueryUserPass($username, $password) == 1)
  29. {
  30. $_SESSION["admin"]["loggedin"] = $username;
  31. header("Location: /admin/security");
  32. }
  33. else
  34. {
  35. echo "<script> alert(\"Details doesn't match.\");</script>";
  36. }
  37. }
  38. ?>
  39. <!doctype HTML>
  40. <html>
  41. <head>
  42. <meta charset="UTF-8">
  43. <title>MinBie Admin Panel</title>
  44. <link href="login.css" rel="stylesheet">
  45. </head>
  46. <body>
  47. <div class="container">
  48. <form class="form-signin" method="POST">
  49. <h2 class="text-center" style="color:#fff">MinBie Admin Panel</h2>
  50. <input type="text" class="form-control" placeholder="Username" name="username" autofocus>
  51. <input type="password" class="form-control" placeholder="Password" name="password">
  52. <button class="btn btn-lg btn-danger btn-block" type="submit" name="login">Sign in</button>
  53. </form>
  54. </div>
  55. </body>
  56. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement