示例#1
0
 //	$data[] = array($job->lang['specialty'], $tpl->selection($job->GetSpecialties($edit['sphere_id']), 'specialty_id', $edit['specialty_id'], 'id="specialty_id"'));
 $data[] = array($job->lang['specialty'], $tpl->InputText('specialty', empty($edit['sphere_id']) ? $job->lang['sel_sphere'] : $edit['specialty'], 'id="specialty"'));
 if ($job->use_country) {
     $data[] = array($job->lang['country'], $tpl->selection($job->GetCountries('add'), 'country_id', $edit['country_id'], "id='country_id'"));
 }
 if ($job->use_city) {
     $data[] = array($job->lang['city'], $tpl->selection($job->GetCities($edit['country_id']), 'city_id', $edit['city_id'], "id='city_id'"));
 }
 foreach (Vacancy::$fields as $field_name => $values_array) {
     $data[] = array($job->lang[$field_name], $tpl->selection(array("" => $job->lang['no_show']) + $values_array, $field_name, $edit[$field_name]));
 }
 $data[] = array($job->lang['sex'], $tpl->selection(array(0 => $job->lang['no_show'], "M" => $job->lang['sex_man'], "W" => $job->lang['sex_woman']), 'sex', $edit['sex']));
 $data[] = array($job->lang['age'], $job->lang['from'] . $tpl->InputText('age_min', $edit['age_min'], 'size=10') . $job->lang['to'] . $tpl->InputText('age_max', $edit['age_max'], 'size=10'));
 $data[] = array($job->lang['salary'], $job->lang['from'] . $tpl->InputText('salary_min', $edit['salary_min'], 'size=10') . $job->lang['to'] . $tpl->InputText('salary_max', $edit['salary_max'], 'size=10') . " " . $tpl->selection(Job::$currecy_array, 'currency', $edit['currency']), $job->lang['salary_desc']);
 $data[] = array($job->lang['description'], $tpl->TextArea('description', $edit['description'], 'style="width:70%;height:80px;"'));
 foreach ($xfields->DecodeFields($edit['xfields']) as $fid => $field) {
     if (!empty($auto->lang[$field['title']])) {
         $field['title'] = $auto->lang[$field['title']];
     }
     $data[] = array($field['title'], $field['html'], $field['description']);
 }
 $data[] = array($job->lang['company'], $tpl->selection(array("" => $job->lang['vac_no_company']) + $job->GetCompaniesArray(), 'company_id', $edit['company_id'], 'id="company"'));
 $cdata[] = array($job->lang['contact_person'], $tpl->InputText('contact_person', $edit['contact_person']));
 $cdata[] = array($job->lang['email'], $tpl->InputText('email', $edit['email']));
 $cdata[] = array($job->lang['phone'], $tpl->InputText('phone', $edit['phone']));
 $tpl->echo = TRUE;
 if ($job->Errors) {
     $tpl->OpenTable();
     echo $job->lang['current_errors'] . "<ol>";
     foreach ($job->Errors as $error) {
         echo "<li>" . $error . "</li>";