Example #1
0
        $sdel = $_POST['sdel'];
    } else {
        $sdel = '';
    }
    $skill->setValue('operatorid', $_POST['Operator_ID']);
    print "full authlist<br>";
    print_r($authlist);
    $authlist = json_decode($authlist);
    print "individual authlist<br>";
    if ($authlist != '') {
        $i = 0;
        $l = count($authlist);
        while ($i < $l) {
            $skill->setValue('skillgroupid', $authlist[$i][0]);
            $skill->setValue('authorityid', $authlist[$i][1]);
            $skill->saveSkillAuthority();
            $i++;
        }
    }
    if ($sdel != '') {
        foreach ($sdel as $key => $value) {
            $skill->delSkills($value);
        }
    }
} else {
    if (isset($_POST['sdel']) && $_POST['sdel'] != '') {
        if (isset($_POST['sdel'])) {
            $sdel = $_POST['sdel'];
        } else {
            $sdel = '';
        }