.
require_once("../inc/util.inc");
require_once("../inc/xml.inc");
xml_header();
// This all needs to work even when DB is down.
// So cache list of platforms in a file,
// and update it every hour if possible.
//
function show_platforms() {
$xmlFragment = unserialize(get_cached_data(3600, "project_config_platform_xml"));
if ($xmlFragment==false){
$platforms = BoincDB::get()->enum_fields("platform, DBNAME.app_version, DBNAME.app", "BoincPlatform", "platform.name, platform.user_friendly_name, plan_class", "app_version.platformid = platform.id and app_version.appid = app.id and app_version.deprecated=0 and app.deprecated=0 group by platform.name, plan_class", "");
$xmlFragment = " ";
foreach ($platforms as $platform){
$xmlFragment .= "
$platform->name
$platform->user_friendly_name";
if ($platform->plan_class) $xmlFragment .= "
$platform->plan_class\n";
$xmlFragment .= "
";
}
$xmlFragment .= "\n \n";
set_cached_data(3600, serialize($xmlFragment), "project_config_platform_xml");
}
echo $xmlFragment;
}
$config = get_config();
$long_name = parse_config($config, "");
$min_passwd_length = parse_config($config, "");
if (!$min_passwd_length) {
$min_passwd_length = 6;
}
$disable_account_creation = parse_bool($config, "disable_account_creation");
$master_url = parse_config($config, "");
echo "
$long_name
$master_url
".secure_url_base()."
";
$local_revision = @trim(file_get_contents("../../local.revision"));
if ($local_revision) {
echo "$local_revision\n";
}
if (web_stopped()) {
echo "
".ERR_PROJECT_DOWN."
1
";
} else {
echo " 0\n";
}
if ($disable_account_creation || defined('INVITE_CODES')) {
echo " \n";
}
if (defined('INVITE_CODES')) {
echo " \n";
}
echo " $min_passwd_length\n";
if (sched_stopped()) {
echo " 1\n";
} else {
echo " 0\n";
}
$min_core_client_version = parse_config($config, "");
if ($min_core_client_version) {
echo "$min_core_client_version\n";
}
show_platforms();
$tou_file = "../../terms_of_use.txt";
if (file_exists($tou_file)) {
$terms_of_use = trim(file_get_contents($tou_file));
if ($terms_of_use) {
echo " \n$terms_of_use\n\n";
}
}
if (LDAP_HOST) {
echo "\n";
}
echo "";
?>