예제 #1
0
        $group->group['active'] = 0;
        $group->persist();
        echo "0";
    } catch (Exception $e) {
        handleAjaxExceptions($e);
    }
    exit;
} elseif (isset($_GET['activate_user_group']) && eF_checkParameter($_GET['activate_user_group'], 'id')) {
    if (isset($currentUser->coreAccess['groups']) && $currentUser->coreAccess['groups'] != 'change') {
        echo urlencode(_UNAUTHORIZEDACCESS);
        exit;
    }
    try {
        $group = new EfrontGroup($_GET['activate_user_group']);
        $group->group['active'] = 1;
        $group->persist();
        echo "1";
    } catch (Exception $e) {
        handleAjaxExceptions($e);
    }
    exit;
} elseif (isset($_GET['add_user_group']) || isset($_GET['edit_user_group']) && eF_checkParameter($_GET['edit_user_group'], 'id')) {
    if (isset($_GET['edit_user_group'])) {
        $currentGroup = new EfrontGroup($_GET['edit_user_group']);
        $smarty->assign("T_CURRENT_GROUP", $currentGroup);
        if (G_VERSIONTYPE != 'community') {
            #cpp#ifndef COMMUNITY
            $smarty->assign("T_STATS_LINK", array(array('text' => _STATISTICS, 'image' => "16x16/reports.png", 'href' => basename($_SERVER['PHP_SELF']) . "?ctg=statistics&option=groups&sel_group=" . $_GET['edit_user_group'], 'target' => '_self')));
        }
        #cpp#endif
        if ($currentGroup->group['key_max_usage'] > 0) {