Advertisement
Guest User

Untitled

a guest
Jun 16th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.43 KB | None | 0 0
  1. <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  2. <!DOCTYPE html>
  3.  
  4. <head>
  5. <title>FunWeb </title>
  6. <meta charset="utf-8">
  7. <meta name="viewport" content="width=device-width, initial-scale=1">
  8. <link href="https://fonts.googleapis.com/css?family=Oleo+Script:400,700" rel="stylesheet">
  9. <link href="https://fonts.googleapis.com/css?family=Teko:400,700" rel="stylesheet">
  10. <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
  11. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  12. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  13. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
  14. <script src="https://cdnjs.cloudflare.com/ajax/libs/lettering.js/0.7.0/jquery.lettering.min.js"> </script>
  15. <link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css" rel="stylesheet">
  16. <script src="https://cdnjs.cloudflare.com/ajax/libs/textillate/0.4.0/jquery.textillate.js"> </script>
  17.  
  18. <link href="/resources/css/index_style.css" rel="stylesheet">
  19. <script src="/resources/js/pages/bounceText.js"> </script>
  20. <script src="/resources/js/pages/titleInAnimation.js"> </script>
  21. </head>
  22.  
  23. <body>
  24. <div id="fb-root"></div>
  25. <div class ="container-fluid" id="login">
  26. <div class="text-center">
  27. <h1> <span class="content-header wow fadeIn " data-wow-delay="0.2s" data-wow-duration="2s"> &lt; Fun Web &#47; &gt;</span></h1>
  28. <h3 class="bounce">A new and exciting game!</h3>
  29. </div>
  30.  
  31.  
  32.  
  33. <form class="items" action="/validateRegistration" method="post">
  34.  
  35. <div class="col-md-3"> </div>
  36. <div class="col-md-6">
  37. <div class="form-group">
  38. <label for="email"> E-mail </label>
  39. <input type="text" class="form-control" id="email" name="email" placeholder=" Enter your e-mail">
  40. </div>
  41. <div class="form-group">
  42. <label for="username">Username</label>
  43. <input type="text" class="form-control" id="username" name="username" placeholder=" Enter Username">
  44. </div>
  45. <div class="form-group">
  46. <label for="password">Password</label>
  47. <input type="password" class="form-control" id="password" name="password" placeholder=" Enter password">
  48. </div>
  49.  
  50. <div class="checkbox">
  51. <label><input type="checkbox"> Remember me</label>
  52. </div>
  53.  
  54. <button type="submit" class="btn btn-success">Register</button>
  55. <button type="submit" onclick="javascript:login();" class="btn btn-primary">Register with FaceBook</button>
  56.  
  57.  
  58.  
  59. </div>
  60. </form>
  61. </div>
  62.  
  63. <footer id = "footer">
  64. <div class="container">
  65. <p class="text-center">Contact | FunWeb &#9400; 2017 <p>
  66. </div>
  67. </footer>
  68.  
  69.  
  70. <script type="text/javascript">
  71. $(document).ready(function() {
  72. $("#username").change(function () {
  73. $("#username").tooltip("hide");
  74. $.post("/checkUsernameAvailable", {
  75. username: $("#username").val()
  76. }, function (data) {
  77.  
  78. data = JSON.parse(data);
  79.  
  80. if (data.status === 'ok') {
  81. $("#username").tooltip("hide");
  82. } else if (data.status === "taken") {
  83. $("#username").attr("title",
  84. "The username is already taken, what about: " + data.suggestion);
  85. $("#username").tooltip("fixTitleda");
  86. $("#username").tooltip("show");
  87. $("#username").trigger("mouseover");
  88. }
  89.  
  90. // the tool tip should be displayed conditionally, depending on the server's output
  91. });
  92.  
  93.  
  94. });
  95.  
  96. $("#password").change(function () {
  97. $("#password").tooltip("hide");
  98.  
  99. $.post("/checkPasswordStrength", {
  100. password: $("#password").val()
  101. }, function (data) {
  102. data = JSON.parse(data);
  103.  
  104. var strengthString = null;
  105.  
  106. if (data.strength === 0) {
  107. strengthString = "weak password";
  108. } else if (data.strength === 1) {
  109. strengthString = "medium password";
  110. } else {
  111. strengthString = "strong password";
  112. }
  113.  
  114. $("#password").attr("title", strengthString);
  115. $("#password").tooltip("fixTitle");
  116. $("#password").tooltip("show");
  117. $("#password").trigger("mouseover");
  118.  
  119. })
  120. });
  121. });
  122. </script>
  123. <script>
  124. window.fbAsyncInit = function() {
  125. FB.init({
  126. appId : '153766825168453',
  127. autoLogAppEvents : true,
  128. xfbml : true,
  129. version : 'v2.9'
  130. });
  131. FB.AppEvents.logPageView();
  132. };
  133.  
  134. (function(d, s, id){
  135. var js, fjs = d.getElementsByTagName(s)[0];
  136. if (d.getElementById(id)) {return;}
  137. js = d.createElement(s); js.id = id;
  138. js.src = "//connect.facebook.net/en_US/sdk.js";
  139. fjs.parentNode.insertBefore(js, fjs);
  140. }(document, 'script', 'facebook-jssdk'));
  141.  
  142. function login() {
  143. FB.login(function(response) {
  144. if (response.authResponse) {
  145. console.log('Welcome! Fetching your information.... ');
  146. FB.api('/me', function(response) {
  147. console.log('Good to see you, ' + response.name + '.');
  148. });
  149. } else {
  150. console.log('User cancelled login or did not fully authorize.');
  151. }
  152. });
  153. }
  154. </script>
  155.  
  156.  
  157.  
  158.  
  159. </body>
  160. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement