$value){
$values[$key] = htmlentities($value);
}
$values2 = $values;
// Attempt to defend against header injections:
$badStrings = array(“/content-type[[:space:]]*:/i”,
“/mime-version[[:space:]]*:/i”,
“/content-transfer-encoding[[:space:]]*:/i”,
“/(to|from|bcc|cc)[[:space:]]*:.*@/i”,
“/[\n\r]subject[[:space:]]*:/i”);
// Loop through each POST’ed value and test if it contains one of the $badStrings:
foreach($values2 as $k => $v){
foreach($badStrings as $v2){
if(preg_match($v2, strtolower($v))) {
header(“HTTP/1.0 403 Forbidden”);
$errors[] = ‘1’;
exit;
}
}
}
$values3 = $values;
foreach ($values3 as $ky=>$vl) {
$values[$ky] = strip_tags($vl);
}
$errors = array();
/*
if (!$values[‘title’]) $errors[] = “Please enter a job title.”;
if (!$values[‘name’]) $errors[] = “Please enter a contact name.”;
if (!$values[’email’]) $errors[] = “Please enter a contact email address.”;
else if (!eregi(“^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$”, $values[’email’]))
$errors[] = “Please enter a valid email address.”;
if (!$values[‘phone’]) $errors[] = “Please enter a contact phone number.”;
if (!strlen(trim($values[‘description’]))) $errors[] = “Please enter a description.”;
*/
if ($values[‘job_submit’] && !count($errors)) {
// Send notification email
$msg = “A new job ad has been submitted to DerivSource:”;
$msg .= “\n\nRelationship: “.htmlentities(stripslashes($values[‘relationship’]));
$msg .= “\nJob Title: “.htmlentities(stripslashes($values[‘title’]));
$msg .= “\nCompany Name: “.htmlentities(stripslashes($values[‘company’]));
$msg .= “\nContact Name: “.htmlentities(stripslashes($values[‘name’]));
$msg .= “\nEmail Address: “.htmlentities(stripslashes($values[’email’]));
$msg .= “\nPhone Number: “.htmlentities(stripslashes($values[‘phone’]));
$msg .= “\nReference No.: “.htmlentities(stripslashes($values[‘reference’]));
$msg .= “\nSalary: “.htmlentities(stripslashes($values[‘salary’]));
$msg .= “\nLocation: “.htmlentities(stripslashes($values[‘location’]));
$msg .= “\nEmployment Type: “.htmlentities(stripslashes($values[‘jobtype’]));
$msg .= “\nDescription: “.htmlentities(stripslashes($values[‘description’]));
mail(‘info@derivsource.com’, ‘[DerivSource | Jobs] New Job Ad Submission!’, $msg, “From: \”DerivSource\”
// mail(‘bkieffer@gmail.com’, ‘[DerivSource | Jobs] New Job Ad Submission!’, $msg, “From: \”DerivSource\”
}
?>
Contact Us
Thank you for submitting your job ad. We will contact you shortly after we have reviewed the ad.
Submit a Job Ad