Advertisement
Guest User

Untitled

a guest
May 4th, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.23 KB | None | 0 0
  1. <?php
  2.  
  3. include("header.php");
  4.  
  5. ?>
  6. <title><?php echo "$Ctitle" ?></title>
  7. <style type='text/css'>
  8. <!--
  9. body
  10. {
  11. background-color: <?php echo "$Cbackground" ?>;
  12. }
  13. -->
  14. </style><label></label>
  15. <?php
  16.  
  17. $username = $_POST["username"];
  18. $enteredpass = $_POST["pass"];
  19.  
  20. if (!isset($username) || empty($username))
  21. {
  22. ?>
  23. <p align="center">You didnt enter a Username </p>
  24. <p align="center"><a href="./index.php">Continue (You will be auto redirected in 3 seconds)</a>
  25. <meta http-equiv="refresh" content="3;url=index.php">
  26. <?php
  27. die();
  28. }
  29.  
  30. if (!isset($enteredpass) || empty($enteredpass))
  31. {
  32. ?>
  33. <p align="center">You didnt enter a Password </p>
  34. <p align="center"><a href="./index.php">Continue (You will be auto redirected in 3 seconds)</a>
  35. <meta http-equiv="refresh" content="3;url=index.php">
  36. <?php
  37. die();
  38. }
  39.  
  40. $query = mysql_query('SELECT Password, Locked FROM `members` WHERE Name = "'.mysql_real_escape_string($username).'" LIMIT 1');
  41.  
  42. if(mysql_num_rows($query) == 0)
  43. {
  44. ?>
  45. <p align="center">Username does not exist </p>
  46. <p align="center"><a href="./index.php">Continue (You will be auto redirected in 3 seconds)</a>
  47. <meta http-equiv="refresh" content="3;url=index.php">
  48. <?php
  49. die();
  50. }
  51. else
  52. {
  53. $row = mysql_fetch_array($query, MYSQL_ASSOC);
  54. $pass = $row['Password'];
  55. $locked = $row['Locked'];
  56. }
  57. if($locked == 1)
  58. {
  59. ?>
  60. <p align="center">This account is banned, Please goto the forums to request an unban </p>
  61. <p align="center"><a href="./index.php">Continue (You will be auto redirected in 3 seconds)</a>
  62. <meta http-equiv="refresh" content="3;url=index.php">
  63. <?php
  64. die();
  65. }
  66.  
  67. if($enteredpass == $pass)
  68. {
  69. $_SESSION['ucploggedin'] = true;
  70. $_SESSION['ucpname'] = $username;
  71. ?>
  72. <p align="center">Logged In successfully </p>
  73. <p align="center"><a href="./index.php">Continue to User Control Panel (You will be auto redirected in 3 seconds)</a>
  74. <meta http-equiv="refresh" content="3;url=index.php">
  75. <?php
  76. die();
  77. }
  78. else
  79. {
  80. ?>
  81. <p align="center">You entered the wrong Password </p>
  82. <p align="center"><a href="./index.php">Continue (You will be auto redirected in 3 seconds)</a>
  83. <meta http-equiv="refresh" content="3;url=index.php">
  84. <?php
  85. die();
  86. }
  87. include("footer.php");
  88. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement