Example #1
0
if (!defined('W2P_BASE_DIR')) {
    die('You should not access this file directly.');
}
// check permissions
$perms =& $AppUI->acl();
if (!canEdit('system')) {
    $AppUI->redirect('m=public&a=access_denied');
}
$reset = (int) w2PgetParam($_GET, 'reset', 0);
if ($reset == 1) {
    $obj =& $AppUI->acl();
    $obj->recalcPermissions();
}
$w2Pcfg = new CConfig();
// retrieve the system configuration data
$rs = $w2Pcfg->loadAll('config_group');
$tab = $AppUI->processIntState('ConfigIdxTab', $_GET, 'tab', 0);
$active = intval(!$AppUI->getState('ConfigIdxTab'));
$titleBlock = new CTitleBlock('System Configuration', 'control-center.png', $m);
$titleBlock->addCrumb('?m=system', 'system admin');
$titleBlock->addCrumb('?m=system&a=addeditpref', 'default user preferences');
$titleBlock->show();
// prepare the automated form fields based on db system configuration data
$output = null;
$last_group = '';
foreach ($rs as $c) {
    $tooltip = $AppUI->_($c['config_name'] . '_tooltip');
    // extraparse the checkboxes and the select lists
    $extra = '';
    $value = '';
    switch ($c['config_type']) {