示例#1
0
    $pref['auth_noconn'] = 0;
}
// Convert prefs
if (isset($pref['auth_nouser'])) {
    $pref['auth_method2'] = 'none';
    // Default to no fallback
    if ($pref['auth_nouser']) {
        $pref['auth_method2'] = 'e107';
    }
    unset($pref['auth_nouser']);
    if (!isset($pref['auth_badpassword'])) {
        $pref['auth_badpassword'] = 0;
    }
    save_prefs();
}
$authlist = alt_auth_get_authlist();
if (isset($pref['auth_extended'])) {
    $authExtended = explode(',', $pref['auth_extended']);
} else {
    $pref['auth_extended'] = '';
    $authExtended = array();
}
if (isset($message)) {
    e107::getRender()->tablerender('', "<div style='text-align:center'><b>" . $message . "</b></div>");
}
$text = "\n<div>\n<form method='post' action='" . e_SELF . "'>\n<table class='table adminform'>\n    \t<colgroup span='2'>\n    \t\t<col class='col-label' />\n    \t\t<col class='col-control' />\n    \t</colgroup>\n<tr>\n<td>" . LAN_ALT_1 . ": </td>\n<td>" . alt_auth_get_dropdown('auth_method', $pref['auth_method'], 'e107') . "\n</td>\n</tr>\n\n<tr>\n<td>" . LAN_ALT_78 . ":<br /></td>\n<td>\n<select class='tbox' name='auth_badpassword'>";
$sel = !$pref['auth_badpassword'] ? "" : " selected = 'selected' ";
$text .= "<option value='0' {$sel} >" . LAN_ALT_FAIL . "</option>";
$sel = $pref['auth_badpassword'] ? " selected = 'selected' " : "";
$text .= "<option value='1' {$sel} >" . LAN_ALT_FALLBACK . "</option>\n</select><div class='smalltext field-help'>" . LAN_ALT_79 . "</div>\n</td>\n</tr>\n\n<tr>\n<td>" . LAN_ALT_6 . ":<br /></td>\n<td>\n<select class='tbox' name='auth_noconn'>";
$sel = !$pref['auth_noconn'] ? '' : " selected = 'selected' ";
示例#2
0
function alt_auth_adminmenu()
{
    global $authlist;
    echo " ";
    if (!is_array($authlist)) {
        $authlist = alt_auth_get_authlist();
    }
    define("ALT_AUTH_ACTION", "main");
    $var['main']['text'] = LAN_ALT_31;
    $var['main']['link'] = e_PLUGIN . "alt_auth/alt_auth_conf.php";
    show_admin_menu("alt auth", ALT_AUTH_ACTION, $var);
    $var = array();
    foreach ($authlist as $a) {
        if ($a != 'e107') {
            $var[$a]['text'] = LAN_ALT_30 . $a;
            $var[$a]['link'] = e_PLUGIN . "alt_auth/{$a}_conf.php";
        }
    }
    show_admin_menu(LAN_ALT_29, ALT_AUTH_ACTION, $var);
}