user_exists == 0) { $page = "error"; $smarty->assign('error_header', 639); $smarty->assign('error_message', 44300765); $smarty->assign('error_submit', 641); include "footer.php"; } $task = rc_toolkit::get_request('task','main'); $result = ""; $rc_validator = new rc_validator(); $rc_resume = new rc_resume($user->user_info[user_id]); //if($user->level_info[level_skill_allow] == 0) { header("Location: user_home.php"); exit(); } if ($task == 'dosave') { $resumes = $_POST['resume']; // rc_toolkit::debug($resumes,'resumes'); foreach ($resumes as $eid=>$resume) { if (strlen($resume['resume_position'])==0) { $rc_resume->delete($eid); } elseif ($eid == 'new') { $rc_resume->insert($resume); $actions->actions_add($user, "newresume", Array($user->user_info['user_username'], $user->user_displayname, $resume['resume_position']), Array(), 0, false, "user", $user->user_info['user_id'], $user->user_info['user_privacy']); } else { $rc_resume->update($eid,$resume); } } $result = 44300764; } $limit_count_resume=2; $resumes = $rc_resume->get_resumes(); $total_resume = count($resumes); $duration=10; //every 10 days must reassign $starttime = time(); $dateexpired = $starttime + 86400 * $duration; if ($total_resume<$limit_count_resume){ $resumes['new'] = array( 'resume_id' => 'new', 'resume_resumecat_id' => '', 'resume_position' => '', 'resume_salary' => '', 'resume_description' => '', 'resume_blank' => '', 'resume_ready_move' => '', 'resume_employment_type' => '', 'resume_dateexpired' => '$time' ); } //rc_toolkit::debug($resumes,"resumes"); $leveloptions = array(); foreach (range(1, 3) as $number) { $leveloptions[$number] = $number; } // GET FIELDS $field = new se_field("business", $business->businessvalue_info); $field->cat_list(0, 0, 0, "", "", ""); $cat_array = $field->cats; //rc_toolkit::debug($cat_array,"is_error=$is_error cat_array"); //rc_toolkit::debug($selected_fields,"selected_fields"); //rc_toolkit::debug($selected_cat_array,"businesscat_id=$businesscat_id selected_cat_array"); //rc_toolkit::debug($cat_array,"is_error=$is_error cat_array"); //print_r($foroptions); //print_r($yearoptions); $foroptions1 = array(); foreach (explode('|',SE_Language::_get(44300813)) as $v) { $foroptions1[$v] = $v; } $foroptions2 = array(); foreach (explode('|',SE_Language::_get(44300809)) as $v) { $foroptions2[$v] = $v; } $smarty->assign('foroptions1',$foroptions1); $smarty->assign('foroptions2',$foroptions2); $smarty->assign('leveloptions',$leveloptions); // ASSIGN VARIABLES AND INCLUDE FOOTER $smarty->assign('total_resume', $total_resume); $smarty->assign_by_ref('cats', $cat_array); $smarty->assign('is_error', $rc_validator->has_errors()); $smarty->assign('error_message', join(" ",$rc_validator->get_errors())); $smarty->assign('result', $result); $smarty->assign('resumes', $resumes); $smarty->assign('rc_resume', $rc_resume); $smarty->assign('limit_resume', $limit_count_resume); $smarty->assign('dateexpired', $dateexpired); $smarty->assign('duration', $duration); include "footer.php"; ?>