Advertisement
Guest User

Untitled

a guest
Jan 8th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.81 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>melon.pw | login</title>
  6. <link href="https://fonts.googleapis.com/css?family=Dosis" rel="stylesheet">
  7. <script src="/jquery.js"></script>
  8. <script src="/jquery-ui.js"></script>
  9. </head>
  10. <body>
  11. <div class="site">
  12. <div class="header">
  13. <div class="link" style="float: left;">melon.pw</div>
  14. <?php
  15. if (isset($_SESSION['username'])) {
  16. ?>
  17. <p style="float: right;" id="username"></p>
  18. <?php
  19. } else {
  20. ?>
  21. <div class="link" style="float: right;" id="register">Register</div>
  22. <div class="link" style="float: right;" id="login">Login</div>
  23. <?php
  24. }
  25. ?>
  26. </div>
  27.  
  28. <div class="authentication">
  29. <div class="webheader">
  30. <span style="margin: 3px 0 0 10px; display:inline-block;">Authentication</span>
  31. <div id="exit" class="link exit">x</div>
  32. </div>
  33. <form method="post" action="login.php">
  34. <table>
  35. <tr>
  36. <td>Username: </td>
  37. <td>
  38. <input type="text" name="username">
  39. </td>
  40. </tr>
  41. <tr>
  42. <td>Password: </td>
  43. <td>
  44. <input type="password" name="password">
  45. </td>
  46. </tr>
  47. <tr>
  48. <td></td>
  49. <td>
  50. <input type="submit" name="login" value="Login">
  51. </td>
  52. </tr>
  53. </table>
  54. </form>
  55. <br>
  56. <div class="link" id="pass" style="margin-left: 15px; font-size: 15px">Request a new password?</div>
  57. </div>
  58. </div>
  59. </body>
  60. <style>
  61.  
  62. @keyframes hover {
  63. from {color: #eee;}
  64. to {color: lightblue;}
  65. }
  66.  
  67. @keyframes bottomGlow {
  68. 0% {border-bottom: solid 1px #5D21C4;}
  69. 25% {border-bottom: solid 1px #000ED1;}
  70. 50% {border-bottom: solid 1px #005BD1;}
  71. 75% {border-bottom: solid 1px #00A0D1;}
  72. 100% {border-bottom: solid 1px #00D1C7;}
  73. }
  74.  
  75. @keyframes leftGlow {
  76. 0% {border-left: solid 1px #5D21C4;}
  77. 25% {border-left: solid 1px #000ED1;}
  78. 50% {border-left: solid 1px #005BD1;}
  79. 75% {border-left: solid 1px #00A0D1;}
  80. 100% {border-left: solid 1px #00D1C7;}
  81. }
  82.  
  83. @keyframes textGlow {
  84. 0% {color: #5D21C4;}
  85. 25% {color: #000ED1;}
  86. 50% {color: #005BD1;}
  87. 75% {color: #00A0D1;}
  88. 100% {color: #00D1C7;}
  89. }
  90.  
  91. @keyframes backgroundGlow {
  92. 0% {background-color: #5D21C4;}
  93. 25% {background-color: #000ED1;}
  94. 50% {background-color: #005BD1;}
  95. 75% {background-color: #00A0D1;}
  96. 100% {background-color: #00D1C7;}
  97. }
  98.  
  99. html, body {
  100. font-family: "Dosis", sans-serif;
  101. background-color: #222;
  102. color: #eee;
  103. margin: 0;
  104. overflow: hidden;
  105. height: 100%;
  106. }
  107.  
  108. table {
  109. margin: 20px;
  110. width: 100%;
  111. }
  112.  
  113. input[type=text], input[type=password] {
  114. border: none;
  115. color: #eee;
  116. background-color: #222;
  117. border-radius: 7px;
  118. }
  119.  
  120. input[type=submit] {
  121. animation-name: backgroundGlow;
  122. animation-duration: 12s;
  123. animation-iteration-count: infinite;
  124. animation-direction: alternate;
  125. background-color: green;
  126. border: none;
  127. color: #eee;
  128. padding: 0 15px 0 15px;
  129. font-family: "Dosis", sans-serif;
  130. font-size: 13px;
  131. }
  132.  
  133. .link {
  134. text-decoration: none;
  135. color: #eee;
  136. font-size: 18px;
  137. padding: 2px 4px 0 4px;
  138. }
  139.  
  140. .link:hover {
  141. animation-name: hover;
  142. animation-duration: 1s;
  143. color: lightblue;
  144. }
  145.  
  146. .exit:hover {
  147. animation-name: textGlow, leftGlow;
  148. animation-duration: 2s;
  149. animation-iteration-count: infinite;
  150. animation-direction: alternate;
  151. }
  152.  
  153. .exit {
  154. animation-name: textGlow, leftGlow;
  155. animation-duration: 12s;
  156. animation-iteration-count: infinite;
  157. animation-direction: alternate;
  158. float: right;
  159. color: lightblue;
  160. height: 100%;
  161. border-left: 1px solid lightblue;
  162. padding: 0 12px 0 12px;
  163. }
  164.  
  165. .header, .webheader {
  166. animation-name: bottomGlow;
  167. animation-duration: 12s;
  168. animation-iteration-count: infinite;
  169. animation-direction: alternate;
  170. height: 30px;
  171. width: 100%;
  172. background-color: #111;
  173. border-bottom: 1px solid lightblue;
  174. }
  175.  
  176. .authentication {
  177. position: absolute;
  178. height: 210px;
  179. width: 350px;
  180. background-color: #111;
  181. border: 1px solid lightblue;
  182. top: calc(50% - 105px);
  183. left: calc(50% - 175px);
  184. }
  185.  
  186. </style>
  187. <script>
  188.  
  189. $(document).ready(function() {
  190. $(".authentication").hide();
  191. });
  192.  
  193. $("#login").click(function() {
  194. $(".authentication").show("drop", 1000);
  195. $(".authentication").html('<div class="webheader"><span style="margin: 3px 0 0 10px; display:inline-block;">Authentication</span><div id="exit" class="link exit">x</div></div><form method="post" action="login.php"><table><tr><td>Username: </td><td><input type="text" name="username"></td></tr><tr><td>Password: </td><td><input type="password" name="password"></td></tr><tr><td></td><td><input type="submit" name="login" value="Login"></td></tr></table></form><br><div class="link" id="pass" style="margin-left: 15px; font-size: 15px">Request a new password?</div></div>');
  196. });
  197.  
  198. $("#register").click(function() {
  199. $(".authentication").show("drop", 1000);
  200. $(".authentication").html('<div class="webheader"><span style="margin: 3px 0 0 10px; display:inline-block;">Authentication</span><div id="exit" class="link exit">x</div></div><form method="post" action="register.php"><table><tr><td>Username: </td><td><input type="text" name="username"></td></tr><tr><td>Password: </td><td><input type="password" name="password"></td></tr><tr><td>Confirm Password: </td><td><input type="password" name="confirmPassword"></td></tr><tr><td></td><td><input type="submit" name="register" value="Register"></td></tr></table></form></div>');
  201.  
  202. $.ajax({
  203. type: "post",
  204. url: "melon.pw/register.php",
  205. cache: false,
  206. data: {
  207. username: username,
  208. password: password
  209. },
  210. success: function(data) {
  211. if (data != "none") {
  212.  
  213. }
  214. }
  215. });
  216. });
  217.  
  218. $("body").on("click", 'div.exit', function() {
  219. $(".authentication").hide("drop", 1000);
  220. });
  221.  
  222. $(".authentication").draggable({
  223. handle: ".webheader",
  224. snap: false
  225. });
  226. </script>
  227. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement