Guest User

Untitled

a guest
Sep 30th, 2013
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.41 KB | None | 0 0
  1. <!DOCTYPE HTML>
  2. <html lang="en">
  3. <head>
  4. <title>Minecraft Server List</title>
  5. <link rel="stylesheet" href="style.css" type="text/css" />
  6. <script>
  7. function validate(form){
  8. fail = validateUsername(form.username.value);
  9. fail += validatePassword(form.password.value);
  10. if(fail == "") return true;
  11. else{
  12. alert(fail);
  13. return false;
  14. }
  15. }
  16. function validateUsername(field){
  17. if(field == "") return "No Username was entered.\n";
  18. else if(field.length) < 3) return "Usernames must be at least 5 characters.\n";
  19. else if(/[^a-zA-Z0-9_-]/.test(field)) return "Only letters, numbers, dashes, and underscores are allowed in Usernames.";
  20. return "";
  21. }
  22. function validatePassword(field){
  23. if(field == "") return "No Password was entered.\n";
  24. else if(field.length < 8) return "Passwords must be atleast 8 characters.\n";
  25. }
  26. </script>
  27. </head>
  28. <body>
  29. <div id="page">
  30. <div id="masthead">
  31.  
  32. </div>
  33. <div id="space"></div>
  34. <div id="navigation">
  35. <a href="index.php"><div class="link">Home</div></a>
  36. <a href="login.php"><div class="link" style="background-color: #ADADAD;">Login</div></a>
  37. </div>
  38. <div id="main" style="height: 320px;">
  39. <form onsubmit="return validate(this)" action="login.php" method="post">
  40. <table border="0" cellpadding="2" cellspacing="2" style="background-color: #C3C3C3; margin-left: auto; margin-right: auto; border: 2px solid #ADADAD; font-family: monospace; width: 400px; margin-top: 75px; padding: 10px;">
  41. <tr><th colspan="2" align="center" style="font-family: Georgia, serif; font-size: 20px;">Login</th></tr>
  42. <tr><td>Username</td><td> <input type="text" maxlength="16" name="username" style="width: 300px;" /> </td></tr>
  43. <tr><td>Password</td><td> <input type="text" maxlength="32" name="password" style="width: 300px;"/> </td></tr>
  44. <tr><th colspan="2" align="right"> <input type="submit" value="Login" /> </th></tr>
  45. <tr><th colspan="2" align="center" style="font-size: 13px;">Don't have an account? <a href="register.php" style="color: blue; text-decoration: underline;">Register here!</a></th></tr>
  46. </table>
  47. </form>
  48. </div>
  49. <div id="footer">
  50. <p class="footerp">&copy;Copyright 2013 - <a href="http://www.srcdevelopment.net/" style="color: blue; text-decoration: underline;">www.srcdevelopment.net</a></p>
  51. </div>
  52. </div>
  53. </body>
  54. </html>
Advertisement
Add Comment
Please, Sign In to add comment