Example #1
0
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
//
// This file was modified by contributors of "BOINC Web Tweak" project.
// Users are taken here after creating an account via the Wizard.
// They've already entered an email address and password.
// Now get a name, country, and zip code
require_once '../inc/boinc_db.inc';
require_once '../inc/util.inc';
require_once '../inc/countries.inc';
require_once '../inc/translation.inc';
$auth = get_str("auth");
$user = lookup_user_auth($auth);
if (!$user) {
    error_page("no such account");
}
page_head("Finish account setup");
?>
<form action="account_finish_action.php" method="post"><?php 
start_table();
row2(tra("Name") . '<br /><span class="description">' . tra("Identifies you on our web site. Use your real name or a nickname.") . '</span>', '<input name="name" size="30" value="$user->name">');
row2_init(tra("Country") . '<br /><span class="description">' . tra("Select the country you want to represent, if any.") . '</span>', '<select name="country">');
print_country_select();
echo "</select></td></tr>\n";
row2(tra("Postal or ZIP Code") . '<br /><span class="description">' . tra("Optional") . '</span>', '<input name="postal_code" size="20">');
row2('', '<input type="submit" value="OK">');
end_table();
echo '
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
//
// This file was modified by contributors of "BOINC Web Tweak" project.
require_once "../inc/forum.inc";
require_once "../inc/image.inc";
// Avatar scaling
if (post_str("account_key", true) != null) {
    $user = lookup_user_auth(post_str("account_key"));
    $rpc = true;
} else {
    $user = get_logged_in_user();
    $rpc = false;
}
BoincForumPrefs::lookup($user);
if (post_str("action", true) == "reset_confirm") {
    page_head("Confirm reset");
    echo "This action will erase any changes you have made\r\n\t\tin your community preferences.\r\n\t\tTo cancel, click your browser's Back button.\r\n\t\t<p>\r\n\t\t<form action=edit_forum_preferences_action.php method=post>\r\n\t\t<input type=hidden name=action value=reset>\r\n\t\t<input type=submit value=\"Reset preferences\">\r\n\t\t</form>\r\n\t";
    page_tail();
    exit;
}
// If the user has requested a reset of preferences;
// preserve a few fields.
//
Example #3
0
    if (time() - $t > 86400) {
        error_page("Link has expired;\r\n\t\t\tgo <a href=get_passwd.php>here</a> to\r\n\t\t\tget a new login link by email.");
    }
    send_cookie('auth', $user->authenticator, true);
    Header("Location: home.php");
    exit;
}
// check for account key case.
// see if key is in URL; if not then check for POST data
//
$authenticator = get_str("key", true);
if (!$authenticator) {
    $authenticator = post_str("authenticator", true);
}
if (!$authenticator) {
    error_page("You must supply an account key");
}
if (substr($user->authenticator, 0, 1) == 'x') {
    //User has been bad so we are going to take away ability to post for awhile.
    error_page("This account has been administratively disabled.");
}
$user = lookup_user_auth($authenticator);
if (!$user) {
    page_head("Login failed");
    echo "There is no account with that authenticator.\r\n\t\tPlease <a href=get_passwd.php>try again</a>.\r\n\t";
    page_tail();
} else {
    Header("Location: {$next_url}");
    $perm = $_POST['stay_logged_in'];
    send_cookie('auth', $authenticator, $perm);
}
Example #4
0
require_once "../inc/team.inc";
$xml = get_int('xml', true);
if ($xml) {
    require_once "../inc/xml.inc";
    xml_header();
    $retval = db_init_xml();
    if ($retval) {
        xml_error($retval);
    }
    $teamid = get_int("teamid");
    $team = BoincTeam::lookup_id($teamid);
    if (!$team) {
        xml_error(-136);
    }
    $account_key = get_str('account_key', true);
    $user = lookup_user_auth($account_key);
    $show_email = $user && is_team_founder($user, $team);
    echo "<users>\n";
    $users = BoincUser::enum_fields("id, email_addr, send_email, name, total_credit, expavg_credit, has_profile, donated, country, cross_project_id, create_time, url", "teamid={$team->id}");
    //$users = BoincUser::enum("teamid=$team->id");
    foreach ($users as $user) {
        show_team_member($user, $show_email);
    }
    echo "</users>\n";
    exit;
}
$user = get_logged_in_user();
$teamid = get_int("teamid");
$plain = get_int("plain", true);
$team = BoincTeam::lookup_id($teamid);
if (!$team) {