} } $smarty->assign('career_selected', $career_selected); if (is_array($_POST['txt_experience']) && !empty($_POST['txt_experience'])) { $experience_selected = array(); foreach ($_POST['txt_experience'] as $key => $value) { $experience_selected[] = $value; $job->fk_experience_id = (int) $value; } } $smarty->assign('experience_selected', $experience_selected); ###############localtion $_SESSION['loc']['citycode'] = $job->city = stripHTMLTags($_POST['txtcity']); $_SESSION['loc']['countycode'] = $job->county = stripHTMLTags($_POST['txtcounty']); $_SESSION['loc']['stateprovince'] = $job->state_province = stripHTMLTags($_POST['txtstateprovince']); $_SESSION['loc']['country'] = $job->country = stripHTMLTags($_POST['txt_country']); if (is_array($_POST['txt_category']) && !empty($_POST['txt_category'])) { $category_selected = array(); foreach ($_POST['txt_category'] as $key => $value) { $category_selected[] = $value; } } $job->category = (int) sizeof($_POST['txt_category']); $smarty->assign('category_selected', $category_selected); //try to save data if ($job->save()) { $job_id = (int) $database->insert_id(); if (is_array($_POST['txt_job_type']) && !empty($_POST['txt_job_type'])) { foreach ($_POST['txt_job_type'] as $key => $value) { $type_added = Job2Type::make($job_id, $value); $type_added->save();
} $smarty->assign('experience', $experience_t); } $categories = Category::find_all(); if (is_array($categories) and !empty($categories)) { $category_t = array(); foreach ($categories as $category) { $category_t[$category->id] = $category->cat_name; } $smarty->assign('category', $category_t); } ///when button is press run this if (isset($_POST['bt_add'])) { $_SESSION['add_job']['job_ref'] = $job->job_ref = $_POST['txt_ref_code']; $job->var_name = $job->mod_write_check($_POST['txt_job_title'], $old_var_name); $_SESSION['add_job']['job_title'] = $job->job_title = strip_html(stripHTMLTags($_POST['txt_job_title'])); $_SESSION['add_job']['job_desc'] = $job->job_description = allowedTags($_POST['txt_job_desc']); $_SESSION['add_job']['job_postion'] = $job->job_postion = $_POST['txt_position']; $_SESSION['add_job']['salary'] = $job->job_salary = $_POST['txt_salary']; $_SESSION['add_job']['freq'] = $job->salaryfreq = $_POST['txt_salaryfreq']; $_SESSION['add_job']['cname'] = $job->contact_name = $_POST['txt_contact_name']; $_SESSION['add_job']['tn'] = $job->contact_telephone = $_POST['txt_telephone']; $_SESSION['add_job']['sl'] = $job->site_link = $_POST['txt_site_link']; $_SESSION['add_job']['email'] = $job->poster_email = $_POST['txt_email']; $_SESSION['add_job']['jsd'] = $job->start_date = $_POST['txt_start_date']; if (is_array($_POST['txt_job_type']) && !empty($_POST['txt_job_type'])) { $type_selected = array(); foreach ($_POST['txt_job_type'] as $key => $value) { $type_selected[] = $value; } }
die; } if (EMPLOYER_REG == "N" || EMPLOYER_REG == "0" || EMPLOYER_REG == false) { $session->message("<div class='error'>" . format_lang('error', 'regNotAllowed') . "</div>"); redirect_to(BASE_URL . "employer/login/"); die; } if (isset($_POST['bt_register'])) { $employer = new Employer(); $_SESSION['add_emp']['com_name'] = $employer->company_name = $company_name = $_POST['txt_company_name']; $employer->var_name = $employer->mod_write_check($_POST['txt_company_name'], null); $_SESSION['add_emp']['contactName'] = $employer->contact_name = $contact_name = $_POST['txt_contact_name']; $_SESSION['add_emp']['url'] = $employer->site_link = $site = $_POST['txt_site']; $_SESSION['add_emp']['comDesc'] = $employer->company_desc = $company_desc = allowedTags($_POST['txt_company_desc']); $_SESSION['add_emp']['email'] = $employer->email_address = $email = stripHTMLTags($_POST['txt_email']); $_SESSION['add_emp']['username'] = $employer->username = $username = stripHTMLTags($_POST['txt_username']); $_SESSION['add_emp']['pass'] = $employer->passwd = $pass = $_POST['txt_pass']; $_SESSION['add_emp']['confirmPass'] = $employer->confirm_password = $confirm_pass = $_POST['txt_confirm_pass']; $_SESSION['add_emp']['address'] = $employer->address = $address = $_POST['txt_address']; $_SESSION['add_emp']['address2'] = $employer->address2 = $address2 = $_POST['txt_address2']; $employer->city = $_SESSION['loc']['citycode'] = $_POST['txtcity']; $employer->county = $_SESSION['loc']['countycode'] = $_POST['txtcounty']; $employer->state_province = $_SESSION['loc']['stateprovince'] = $_POST['txtstateprovince']; $employer->country = $_SESSION['loc']['country'] = $_POST['txt_country']; $employer->actkey = $key = md5(time()); $_SESSION['add_emp']['pCode'] = $employer->post_code = $pcode = $_POST['txt_pcode']; $_SESSION['add_emp']['tel'] = $employer->phone_number = $tele = $_POST['txt_tele']; if (ENABLE_SPAM_REGISTER && ENABLE_SPAM_REGISTER == 'Y') { if (strtolower($_POST['spam_code']) != strtolower($_SESSION['spam_code']) || (!isset($_SESSION['spam_code']) || $_SESSION['spam_code'] == NULL)) { $employer->CAPTCHA = false; //$_SESSION['CAPTCHA'] = false;