Contact Us

If you would like a free quotation for your moving needs, please fill out the booking request form.

STEVE DRESSLER

Telephone: +852.2803.2561
Mobile Phone Number: +852.9489.9979

 

// ################### CONFIG ###################

error_reporting(0);

// CSS classes & styles
$classError = "error"; // class for error messages below input fields
$classTxt = "text"; // class for field caption cell
$classField = "field"; // class for input/textarea field cell
$classInputbutton = "inputButton"; // class for submit button
$classInputline = "inputLine"; // class for input lines
$classInputfield = "inputField"; // class for textareas

$styleInputline = "width:320px;"; // add. styles for input lines
$styleInputfield = "width:320px; height:80px;"; // add. styles for textareas
$styleInputbutton = "width:130px;"; // add. styles for submit button
$styleInputradio = "vertical-align:middle;"; // add. styles for radio input fields
$styleInputselect = "width:325px;";

// email
$targetAddress = "info@tradewindstransport.com, steve@tradewindstransport.com";
$emailSubject = "Contact Us Form - (Tradewindstransport.Com)";

// misc text
$txtSend = "SUBMIT";
$txtMandatory = "required";
$msgDate = "Date";
$dateFormat = "d. M Y, H:i";
$txtRemainingChars = "Remaining chars:";

// indent for field values in email message
$msgIndent = 15;

// errors (above/below the field)
$posError = "above";

//thank you messages
$txtThankyou = "

Thanks for contacting us! You will receive a response within 24 hours.
We look forward to serving your moving needs.

 

Best regards,
Steve Dressler & Team Trade Winds
852.2803.2561 office
852.9489.9979 mobile

Where Moving’s A Breeze!

“;

$fields[] = array(“Full Name: “, “fullname”, “line”, “”, “*”, “Please enter your Full Name”);
$fields[] = array(“Email: “, “email”, “line”, “email”, “*”, “Please enter a valid Email address”);
$fields[] = array(“Subject: “, “subject”, “line”, “”, “”, “Please enter your subject”);
$fields[] = array(“How did you hear about Tradewinds: “, “how”, “select”, “{– please choose –|}{Referred by a friend}{AsiaXpat.com}{Google}{Yahoo}{Bing}{Others}”, “*”, “Please select one”);
$fields[] = array(“Message”, “message”, “field”, “”, “*”, “Please enter a message or comments”);

// ################ END CONFIG ##########################################################
// #######################################################################################

$version = “1.5″;
$errorPointer = ($posError == “above”) ? “↓ ” : “↑ “;

function spaces($num, $fill=” “){
$foo=”";
for ($i=0; $i<$num; $i++) $foo.=$fill;
return $foo;
}

function isValidEmail($addr){
if(eregi("^[a-z0-9]+([_.-][a-z0-9]+)*@([a-z0-9]+([.-][a-z0-9]+)*)+\\.[a-z]{2,4}$", $addr))
return true;
else
return false;
}

function jsCharCount(){
if ($GLOBALS['cfCharCountFunc'] != 1){
$html = "\n";
$GLOBALS['cfCharCountFunc'] = 1;
return $html;
}
}

// start form evaluation
unset($error);
if ($_REQUEST['do']=="send"){

$error = false;
$fromAddress = "";
$message = "";

foreach ($fields as $field){
if ($field[4] == "*"){
if ($field[3] == "email"){
if (!isValidEmail($_REQUEST[$field[1]])) $error[$field[1]] = $field[5];
}else{
if ($_REQUEST[$field[1]] == "" || $_REQUEST[$field[1]] == " " || $_REQUEST[$field[1]] == " ") $error[$field[1]] = $field[5];
}
}
}

if ($error === false){

$message = $emailSubject." \n";
for ($i = 0; $i < strlen($emailSubject); $i++) $message .= "*";
$message .= " \n\n$msgDate:".spaces($msgIndent-strlen($msgDate)).date($dateFormat);
foreach ($fields as $field){
if ($field[2] == "divider"){
$message .= "\n-----------------------------------";
}else{
$message .= "\n".$field[0].":".spaces($msgIndent-strlen($field[0]));
if ($field[3] == "email"){
$message .= "mailto:".$_REQUEST[$field[1]];
$fromAddress = "From: ".$_REQUEST[$field[1]];
}else if ($field[2] == "checkbox" || $field[2] == "multiselect"){
$multi = "";
foreach ($_REQUEST[$field[1]] as $val){
$divider = ($multi != "") ? ", " : "";
$multi .= (isset($val) && $val != "") ? $divider.$val : "";
}
$message .= $multi;
}else $message .= $_REQUEST[$field[1]];
}
$message .= " ";
}

mail($targetAddress, $emailSubject, $message, $fromAddress);
//echo "

$message

";
echo $txtThankyou;

}

}

