Advertisement
Guest User

Untitled

a guest
Mar 16th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.32 KB | None | 0 0
  1. <?php
  2. include "controls/database.php";
  3. $page = "Login";
  4. ?>
  5. <!DOCTYPE html>
  6. <html>
  7.  
  8. <head>
  9. <!-- -------------- Meta and Title -------------- -->
  10. <meta charset="utf-8">
  11. <title>Lightning Stresser - Login</title>
  12. <meta name="keywords" content="booter, ip booter, stresser, ip stresser"/>
  13. <meta name="description" content="Lightning Stresser - The Best Around">
  14. <meta name="author" content="Goat">
  15. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  16.  
  17. <!-- -------------- Fonts -------------- -->
  18. <link rel='stylesheet' type='text/css' href='http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700'>
  19. <link href='https://fonts.googleapis.com/css?family=Lato:400,300,300italic,400italic,700,700italic' rel='stylesheet'
  20. type='text/css'>
  21.  
  22. <!-- -------------- CSS - theme -------------- -->
  23. <link rel="stylesheet" type="text/css" href="assets/skin/default_skin/css/theme.css">
  24.  
  25. <!-- -------------- CSS - allcp forms -------------- -->
  26. <link rel="stylesheet" type="text/css" href="assets/allcp/forms/css/forms.css">
  27.  
  28. <!-- -------------- Favicon -------------- -->
  29. <link rel="shortcut icon" href="assets/img/favicon.ico">
  30.  
  31. <!-- -------------- IE8 HTML5 support -------------- -->
  32. <!--[if lt IE 9]>
  33. <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.js"></script>
  34. <script src="https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
  35. <![endif]-->
  36. </head>
  37.  
  38. <body class="utility-page sb-l-c sb-r-c">
  39.  
  40. <!-- -------------- Body Wrap -------------- -->
  41. <div id="main" class="animated fadeIn">
  42.  
  43. <!-- -------------- Main Wrapper -------------- -->
  44. <section id="content_wrapper">
  45.  
  46. <div id="canvas-wrapper">
  47. <canvas id="demo-canvas"></canvas>
  48. </div>
  49.  
  50. <!-- -------------- Content -------------- -->
  51. <section id="content">
  52.  
  53. <!-- -------------- Login Form -------------- -->
  54. <div class="allcp-form theme-primary mw320" id="login">
  55. <div class="text-center mb20"><img src="assets/img/logo_login_form.png" class="img-responsive"
  56. alt="Logo"/></div>
  57. <div class="panel mw320">
  58.  
  59. <form method="post" id="form-login">
  60. <div class="panel-body pn mv10">
  61.  
  62. <div class="section">
  63. <label for="username" class="field prepend-icon">
  64. <input type="text" name="username" id="username" class="gui-input"
  65. placeholder="Username">
  66. <label for="username" class="field-icon">
  67. <i class="fa fa-user"></i>
  68. </label>
  69. </label>
  70. </div>
  71. <!-- -------------- /section -------------- -->
  72.  
  73. <div class="section">
  74. <label for="password" class="field prepend-icon">
  75. <input type="text" name="password" id="password" class="gui-input"
  76. placeholder="Password">
  77. <label for="password" class="field-icon">
  78. <i class="fa fa-lock"></i>
  79. </label>
  80. </label>
  81. </div>
  82. <!-- -------------- /section -------------- -->
  83.  
  84. <div class="section">
  85. <div class="bs-component pull-left pt5">
  86. <div class="radio-custom radio-primary mb5 lh25">
  87. <input type="radio" id="remember" name="remember">
  88. <label for="remember">Remember me</label>
  89. </div>
  90. </div>
  91. <button type="submit" name="loginBtn" class="btn btn-bordered btn-primary pull-right">Log in</button>
  92. </div>
  93. <!-- -------------- /section -------------- -->
  94.  
  95. </div>
  96. <!-- -------------- /Form -------------- -->
  97. </form>
  98. </div>
  99. <!-- -------------- /Panel -------------- -->
  100. </div>
  101. <!-- -------------- /Spec Form -------------- -->
  102.  
  103. </section>
  104. <!-- -------------- /Content -------------- -->
  105.  
  106. </section>
  107. <!-- -------------- /Main Wrapper -------------- -->
  108.  
  109. </div>
  110. <!-- -------------- /Body Wrap -------------- -->
  111.  
  112. <!-- -------------- Scripts -------------- -->
  113. <?php
  114. if (!($user -> LoggedIn()))
  115. {
  116. if (isset($_POST['loginBtn']))
  117. {
  118. $username = $_POST['username'];
  119. $password = $_POST['password'];
  120. if (!empty($username) && !empty($password))
  121. {
  122. if (!ctype_alnum($username) || strlen($username) < 4 || strlen($username) > 15)
  123. {
  124. echo '<div class="g_12"><div class="alert alert-danger"><strong>ERROR</strong>:Invalid username format</div></div>';
  125. }
  126. else
  127. {
  128. $SQLCheckLogin = $odb -> prepare("SELECT COUNT(*) FROM `users` WHERE `username` = :username AND `password` = :password");
  129. $SQLCheckLogin -> execute(array(':username' => $username, ':password' => SHA1($password)));
  130. $countLogin = $SQLCheckLogin -> fetchColumn(0);
  131. if ($countLogin == 1)
  132. {
  133. $SQLGetInfo = $odb -> prepare("SELECT `username`, `ID`,`status` FROM `users` WHERE `username` = :username AND `password` = :password");
  134. $SQLGetInfo -> execute(array(':username' => $username, ':password' => SHA1($password)));
  135. $userInfo = $SQLGetInfo -> fetch(PDO::FETCH_ASSOC);
  136. if ($userInfo['status'] == 0)
  137. {
  138. $_SESSION['username'] = $userInfo['username'];
  139. $_SESSION['ID'] = $userInfo['ID'];
  140. $Query = $odb-> query("INSERT INTO `logins` VALUES ('$username','$ip','$newcount','$time')");
  141. echo '<div class="g_12"><div class="alert alert-success"><strong>Success</strong>: You are now being redirected to Dashboard</div></div><meta http-equiv="refresh" content="2;url=index.php">';
  142. }
  143. else
  144. {
  145. echo '<div class="g_12"><div class="alert alert-danger"><strong>ERROR</strong>: Your user was banned</div></div>';
  146. }
  147. }
  148. else
  149. {
  150. echo '<div class="g_12"><div class="alert alert-danger"><strong>ERROR</strong>: Login Failed</div></div>';
  151. }
  152. }
  153. }
  154. else
  155. {
  156. echo '<div class="g_12"><div class="alert alert-danger"><strong>ERROR</strong>: Please fill in all fields</div></div>';
  157. }
  158. }
  159. }
  160. else
  161. {
  162. header('location: index.php');
  163. }
  164. ?>
  165. <!-- -------------- jQuery -------------- -->
  166. <script src="assets/js/jquery/jquery-1.11.3.min.js"></script>
  167. <script src="assets/js/jquery/jquery_ui/jquery-ui.min.js"></script>
  168.  
  169. <!-- -------------- CanvasBG JS -------------- -->
  170. <script src="assets/js/plugins/canvasbg/canvasbg.js"></script>
  171.  
  172. <!-- -------------- Theme Scripts -------------- -->
  173. <script src="assets/js/utility/utility.js"></script>
  174. <script src="assets/js/main.js"></script>
  175.  
  176. <!-- -------------- Page JS -------------- -->
  177. <script type="text/javascript">
  178. jQuery(document).ready(function () {
  179.  
  180. "use strict";
  181.  
  182. // Init Theme Core
  183. Core.init();
  184.  
  185. // Init Demo JS
  186. Demo.init();
  187.  
  188. // Init CanvasBG
  189. CanvasBG.init({
  190. Loc: {
  191. x: window.innerWidth / 5,
  192. y: window.innerHeight / 10
  193. }
  194. });
  195.  
  196. });
  197. </script>
  198.  
  199. <!-- -------------- /Scripts -------------- -->
  200.  
  201. </body>
  202.  
  203. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement