require_once("front_global.php");
require_once ("classes/tools/debug.php");
require_once ("classes/tools/arrs.php");
start_page ("lib", "candidates", 0);
include ('header.php');
include ('footer.php');
//print_r($_POST);
if (!empty($_POST['do'])) {
//$_POST['user_email_login'] = $_POST['mail'];
$userdata = new CANDIDATE($_POST);
$userdata->save();
//debug::dump($userdata);
//debug::dump($db);
$message = "Thank you for your registration on MenaGlobalRecruitment.com!
You can now login with your e-mail address : ".$userdata->get('mail')." and password you provided during your registration.
Best Regards / Salutations / Vriendelijke groet,
MENA Global Recruitment
Internship & Recruitment Services Middle East and North Africa
T: 0031 (0)20 411 99 14
M: 0031 (0)6 24 92 17 97
E: info@menaglobalrecruitment.com
W: www.menaglobalrecruitment.com
Skype: menaglobalrecruitment";
require_once('classes/tools/mail.php');
new Mail($userdata->get('mail'), "Registration confirmation", $message);
$sentToMENA = 2;
if ($userdata->get('id') > 1) {
$countries = Registry::get('countries');
$countries_list = $countries->select();
$country_id = $userdata->get('country');
if (!empty($countries_list[$country_id])) $country = $countries_list[$country_id]->get('printable_name');
else $country = 'no country';
$message = "There is a new candidate registration on MenaGlobalRecruitment.com!
Name: " . $userdata->get('first_name') . ' ' . $userdata->get('family_name') . '.';
//require_once('classes/tools/mail.php');
new Mail('info@menaglobalrecruitment.com', "New Candidate Registration - " . $userdata->get('first_name') . ' ' . $userdata->get('family_name') . ' from ' . $country, $message);
new Mail('prinyo@gmail.com', "New Candidate Registration - " . $userdata->get('first_name') . ' ' . $userdata->get('family_name') . ' from ' . $country, $message);
$sentToMENA = 1;
}
$message = "There is a new candidate registration on MenaGlobalRecruitment.com!
Name: " . $sentToMENA. " - " .$userdata->get('first_name') . ' ' . $userdata->get('family_name') . '.' . serialize($_POST) . ' ' . mysql_error();
//require_once('classes/tools/mail.php');
//new Mail('prinyo@gmail.com', "Candidate Registration Form - MENA Global Recruitment", $message);
front_page_start('Register');
echo '