Advertisement
Guest User

Untitled

a guest
Nov 1st, 2017
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.41 KB | None | 0 0
  1. <?php
  2. require 'includes/db.php';
  3. require 'includes/init.php';
  4. ?>
  5.  
  6. <html><head>
  7. <meta charset="utf-8">
  8. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9. <title>EG:RP Login</title>
  10. <!-- Tell the browser to be responsive to screen width -->
  11. <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  12. <!-- Bootstrap 3.3.6 -->
  13. <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
  14. <!-- Font Awesome -->
  15. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
  16. <!-- Ionicons -->
  17. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
  18. <!-- Theme style -->
  19. <link rel="stylesheet" href="dist/css/AdminLTE.min.css">
  20. <!-- iCheck -->
  21. <link rel="stylesheet" href="plugins/iCheck/square/blue.css">
  22. <!-- Background -->
  23. <link rel="stylesheet" href="plugins/bg-plugin/changContain.css">
  24.  
  25.  
  26. <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  27. <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  28. <!--[if lt IE 9]>
  29. <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  30. <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  31. <![endif]-->
  32. </head>
  33.  
  34. <?php
  35. if (!($player -> LoggedIn()))
  36. {
  37. if (isset($_POST['loginBtn']))
  38. {
  39. $username = $_POST['Username'];
  40. $password = $_POST['Key'];
  41. $errors = array();
  42.  
  43. if (empty($username) || empty($password))
  44. {
  45. $errors[] = 'Please fill in all fields';
  46. }
  47.  
  48. if (empty($errors))
  49. {
  50. $SQLCheckLogin = $odb -> prepare("SELECT COUNT(*) FROM `accounts` WHERE `Username` = :username AND `Key` = :password");
  51. $SQLCheckLogin -> execute(array(':username' => $username, ':password' => hash('whirlpool',$password)));
  52. $countLogin = $SQLCheckLogin -> fetchColumn(0);
  53. if ($countLogin == 1)
  54. {
  55. $SQLGetInfo = $odb -> prepare("SELECT `Username`, `id` FROM `accounts` WHERE `Username` = :username AND `Key` = :password");
  56. $SQLGetInfo -> execute(array(':username' => $username, ':password' => hash('whirlpool',$password)));
  57. $userInfo = $SQLGetInfo -> fetch(PDO::FETCH_ASSOC);
  58. if ($userInfo['id'] != -1)
  59. {
  60. $_SESSION['username'] = $userInfo['Username'];
  61. $_SESSION['ID'] = $userInfo['id'];
  62. 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">';
  63. }
  64. else
  65. {
  66. 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>';
  67. }
  68. }
  69. else
  70. {
  71. 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>';
  72. }
  73. }
  74. else
  75. {
  76. 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 />';
  77. foreach($errors as $error)
  78. {
  79. echo '-'.$error.'<br />';
  80. }
  81. echo '</div>';
  82. }
  83. }
  84. }
  85. else
  86. {
  87. echo "<font color='white'>Already logged in, redirecting...</font>";
  88. echo "<meta http-equiv=\"refresh\" content=\"3;url=index.php\">";
  89. die();
  90. }
  91. ?>
  92. <style>
  93. [data-slides] {
  94. background-image: url(bg/1.jpg) no-repeat center center fixed; /* Default image. */
  95. background-repeat: no-repeat;
  96. background-size: cover;
  97. transition: background-image 1s linear;
  98. }
  99.  
  100. /* Use additional CSS to control the `height` of `[data-slides]`, like so: */
  101.  
  102. .test { height: 220px; }
  103. @media all and (min-width: 48em) {
  104. -webkit-background-size: cover;
  105. -moz-background-size: cover;
  106. -o-background-size: cover;
  107. background-size: cover;
  108. }
  109. .login-box-body {
  110.  
  111. background-color:rgba(66,217,244,0.79);
  112. border-radius: 5px;
  113.  
  114. }
  115. </style>
  116. <body class="test" data-slides='[
  117. "bg/1.jpg?2",
  118. "bg/2.jpg?2",
  119. "bg/3.jpg?2",
  120. "bg/4.jpg?2",
  121. "bg/5.jpg?2",
  122. "bg/6.jpg?2",
  123. "bg/7.jpg?2",
  124. "bg/8.jpg?2",
  125. "bg/9.jpg?2"
  126. ]'>
  127. <div class="login-box" id="particles-js">
  128. <div class="login-logo">
  129. <a href="login.php">Bloo<b>Gaming</b></a>
  130. </div>
  131. <!-- /.login-logo -->
  132. <div class="login-box-body">
  133. <?php
  134. {?>
  135. <p class="login-box-msg">Sign in to start your session</p>
  136.  
  137. <form action="" method="post">
  138. <div class="form-group has-feedback">
  139. <input type="text" style ="border-radius: 5px" class="form-control" name="username" placeholder="Username">
  140. <span class="glyphicon glyphicon-user form-control-feedback"></span>
  141. </div>
  142. <div class="form-group has-feedback">
  143. <input type="password" style="border-radius: 5px" class="form-control" name="password" placeholder="Password">
  144. <span class="glyphicon glyphicon-lock form-control-feedback"></span>
  145. </div>
  146. <div class="row">
  147. <div class="col-xs-8">
  148. <div class="checkbox icheck">
  149. <label class="">
  150. <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
  151. </label>
  152. </div>
  153. </div>
  154. <!-- /.col -->
  155. <div class="col-xs-4">
  156. <button type="submit" name="loginBtn" class="btn btn-primary btn-block btn-flat">Sign In</button>
  157. </div>
  158. <!-- /.col -->
  159. </div>
  160. </form>
  161.  
  162.  
  163. <!-- /.social-auth-links -->
  164.  
  165.  
  166.  
  167. <?php } ?>
  168. </div>
  169. <!-- /.login-box-body -->
  170. </div>
  171. <!-- /.login-box -->
  172.  
  173. <!-- jQuery 2.2.3 -->
  174. <script src="plugins/jQuery/jquery-2.2.3.min.js"></script>
  175. <!-- Bootstrap 3.3.6 -->
  176. <script src="bootstrap/js/bootstrap.min.js"></script>
  177. <!-- iCheck -->
  178. <script src="plugins/iCheck/icheck.min.js"></script>
  179. <script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
  180.  
  181. <script>
  182. particlesJS.load('particles-js', 'particles.json', function(){
  183. console.log('particles.json loaded...');
  184. });
  185. </script>
  186. <script>
  187. $(function () {
  188. $('input').iCheck({
  189. checkboxClass: 'icheckbox_square-blue',
  190. radioClass: 'iradio_square-blue',
  191. increaseArea: '20%' // optional
  192. });
  193. });
  194. $(function () {
  195. $('.login-box-body').hide().show(1500);
  196. });
  197. (function($) {
  198.  
  199. 'use strict';
  200.  
  201. var $slides = $('[data-slides]');
  202. var images = $slides.data('slides');
  203. var count = images.length;
  204. var slideshow = function() {
  205. $slides
  206. .css('background-image', 'url("' + images[Math.floor(Math.random() * count)] + '")')
  207. .show(0, function() {
  208. setTimeout(slideshow, 5000);
  209. });
  210. };
  211.  
  212. slideshow();
  213.  
  214. }(jQuery));
  215. </script>
  216. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement