Advertisement
Guest User

Untitled

a guest
Feb 12th, 2016
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1.  
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <title>SPAM-LAB.su</title>
  6. <link rel="stylesheet" href="style.css">
  7. <script>
  8.  
  9. function validateForm()
  10. {
  11. var x=document.forms["registerForm"]["email"].value;
  12. var y=document.forms["registerForm"]["username"].value;
  13. var z=document.forms["registerForm"]["password"].value;
  14. var atpos=x.indexOf("@");
  15. var dotpos=x.lastIndexOf(".");
  16. var isspace=y.indexOf(" ");
  17. if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
  18. {
  19. alert("Not a valid e-mail address");
  20. return false;
  21. }
  22.  
  23. if (y=="") {
  24. alert("Username is empty!");
  25. return false;
  26. }
  27.  
  28. if (isspace!=-1) {
  29. alert("Invalid username!");
  30. return false;
  31. }
  32.  
  33. if (z=="") {
  34. alert("Password is empty!");
  35. return false;
  36. }
  37.  
  38. }
  39.  
  40. </script>
  41. </head>
  42. <body>
  43. <div id="loginbox">
  44. <img src="http://spam-lab.su/images/logo.jpg" />
  45. <div id="controls">
  46. <form action="index.php" method="post">
  47. <table style="margin:auto;padding:0;">
  48. <tr>
  49. <td style="text-align:right;">USERNAME: </td>
  50. <td><input class="inputtext" type="text" name="username" /></td>
  51. </tr>
  52. <tr>
  53. <td style="text-align:right;">PASSWORD: </td>
  54. <td><input class="inputtext" type="password" name="password" /></td>
  55. </tr>
  56. <tr>
  57. <td></td>
  58. <td style="text-align:left;"><input class="submitbutton" type="submit" name="ulogin" value="LOGIN" />&nbsp;<input type="button" value="REGISTER" onclick="window.location.href = 'index.php?page=register';" /></td>
  59. </tr>
  60. </table>
  61. </form>
  62. </div>
  63. </div></body>
  64. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement