Location: PHPKode > projects > CoreAsset > coreasset/templates/add_vendor.tpl
{include file="head.tpl"}
{include file="left.tpl"}

<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="21"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/corner9.gif" width="5" height="21"></td>
<td width="99%" class="header"><span class="whitetext">

 Add Vendor
</span></td>
<td><img src="images/corner10.gif" width="5" height="21"></td>
</tr>
</table></td>
</tr>
<tr>
<td class="border3side" valign="top" height="100%"><table width="100%" height="100%" border="0" cellspacing="8" cellpadding="0">
<tr>
<td valign="top">

<!-- #######################   Paste the Table to Table from here ############## -->
<table cellSpacing="0" cellPadding="0" width="98%" align="center" border="0">
          <!--<tr>
            <td><img title alt src="images/blank.gif" width="1" height="1"></td>
          </tr>
          <tr>
            <td style="border-left: 1px solid #bbbbbb; border-right: 1px solid #bbbbbb" bgColor="#bbbbbb">
            <img title height="3" alt src="images/blank.gif" width="1" valign="top"></td>
          </tr>-->
          <tr>
            <!--<td style="border-left: 1px solid #bbbbbb; border-right: 1px solid #bbbbbb; padding-left: 18px; padding-right: 23px; padding-top: 11px" vAlign="top" bgColor="#ededed" height="180">-->
			<td>
            {if $status < 4}
            <table borderColor="#ffffff" cellSpacing="1" cellPadding="0" width="100%" border="0">
              <form name="f1" action="?act=add" method="post" onSubmit="return validate();">
                <tr>
                  <td class="txtbox_bgcolor" width="20%">
                  &nbsp;Name</td>
                  <td class="txtbox_bgcolor" width="33%">
                  <input name="vendor_name"  type="text" size="20" class="text"></td>
                </tr>
                <tr>
                  <td class="alttxtbox_bgcolor" width="20%">
                  &nbsp;Address</td>
                  <td class="alttxtbox_bgcolor" width="33%">
                  <textarea name="vendor_address"  class="text" rows="9" cols="30"></textarea></td>
                </tr>
                <tr>
                  <td class="txtbox_bgcolor" width="20%">
                  &nbsp;Email</td>
                  <td class="txtbox_bgcolor" width="33%">
                  <input name="vendor_email"  type="text" size="20" class="text"></td>
                </tr>
                <tr>
                  <td class="alttxtbox_bgcolor" width="20%">
                  &nbsp;Phone</td>
                  <td class="alttxtbox_bgcolor" width="33%">
                  <input name="vendor_phone"  type="text" size="20" class="text" onkeypress="if((event.keyCode!=43) &&(event.keyCode!=47) &&(event.keyCode!=45) 
			&&(event.keyCode!=93) &&(event.keyCode!=91) 
			&& ((event.keyCode<48) ||(event.keyCode>57)))  event.returnValue = false;"></td>
                </tr>
                <tr>
                  <td class="txtbox_bgcolor" width="20%">
                  &nbsp;Zip Code</td>
                  <td class="txtbox_bgcolor" width="33%">
                  <input name="vendor_zip"  type="text" size="20" class="text" onkeypress="if((event.keyCode!=43) &&(event.keyCode!=47) &&(event.keyCode!=45) 
			&&(event.keyCode!=93) &&(event.keyCode!=91) 
			&& ((event.keyCode<48) ||(event.keyCode>57)))  event.returnValue = false;"></td>
                </tr>
                <tr>
                  <td class="alttxtbox_bgcolor" width="20%">
                  &nbsp;Country</td>
                  <td class="alttxtbox_bgcolor" width="33%">
                  <select name="vendor_country">
                    <option value=""	 selected>-- Select --</option>
            				<option value="AF">Afghanistan</option>
            				<option value="AL">Albania</option>
            				<option value="DZ">Algeria</option>
            				<option value="AS">American Samoa</option>
            				<option value="AD">Andorra</option>
            				<option value="AO">Angola</option>
            				<option value="AQ">Antartica</option>
            				<option value="AG">Antiqua and Barbuda</option>
            				<option value="AM">Armenia</option>
            				<option value="AR">Argentina</option>
            				<option value="AU">Australia</option>
            				<option value="AT">Austria</option>
            				<option value="AZ">Azerbaijan</option>
            				<option value="BS">Bahamas, The</option>
            				<option value="BH">Bahrain</option>
            				<option value="BD">Bangladesh</option>
            				<option value="BB">Barbados</option>
            				<option value="BY">Belarus</option>
            				<option value="BE">Belgium</option>
            				<option value="BZ">Belize</option>
            				<option value="BJ">Benin</option>
            				<option value="BM">Bermuda</option>
            				<option value="BT">Bhutan</option>
            				<option value="BO">Bolivia</option>
            				<option value="BW">Botswana</option>
            				<option value="BV">Bouvet Island</option>
            				<option value="BR">Brazil</option>
            				<option value="BQ">British Antartic Territory</option>
            				<option value="IO">British Indian Ocean Territory</option>
            				<option value="SB">British Solomon Islands</option>
            				<option value="VG">British Virgin Islands</option>
            				<option value="BN">Brunei</option>
            				<option value="BG">Bulgaria</option>
            				<option value="MM">Myanmar (formerly Burma)</option>
            				<option value="BI">Burundi</option>
            				<option value="KH">Khmer Republic</option>
            				<option value="CM">Cameroon</option>
            				<option value="CA">Canada</option>
            				<option value="CT">Canton and Enderbury Islands</option>
            				<option value="CV">Cape Verde Islands</option>
            				<option value="KY">Cayman Islands</option>
            				<option value="CF">Central African Republic</option>
            				<option value="TD">Chad</option>
            				<option value="CL">Chile</option>
            				<option value="CN">China, People's Republic of</option>
            				<option value="CX">Christmas Island</option>
            				<option value="CC">Cocos (Keeling) Islands</option>
            				<option value="CO">Colombia</option>
            				<option value="KM">Comoro Islands</option>
            				<option value="CG">Congo</option>
            				<option value="CK">Cook Islands</option>
            				<option value="CR">Costa Rica</option>
            				<option value="HR">Croatia</option>
            				<option value="CU">Cuba</option>
            				<option value="CY">Cyprus</option>
            				<option value="CZ">Czech Republic</option>
            				<option value="DY">Dahomey</option>
            				<option value="DK">Denmark</option>
            				<option value="DJ">Djibouti</option>
            				<option value="DM">Dominica</option>
            				<option value="DO">Dominican Republic</option>
            				<option value="NQ">Dronning Maud Land</option>
            				<option value="EC">Ecuador</option>
            				<option value="EG">Egypt</option>
            				<option value="SV">El Salvador</option>
            				<option value="GQ">Equitorial Guinea</option>
            				<option value="ER">Eritrea</option>
            				<option value="EE">Estonia</option>
            				<option value="ET">Ethiopia</option>
            				<option value="FO">Faeroe Islands</option>
            				<option value="FK">Falkland Islands (Malvinas)</option>
            				<option value="FJ">Fiji</option>
            				<option value="FI">Finland</option>
            				<option value="FR">France</option>
            				<option value="GF">French Guiana</option>
            				<option value="PF">French Polynesia</option>
            				<option value="FQ">French South and Antartic Territory</option>
            				<option value="AI">French Afars and Issas</option>
            				<option value="GA">Gabon</option>
            				<option value="GM">Gambia</option>
            				<option value="GE">Georgia</option>
            				<option value="DE">Germany</option>
            				<option value="GH">Ghana</option>
            				<option value="GI">Gibraltar</option>
            				<option value="GR">Greece</option>
            				<option value="GL">Greenland</option>
            				<option value="GD">Grenada</option>
            				<option value="GP">Guadeloupe</option>
            				<option value="GU">Guam</option>
            				<option value="GT">Guatemala</option>
            				<option value="GN">Guinea</option>
            				<option value="GW">Guinea Bissaw</option>
            				<option value="GY">Guyana</option>
            				<option value="HT">Haiti</option>
            				<option value="HM">Heard and McDonald Islands</option>
            				<option value="HN">Honduras</option>
            				<option value="HK">Hong Kong</option>
            				<option value="HU">Hungary</option>
            				<option value="IS">Iceland</option>
            				<option value="IN">India</option>
            				<option value="ID">Indonesia</option>
            				<option value="IR">Iran</option>
            				<option value="IQ">Iraq</option>
            				<option value="IE">Ireland</option>
            				<option value="IL">Israel</option>
            				<option value="IT">Italy</option>
            				<option value="CI">Ivory Coast</option>
            				<option value="JM">Jamaica</option>
            				<option value="JP">Japan</option>
            				<option value="JT">Johnston Island</option>
            				<option value="JO">Jordan</option>
            				<option value="KZ">Kazakhstan</option>
            				<option value="KE">Kenya</option>
            				<option value="KP">Korea,Democratic People's</option>
            				<option value="KR">Korea,Republic</option>
            				<option value="KW">Kuwait</option>
            				<option value="KG">Kyrgystan</option>
            				<option value="LA">Laos</option>
            				<option value="LV">Latvia</option>
            				<option value="LB">Lebanon</option>
            				<option value="LS">Lesotho</option>
            				<option value="LR">Liberia</option>
            				<option value="LY">Libya</option>
            				<option value="LI">Liechtenstein</option>
            				<option value="LT">Lithuania</option>
            				<option value="LU">Luxembourg</option>
            				<option value="MO">Macao</option>
            				<option value="MG">Madagascar</option>
            				<option value="MW">Malawi</option>
            				<option value="MY">Malaysia</option>
            				<option value="MV">Maldives</option>
            				<option value="ML">Mali</option>
            				<option value="MT">Malta</option>
            				<option value="MH">Marshall Islands</option>
            				<option value="MQ">Martinique</option>
            				<option value="MR">Mauritania</option>
            				<option value="MU">Mauritius</option>
            				<option value="MX">Mexico</option>
            				<option value="FM">Micronesia</option>
            				<option value="MI">Midway Islands</option>
            				<option value="MD">Moldova</option>
            				<option value="MC">Monaco</option>
            				<option value="MN">Mongolia</option>
            				<option value="MS">Montserrat</option>
            				<option value="MA">Morocco</option>
            				<option value="MZ">Mozambique</option>
            				<option value="NA">Namibia</option>
            				<option value="NR">Nauru</option>
            				<option value="NP">Nepal</option>
            				<option value="NL">Netherlands</option>
            				<option value="AN">Netherlands Antilles</option>
            				<option value="NT">Neutral Zone</option>
            				<option value="NC">New Caledonia</option>
            				<option value="NH">New Hebrides</option>
            				<option value="NZ">New Zealand</option>
            				<option value="NI">Nicaragua</option>
            				<option value="NE">Niger</option>
            				<option value="NG">Nigeria</option>
            				<option value="NU">Niue Island</option>
            				<option value="NF">Norfolk Island</option>
            				<option value="NO">Norway</option>
            				<option value="OM">Oman</option>
            				<option value="PC">Pacific Island Trust Territory</option>
            				<option value="PK">Pakistan</option>
            				<option value="PW">Palau</option>
            				<option value="PA">Panama</option>
            				<option value="PZ">Panama Canal Zone</option>
            				<option value="PG">Papua New Guinea</option>
            				<option value="PY">Paraguay</option>
            				<option value="PE">Peru</option>
            				<option value="PH">Philippines</option>
            				<option value="PN">Pitcairn Islands</option>
            				<option value="PL">Poland</option>
            				<option value="PT">Portugal</option>
            				<option value="TP">Portuguese Timor</option>
            				<option value="PR">Puerto Rico</option>
            				<option value="QA">Qatar</option>
            				<option value="RE">Reunion Island</option>
            				<option value="RO">Romania</option>
            				<option value="RU">Russia</option>
            				<option value="RW">Rwanda</option>
            				<option value="SH">St. Helena</option>
            				<option value="KN">St. Kitts-Nevis-Anguilla</option>
            				<option value="LC">St. Lucia</option>
            				<option value="PM">St. Pierre and Miquelon</option>
            				<option value="VC">St. Vincent</option>
            				<option value="SM">San Marino</option>
            				<option value="ST">Sao Tome and Principe</option>
            				<option value="SA">Saudi Arabia</option>
            				<option value="SN">Senegal</option>
            				<option value="SC">Seychelles</option>
            				<option value="SL">Sierra Leone</option>
            				<option value="SG">Singapore</option>
            				<option value="SK">Slovakia</option>
            				<option value="SI">Slovenia</option>
            				<option value="SO">Somalia</option>
            				<option value="ZA">South Africa, Republic of</option>
            				<option value="ES">Spain</option>
            				<option value="EH">Spanish Sahara</option>
            				<option value="LK">Sri Lanka</option>
            				<option value="SD">Sudan</option>
            				<option value="SR">Suriname</option>
            				<option value="SJ">Svalbard and Jan Mayen Islands</option>
            				<option value="SZ">Swaziland</option>
            				<option value="SE">Sweden</option>
            				<option value="CH">Switzerland</option>
            				<option value="SY">Syria</option>
            				<option value="TW">Taiwan</option>
            				<option value="TJ">Tajikistan</option>
            				<option value="TZ">Tanzania</option>
            				<option value="TH">Thailand</option>
            				<option value="TG">Togo</option>
            				<option value="TK">Tokelau Island</option>
            				<option value="TO">Tonga</option>
            				<option value="TT">Trinidad and Tobago</option>
            				<option value="TN">Tunisia</option>
            				<option value="TR">Turkey</option>
            				<option value="TM">Turkmenistan</option>
            				<option value="TC">Turks and Caicos Islands</option>
            				<option value="TV">Tuvalu</option>
            				<option value="UG">Uganda</option>
            				<option value="UA">Ukraine</option>
            				<option value="AE">United Arab Emirates</option>
            				<option value="GB">United Kingdom</option>
            				<option value="US">United States</option>
            				<option value="PU">U.S. Miscellaneous Pacific Islands</option>
            				<option value="VI">U.S. Virgin Islands</option>
            				<option value="HV">Upper Volta</option>
            				<option value="UY">Uruguay</option>
            				<option value="UZ">Uzbekistan</option>
            				<option value="VU">Vanuatu</option>
            				<option value="VA">Vatican City State (The Holy See)</option>
            				<option value="VE">Venezuela</option>
            				<option value="VN">Vietnam</option>
            				<option value="WK">Wake Island</option>
            				<option value="WF">Wallis and Futuna Islands</option>
            				<option value="WS">Western Samoa</option>
            				<option value="YE">Yemen</option>
            				<option value="YD">Yemen, Democratic</option>
            				<option value="YU">Yugoslavia</option>
            				<option value="ZR">Zaire</option>
            				<option value="ZM">Zambia</option>
            				<option value="ZW">Zimbabwe</option>
				        </select>
                  </td>
                </tr>
                <tr>
                  <td class="txtbox_bgcolor" width="20%">
                  &nbsp;State</td>
                  <td class="txtbox_bgcolor" width="33%">
                  <input name="vendor_state"  type="text" size="20" class="text"></td>
                </tr>
                <tr>
                  <td class="alttxtbox_bgcolor" width="20%">
                  &nbsp;Description</td>
                  <td class="alttxtbox_bgcolor" width="33%">
                  <textarea name="vendor_description"  class="text" rows="9" cols="30"></textarea></td>
                </tr>



                <tr>
				   <td class="btn_bg" colSpan="1">
                  <td class="btn_bg" colSpan="1">
                  <input type="image" src="images/add_vendor.gif" name="add"></td>
                </tr>
              </form>
            </table>

            {else}
            <table borderColor="#ffffff" cellSpacing="1" cellPadding="0" width="100%" border="0">
                <tr>
                  <td class="txt" align="center" width="20%" height="23">
                  <font color="RED">{$mes}</font>
                  </td>
                </tr>
             </table>
            {/if}
            </td>
          </tr>
          <!--<tr>
            <td style="border-left: 1px solid #bbbbbb; border-right: 1px solid #bbbbbb" bgColor="#bbbbbb">
            <img title height="4" alt src="images/blank.gif" width="1"></td>
          </tr>-->
          </table>
        </td>
      </tr>
    </table>



