"Alabama", "AK" => "Alaska", "AB" => "Alberta", "AS" => "American Samoa", "AZ" => "Arizona", "AR" => "Arkansas", "BC" => "British Columbia", "CA" => "California", "CO" => "Colorado", "CT" => "Connecticut", "DE" => "Delaware", "DC" => "District of Columbia", "FM" => "Federated States of Micronesia", "FL" => "Florida", "GA" => "Georgia", "GU" => "Guam", "HI" => "Hawaii", "ID" => "Idaho", "IL" => "Illinois", "IN" => "Indiana", "IA" => "Iowa", "KS" => "Kansas", "KY" => "Kentucky", "LA" => "Louisiana", "ME" => "Maine", "MB" => "Manitoba", "MH" => "Marshall Islands", "MD" => "Maryland", "MA" => "Massachusetts", "MI" => "Michigan", "MN" => "Minnesota", "MS" => "Mississippi", "MO" => "Missouri", "MT" => "Montana", "NE" => "Nebraska", "NV" => "Nevada", "NB" => "New Brunswick", "NF" => "Newfoundland", "NH" => "New Hampshire", "NJ" => "New Jersey", "NM" => "New Mexico", "NY" => "New York", "NC" => "North Carolina", "ND" => "North Dakota", "MP" => "Northern Mariana Islands", "NT" => "Northwest Territories", "NS" => "Nova Scotia", "OH" => "Ohio", "OK" => "Oklahoma", "ON" => "Ontario", "OR" => "Oregon", "PW" => "Palau", "PA" => "Pennsylvania", "PE" => "Prince Edward Island", "PR" => "Puerto Rico", "QC" => "Quebec", "RI" => "Rhode Island", "SK" => "Saskatchewan", "SC" => "South Carolina", "SD" => "South Dakota", "TN" => "Tennessee", "TX" => "Texas", "UT" => "Utah", "VT" => "Vermont", "VI" => "Virgin Island of the United States", "VA" => "Virginia", "WA" => "Washington", "WV" => "West Virginia", "WI" => "Wisconsin", "WY" => "Wyoming", "YT" => "Yukon", "NA" => "None of the above"); $countryValue = array("HKG" => "Hong Kong", "AL" => "Alabama", "AFG" => "Afghanistan", "ALB" => "Albania", "DZA" => "Algeria", "ASM" => "American Samoa", "AND" => "Andorra", "AGO" => "Angola", "AIA" => "Anguilla", "ATA" => "Antarctica", "ATG" => "Antigua and Barbuda", "ARG" => "Argentina", "ARM" => "Armenia", "ABW" => "Aruba", "AUS" => "Australia", "AUT" => "Austria", "AZE" => "Azerbaijan", "BHS" => "Bahamas", "BHR" => "Bahrain", "BGD" => "Bangladesh", "BRB" => "Barbados", "BLR" => "Belarus", "BEL" => "Belgium", "BLZ" => "Belize", "BEN" => "Benin", "BMU" => "Bermuda", "BTN" => "Bhutan", "BOL" => "Bolivia", "BIH" => "Bosnia and Herzegowina", "BWA" => "Botswana", "BVT" => "Bouvet Island", "BRA" => "Brazil", "IOT" => "British Indian Ocean Territory", "BRN" => "Brunei Darussalam", "BGR" => "Bulgaria", "BFA" => "Burkina Faso", "BDI" => "Burundi", "KHM" => "Cambodia", "CMR" => "Cameroon", "CAN" => "Canada", "CPV" => "Cape Verde", "CYM" => "Cayman Islands", "CAF" => "Central African Republic", "TCD" => "Chad", "CHL" => "Chile", "CHN" => "China", "CXR" => "Christmas Island", "CCK" => "Cocoa (Keeling) Islands", "COL" => "Colombia", "COM" => "Comoros", "COG" => "Congo", "COK" => "Cook Islands", "CRI" => "Costa Rica", "CIV" => "Cote Divoire", "HRV" => "Croatia (local name: Hrvatska)", "CUB" => "Cuba", "CYP" => "Cyprus", "CZE" => "Czech Republic", "DNK" => "Denmark", "DJI" => "Djibouti", "DMA" => "Dominica", "DOM" => "Dominican Republic", "TMP" => "East Timor", "ECU" => "Ecuador", "EGY" => "Egypt", "SLV" => "El Salvador", "GNQ" => "Equatorial Guinea", "ERI" => "Eritrea", "EST" => "Estonia", "ETH" => "Ethiopia", "FLK" => "Falkland Islands (Malvinas)", "FRO" => "Faroe Islands", "FJI" => "Fiji", "FIN" => "Finland", "FRA" => "France", "FXX" => "France, Metropolitan", "GUF" => "French Guiana", "PYF" => "French Polynesia", "ATF" => "French Southern Territories", "GAB" => "Gabon", "GMB" => "Gambia", "GEO" => "Georgia", "DEU" => "Germany", "GHA" => "Ghana", "GIB" => "Gibraltar", "GRC" => "Greece", "GRL" => "Greenland", "GRD" => "Grenada", "GLP" => "Guadeloupe", "GUM" => "Guam", "GTM" => "Guatemala", "GIN" => "Guinea", "GNB" => "Guinea-Bissau", "GUY" => "Guyana", "HTI" => "Haiti", "HMD" => "Heard and Mc Donald Islands", "HND" => "Honduras", "HUN" => "Hungary", "ISL" => "Iceland", "IND" => "India", "IDN" => "Indonesia", "IRN" => "Iran (Islamic Republic of)", "IRQ" => "Iraq", "IRL" => "Ireland", "ISR" => "Israel", "ITA" => "Italy", "JAM" => "Jamaica", "JPN" => "Japan", "JOR" => "Jordan", "KAZ" => "Kazakhstan", "KEN" => "Kenya", "KIR" => "Kiribati", "PRK" => "Korea, Democratic Peoples Republic of", "KOR" => "Korea, Republic of", "KWT" => "Kuwait", "KGZ" => "Kyrgyzstan", "LAO" => "Lao Peoples Democratic Republic", "LVA" => "Latvia", "LBN" => "Lebanon", "LSO" => "Lesotho", "LBR" => "Liberia", "LBY" => "Libyan Arab Jamahiriya", "LIE" => "Liechtenstein", "LTU" => "Lithuania", "LUX" => "Luxembourg", "MAC" => "Macau", "MKD" => "Macedonia, Former Yugoslav Republic of", "MDG" => "Madagascar", "MWI" => "Malawi", "MYS" => "Malaysia", "MDV" => "Maldives", "MLI" => "Mali", "MLT" => "Malta", "MHL" => "Marshall Islands", "MTQ" => "Martinique", "MRT" => "Mauritania", "MUS" => "Mauritius", "MYT" => "Mayotte", "MEX" => "Mexico", "FSM" => "Micronesia, Federated States Of", "MDA" => "Moldova, Republic of", "MCO" => "Monaco", "MNG" => "Mongolia", "MSR" => "Montserrat", "MAR" => "Morocco", "MOZ" => "Mozambique", "MMR" => "Myanmar", "NAM" => "Namibia", "NRU" => "Nauru", "NPL" => "Nepal", "NLD" => "Netherlands", "ANT" => "Netherlands Antilles", "NCL" => "New Caledonia", "NZL" => "New Zealand", "NIC" => "Nicaragua", "NER" => "Niger", "NGA" => "Nigeria", "NIU" => "Niue", "NFK" => "Norfolk Island", "MNP" => "Northern Mariana Islands", "NOR" => "Norway", "OMN" => "Oman", "PAK" => "Pakistan", "PLW" => "Palau", "PAN" => "Panama", "PNG" => "Papua New Guinea", "PRY" => "Paraguay", "PER" => "Peru", "PHL" => "Philippines", "PCN" => "Pitcairn", "POL" => "Poland", "PRT" => "Portugal", "PRI" => "Puerto Rico", "QAT" => "Qatar", "REU" => "Reunion", "ROM" => "Romania", "RUS" => "Russian Federation", "RWA" => "Rwanda", "KNA" => "Saint Kitts and Nevis", "LCA" => "Saint Lucia", "VCT" => "Saint Vincent and the Grenadines", "WSM" => "Samoa", "SMR" => "San Marino", "STP" => "Sao Tome and Principe", "SAU" => "Saudi Arabia", "SEN" => "Senegal", "SYC" => "Seychelles", "SLE" => "Sierra Leone", "SGP" => "Singapore", "SVK" => "Slovakia (Slovak Republic)", "SVN" => "Slovenia", "SLB" => "Solomon Islands", "SOM" => "Somalia", "ZAF" => "South Africa", "SGS" => "South Georgia & South Sandwich Islands", "ESP" => "Spain", "LKA" => "Sri Lanka", "SHN" => "St. Helena", "SPM" => "St. Pierre and Miquelon", "SDN" => "Sudan", "SUR" => "Suriname", "SJM" => "Svalbard and Jan Mayen Islands", "SWZ" => "Swaziland", "SWE" => "Sweden", "CHE" => "Switzerland", "SYR" => "Syrian Arab Republic", "TWN" => "Taiwan", "TJK" => "Tajikistan", "TZA" => "Tanzania, United Republic of", "THA" => "Thailand", "TGO" => "Togo", "TKL" => "Tokelau", "TON" => "Tonga", "TTO" => "Trinidad and Tobago", "TUN" => "Tunisia", "TUR" => "Turkey", "TKM" => "Turkmenistan", "TCA" => "Turks and Caicos Islands", "TUV" => "Tuvalu", "UGA" => "Uganda", "UKR" => "Ukraine", "ARE" => "United Arab Emirates", "GBR" => "United Kingdom", "UMI" => "United States Minor Outlying Islands", "USA" => "United States of America", "URY" => "Uruguay", "UZB" => "Uzbekistan", "VUT" => "Vanuatu", "VAT" => "Vatican City State (Holy See)", "VEN" => "Venezuela", "VNM" => "Viet Nam", "VGB" => "Virgin Islands (British)", "VIR" => "Virgin Islands (U.S.)", "WLF" => "Wallis and Futuna Islands", "ESH" => "Western Sahara", "YEM" => "Yemen", "YUG" => "Yugoslavia", "ZAR" => "Zaire", "ZMB" => "Zambia", "ZWE" => "Zimbabwe", "UNK" => "** Unknown Country **"); function check_content($form_items) { global $spamText; if (empty($form_items)){ return "Message is not provided by the customer"; }else{ foreach($spamText as $spamWord){ if (stristr($form_items,$spamWord)){ return "{{to be removed}}"; } } $form_items=str_replace("<","<",$form_items); $form_items=str_replace(">",">",$form_items); return $form_items; } } // if submitted form process and send mail if ($REQUEST_METHOD == "POST") { $postWithError = true; // validate user enquiry content if (trim($FirstName) != "" && trim($LastName) != "" && trim($CompanyName) != "" && trim($Telephone) != "" && strlen($FirstName) < 40 && strlen($LastName) < 40 && strlen($CompanyName) < 50 && strlen($Telephone) < 15){ // check correctness of State foreach($stateValue as $eachState => $eachStateName){ if ($State == $eachState){ $State = $eachStateName; $postWithError = false; break; } } if (!$postWithError){ $postWithError = true; // check correctness of Country foreach($countryValue as $eachCountry => $eachCountryName){ if ($Country == $eachCountry){ $Country = $eachCountryName; $postWithError = false; break; } } if (!$postWithError){ //$sendto = "sales@it-missions.com"; // target email $sendto = "philip_ma@it-missions.com"; $subject = "Enquiry from in-order web site"; $body= "WEB ENQUIRY
". "

