Example #1
0
$next_url = sanitize_local_url(get_str('next_url', true));
if (defined('SECURE_URL_BASE') && strstr(SECURE_URL_BASE, "https://") && !$_SERVER['HTTPS']) {
    Header("Location: " . SECURE_URL_BASE . "/create_account_form.php?next_url={$next_url}");
    exit;
}
page_head(tra("Create an account"), null, null, null, IE_COMPAT_MODE);
$config = get_config();
if (parse_bool($config, "disable_account_creation")) {
    echo "\n        <h1>" . tra("Account creation is disabled") . "</h1>\n        <p>" . tra("Account creation is currently disabled. Please try again later.") . "</p>\n    ";
    page_tail();
    exit;
}
// CMC check for RAMP
$isramp = strstr($next_url, "ramp");
$nwac = parse_bool($config, "no_web_account_creation");
if (!$wac && !$isramp && !no_computing()) {
    echo "<p>\n        <b>" . tra("NOTE: If you use the BOINC Manager, don't use this form. Just run BOINC, select Add Project, and enter an email address and password.") . "</b></p>\n    ";
}
echo "\n    <p>\n    <form action=\"create_account_action.php\" method=\"post\">\n    <input type=hidden name=next_url value=\"{$next_url}\">\n";
$teamid = get_int("teamid", true);
if ($teamid) {
    $team = lookup_team($teamid);
    $user = lookup_user_id($team->userid);
    if (!$user) {
        echo "No such user";
    } else {
        echo "<b>" . tra("This account will belong to the team %1 and will have the project preferences of its founder.", "<a href=\"team_display.php?teamid={$team->id}\">{$team->name}</a>") . "</b><p>";
        echo "\n            <input type=\"hidden\" name=\"teamid\" value=\"{$teamid}\">\n        ";
    }
}
start_table();
Example #2
0
require_once '../inc/account.inc';
require_once '../inc/countries.inc';
require_once '../inc/translation.inc';
require_once '../inc/recaptchalib.php';
check_get_args(array("next_url", "teamid"));
$next_url = sanitize_local_url(get_str('next_url', true));
redirect_to_secure_url("create_account_form.php?next_url={$next_url}");
$config = get_config();
if (parse_bool($config, "disable_account_creation")) {
    error_page("This project is not accepting new accounts");
}
if (parse_bool($config, "no_web_account_creation")) {
    error_page("This project has disabled Web account creation");
}
page_head(tra("Create an account"), null, null, null, recaptcha_get_head_extra());
if (!no_computing()) {
    echo "<p>\n        <b>" . tra("NOTE: If you use the BOINC Manager, don't use this form. Just run BOINC, select Add Project, and enter an email address and password.") . "</b></p>\n    ";
}
$teamid = get_int("teamid", true);
if ($teamid) {
    $team = BoincTeam::lookup_id($teamid);
    $user = BoincUser::lookup_id($team->userid);
    if (!$user) {
        error_page("Team {$team->name} has no founder");
        $teamid = 0;
    } else {
        echo "<b>" . tra("This account will belong to the team %1 and will have the project preferences of its founder.", "<a href=\"team_display.php?teamid={$team->id}\">{$team->name}</a>") . "</b><p>";
    }
}
create_account_form($teamid, $next_url);
page_tail();
require_once '../inc/recaptchalib.php';
check_get_args(array("next_url", "teamid"));
$next_url = sanitize_local_url(get_str('next_url', true));
if (defined('SECURE_URL_BASE') && strstr(SECURE_URL_BASE, "https://") && !$_SERVER['HTTPS']) {
    Header("Location: " . SECURE_URL_BASE . "/create_account_form.php?next_url={$next_url}");
    exit;
}
page_head(tra("Create an account"), null, null, null, IE_COMPAT_MODE);
$config = get_config();
if (parse_bool($config, "disable_account_creation")) {
    echo "\n        <h1>" . tra("Account creation is disabled") . "</h1>\n        <p>" . tra("Account creation is currently disabled. Please try again later.") . "</p>\n    ";
    page_tail();
    exit;
}
$nwac = parse_bool($config, "no_web_account_creation");
if (!$nwac && !no_computing()) {
    echo "<p>\n        <b>" . tra("NOTE: If you use the BOINC Manager, don't use this form. Just run BOINC, select Add Project, and enter an email address and password.") . "</b></p>\n    ";
}
echo "\n    <p>\n    <form action=\"create_account_action.php\" method=\"post\">\n    <input type=hidden name=next_url value=\"{$next_url}\">\n";
$teamid = get_int("teamid", true);
if ($teamid) {
    $team = lookup_team($teamid);
    $user = lookup_user_id($team->userid);
    if (!$user) {
        echo "No such user";
    } else {
        echo "<b>" . tra("This account will belong to the team %1 and will have the project preferences of its founder.", "<a href=\"team_display.php?teamid={$team->id}\">{$team->name}</a>") . "</b><p>";
        echo "\n            <input type=\"hidden\" name=\"teamid\" value=\"{$teamid}\">\n        ";
    }
}
start_table();