diff --git a/checkin_notes b/checkin_notes index c6590b26da..7c0e093974 100755 --- a/checkin_notes +++ b/checkin_notes @@ -3123,3 +3123,11 @@ David Feb 7 2003 html_user/ account_setup* (new) + +David Feb 8 2003 + - Work on account creation a bit more. + Removed project graphics prefs. + Added email prefs. + + html_user/ + various diff --git a/html/user/account_created.php b/html/user/account_created.php index b87ed2dde7..87996ba988 100644 --- a/html/user/account_created.php +++ b/html/user/account_created.php @@ -13,7 +13,7 @@
- + diff --git a/html/user/account_setup.php b/html/user/account_setup.php index e501b361fd..ec370165e8 100644 --- a/html/user/account_setup.php +++ b/html/user/account_setup.php @@ -9,18 +9,19 @@ $user = get_user_from_auth($authenticator); require_login($user); - page_head("Account configuration"); + page_head("Account setup", $user); echo " -

Account configuration

+

Account setup

".PROJECT." uses the BOINC software system.
BOINC lets you divide your computer time between several distributed computing projects. -
Are you currently participating in other projects that use BOINC? +
Is this your first BOINC project? +
+ This is my first BOINC project

- Yes -

- No + I'm currently participating in another BOINC project +

"; page_tail(); diff --git a/html/user/account_setup_first.php b/html/user/account_setup_first.php index 2639c4d6d5..7cebaa7a0a 100644 --- a/html/user/account_setup_first.php +++ b/html/user/account_setup_first.php @@ -13,21 +13,21 @@ if ($user == NULL) { exit(); } -page_head("Account configuration"); +page_head("Account setup", $user); echo " -

Account configuration

- Thank you for allowing ".PROJECT." to use part of your computer power. +

Account setup

+ Thank you for letting ".PROJECT." use part of your computer power.
- You control when and how your computer is used. + You can control when and how your computer is used.
- We suggest using the defaults - + We suggest using the defaults settings - just go to the bottom and click OK. "; $prefs = default_prefs(); global_prefs_update($user, $prefs); project_prefs_update($user, $prefs); -prefs_form_global($user, $prefs, "account_setup_first_project.php"); +prefs_form_global($user, $prefs, "account_setup_first_email.php"); page_tail(); ?> diff --git a/html/user/account_setup_first_download.php b/html/user/account_setup_first_download.php index d856cb62c0..1c8f629816 100644 --- a/html/user/account_setup_first_download.php +++ b/html/user/account_setup_first_download.php @@ -12,15 +12,12 @@ if ($user == NULL) { exit(); } -page_head("Download BOINC software"); +page_head("Download BOINC software", $user); echo " - Your account is now configured according to your preferences - (you can return to our web site to change your preferences later). -

- The next step is to download the BOINC software. - Click on the kind of computer that you have to download - the appropriate version of BOINC. + Your account setup is complete. +
Next you must download the BOINC software. +
Click on the type of computer that you have:

"; @@ -33,23 +30,23 @@ echo "

  • Windows users: double-click on the downloaded file. This will install BOINC on your computer. -
  • Macintosh OS/X users: xxx +
  • Macintosh OS/X users: BOINC will install itself automatically.
  • Unix and Linux users: Use gunzip and tar to extract BOINC. - When the BOINC software first runs, + When BOINC first runs, it will ask you for a project URL and an account key. Copy and paste the following: - That's it - you're done. - Thanks for participating in ".PROJECT.". - Visit our main page for more information. + This completes the ".PROJECT." installation. +
    Thanks for participating in ".PROJECT.". +
    Visit our main page for more information. "; page_tail(); diff --git a/html/user/account_setup_first_email.php b/html/user/account_setup_first_email.php new file mode 100644 index 0000000000..04fb883458 --- /dev/null +++ b/html/user/account_setup_first_email.php @@ -0,0 +1,24 @@ +Account setup: email options +
    +"; +$prefs = null; +prefs_form_email($prefs, "account_setup_first_download.php"); +page_tail(); + +?> diff --git a/html/user/account_setup_first_project.php b/html/user/account_setup_first_project.php index a173e05bf5..e19cab3acb 100644 --- a/html/user/account_setup_first_project.php +++ b/html/user/account_setup_first_project.php @@ -12,9 +12,9 @@ if ($user == NULL) { print_login_form(); exit(); } -page_head("Account configuration: graphics"); +page_head("Account setup: graphics", $user); echo " -

    Account configuration: graphics

    +

    Account setup: graphics


    ".PROJECT." lets you control the following properties of its graphics. "; diff --git a/html/user/account_setup_nonfirst.php b/html/user/account_setup_nonfirst.php index f6cdf1cf3a..5d91ce7282 100644 --- a/html/user/account_setup_nonfirst.php +++ b/html/user/account_setup_nonfirst.php @@ -12,9 +12,9 @@ if ($user == NULL) { print_login_form(); exit(); } -page_head("Account configuration"); +page_head("Account setup: resource share", $user); echo " -

    Account configuration

    +

    Account setup: resource share


    You can control how your resources (computer time and disk space) are divided @@ -25,7 +25,7 @@ echo " The default resource share is 100. "; $prefs = prefs_parse($user->project_prefs); -prefs_form_resource($prefs, "account_setup_nonfirst_done.php"); +prefs_form_resource($prefs, "account_setup_nonfirst_email.php"); page_tail(); ?> diff --git a/html/user/account_setup_nonfirst_done.php b/html/user/account_setup_nonfirst_done.php index b381ee84d8..baf61e36d8 100644 --- a/html/user/account_setup_nonfirst_done.php +++ b/html/user/account_setup_nonfirst_done.php @@ -12,12 +12,12 @@ if ($user == NULL) { print_login_form(); exit(); } -page_head("Account configuration: last step"); +page_head("Account setup: done", $user); echo " -

    Account configuration: last step

    +

    Account setup: done

    - Your ".PROJECT." account is now set up. -
    Now you must tell your computer about it. + Your account setup is complete. +
    Next you must tell your computer(s) to use this account. - That's it - you're done. - Thanks for participating in ".PROJECT.". - Visit our main page for more information. + This completes the ".PROJECT." installation. +
    Thanks for participating in ".PROJECT.". +
    Visit our main page for more information. "; page_tail(); diff --git a/html/user/account_setup_nonfirst_email.php b/html/user/account_setup_nonfirst_email.php new file mode 100644 index 0000000000..c16aa3bc5b --- /dev/null +++ b/html/user/account_setup_nonfirst_email.php @@ -0,0 +1,24 @@ +Account setup: email options +
    +"; +$prefs = null; +prefs_form_email($prefs, "account_setup_nonfirst_done.php"); +page_tail(); + +?> diff --git a/html/user/account_setup_nonfirst_project.php b/html/user/account_setup_nonfirst_project.php new file mode 100644 index 0000000000..2075fc3d30 --- /dev/null +++ b/html/user/account_setup_nonfirst_project.php @@ -0,0 +1,25 @@ +Account setup: graphics +
    + ".PROJECT." lets you control the following properties of its graphics. +"; +$prefs = null; +prefs_form_project($prefs, "account_setup_nonfirst_done.php"); +page_tail(); + +?> diff --git a/html/user/home.php b/html/user/home.php index bbd958583a..91bdcdc30b 100644 --- a/html/user/home.php +++ b/html/user/home.php @@ -10,7 +10,7 @@ db_init(); $user = get_user_from_auth($authenticator); if ($user) { - page_head("User page for $user->name"); + page_head("User page", $user); show_user_page_private($user); page_tail(); } else { diff --git a/html/user/prefs.inc b/html/user/prefs.inc index e5328cb5d5..a7ca37c3c2 100644 --- a/html/user/prefs.inc +++ b/html/user/prefs.inc @@ -130,7 +130,7 @@ function default_prefs() { $p->confirm_before_connecting = 0; $p->low_water_days = 1; $p->high_water_days = 3; - $p->disk_max_used_gb = 1000; + $p->disk_max_used_gb = 100; $p->disk_max_used_pct = 50; $p->disk_min_free_gb = 1; @@ -158,9 +158,6 @@ function prefs_parse($prefs_xml) { // display preference subsets, with Edit buttons // function prefs_show_global($prefs) { - - echo "

    "; - echo "

  • Copy and paste the account key here:
    Then copy and paste the account key here:
    and click here:
    \n"; echo "".TD2.LG_FONT."Global preferences
    These apply to all BOINC projects in which you participate\n"; if ($prefs->dont_run_on_batteries) { @@ -178,37 +175,50 @@ function prefs_show_global($prefs) { } else { $confirm = "No"; } - row2a("Work if computer on batteries: ", $batteries); - row2a("Work if computer in use: ", $in_use); - row2a("Confirm before connecting to network: ", $confirm); - row2a("Minimum amount of work to buffer: ", "$prefs->low_water_days days"); - row2a("Maximum amount of work to buffer: ", "$prefs->high_water_days days"); - - - echo "

    "; - row2a("Maximum disk space to use: ", "$prefs->disk_max_used_gb GB"); - row2a("Minimum disk space to leave free: ", "$prefs->disk_min_free_gb GB"); - row2a("Maximum % of disk allowed to used: ", "$prefs->disk_max_used_pct %"); + row2a("Work if computer on batteries:", $batteries); + row2a("Work if computer in use:", $in_use); + row2a("Confirm before connecting to network:", $confirm); + row2a("Minimum amount of work to buffer:", "$prefs->low_water_days days"); + row2a("Maximum amount of work to buffer:", "$prefs->high_water_days days"); + row2a("Maximum disk space to use:", "$prefs->disk_max_used_gb GB"); + row2a("Minimum disk space to leave free:", "$prefs->disk_min_free_gb GB"); + row2a("Maximum % of disk allowed to used:", "$prefs->disk_max_used_pct %"); echo "

    \n"; - echo "
    Edit global preferences
    \n"; +} + +function prefs_show_resource($prefs) { + echo "".TD2.LG_FONT."Resource share +
    Control how your resources are divided among BOINC projects\n"; + row2a(PROJECT." resource share:", $prefs->resource_share); + echo "Edit resource share\n"; +} + +function prefs_show_email($prefs) { + echo "".TD2.LG_FONT."Email options +
    Control how ".PROJECT." uses your email address\n"; + row2a("Should ".PROJECT." send you email newsletters?", $prefs->send_email?"Yes":"No"); + row2a("Should ".PROJECT." show your email address on its web site?", $prefs->show_email?"Yes":"No"); + echo "Edit email options\n"; } function prefs_show_project($prefs) { - echo "

    "; - echo "\n"; - echo "".TD2.LG_FONT."Project preferences -
    These apply only to this project\n"; - row2a("Resource Share: ", $prefs->resource_share); - $prefs = project_specific_prefs_parse($prefs->project_specific); + echo "".TD2.LG_FONT."Graphics preferences +
    Customize ".PROJECT." screensaver graphics\n"; project_specific_prefs_show($prefs); - echo "\n"; - echo "
    Edit project preferences
    "; + echo "Edit graphics preferences\n"; } function print_prefs_display($user) { - prefs_show_project(prefs_parse($user->project_prefs)); - prefs_show_resource(prefs_parse($user->project_prefs)); - prefs_show_global(prefs_parse($user->global_prefs)); + echo "\n"; + $global_prefs = prefs_parse($user->global_prefs); + $project_prefs = prefs_parse($user->project_prefs); + $project_specific_prefs = project_specific_prefs_parse($project_prefs->project_specific); + + prefs_show_resource($project_prefs); + prefs_show_project($project_specific_prefs); + prefs_show_email($global_prefs); + prefs_show_global($global_prefs); + echo "
    "; } //////////////////////////////////////////// @@ -270,8 +280,27 @@ function prefs_form_global($user, $prefs, $next_url) { "; } -function prefs_form_resource($prefs_xml, $next_url) { - $prefs = project_specific_prefs_parse($prefs_xml); +function prefs_form_email($prefs, $next_url) { + echo " + + + + + + +
    Should ".PROJECT." send you email newsletters? + "; + printf("Yes \n", $prefs->send_email?"checked":""); + printf("No \n", $prefs->send_email?"":"checked"); + echo "
    Should ".PROJECT." show your email address on its web site? + "; + printf("Yes \n", $prefs->show_email?"checked":""); + printf("No \n", $prefs->show_email?"":"checked"); + echo"

    + "; +} + +function prefs_form_resource($prefs, $next_url) { echo "
    @@ -320,6 +349,12 @@ function prefs_resource_parse_form(&$prefs) { $prefs->resource_share = $resource_share; } +function prefs_email_parse_form(&$prefs) { + parse_str(getenv("QUERY_STRING")); + $prefs->send_email = isset($send_email)?1:0; + $prefs->show_email = isset($show_email)?1:0; +} + function prefs_project_parse_form(&$prefs) { $prefs->project_specific = project_specific_prefs_parse_form(); } diff --git a/html/user/prefs_edit_email_action.php b/html/user/prefs_edit_email_action.php new file mode 100644 index 0000000000..e0bdc2e202 --- /dev/null +++ b/html/user/prefs_edit_email_action.php @@ -0,0 +1,24 @@ +project_prefs); +prefs_email_parse_form($prefs); +project_prefs_update($user, $prefs); +Header("Location: $next_url"); + +?> diff --git a/html/user/prefs_edit_email_form.php b/html/user/prefs_edit_email_form.php new file mode 100644 index 0000000000..e95a1249c8 --- /dev/null +++ b/html/user/prefs_edit_email_form.php @@ -0,0 +1,21 @@ +project_prefs); +prefs_form_email($prefs, "prefs.php"); +page_tail(); + +?> diff --git a/html/user/prefs_edit_form.php b/html/user/prefs_edit_form.php index a84f226c4e..7b5b990ee7 100644 --- a/html/user/prefs_edit_form.php +++ b/html/user/prefs_edit_form.php @@ -12,7 +12,7 @@ if ($user == NULL) { print_login_form(); exit(); } -page_head("Edit preferences"); +page_head("Edit preferences", $user); parse_str(getenv("QUERY_STRING")); $prefs = prefs_parse($user->project_prefs); prefs_form_project($prefs); diff --git a/html/user/prefs_edit_global_form.php b/html/user/prefs_edit_global_form.php index bbd90c4a48..f6edae167c 100644 --- a/html/user/prefs_edit_global_form.php +++ b/html/user/prefs_edit_global_form.php @@ -12,11 +12,18 @@ if ($user == NULL) { print_login_form(); exit(); } -page_head("Edit Global Preferences"); +page_head("Edit global preferences", $user); $prefs = prefs_parse($user->global_prefs); -prefs_form_global($user, $prefs); +echo "

    Edit global preferences

    + These preferences apply to all the BOINC projects + in which you participate. +
    If you participate in multiple BOINC projects, + edit your preferences only one project's web site; +
    otherwise edits may be overwritten. +"; + +prefs_form_global($user, $prefs, "prefs.php"); echo "Back to preferences\n"; -echo "

    \n"; page_tail(); ?> diff --git a/html/user/prefs_edit_project_form.php b/html/user/prefs_edit_project_form.php index b4390aa36b..3e97a7dd6a 100644 --- a/html/user/prefs_edit_project_form.php +++ b/html/user/prefs_edit_project_form.php @@ -12,10 +12,10 @@ if ($user == NULL) { print_login_form(); exit(); } -page_head("Edit project preferences"); +page_head("Edit project preferences", $user); parse_str(getenv("QUERY_STRING")); $prefs = prefs_parse($user->project_prefs); -prefs_form_project($prefs); +prefs_form_project($prefs, "prefs.php"); echo "

    \n"; page_tail(); diff --git a/html/user/prefs_edit_resource_form.php b/html/user/prefs_edit_resource_form.php new file mode 100644 index 0000000000..e28f82bf1c --- /dev/null +++ b/html/user/prefs_edit_resource_form.php @@ -0,0 +1,21 @@ +project_prefs); +prefs_form_resource($prefs, "prefs.php"); +page_tail(); + +?> diff --git a/html/user/project_specific_prefs.inc b/html/user/project_specific_prefs.inc index e434d16f34..6752391bc7 100644 --- a/html/user/project_specific_prefs.inc +++ b/html/user/project_specific_prefs.inc @@ -41,7 +41,7 @@ function project_specific_prefs_parse_form() { // function project_specific_prefs_show($prefs) { echo "

    \n - \n + \n \n \n"; } diff --git a/html/user/user.inc b/html/user/user.inc index 0124e22649..0f1711d90c 100644 --- a/html/user/user.inc +++ b/html/user/user.inc @@ -2,15 +2,15 @@ function show_user_stats($user) { echo TABLE2."\n"; - echo "".TD2.LG_FONT."User Stats:\n"; - $row = sprintf("%s user since: ", $project); + echo "".TD2.LG_FONT."User stats\n"; + $row = sprintf("%s user since", $project); row($row, time_str($user->create_time)); - row("Total credit: ", $user->total_credit); - row("Recent average credit: ", $user->expavg_credit); + row("Total credit", $user->total_credit); + row("Recent average credit", $user->expavg_credit); if ($user->teamid) { $result = mysql_query("select * from team where id = $user->teamid"); $team = mysql_fetch_object($result); - row("Team: ", "id>$team->name"); + row("Team", "id>$team->name"); } else { row("Team: ", "None"); } @@ -19,7 +19,8 @@ function show_user_stats($user) { function show_user_profile($user) { echo TABLE2."\n"; - echo "".TD2.LG_FONT."User Information:\n"; + echo "".TD2.LG_FONT."User information\n"; + row("name", $user->name); row("email address", $user->email_addr); row("country", $user->country); row("postal (ZIP) code", $user->postal_code); @@ -46,10 +47,11 @@ function show_hosts($user) { function show_host_brief($host) { echo " - - - - "; + + + + + "; } // show a summary of the user. diff --git a/html/user/util.inc b/html/user/util.inc index 90e1fea24e..2299ac8460 100644 --- a/html/user/util.inc +++ b/html/user/util.inc @@ -15,7 +15,7 @@ define("TD3", "
    Color scheme:Color scheme:$prefs->color_scheme
    id>$host->domain_name$host->total_credit$host->expavg_credit
    id>$host->domain_name$host->total_credit$host->expavg_credit
    "); define("TABLE", ""); define("VISTABLE", "
    "); -define("TABLE2", "
    "); +define("TABLE2", "
    "); define("BG_COLOR", " bgcolor=ffffff "); define("TITLE_COLOR", " bgcolor=000000 "); @@ -79,13 +79,18 @@ function show_login($user) { } } -function page_head($title) { +function page_head($title, $user=null) { echo "$title\n"; // Put your project title and logo here - echo "

    ".PROJECT."


    \n"; - //echo "

    $title

    \n"; + echo "

    ".PROJECT."

    \n"; + if ($user) { + echo "Logged in as $user->name"; + } else { + echo "
    "; + } + echo "

    \n"; } function page_tail() {