if ($error!==false){

$html = "";

// draw form
$html .= "

\n";
$html .= "
\n";

foreach ($fields as $field){

$htmlError = "";
$htmlField = "";

if ($field[2] == "divider"){
$html .= "

";
}else{
$html .= "

\n

\n";

}

$html .= "

\n";
$html .= "

\n";
$html .= "

".$field[0]."
".$field[0].$field[4]."  ";
}

switch ($field[2]){

case "line":
$htmlField = "
";
if (isset($error[$field[1]])) $htmlError = "

".$errorPointer.$error[$field[1]]."

";
$html .= ($posError == "above") ? $htmlError.$htmlField : $htmlField.$htmlError;
break;

case "field":

if (is_numeric($field[3])){
$attrVal = "cfCount('cf_".$field[1]."', 'cf_remchars_".$field[1]."', ".$field[3].")";
$attr = "onkeydown=\"$attrVal\" onkeyup=\"$attrVal\"";
}else $attr = "";

$htmlField .= "\n";
if (is_numeric($field[3])){
$remChars = (isset($_REQUEST[$field[1]])) ? ($field[3] - strlen($_REQUEST[$field[1]])) : $field[3];
$htmlField .= jsCharCount()."
$txtRemainingChars ".$remChars."";
}

if (isset($error[$field[1]])) $htmlError .= "

".$errorPointer.$error[$field[1]]."

";
$html .= ($posError == "above") ? $htmlError.$htmlField : $htmlField.$htmlError;
break;

case "radio":
preg_match_all("/\{(.*?)\}/", $field[3], $foo);
$options = $foo[1];
$i=1;
foreach ($options as $opt){
$opt = explode("|", $opt);
$label = $opt[0];
$value = (isset($opt[1])) ? $opt[1] : $opt[0];
$checked = ($_REQUEST[$field[1]] == $value) ? "checked" : "";
$htmlField .= "
  ";
$i++;
}
if (isset($error[$field[1]])) $htmlError .= "

".$errorPointer.$error[$field[1]]."

";
$html .= ($posError == "above") ? $htmlError.$htmlField : $htmlField.$htmlError;
break;

case "checkbox":
preg_match_all("/\{(.*?)\}/", $field[3], $foo);
$options = $foo[1];
$i=1;
foreach ($options as $opt){
$opt = explode("|", $opt);
$label = $opt[0];
$value = (isset($opt[1])) ? $opt[1] : $opt[0];
$checked = ($_REQUEST[$field[1]][($i)] == $value) ? "checked" : "";
$htmlField .= "
  ";
$i++;
}
if (isset($error[$field[1]])) $htmlError .= "

".$errorPointer.$error[$field[1]]."

";
$html .= ($posError == "above") ? $htmlError.$htmlField : $htmlField.$htmlError;
break;

case "select":
preg_match_all("/\{(.*?)\}/", $field[3], $foo);
$options = $foo[1];
$i=1;
$htmlField .= "\n

\n";
if (isset($error[$field[1]])) $htmlError .= "

".$errorPointer.$error[$field[1]]."

";
$html .= ($posError == "above") ? $htmlError.$htmlField : $htmlField.$htmlError;
break;

case "multiselect":
preg_match_all("/\{(.*?)\}/", $field[3], $foo);
$options = $foo[1];
$i=1;
$htmlField .= "\n

\n";
if (isset($error[$field[1]])) $htmlError .= "

".$errorPointer.$error[$field[1]]."

";
$html .= ($posError == "above") ? $htmlError.$htmlField : $htmlField.$htmlError;
break;
}

$html .= "

  * $txtMandatory
  \n";
$html .= "

\n";
$html .= "

\n";

echo $html;

}
/*
######################### END Contact Form ##########################
#####################################################################
*/
?>