Exemple #1
0
            simple_set_toggle($feature, USERS_PKG_NAME);
        }
    }
}
$httpSettings = array('site_https_login' => array('label' => "Allow secure (https) login", 'type' => "checkbox", 'note' => ""), 'site_https_login_required' => array('label' => "Require secure (https) login", 'type' => "checkbox", 'note' => ""), 'site_http_domain' => array('label' => "HTTP server name", 'type' => "text", 'note' => ""), 'site_http_port' => array('label' => "HTTP port", 'type' => "text", 'note' => ""), 'site_http_prefix' => array('label' => "HTTP URL prefix", 'type' => "text", 'note' => ""), 'site_https_domain' => array('label' => "HTTPS server name", 'type' => "text", 'note' => ""), 'site_https_port' => array('label' => "HTTPS port", 'type' => "text", 'note' => ""), 'site_https_prefix' => array('label' => "HTTPS URL prefix", 'type' => "text", 'note' => ""));
$gBitSmarty->assign('httpSettings', $httpSettings);
if (!empty($_REQUEST["httpprefs"])) {
    foreach (array_keys($httpSettings) as $feature) {
        if ($httpSettings[$feature]['type'] == 'text') {
            simple_set_value($feature, USERS_PKG_NAME);
        } else {
            simple_set_toggle($feature, USERS_PKG_NAME);
        }
    }
}
$listHash = array();
// This needs to be made more generic so that it picks up all plugins
// Could not see where the 'auth_ldap' was defined in the $options['avail'] array
$options = BaseAuth::getConfig();
if (!empty($_REQUEST["auth_ldap"])) {
    $option_ldap = $options['avail']['ldap']['options'];
    foreach (array_keys($option_ldap) as $feature) {
        if ($option_ldap[$feature]['type'] == 'text') {
            simple_set_value($feature, USERS_PKG_NAME);
        } else {
            simple_set_toggle($feature, USERS_PKG_NAME);
        }
    }
}
$gBitSmarty->assign('authSettings', BaseAuth::getConfig());