Beispiel #1
0
        $course = new EfrontCourse($_GET['deactivate_course']);
        $course->course['active'] = 0;
        $course->persist();
        echo "0";
    } catch (Exception $e) {
        handleAjaxExceptions($e);
    }
    exit;
} elseif (isset($_GET['activate_course']) && eF_checkParameter($_GET['activate_course'], 'id')) {
    try {
        if (!$_change_) {
            throw new Exception(_UNAUTHORIZEDACCESS);
        }
        $course = new EfrontCourse($_GET['activate_course']);
        $course->course['active'] = 1;
        $course->persist();
        echo "1";
    } catch (Exception $e) {
        handleAjaxExceptions($e);
    }
    exit;
} else {
    if (isset($_GET['ajax']) && isset($_GET['edit_course']) && $_change_) {
        try {
            $editCourse = new EfrontCourse($_GET['edit_course']);
            $smarty->assign('T_EDIT_COURSE', $editCourse);
            //Perform ajax operations
            if ($_GET['ajax'] == 'skillsTable') {
                $skills = $editCourse->getSkills();
                $dataSource = $skills;
                $tableName = 'skillsTable';