[END_COT_EXT]
==================== */
defined('COT_CODE') or die('Wrong URL');
require_once cot_incfile('usercategories', 'plug');
$adminhelp = $L['usercategories_help'];
if ($p == 'usercategories' && $row['config_name'] == 'catslimit' && $cfg['jquery']) {
    $sskin = cot_tplfile('usercategories.admin.config', 'plug', true);
    $tt = new XTemplate($sskin);
    $tpaset = str_replace("\r\n", "\n", $row['config_value']);
    $tpaset = explode("\n", $tpaset);
    $jj = 0;
    foreach ($tpaset as $lineset) {
        $lines = explode("|", $lineset);
        $lines[0] = (int) trim($lines[0]);
        $lines[1] = (int) trim($lines[1]);
        $lines[2] = (int) trim($lines[2]);
        if ($lines[0] > 0) {
            $tt->assign(array('ADDNUM' => $jj, 'ADDGROUP' => cot_selectbox_groups($lines[0], 'groupid' . $jj, array(1, 2, 3, 5, 6), 'class="area_groupid"'), 'ADDLIMIT1' => cot_inputbox('text', 'limit1', $lines[1], 'class="area_limit1"'), 'ADDLIMIT2' => cot_inputbox('text', 'limit2', $lines[2], 'class="area_limit2"')));
            $tt->parse('MAIN.ADDITIONAL');
            $jj++;
        }
    }
    if ($jj == 0) {
        $tt->assign(array('ADDNUM' => $jj, 'ADDGROUP' => cot_selectbox_groups('', 'groupid' . $jj, array(1, 2, 3, 5, 6), 'class="area_groupid"'), 'ADDLIMIT1' => cot_inputbox('text', 'limit1', 0, 'class="area_limit1"'), 'ADDLIMIT2' => cot_inputbox('text', 'limit2', 0, 'class="area_limit2"')));
        $tt->parse('MAIN.ADDITIONAL');
    }
    $jj++;
    $tt->assign(array('CATNUM' => $jj));
    $tt->parse('MAIN');
    $t->assign(array('ADMIN_CONFIG_ROW_CONFIG_MORE' => $tt->text('MAIN') . '<div id="helptext">' . $config_more . '</div>'));
}
Example #2
0
        $extp = cot_getextplugins('admin.users.row.tags');
        /* ===== */
        foreach ($sql->fetchAll() as $row) {
            $members[$row['grp_id']] = empty($members[$row['grp_id']]) ? '0' : $members[$row['grp_id']];
            $grp_title = isset($L['users_grp_' . $row['grp_id'] . '_title']) ? $L['users_grp_' . $row['grp_id'] . '_title'] : htmlspecialchars($row['grp_title']);
            $grp_desc = isset($L['users_grp_' . $row['grp_id'] . '_desc']) ? $L['users_grp_' . $row['grp_id'] . '_desc'] : htmlspecialchars($row['grp_desc']);
            $t->assign(array('ADMIN_USERS_ROW_GRP_TITLE_URL' => cot_url('admin', 'm=users&n=edit&g=' . $row['grp_id']), 'ADMIN_USERS_ROW_GRP_NAME' => htmlspecialchars($row['grp_name']), 'ADMIN_USERS_ROW_GRP_TITLE' => $grp_title, 'ADMIN_USERS_ROW_GRP_DESC' => $grp_desc, 'ADMIN_USERS_ROW_GRP_ID' => $row['grp_id'], 'ADMIN_USERS_ROW_GRP_COUNT_MEMBERS' => $members[$row['grp_id']], 'ADMIN_USERS_ROW_GRP_DISABLED' => $cot_yesno[!$row['grp_disabled']], 'ADMIN_USERS_ROW_GRP_SKIPRIGHTS' => $row['grp_skiprights'], 'ADMIN_USERS_ROW_GRP_RIGHTS_URL' => cot_url('admin', 'm=rights&g=' . $row['grp_id']), 'ADMIN_USERS_ROW_GRP_JUMPTO_URL' => cot_url('users', 'g=' . $row['grp_id'])));
            /* === Hook - Part2 : Include === */
            foreach ($extp as $pl) {
                include $pl;
            }
            /* ===== */
            $t->parse('MAIN.ADMIN_USERS_DEFAULT.USERS_ROW');
        }
    }
    $t->assign(array('ADMIN_USERS_FORM_URL' => cot_url('admin', 'm=users&n=add'), 'ADMIN_USERS_NGRP_NAME' => cot_inputbox('text', 'rname', '', 'size="40" maxlength="64"'), 'ADMIN_USERS_NGRP_TITLE' => cot_inputbox('text', 'rtitle', '', 'size="40" maxlength="64"'), 'ADMIN_USERS_NGRP_DESC' => cot_inputbox('text', 'rdesc', '', 'size="40" maxlength="64"'), 'ADMIN_USERS_NGRP_ICON' => cot_inputbox('text', 'ricon', '', 'size="40" maxlength="128"'), 'ADMIN_USERS_NGRP_ALIAS' => cot_inputbox('text', 'ralias', '', 'size="40" maxlength="24"'), 'ADMIN_USERS_NGRP_DISABLED' => cot_radiobox(0, 'rdisabled', array(1, 0), array($L['Yes'], $L['No'])), 'ADMIN_USERS_NGRP_MAINTENANCE' => cot_radiobox(0, 'rmtmode', array(1, 0), array($L['Yes'], $L['No'])), 'ADMIN_USERS_NGRP_SKIPRIGHTS' => cot_radiobox(0, 'rskiprights', array(1, 0), array($L['Yes'], $L['No'])), 'ADMIN_USERS_NGRP_RLEVEL' => cot_selectbox(50, 'rlevel', range(0, 99), range(0, 99), false), 'ADMIN_USERS_FORM_SELECTBOX_GROUPS' => cot_selectbox_groups(4, 'rcopyrightsfrom', array('5'))));
    /* === Hook === */
    foreach (cot_getextplugins('admin.users.add.tags') as $pl) {
        include $pl;
    }
    /* ===== */
    $t->parse('MAIN.ADMIN_USERS_DEFAULT');
}
$t->assign(array('ADMIN_USERS_URL' => cot_url('admin', 'm=config&n=edit&o=module&p=users'), 'ADMIN_USERS_EXTRAFIELDS_URL' => cot_url('admin', 'm=extrafields&n=' . $db_users)));
cot_display_messages($t);
/* === Hook  === */
foreach (cot_getextplugins('admin.users.tags') as $pl) {
    include $pl;
}
/* ===== */
$t->parse('MAIN');
Example #3
0
    }
}
$jj = 1;
/* === Hook for the plugins === */
foreach (cot_getextplugins('admin.rights.main') as $pl) {
    include $pl;
}
/* ===== */
$adminpath[] = array(cot_url('admin', 'm=users'), $L['Users']);
$adminpath[] = array(cot_url('admin', 'm=users&n=edit&g=' . $g), $cot_groups[$g]['name']);
$adminpath[] = array(cot_url('admin', 'm=rights&g=' . $g), $L['Rights']);
$advanced && ($adminpath[] = array(cot_url('admin', 'm=rights&g=' . $g . '&advanced=1'), $L['More']));
$adminsubtitle = $L['Rights'];
$adv_columns = $advanced ? 8 : 4;
// Common tags
$t->assign(array('ADMIN_RIGHTS_FORM_URL' => cot_url('admin', 'm=rights&a=update&g=' . $g . $adv_for_url), 'ADMIN_RIGHTS_ADVANCED_URL' => cot_url('admin', 'm=rights&g=' . $g . '&advanced=1'), 'ADMIN_RIGHTS_SELECTBOX_GROUPS' => cot_selectbox_groups(4, 'ncopyrightsfrom', array('5', $g)), 'ADMIN_RIGHTS_ADV_COLUMNS' => $adv_columns, 'ADMIN_RIGHTS_4ADV_COLUMNS' => 4 + $adv_columns));
// Preload module langfiles
foreach ($cot_modules as $code => $mod) {
    if (file_exists(cot_langfile($code, 'module'))) {
        require_once cot_langfile($code, 'module');
    }
}
// The core and modules top-level
$sql = $db->query("SELECT a.*, u.user_name FROM {$db_auth} AS a \nLEFT JOIN {$db_core} AS c ON c.ct_code=a.auth_code\nLEFT JOIN {$db_users} AS u ON u.user_id=a.auth_setbyuserid\nWHERE auth_groupid='{$g}' AND auth_option = 'a' AND (c.ct_plug = 0 || c.ct_plug IS NULL)\nORDER BY auth_code ASC");
while ($row = $sql->fetch()) {
    $ico = '';
    if ($row['auth_code'] == 'admin') {
        $link = cot_url($row['auth_code']);
        $title = $L['Administration'];
    } elseif ($row['auth_code'] == 'message') {
        $link = '#';
[BEGIN_COT_EXT]
Hooks=admin.config.edit.loop
[END_COT_EXT]
==================== */
/**
 * plugin User Group Selector for Cotonti Siena
 * 
 * @package usergroupselector
 * @version 1.0.0
 * @author CMSWorks Team
 * @copyright Copyright (c) CMSWorks.ru, littledev.ru
 * @license BSD
 *  */
defined('COT_CODE') or die('Wrong URL');
require_once cot_langfile('usergroupselector', 'plug');
$adminhelp = $L['usergroupselector_help'];
if ($p == 'usergroupselector' && $row['config_name'] == 'groups' && $cfg['jquery']) {
    $sskin = cot_tplfile('usergroupselector.admin.config', 'plug', true);
    $tt = new XTemplate($sskin);
    $tpaset = explode(",", $row['config_value']);
    $jj = 0;
    foreach ($tpaset as $k) {
        $tt->assign(array('ADDNUM' => $jj, 'ADDGROUP' => cot_selectbox_groups($k, 'group' . $jj, array(1, 2, 3, 5, 6))));
        $tt->parse('MAIN.ADDITIONAL');
        $jj++;
    }
    $jj++;
    $tt->assign(array('CATNUM' => $jj));
    $tt->parse('MAIN');
    $t->assign(array('ADMIN_CONFIG_ROW_CONFIG' => cot_config_input($row['config_name'], $row['config_type'], $row['config_value'], $row['config_variants']) . $tt->text('MAIN')));
}