Advertisement
Guest User

Daddy sure does

a guest
Jun 20th, 2016
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.58 KB | None | 0 0
  1. <?php
  2.  
  3. include 'src/config.php';
  4. include 'src/globalfunc.php';
  5. include 'login/login.php';
  6.  
  7. ?>
  8.  
  9. <!DOCTYPE html>
  10.  
  11. <html>
  12.  
  13. <head>
  14.  
  15. <!--SEO-->
  16. <title>Welcome to <?php echo $Websitename; ?> BETA</title>
  17.  
  18. <!--CSS-->
  19. <link href="css/bootstrap.css" rel="stylesheet" />
  20.  
  21. <link href="css/style.css" rel="stylesheet" />
  22.  
  23. <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css">
  24.  
  25. <!--JS-->
  26. <script src="//code.jquery.com/jquery-3.0.0.min.js" integrity="sha256-JmvOoLtYsmqlsWxa7mDSLMwa6dZ9rrIdtrrVYRnDRH0=" crossorigin="anonymous"></script>
  27.  
  28. <script src="js/bootstrap.js"></script>
  29. </head>
  30.  
  31. <body>
  32. <div class="container">
  33. <div class="row">
  34. <div class="col-md-12">
  35. <?php include 'includes/navbar.php'; ?>
  36. </div>
  37. </div>
  38. <div class="row">
  39. <div class="col-md-6">
  40. <div class="panel panel-primary">
  41. <div class="panel-heading">
  42. <h3 class="panel-title">Login to <?php echo $Websitename; ?></h3>
  43. </div>
  44. <div class="panel-body">
  45. <?php
  46.  
  47. if (isset($_POST['submit'])) {
  48.  
  49. $username = $_POST['username'];
  50. $password = $_POST['password'];
  51. $ip = $_SERVER["HTTP_CF_CONNECTING_IP"]; //Cloudflare yes
  52. //$ip = $_SERVER["REMOTE_ADDR"]; //Cloudflare no
  53.  
  54. if (login::canLogin($ip, $conn)) {
  55. if (strlen($username) > 4 && (strlen($username) < 17)) {
  56. if (strlen($password) > 4 && (strlen($password) < 26)) {
  57. if (login::validateUser($username)) {
  58. if (login::userCorrect($username, $password, $conn)) {
  59. if (login::getUserinfo($username, "active", $conn) != 0) {
  60. if (login::getUserinfo($username, "active", $conn) != 2) {
  61. echo '<div class="alert alert-success">You have succesfully logged in.</div>';
  62. //globalfunc::redirect("index.php");
  63. login::deleteFails($ip, $conn);
  64. } else {
  65. echo '<div class="alert alert-danger">Sorry, but your account has been banned.</div>';
  66. }
  67. } else {
  68. echo '<div class="alert alert-warning">Please activate your account before logging in.</div>';
  69. }
  70. } else {
  71. echo '<div class="alert alert-danger">Sorry, but you have filled in a incorrect username or password.</div>';
  72. login::determineFailAction($ip, $conn);
  73. }
  74. } else {
  75. echo '<div class="alert alert-danger">Your username may only contain A-z, and 0-9.</div>';
  76. }
  77. } else {
  78. echo '<div class="alert alert-danger">Your password must be higher than 4 and lower than 26 characters.</div>';
  79. }
  80. } else {
  81. echo '<div class="alert alert-danger">Your username must be higher than 4 and lower than 17 characters.</div>';
  82. }
  83. } else {
  84. echo '<div class="alert alert-danger">Due to 5 failed login attempts, you cannot login for one hour.
  85. <br />You can try again at: ' . login::calcNextTry($ip, $conn) . '</div>';
  86. }
  87.  
  88. }
  89.  
  90. ?>
  91. <form method="post" action="">
  92. <b>Username:</b>
  93. <input type="text" name="username" placeholder="Enter your username" value="<?php echo htmlspecialchars($_POST['username'], ENT_QUOTES); ?>" class="form-control">
  94. <br /><b>Password:</b>
  95. <input type="password" name="password" placeholder="Enter your password" class="form-control">
  96. <br /><button type="submit" name="submit" class="btn btn-primary"><i class="fa fa-sign-in"></i> Sign in to <?php echo $Websitename; ?></button>
  97. </form>
  98. </div>
  99. </div>
  100. </div>
  101. <div class="col-md-6">
  102. <div class="panel panel-primary">
  103. <div class="panel-heading">
  104. <h3 class="panel-title">Latest updates</h3>
  105. </div>
  106. <div class="panel-body">
  107. <h3>Updates: (17/6/2016)</h3>
  108. <ul>
  109. <li>Added 3 classes</li>
  110. <ul><li>Pimp</li>
  111. <li>Undercover cop</li>
  112. <li>Drugs dealer</li>
  113. </ul>
  114. <li>Finished registration untill E-Mail confirm</li>
  115. <li>Finished base theme</li>
  116. <li>Added over 10 general functions</li>
  117. <li>Added database support</li>
  118. <li>Added unique email/username support</li>
  119. <li>Restabled backend</li>
  120. </ul>
  121. </div>
  122. </div>
  123. </div>
  124. </div>
  125. <?php include 'includes/footer.php'; ?>
  126. </div>
  127.  
  128.  
  129. </body>
  130.  
  131. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement