Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require 'includes/db.php';
- require 'includes/init.php';
- ?>
- <html><head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <title>EG:RP Login</title>
- <!-- Tell the browser to be responsive to screen width -->
- <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
- <!-- Bootstrap 3.3.6 -->
- <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
- <!-- Font Awesome -->
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
- <!-- Ionicons -->
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
- <!-- Theme style -->
- <link rel="stylesheet" href="dist/css/AdminLTE.min.css">
- <!-- iCheck -->
- <link rel="stylesheet" href="plugins/iCheck/square/blue.css">
- <!-- Background -->
- <link rel="stylesheet" href="plugins/bg-plugin/changContain.css">
- <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
- <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
- <!--[if lt IE 9]>
- <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
- <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
- <![endif]-->
- </head>
- <?php
- if (!($player -> LoggedIn()))
- {
- if (isset($_POST['loginBtn']))
- {
- $username = $_POST['Username'];
- $password = $_POST['Key'];
- $errors = array();
- if (empty($username) || empty($password))
- {
- $errors[] = 'Please fill in all fields';
- }
- if (empty($errors))
- {
- $SQLCheckLogin = $odb -> prepare("SELECT COUNT(*) FROM `accounts` WHERE `Username` = :username AND `Key` = :password");
- $SQLCheckLogin -> execute(array(':username' => $username, ':password' => hash('whirlpool',$password)));
- $countLogin = $SQLCheckLogin -> fetchColumn(0);
- if ($countLogin == 1)
- {
- $SQLGetInfo = $odb -> prepare("SELECT `Username`, `id` FROM `accounts` WHERE `Username` = :username AND `Key` = :password");
- $SQLGetInfo -> execute(array(':username' => $username, ':password' => hash('whirlpool',$password)));
- $userInfo = $SQLGetInfo -> fetch(PDO::FETCH_ASSOC);
- if ($userInfo['id'] != -1)
- {
- $_SESSION['username'] = $userInfo['Username'];
- $_SESSION['ID'] = $userInfo['id'];
- echo '<div class="alert alert-success alert-dismissible"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><h4><i class="icon fa fa-check"></i> Success!</h4>Logging in.</div><meta http-equiv="refresh" content="3;url=index.php">';
- }
- else
- {
- echo '<div class="alert alert-danger alert-dismissible"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><h4><i class="icon fa fa-check"></i> ERROR:</h4>Unspecified Error.. Contact a Developer!</div>';
- }
- }
- else
- {
- echo '<div class="alert alert-danger alert-dismissible"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><h4><i class="icon fa fa-check"></i> ERROR:</h4>Credentials Wrong</div>';
- }
- }
- else
- {
- echo '<div class="alert alert-danger alert-dismissible"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><h4><i class="icon fa fa-check"></i> ERROR:</h4><br />';
- foreach($errors as $error)
- {
- echo '-'.$error.'<br />';
- }
- echo '</div>';
- }
- }
- }
- else
- {
- echo "<font color='white'>Already logged in, redirecting...</font>";
- echo "<meta http-equiv=\"refresh\" content=\"3;url=index.php\">";
- die();
- }
- ?>
- <style>
- [data-slides] {
- background-image: url(bg/1.jpg) no-repeat center center fixed; /* Default image. */
- background-repeat: no-repeat;
- background-size: cover;
- transition: background-image 1s linear;
- }
- /* Use additional CSS to control the `height` of `[data-slides]`, like so: */
- .test { height: 220px; }
- @media all and (min-width: 48em) {
- -webkit-background-size: cover;
- -moz-background-size: cover;
- -o-background-size: cover;
- background-size: cover;
- }
- .login-box-body {
- background-color:rgba(66,217,244,0.79);
- border-radius: 5px;
- }
- </style>
- <body class="test" data-slides='[
- "bg/1.jpg?2",
- "bg/2.jpg?2",
- "bg/3.jpg?2",
- "bg/4.jpg?2",
- "bg/5.jpg?2",
- "bg/6.jpg?2",
- "bg/7.jpg?2",
- "bg/8.jpg?2",
- "bg/9.jpg?2"
- ]'>
- <div class="login-box" id="particles-js">
- <div class="login-logo">
- <a href="login.php">Bloo<b>Gaming</b></a>
- </div>
- <!-- /.login-logo -->
- <div class="login-box-body">
- <?php
- {?>
- <p class="login-box-msg">Sign in to start your session</p>
- <form action="" method="post">
- <div class="form-group has-feedback">
- <input type="text" style ="border-radius: 5px" class="form-control" name="username" placeholder="Username">
- <span class="glyphicon glyphicon-user form-control-feedback"></span>
- </div>
- <div class="form-group has-feedback">
- <input type="password" style="border-radius: 5px" class="form-control" name="password" placeholder="Password">
- <span class="glyphicon glyphicon-lock form-control-feedback"></span>
- </div>
- <div class="row">
- <div class="col-xs-8">
- <div class="checkbox icheck">
- <label class="">
- <div class="icheckbox_square-blue" aria-checked="false" aria-disabled="false" style="position: relative;"><input type="checkbox" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"><ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins></div> Remember Me
- </label>
- </div>
- </div>
- <!-- /.col -->
- <div class="col-xs-4">
- <button type="submit" name="loginBtn" class="btn btn-primary btn-block btn-flat">Sign In</button>
- </div>
- <!-- /.col -->
- </div>
- </form>
- <!-- /.social-auth-links -->
- <?php } ?>
- </div>
- <!-- /.login-box-body -->
- </div>
- <!-- /.login-box -->
- <!-- jQuery 2.2.3 -->
- <script src="plugins/jQuery/jquery-2.2.3.min.js"></script>
- <!-- Bootstrap 3.3.6 -->
- <script src="bootstrap/js/bootstrap.min.js"></script>
- <!-- iCheck -->
- <script src="plugins/iCheck/icheck.min.js"></script>
- <script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
- <script>
- particlesJS.load('particles-js', 'particles.json', function(){
- console.log('particles.json loaded...');
- });
- </script>
- <script>
- $(function () {
- $('input').iCheck({
- checkboxClass: 'icheckbox_square-blue',
- radioClass: 'iradio_square-blue',
- increaseArea: '20%' // optional
- });
- });
- $(function () {
- $('.login-box-body').hide().show(1500);
- });
- (function($) {
- 'use strict';
- var $slides = $('[data-slides]');
- var images = $slides.data('slides');
- var count = images.length;
- var slideshow = function() {
- $slides
- .css('background-image', 'url("' + images[Math.floor(Math.random() * count)] + '")')
- .show(0, function() {
- setTimeout(slideshow, 5000);
- });
- };
- slideshow();
- }(jQuery));
- </script>
- </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement