예제 #1
0
    $title = $structure[$row['structure_area']][$row['auth_option']]['tpath'];
    $ico = $cfg['modules_dir'] . '/' . $area . '/' . $area . '.png';
    cot_rights_parseline($row, $title, $link, $ico);
}
if (!empty($area)) {
    $t->assign('RIGHTS_SECTION_TITLE', $L['Module'] . ' ' . $cot_modules[$area]['title'] . ' ' . mb_strtolower($L['Structure']));
    $t->parse('MAIN.RIGHTS_SECTION');
}
$sql->closeCursor();
// Plugin permissions
$sql = $db->query("SELECT a.*, u.user_name FROM {$db_auth} as a\n\tLEFT JOIN {$db_users} AS u ON u.user_id=a.auth_setbyuserid\n\tWHERE auth_groupid='{$g}' AND auth_code='plug'\n\tORDER BY auth_option ASC");
while ($row = $sql->fetch()) {
    $ico = $cfg['plugins_dir'] . '/' . $row['auth_option'] . '/' . $row['auth_option'] . '.png';
    $link = cot_url('admin', 'm=extensions&a=details&pl=' . $row['auth_option']);
    $title = $cot_plugins_enabled[$row['auth_option']]['title'];
    cot_rights_parseline($row, $title, $link, $ico);
}
$sql->closeCursor();
$t->assign('RIGHTS_SECTION_TITLE', $L['Plugins']);
$t->parse('MAIN.RIGHTS_SECTION');
/* === Hook for the plugins === */
foreach (cot_getextplugins('admin.rights.end') as $pl) {
    include $pl;
}
/* ===== */
$adv_for_url = $advanced ? '&advanced=1' : '';
cot_display_messages($t);
/* === Hook === */
foreach (cot_getextplugins('admin.rights.tags') as $pl) {
    include $pl;
}
예제 #2
0
            $adminpath[] = array(cot_url('admin', 'm=structure&n=' . $ic), $L['Structure']);
            $adminpath[] = array(cot_url('admin', 'm=structure&n=' . $ic . '&al=' . $io), $structure[$ic][$io]['title']);
        }
    }
}
//m=extensions&a=details&mod=page
$adminpath[] = array(cot_url('admin', 'm=rightsbyitem&ic=' . $ic . '&io=' . $io), $L['Rights']);
$advanced && ($adminpath[] = array(cot_url('admin', 'm=rightsbyitem&ic=' . $ic . '&io=' . $io . '&advanced=1'), $L['More']));
$adminsubtitle = $L['Rights'];
$adv_columns = $advanced ? 8 : 3;
$adv_columns = !$advanced && $ic == 'page' ? 4 : $adv_columns;
$l_custom1 = $ic == 'page' ? $L['Download'] : $L['Custom'] . ' #1';
while ($row = $sql->fetch()) {
    $link = cot_url('admin', 'm=rights&g=' . $row['auth_groupid']);
    $title = htmlspecialchars($row['grp_name']);
    cot_rights_parseline($row, $title, $link);
}
$sql->closeCursor();
$is_adminwarnings = isset($adminwarnings);
$adv_for_url = $advanced ? '&advanced=1' : '';
$t->assign(array('ADMIN_RIGHTSBYITEM_FORM_URL' => cot_url('admin', 'm=rightsbyitem&a=update&ic=' . $ic . '&io=' . $io . $adv_for_url), 'ADMIN_RIGHTSBYITEM_ADVANCED_URL' => cot_url('admin', 'm=rightsbyitem&ic=' . $ic . '&io=' . $io . '&advanced=1'), 'ADMIN_RIGHTSBYITEM_ADV_COLUMNS' => $adv_columns, 'ADMIN_RIGHTSBYITEM_4ADV_COLUMNS' => 4 + $adv_columns));
cot_display_messages($t);
/* === Hook === */
foreach (cot_getextplugins('admin.rightsbyitem.tags') as $pl) {
    include $pl;
}
/* ===== */
$t->parse('MAIN');
$adminmain = $t->text('MAIN');
$t->parse('RIGHTSBYITEM_HELP');
$adminhelp = $t->text('RIGHTSBYITEM_HELP');