'', // Return reason
'rcp'=>'Denken Recruitment '
);
CleanPost();
Form_Check($glob);
?>
Careers - Join Denken :: Denken Partners
Applicant
“Denken provides an unparalleled opportunity to grow
your personal and professional abilities. It offers an
amazing and diverse experience, with a fantastic and
motivated team.”
Careers
Join Denken
We are keen to meet people who bring energy and passion to their careers and
bring new perspectives to our business.
If you have the necessary academic and professional background and can demonstrate
that you are what we are
looking for then please complete the form, below, including a cover
letter and resumé and we will get in touch.
';
/*** DEBUG:BEGIN *************************************************/
/**/ if(__TJ_DBG) { $to = 'Tester 1 '; }
/*** DEBUG:END ***************************************************/
// Validate data fields
$name = trim($_POST['you']); if (empty($name)) {$retv = 'Please enter your name.'; $ok = false; break;}
$tele = trim($_POST['phn']); if (empty($tele) || strlen($tele) < 11) {$retv = 'Please enter a valid phone number.'; $ok = false; break;}
if (preg_match('/^[a-z0-9&\'\.\-_\+]+@[a-z0-9\-]+\.([a-z0-9\-]+\.)*[a-z]+$/i', $send = $_POST['ema']) == 0) {$retv = 'Please enter a valid email address.'; $ok = false; break;}
$part = ucfirst(trim($_POST['prt'])); if ($part != 'Yes' && $part != 'No') {$retv = "Please choose 'yes' or 'no' for the two questions (P:$part)."; $ok = false; break;}
$work = ucfirst(trim($_POST['exi'])); if ($work != 'Yes' && $work != 'No') {$retv = "Please choose 'yes' or 'no' for the two questions (W:$work)."; $ok = false; break;}
// Validate uploaded files
if (Upload_Check($retv) !== true) {$ok = false; break;}
$cov =& $_FILES['cov'];
$res =& $_FILES['res'];
// MIME stuff
$boundary = '----=DKN'.md5(date('r'));
// Mail out
$date = date('r'); // RFC 822 format: Wed, 20 Jun 2001 12:34:56 -0400
$subj = 'Application from: '.$name;
$hdrs = 'From: '.$from."\r\n"
.'Reply-To: '.(preg_match('/[^a-z0-9 ]/i', $name)?'"'.addslashes($name).'"':$name).' <'.$send.">\r\n"
.'Date: '.$date."\r\n"
."Mime-Version: 1.0\r\n"
."Content-Type: multipart/mixed; \r\n"
."\tboundary=\"{$boundary}\"\r\n";
$mesg = << "'%FILE%' cannot be larger than %LIMIT%. Please use a smaller file.",
UPLOAD_ERR_FORM_SIZE => "'%FILE%' exceeded the upload limit of %LIMIT%. Please use a smaller file.",
UPLOAD_ERR_PARTIAL => "'%FILE%' was cut off mid-upload. Please try again.",
UPLOAD_ERR_NO_FILE => "A %WHAT% is required for all applicants. Please include one.",
UPLOAD_ERR_NO_TMP_DIR => "A server issue (NTD) restricted your file from uploading. Please inform an administrator.",
UPLOAD_ERR_CANT_WRITE => "A server issue (CW) restricted your file from uploading. Please inform an administrator.",
UPLOAD_ERR_BAD_TYPE => "Your %WHAT% must be in one of the following formats: %TYPES%."
);
static $types = null; if(is_null($types)) $types = explode(', ', strtolower(__LIMIT_TYPES));
static $zLim = array(' bytes',' Kb',' Mb',' Gb',' Tb');
static $zLen = null; if(is_null($zLen)) $zLen = count($zLim);
$limsuf = 0; $file['size_fmt'] = $file['size'];
while($file['size_fmt']>=1024 && $limsuf<$zLen) { $file['size_fmt'] /= 1024.0; $limsuf++; }
$file['size_fmt'] = sprintf('%.1d %s', round($file['size_fmt'], 1), $zLim[$limsuf]);
$path = pathinfo($file['name']);
$file['basename'] = $path['basename'];
if ($file['error'] == UPLOAD_ERR_OK) {
// Check to see if it's above our internal limit or of the wrong filetype
if ($file['size'] > $limit)
$file['error'] = UPLOAD_ERR_FORM_SIZE; // Force error
elseif (!in_array(strtolower($path['extension']), $types)) {
$file['error'] = UPLOAD_ERR_BAD_TYPE; // Force error
}
else
return true; // A-Ok! :D
}
// If we got here, there's a problem...
$limsuf = 0;
while($limit>=1024 && $limsuf<$zLen) { $limit /= 1024.0; $limsuf++; } $limit = round($limit, 1);
$retv = str_replace(
array('%FILE%','%WHAT%','%LIMIT%','%TYPES%'),
array($file['basename'], $what, $limit.' '.$zLim[$limsuf], __LIMIT_TYPES),
$zFails[$file['error']]
);
return false;
}
//=============================================================================//
function CleanPost()
{
if (!get_magic_quotes_gpc()) return;
function CPass(&$z) { foreach($z as $k => $v) { if (is_array($v)) CPass($z[$k]); else $z[$k] = stripslashes($v); } }
foreach(array('POST','REQUEST','GET','COOKIE') as $v)
if(array_key_exists("_$v",$GLOBALS)) CPass($GLOBALS["_$v"]);
}
//=============================================================================//
?>