コード例 #1
0
//$tpl->assign('user_list', $user_list);
$tpl->assign('order_user_list', $ordered_user_list);
$tpl->assign('total_search_skills', $count_skills);
if (!empty($skills)) {
    $counter = 0;
    foreach ($skills as $hidden_skill_id) {
        $form->addElement('hidden', 'hidden_skills[]', $hidden_skill_id);
        $counter++;
    }
}
if (!empty($skills)) {
    foreach ($skills as $my_skill) {
        $total_skills_to_search[$my_skill] = $my_skill;
    }
}
$total_skills_to_search = $skill->get_skills_info($total_skills_to_search);
$action = isset($_REQUEST['a']) ? $_REQUEST['a'] : null;
$id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : null;
switch ($action) {
    case 'remove_skill':
        $new_skill = array();
        foreach ($skills as $skill_id) {
            if ($id != $skill_id) {
                $new_skill[] = $skill_id;
            }
        }
        $skills = $new_skill;
        Session::write('skills', $skills);
        break;
    case 'load_profile':
        $skill_profile = new SkillRelProfile();