Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "controls/database.php";
- $page = "Login";
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <!-- -------------- Meta and Title -------------- -->
- <meta charset="utf-8">
- <title>Lightning Stresser - Login</title>
- <meta name="keywords" content="booter, ip booter, stresser, ip stresser"/>
- <meta name="description" content="Lightning Stresser - The Best Around">
- <meta name="author" content="Goat">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <!-- -------------- Fonts -------------- -->
- <link rel='stylesheet' type='text/css' href='http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700'>
- <link href='https://fonts.googleapis.com/css?family=Lato:400,300,300italic,400italic,700,700italic' rel='stylesheet'
- type='text/css'>
- <!-- -------------- CSS - theme -------------- -->
- <link rel="stylesheet" type="text/css" href="assets/skin/default_skin/css/theme.css">
- <!-- -------------- CSS - allcp forms -------------- -->
- <link rel="stylesheet" type="text/css" href="assets/allcp/forms/css/forms.css">
- <!-- -------------- Favicon -------------- -->
- <link rel="shortcut icon" href="assets/img/favicon.ico">
- <!-- -------------- IE8 HTML5 support -------------- -->
- <!--[if lt IE 9]>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
- <![endif]-->
- </head>
- <body class="utility-page sb-l-c sb-r-c">
- <!-- -------------- Body Wrap -------------- -->
- <div id="main" class="animated fadeIn">
- <!-- -------------- Main Wrapper -------------- -->
- <section id="content_wrapper">
- <div id="canvas-wrapper">
- <canvas id="demo-canvas"></canvas>
- </div>
- <!-- -------------- Content -------------- -->
- <section id="content">
- <!-- -------------- Login Form -------------- -->
- <div class="allcp-form theme-primary mw320" id="login">
- <div class="text-center mb20"><img src="assets/img/logo_login_form.png" class="img-responsive"
- alt="Logo"/></div>
- <div class="panel mw320">
- <form method="post" id="form-login">
- <div class="panel-body pn mv10">
- <div class="section">
- <label for="username" class="field prepend-icon">
- <input type="text" name="username" id="username" class="gui-input"
- placeholder="Username">
- <label for="username" class="field-icon">
- <i class="fa fa-user"></i>
- </label>
- </label>
- </div>
- <!-- -------------- /section -------------- -->
- <div class="section">
- <label for="password" class="field prepend-icon">
- <input type="text" name="password" id="password" class="gui-input"
- placeholder="Password">
- <label for="password" class="field-icon">
- <i class="fa fa-lock"></i>
- </label>
- </label>
- </div>
- <!-- -------------- /section -------------- -->
- <div class="section">
- <div class="bs-component pull-left pt5">
- <div class="radio-custom radio-primary mb5 lh25">
- <input type="radio" id="remember" name="remember">
- <label for="remember">Remember me</label>
- </div>
- </div>
- <button type="submit" name="loginBtn" class="btn btn-bordered btn-primary pull-right">Log in</button>
- </div>
- <!-- -------------- /section -------------- -->
- </div>
- <!-- -------------- /Form -------------- -->
- </form>
- </div>
- <!-- -------------- /Panel -------------- -->
- </div>
- <!-- -------------- /Spec Form -------------- -->
- </section>
- <!-- -------------- /Content -------------- -->
- </section>
- <!-- -------------- /Main Wrapper -------------- -->
- </div>
- <!-- -------------- /Body Wrap -------------- -->
- <!-- -------------- Scripts -------------- -->
- <?php
- if (!($user -> LoggedIn()))
- {
- if (isset($_POST['loginBtn']))
- {
- $username = $_POST['username'];
- $password = $_POST['password'];
- if (!empty($username) && !empty($password))
- {
- if (!ctype_alnum($username) || strlen($username) < 4 || strlen($username) > 15)
- {
- echo '<div class="g_12"><div class="alert alert-danger"><strong>ERROR</strong>:Invalid username format</div></div>';
- }
- else
- {
- $SQLCheckLogin = $odb -> prepare("SELECT COUNT(*) FROM `users` WHERE `username` = :username AND `password` = :password");
- $SQLCheckLogin -> execute(array(':username' => $username, ':password' => SHA1($password)));
- $countLogin = $SQLCheckLogin -> fetchColumn(0);
- if ($countLogin == 1)
- {
- $SQLGetInfo = $odb -> prepare("SELECT `username`, `ID`,`status` FROM `users` WHERE `username` = :username AND `password` = :password");
- $SQLGetInfo -> execute(array(':username' => $username, ':password' => SHA1($password)));
- $userInfo = $SQLGetInfo -> fetch(PDO::FETCH_ASSOC);
- if ($userInfo['status'] == 0)
- {
- $_SESSION['username'] = $userInfo['username'];
- $_SESSION['ID'] = $userInfo['ID'];
- $Query = $odb-> query("INSERT INTO `logins` VALUES ('$username','$ip','$newcount','$time')");
- 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">';
- }
- else
- {
- echo '<div class="g_12"><div class="alert alert-danger"><strong>ERROR</strong>: Your user was banned</div></div>';
- }
- }
- else
- {
- echo '<div class="g_12"><div class="alert alert-danger"><strong>ERROR</strong>: Login Failed</div></div>';
- }
- }
- }
- else
- {
- echo '<div class="g_12"><div class="alert alert-danger"><strong>ERROR</strong>: Please fill in all fields</div></div>';
- }
- }
- }
- else
- {
- header('location: index.php');
- }
- ?>
- <!-- -------------- jQuery -------------- -->
- <script src="assets/js/jquery/jquery-1.11.3.min.js"></script>
- <script src="assets/js/jquery/jquery_ui/jquery-ui.min.js"></script>
- <!-- -------------- CanvasBG JS -------------- -->
- <script src="assets/js/plugins/canvasbg/canvasbg.js"></script>
- <!-- -------------- Theme Scripts -------------- -->
- <script src="assets/js/utility/utility.js"></script>
- <script src="assets/js/main.js"></script>
- <!-- -------------- Page JS -------------- -->
- <script type="text/javascript">
- jQuery(document).ready(function () {
- "use strict";
- // Init Theme Core
- Core.init();
- // Init Demo JS
- Demo.init();
- // Init CanvasBG
- CanvasBG.init({
- Loc: {
- x: window.innerWidth / 5,
- y: window.innerHeight / 10
- }
- });
- });
- </script>
- <!-- -------------- /Scripts -------------- -->
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement