Location: PHPKode > projects > phpLedMailer > templates/subscribe.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <script language="javascript">
	function validateForm( )
	{
		var frm = document.frmMain;

		if(! ValidateEmail(frm.emailaddr) )
		{
			return false;
		}

		if(frm.firstname.value == "")
		{
			alert('Must fill in your first name!');
			frm.firstname.focus();
			return false;
		}

		return true;
	}

	function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail ID")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

 		 return true
	}

	function ValidateEmail(emailID){
		if ((emailID.value==null)||(emailID.value=="")){
			alert("Please Enter your Email ID")
			emailID.focus()
			return false
		}
		if (echeck(emailID.value)==false){
			emailID.value=""
			emailID.focus()
			return false
		}
		return true
	 }
  </script>
  <title>Subscriber to {listname}</title>
  <style type="text/css">
  .main { font-family: Arial,Helvetica,sans-serif;
    font-size: 12px;
    }
  </style>
</head>
<body style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"
 class="main" link="#000099" alink="#000099" vlink="#625b99">
<div style="text-align: center;"><span style="font-weight: bold;">Subscribe
to {listname} today!</span><br>
</div>
  <form name="frmMain" method="post" action="{form_action}">
  <table class="main"
 style="text-align: center; margin-left: 0px; margin-right: auto;"
 align="center" border="0" bgcolor="#000000" cellspacing="1">
    <tr bgcolor="#FFFFFF"> 
      <td>*E-Mail Address:</td>
      <td> 
        <input name="emailaddr" size="30" type="text" value="{default_email}"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td> *First Name: </td>
      <td> 
        <input name="firstname" size="30" type="text" value="{default_firstname}"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td> Last Name: </td>
      <td> 
        <input name="lastname" size="30" type="text" value="{default_lastname}"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td> City: </td>
      <td> 
        <input name="userfield1" size="30" type="text" value="{default_userfield1}"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td>State: </td>
      <td> 
        <select name="userfield2">
      <option value="">N/A</option>
      <option value="AL">Alabama</option>
      <option value="AK">Alaska</option>
      <option value="AS">American
Samoa</option>
      <option value="AZ">Arizona</option>
      <option value="AR">Arkansas</option>
      <option value="CA">California</option>
      <option value="CO">Colorado</option>
      <option value="CT">Connecticut</option>
      <option value="DE">Delaware</option>
      <option value="DC">District
Of Columbia</option>
      <option value="FM">Federated
States Of Micronesia</option>
      <option value="FL">Florida</option>
      <option value="GA">Georgia</option>
      <option value="GU">Guam</option>
      <option value="HI">Hawaii</option>
      <option value="ID">Idaho</option>
      <option value="IL">Illinois</option>
      <option value="IN">Indiana</option>
      <option value="IA">Iowa</option>
      <option value="KS">Kansas</option>
      <option value="KY">Kentucky</option>
      <option value="LA">Louisiana</option>
      <option value="ME">Maine</option>
      <option value="MH">Marshall
Islands</option>
      <option value="MD">Maryland</option>
      <option value="MA">Massachusetts</option>
      <option value="MI">Michigan</option>
      <option value="MN">Minnesota</option>
      <option value="MS">Mississippi</option>
      <option value="MO">Missouri</option>
      <option value="MT">Montana</option>
      <option value="NE">Nebraska</option>
      <option value="NV">Nevada</option>
      <option value="NH">New
Hampshire</option>
      <option value="NJ">New
Jersey</option>
      <option value="NM">New
Mexico</option>
      <option value="NY">New
York</option>
      <option value="NC">North
Carolina</option>
      <option value="ND">North
Dakota</option>
      <option value="MP">Northern
Mariana Islands</option>
      <option value="OH">Ohio</option>
      <option value="OK">Oklahoma</option>
      <option value="OR">Oregon</option>
      <option value="PW">Palau</option>
      <option value="PA">Pennsylvania</option>
      <option value="PR">Puerto
Rico</option>
      <option value="RI">Rhode
Island</option>
      <option value="SC">South
Carolina</option>
      <option value="SD">South
Dakota</option>
      <option value="TN">Tennessee</option>
      <option value="TX">Texas</option>
      <option value="UT">Utah</option>
      <option value="VT">Vermont</option>
      <option value="VI">Virgin
Islands</option>
      <option value="VA">Virginia</option>
      <option value="WA">Washington</option>
      <option value="WV">West
Virginia</option>
      <option value="WI">Wisconsin</option>
      <option value="WY">Wyoming</option>
      </select>
      </td>
    </tr>
    <tr align="center" bgcolor="#FFFFFF"> 
      <td colspan="2"> 
        <input value="Join mailing list"
 onclick="return validateForm( )" type="submit"></td>
    </tr>
</table>
    </form>
</body>
</html>
Return current item: phpLedMailer