|
Solicitudes de informacion general por correo electronico: trim($_POST['emailName']), "emailAddress" => trim($_POST['emailAddress']), "emailSubject" => trim($_POST['emailSubject']), "emailComments" => trim($_POST['emailComments']), "sendCopy" => trim($_POST['sendCopy'])); // build array of survey information if (trim($_POST['industryBreed']) == "(Por favor especifique)") { $industryBreed = ""; } else { $industryBreed = trim($_POST['industryBreed']); } if (trim($_POST['industryOther']) == "(Por favor especificar)") { $industryOther = ""; } else { $industryOther = trim($_POST['industryOther']); } if (trim($_POST['discipline']) == "(Por favor especificar)") { $discipline = ""; } else { $discipline = trim($_POST['discipline']); } if ($_POST['industry'] != "") { while (list($key, $val) = each($_POST['industry'])) { $industry .= "$val, "; } $industry = ltrim(rtrim($industry, ", "), "Array"); } $surveyInfo = array("Gender" => trim($_POST['gender']), "Age" => trim($_POST['age']), "City" => trim($_POST['city']), "Province" => trim($_POST['province']), "Country" => trim($_POST['country']), "Income" => trim($_POST['income']), "Horsemanship" => trim($_POST['horsemanship']), "Industry" => $industry, "IndustryBreed" => $industryBreed, "IndustryOther" => $industryOther, "Discipline" => $discipline, "Timeframe" => trim($_POST['timeframe']), "Comments" => trim($_POST['comments'])); if (!(empty($_POST['emailName']) || empty($_POST['emailAddress']) || empty($_POST['emailSubject']) || empty($_POST['emailComments']))) { // submission can be sent // send email to Cuatro L call_user_func('sendEmail', $emailInfo, $surveyInfo); // send email to user if ($emailInfo['sendCopy']) { call_user_func('sendCopy', $emailInfo, $surveyInfo); } } else { // form is incomplete $msgToUser = "Por favor complete toda la información requerida."; call_user_func('displayForm', $emailInfo, $surveyInfo, $msgToUser); } } else { // first time here $surveyInfo = array("IndustryBreed" => "(Por favor especifique)", "IndustryOther" => "(Por favor especificar)", "Discipline" => "(Por favor especificar)"); call_user_func('displayForm', $emailInfo, $surveyInfo, $msgToUser); } ?> |