*** empty log message ***

svn path=/trunk/boinc/; revision=4334
This commit is contained in:
David Anderson 2004-10-15 23:46:24 +00:00
parent 52c51fbae4
commit bc2a5037f5
7 changed files with 41 additions and 10 deletions

View File

@ -18451,3 +18451,16 @@ Lana 15 Oct 2004
sched/
transitioner.C
David 15 Oct 2004
- debugged "clone account" feature
html/
inc/
result.inc
user.inc
user/
account_setup_first.php
account_setup_nonfirst_action.php
create_account_action.php
create_account_form.php

View File

@ -22,7 +22,7 @@ function result_granted_credit_string($result, $string_to_show) {
return $string_to_show;
}
case 2: return "---"; //Couldn't send
case 3: return "-!-"; //Client error
case 3: return "---"; //Client error
case 4: return "---"; //No reply
case 5: return "---"; //Didn't need
default: return $string_to_show;
@ -46,6 +46,7 @@ function result_outcome_string($s) {
case 3: return "Client error";
case 4: return "No reply";
case 5: return "Didn't need";
case 6: return "Couldn't validate - missing file";
}
return "Unknown";
}

View File

@ -108,6 +108,10 @@ function show_user_info_private($user) {
);
}
function show_clone_url($user) {
$url = URL_BASE."create_account_form.php?userid=$user->id";
row2("Clone account URL<br><font size=-2>create accounts with the same team and project preferences as this account</font>", "<a href=$url>$url</a>");
}
// show summary of dynamic and static info (public)
function show_user_summary_public($user) {
row1("Account data for $user->name");
@ -136,6 +140,7 @@ function show_user_summary_public($user) {
if ($user->has_profile) {
row2("Profile", "<a href=view_profile.php?userid=$user->id>view</a>");
}
show_clone_url($user);
}
// show a summary of the user.
@ -150,6 +155,7 @@ function show_user_page_private($user) {
row2("", "<a href=logout.php>Log out</a>");
row2("Account number<br><font size=-2>Used in URLs</font>", $user->id);
row2("Cross-project ID", $user->cross_project_id);
show_clone_url($user);
end_table();
}

View File

@ -25,8 +25,11 @@ echo "
";
$global_prefs = default_prefs_global();
global_prefs_update($user, $global_prefs);
$project_prefs = default_prefs_project();
project_prefs_update($user, $project_prefs);
if (strlen($user->project_prefs) == 0) {
$project_prefs = default_prefs_project();
project_prefs_update($user, $project_prefs);
}
echo "<form action=account_setup_first_action.php>
<table cellpadding=6>

View File

@ -8,7 +8,7 @@ db_init();
$user = get_logged_in_user();
$prefs = prefs_parse_global($user->global_prefs);
$prefs = prefs_parse_project($user->project_prefs);
prefs_resource_parse_form($prefs);
venue_parse_form($user);
project_prefs_update($user, $prefs);

View File

@ -28,9 +28,7 @@ function show_error($str) {
$userid = $_POST["userid"];
if ($userid) {
$result = mysql_query("select * from user where id=$userid");
$clone_user = mysql_fetch_object($result);
mysql_free_result($result);
$clone_user = lookup_user_id($userid);
if (!$clone_user) {
echo "User $userid not found";
exit();

View File

@ -30,9 +30,19 @@ echo "
<form action=create_account_action.php method=post>
";
if ($userid) {
echo "
<input type=hidden name=userid value=$userid>
";
$user = lookup_user_id($userid);
if (!$user) {
echo "No such user";
} else {
echo "This account will have
the same team and project preferences as
<a href=show_user.php?userid=$userid>$user->name</a>.
<p>
";
echo "
<input type=hidden name=userid value=$userid>
";
}
}
start_table();
row2(