<!-- ########################      End Here ##########################-->

{include file="foot.tpl"}
{literal}
<script language="Javascript">
function phonecheck(str)
{
if (str =="")
{
return true;
}
else
{
var a;
a=str.length;
if(a < 10)
return false;
else
return true;
}
}
function checkzip(strzip)
{
var z;
z=strzip.length;
if(z<5)
return false;
else
return true;
}
function checkEmail(str)
	{
		if(str=="")
		 testResults=false;
		else
		{ 
		var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
		if( filter.test(str) )
			testResults=true;
		else
			testResults=false;
		}	
	 return(testResults);
	}
function validate()
{
 if(document.f1.vendor_name.value=="")
 {
  alert("Please Enter Vendor Name !");
  document.f1.vendor_name.focus();
  return false;
 }

 if(document.f1.vendor_address.value=="")
 {
  alert("Please Enter Address !");
  document.f1.vendor_address.focus();
  return false;
 }
/*
 if(document.f1.vendor_email.value=="")
 {
  alert("Please Enter Email !");
  document.f1.vendor_email.focus();
  return false;
 }

 if(!checkEmail(document.f1.vendor_email.value))
{
 alert("Email address is blank or it is invalid");
 document.f1.vendor_email.select();
 return false;
 }
*/
 if(document.f1.vendor_phone.value=="")
 {
  alert("Please Enter Phone Number !");
  document.f1.vendor_phone.focus();
  return false;
 }
if(!phonecheck(document.f1.vendor_phone.value))
 {
  alert("Please enter valid phone number");
  document.f1.vendor_phone.focus();
  return false;
 }

 /*
 if(document.f1.vendor_zip.value=="" ||isNaN(document.f1.vendor_zip.value) )
 {
  alert("Please enter Zip Code or it is invalid");
  document.f1.vendor_zip.focus();
  return false;
 }
 if(!checkzip(document.f1.vendor_zip.value))
 {
   alert("Zip Code should be 5 digit minimum");
   document.f1.vendor_country.focus();
    return false;
}
 if(document.f1.vendor_country.value=="")
 {
  alert("Please select Country !");
  document.f1.vendor_country.focus();
  return false;
 }

 if(document.f1.vendor_state.value=="")
 {
  alert("Please Enter State !");
  document.f1.vendor_state.focus();
  return false;
 }
 */
 return confirm("Are you sure? The Vendor will be added!");
}
</script>
{/literal}
Return current item: CoreAsset