An enquiry was sent from in-order web site.  Here are the information...
". "

First Name*...:
".check_content($FirstName). "
Last Name*....:
".check_content($LastName). "
Title.........:
".check_content($Title). "
Company*......:
".check_content($CompanyName). "
Company URL...:
".check_content($CompanyURL). "
Address 1.....:
".check_content($Address1). "
Address 2.....:
".check_content($Address2). "
City..........:
".check_content($City). "
State.........:
".check_content($State). "
Zip Code......:
".check_content($ZipCode). "
Country.......:
".check_content($Country). "
Telephone*....:
".check_content($Telephone). "
Fax...........:
".check_content($FAX). "
Email.........:
".check_content($Email). "

Content:
".check_content($Message)."
"; if (strstr($body,"{{to be removed}}")){ $postWithError = true; }else{ mail($sendto, $subject, $body, "To: ".$sendto."\n" ."From: Web Enquiry\n" ."MIME-Version: 1.0\n" ."Content-type: text/html; charset=big5"); } } } } } ?>
Enquiry

Message is not accept because of invalid content!

Please check and input again.

\n"); echo("
\n");
        echo("
"); }else{ // if submitted form display sent message echo("

Message Sent!

Thank you for your enquiry

\n"); echo("
\n");
//        echo("$message");
        echo("
"); } } else { // if not display form ?>
*First name:
*Last name:
Title:
*Company name:
Company URL:
Address:
City:
State/Province:

Zip Code:
*Country/Area:
*Telephone:
Fax:
E-mail address:
Message: