Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>SPAM-LAB.su</title>
- <link rel="stylesheet" href="style.css">
- <script>
- function validateForm()
- {
- var x=document.forms["registerForm"]["email"].value;
- var y=document.forms["registerForm"]["username"].value;
- var z=document.forms["registerForm"]["password"].value;
- var atpos=x.indexOf("@");
- var dotpos=x.lastIndexOf(".");
- var isspace=y.indexOf(" ");
- if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
- {
- alert("Not a valid e-mail address");
- return false;
- }
- if (y=="") {
- alert("Username is empty!");
- return false;
- }
- if (isspace!=-1) {
- alert("Invalid username!");
- return false;
- }
- if (z=="") {
- alert("Password is empty!");
- return false;
- }
- }
- </script>
- </head>
- <body>
- <div id="loginbox">
- <img src="http://spam-lab.su/images/logo.jpg" />
- <div id="controls">
- <form action="index.php" method="post">
- <table style="margin:auto;padding:0;">
- <tr>
- <td style="text-align:right;">USERNAME: </td>
- <td><input class="inputtext" type="text" name="username" /></td>
- </tr>
- <tr>
- <td style="text-align:right;">PASSWORD: </td>
- <td><input class="inputtext" type="password" name="password" /></td>
- </tr>
- <tr>
- <td></td>
- <td style="text-align:left;"><input class="submitbutton" type="submit" name="ulogin" value="LOGIN" /> <input type="button" value="REGISTER" onclick="window.location.href = 'index.php?page=register';" /></td>
- </tr>
- </table>
- </form>
- </div>
- </div></body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement