<?php if (!defined('DATALIFEENGINE')) { die("Hacking attempt!"); } require ENGINE_DIR . "/job/classes/thumb.class.php"; require_once ENGINE_DIR . '/job/classes/Fields.php'; $validete_array = array("photo" => array("valid" => array("accept" => "'jpeg?|png|gif|jpg'"), "messages" => array("accept" => $job->lang['resume_error_type_image'], "required" => $job->lang['resume_error_photo'])), "sphere_id" => array("valid" => array("required" => "true"), "messages" => array("required" => $job->lang['sel_sphere'])), "specialty_id" => array("valid" => array("required" => "true"), "messages" => array("required" => $job->lang['sel_specialty'])), "country_id" => array("valid" => array("required" => "true"), "messages" => array("required" => $job->lang['sel_country'])), "city_id" => array("valid" => array("required" => "true"), "messages" => array("required" => $job->lang['sel_city'])), "contact_person" => array("valid" => array("required" => "true"))); $PHP_SELF .= "resumes"; $where = empty($_REQUEST['where']) ? array() : $_REQUEST['where']; $edit = ConvertTypeToValue($TABLES['job_resumes']); $per_page = intval(!empty($_REQUEST['per_page'])) ? intval($_REQUEST['per_page']) : 50; $page = intval(!empty($_REQUEST['page'])) ? intval($_REQUEST['page']) : 0; $hidden_array['subaction'] = 'add'; $xfields = new Fields(XFIELDS_RESUME, $job); switch ($subaction) { case "add": $job->NewResume($_POST); if (!$job->Errors) { Cache::ClearHTMLCache('main'); Cache::ClearArrayCache('stats'); $tpl->msg($job->lang['add_resume'], $job->lang['add_resume_ok'], $PHP_SELF); } $edit = $_POST; break; case "edit": if (!$id) { $tpl->msg($job->lang['error'], $job->lang['resume_not_found'], $PHP_SELF); } $edit = $job->GetResumeForEdit($id); ConvertDBResultToType($TABLES['job_resumes'], $edit);
<?php if (!defined('DATALIFEENGINE')) { die("Hacking attempt!"); } $validete_array = array("sphere_id" => array("valid" => array("required" => "true"), "messages" => array("required" => $job->lang['sel_sphere'])), "specialty_id" => array("valid" => array("required" => "true"), "messages" => array("required" => $job->lang['sel_specialty'])), "specialty" => array("valid" => array("required" => "true"), "messages" => array("required" => $job->lang['sel_specialty'])), "country_id" => array("valid" => array("required" => "true"), "messages" => array("required" => $job->lang['sel_country'])), "city_id" => array("valid" => array("required" => "true"), "messages" => array("required" => $job->lang['sel_city'])), "contact_person" => array("valid" => array("no_company" => "true"))); $PHP_SELF .= "vacancies"; $where = empty($_REQUEST['where']) ? array() : $_REQUEST['where']; $edit = ConvertTypeToValue($TABLES['job_vacancies']); $per_page = intval(!empty($_REQUEST['per_page'])) ? intval($_REQUEST['per_page']) : 50; $page = intval(!empty($_REQUEST['page'])) ? intval($_REQUEST['page']) : 0; $hidden_array['subaction'] = 'add'; require_once ENGINE_DIR . '/job/classes/Fields.php'; $xfields = new Fields(XFIELDS_VACANCY, $job); switch ($subaction) { case "add": $job->NewVacancy($_POST); if (!$job->Errors) { Cache::ClearHTMLCache('main'); Cache::ClearArrayCache('stats'); $tpl->msg($job->lang['add_vacancy'], $job->lang['add_vacancy_ok'], $PHP_SELF); } $edit = $_POST; break; case "edit": if (!$id) { $tpl->msg($job->lang['error'], $job->lang['vacancy_not_found'], $PHP_SELF); } $edit = $job->GetVacancyForEdit($id); ConvertDBResultToType($TABLES['job_vacancies'], $edit); foreach (array('age_min', 'age_max', 'salary_min', 'salary_max', 'date_exp') as $field) {
$hidden_array['action'] = "company_save"; break; case "company_del": if (!$id) { $template->msg($job->lang['company_del'], $job->lang['company_not_found']); return 0; } $job->DeleteCompany($id); $template->msg($job->lang['company_del'], $job->lang['company_del_ok']); Cache::ClearHTMLCache('companies', 'main'); Cache::ClearArrayCache('company_obj_' . $id, 'stats'); return 1; break; default: $hidden_array['action'] = "company_doadd"; $edit = ConvertTypeToValue($TABLES['job_companies']); break; } $hidden_array['company_form_code'] = $_SESSION['company_form_code'] = empty($edit['company_form_code']) ? uniqid(microtime(1)) : $edit['company_form_code']; foreach ($job->config['company_need_field'] as $field) { $validete_array[$field]['valid']['required'] = "true"; if (!empty($job->lang['company_error_' . $field])) { $validete_array[$field]['messages']['required'] = $job->lang['company_error_' . $field]; } } if ($job->Errors) { $errors = " <font color=\"red\" >" . $job->lang['isset_error'] . "</font><ol>"; foreach ($job->Errors as $error) { $errors .= "<li>" . $error . "</li>"; } $errors .= "</ol>";