$value) { unset($conf); $conf->name = $name; $conf->value = $value; if ($current = get_record("config", "name", $name)) { $conf->id = $current->id; if (! update_record("config", $conf)) { notify("Could not update $name to $value"); } } else { if (! insert_record("config", $conf)) { notify("Error: could not add new variable $name !"); } } } redirect("auth.php", get_string("changessaved"), 1); exit; } else { foreach ($err as $key => $value) { $focus = "form.$key"; } } } /// Otherwise fill and print the form. if (!isset($config)) { $config = $CFG; } $modules = get_list_of_plugins("auth"); foreach ($modules as $module) { $options[$module] = get_string("auth_$module"."title", "auth"); } asort($options); if (isset($_GET['auth'])) { $auth = $_GET['auth']; } else { $auth = $config->auth; } if (! isset($config->guestloginbutton)) { $config->guestloginbutton = 1; } $guestoptions[0] = get_string("hide"); $guestoptions[1] = get_string("show"); $stradministration = get_string("administration"); $strauthentication = get_string("authentication"); $strauthenticationoptions = get_string("authenticationoptions","auth"); $strsettings = get_string("settings"); print_header("$site->shortname: $strauthenticationoptions", "$site->fullname", "$stradministration -> $strauthenticationoptions", "$focus"); echo "
"; echo "
"; print_string("auth_$auth"."description", "auth"); echo "
guestloginbutton: | ";
echo ""; choose_from_menu($guestoptions, "guestloginbutton", $config->guestloginbutton, ""); echo " | "; echo ""; print_string("showguestlogin","auth"); echo " |