");
- if (!$filename) { echo "CAN'T FIND FILENAMEn $app_version->xml_doc\n";}
- $version = sprintf(
- "BOINC core client, version %s %.2f",
- $platform->name,
- $app_version->version_num/100
- );
- echo "$version |
\n";
- //$app_version->md5_cksum";
- $found = true;
- }
- if (!$found)
- echo "No version found |
";
-
- mysql_free_result($result);
-}
-
$authenticator = init_session();
db_init();
+
page_head("Download the BOINC client");
-
- start_table();
-
- $result = mysql_query("select * from app where name='core client'");
- $core_app = mysql_fetch_object($result);
- mysql_free_result($result);
-
- $result = mysql_query("select * from platform");
- while ($platform = mysql_fetch_object($result)) {
- platform_downloads($platform, $core_app);
- }
- mysql_free_result($result);
- echo "\n\n";
+ echo "
+ To participate in ".PROJECT." you must
+ install BOINC* software on your computer.
+
+ If BOINC is already installed on your computer,
+ finish setting up your account.
+
+ Otherwise download BOINC.
+
+
+ *BOINC is distributed computing software
+ developed at the University of California by
+ the SETI@home project.
+
+ ";
+ print_download_links();
page_tail();
?>
diff --git a/html/user/get_passwd.php b/html/user/get_passwd.php
index f602edffd8..f0656c2a51 100644
--- a/html/user/get_passwd.php
+++ b/html/user/get_passwd.php
@@ -6,22 +6,6 @@ require_once("user.inc");
page_head("Account key");
echo "
Get your ".PROJECT." account key
-
- In order to protect your account from modification by others,
- we require both your account key for access.
-
-
- - Do not give this account key out to anybody! If you get an
- e-mail requesting your account key, please ignore it - it's not from us.
-
- The e-mail address you enter below is where we'll send the
- account key. It should be the same address you enter to log into
- ".PROJECT.". If they aren't the same, we cannot send the account
- key for both security and administrative reasons.
-
- If your BOINC login is not a valid email address, we
- unfortunately cannot help you access your account or your credits.
- You will need to create a new account with a valid e-mail address
- to access any future credit.
-
@@ -31,8 +15,8 @@ echo "Get your ".PROJECT." account key
|
- Your account key will be sent by e-mail to the address you
- entered - you should receive it in a few minutes.
";
+ Your account key will be emailed to this address.
+ You should receive it in a few minutes.
";
page_tail();
diff --git a/html/user/index.php b/html/user/index.php
index b48fe287c8..d5cd9ee1ae 100644
--- a/html/user/index.php
+++ b/html/user/index.php
@@ -6,58 +6,16 @@
page_head("Home page");
?>
-
What we're doing
The Astropulse project, based at UC Berkeley,
uses the idle time of thousands of computers to
analyze radio telescope signals.
-Astropulse uses BOINC,
-which allows you to participate in other
-distributed computing projects at the same time.
How to join Astropulse
-
--
-First, create an account.
-You will be asked for your email address.
-An account key will be emailed to you.
-
- If you don't already have it,
-download the BOINC client.
-Install and run the client, and give it your account key.
-
- If you're already running the BOINC client,
-select the Add project command
-and give it your account key.
+
+Create an account.
-Instructions for beta testers
-When you install and run the BOINC client,
-it will ask you for a project URL and account key.
-Then it should download two work units,
-process them, upload the results,
-and continue doing this forever.
-
-If at any point BOINC is neither computing nor transferring files,
-something is probably wrong;
-submit a bug report (see below).
-
-Windows users:
-The BOINC core client (accessable via its system tray icon)
-has tabs that let you see projects, file transfers,
-work in progress, and messages.
-If you experience bugs, look at the file stderr.txt
-in the BOINC directory.
-If it's nonempty please include it in your bug report.
-
-Unix and Mac OS/X users:
-This version of the client has no GUI,
-and writes to stderr and stdout.
-Please include any suspicious-looking text in your bug reports.
-
-Please report bugs by sending email to the boinc-beta
-mailing list on SourceForge.net.
-To join this list, go to
-http://lists.sourceforge.net/lists/listinfo/boinc-beta.
-
Returning participants
- Log in
diff --git a/html/user/login_action.php b/html/user/login_action.php
index ee2851ba46..e063352660 100644
--- a/html/user/login_action.php
+++ b/html/user/login_action.php
@@ -6,14 +6,14 @@
$authenticator = init_session();
db_init();
$authenticator = $HTTP_POST_VARS["authenticator"];
- $email_addr = $HTTP_POST_VARS["email_addr"];
- $password = $HTTP_POST_VARS["password"];
+ //$email_addr = $HTTP_POST_VARS["email_addr"];
+ //$password = $HTTP_POST_VARS["password"];
if (strlen($authenticator)) {
$query = "select * from user where authenticator='$authenticator'";
- } else if (strlen($email_addr)) {
- $query = "select * from user where email_addr='$email_addr'";
- } else {
- echo "NO SELECTION";
+ //} else if (strlen($email_addr)) {
+ // $query = "select * from user where email_addr='$email_addr'";
+ //} else {
+ // echo "NO SELECTION";
}
$result = mysql_query($query);
if ($result) {
@@ -22,17 +22,21 @@
}
if (!$user) {
page_head("Log in");
- echo "There is no account with the account key or email address you have entered.\n";
- echo "Click Back to try again.\n";
- } else if (strlen($password)) {
- page_head("Log in");
- if ($user->web_password != $HTTP_POST_VARS["existing_password"]) {
- echo "Bad password.";
- }
+ echo "
+ We have no account with the account key '$authenticator'.
+
Click Back to try again.
+ ";
+ page_tail();
+ //} else if (strlen($password)) {
+ // page_head("Log in");
+ // if ($user->web_password != $HTTP_POST_VARS["existing_password"]) {
+ // echo "Bad password.";
+ // }
} else {
$_SESSION["authenticator"] = $user->authenticator;
- page_head("User Page");
- show_user_page_private($user);
+ $url = $HTTP_POST_VARS["url"];
+ Header("Location: $url");
+ //page_head("User Page");
+ //show_user_page_private($user);
}
- page_tail();
?>
diff --git a/html/user/prefs.inc b/html/user/prefs.inc
index e4c59ccdf4..e5328cb5d5 100644
--- a/html/user/prefs.inc
+++ b/html/user/prefs.inc
@@ -78,12 +78,6 @@ function element_end($parser, $name) {
case "confirm_before_connecting":
$parse_result->confirm_before_connecting = 1;
break;
- case "run_minimized":
- $parse_result->run_minimized = 1;
- break;
- case "run_on_startup":
- $parse_result->run_on_startup = 1;
- break;
case "low_water_days":
$parse_result->low_water_days = $text;
break;
@@ -129,24 +123,27 @@ function char_handler($parser, $x) {
$text = $text.$x;
}
+function default_prefs() {
+ $p = null;
+ $p->dont_run_on_batteries = 1;
+ $p->dont_run_if_user_active = 1;
+ $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_pct = 50;
+ $p->disk_min_free_gb = 1;
+
+ $p->resource_share = 100;
+ $p->show_email = 0;
+ $p->send_email = 1;
+ return $p;
+}
+
function prefs_parse($prefs_xml) {
global $parse_result;
- $parse_result = null;
- $parse_result->dont_run_on_batteries = 0;
- $parse_result->dont_run_if_user_active = 0;
- $parse_result->confirm_before_connecting = 0;
- $parse_result->run_minimized = 0;
- $parse_result->run_on_startup = 0;
- $parse_result->low_water_days = 1;
- $parse_result->high_water_days = 3;
- $parse_result->disk_max_used_gb = 1000;
- $parse_result->disk_max_used_pct = 50;
- $parse_result->disk_min_free_gb = 1;
-
- $parse_result->resource_share = 1;
- $parse_result->show_email = 1;
- $parse_result->send_email = 1;
+ $parse_result = default_prefs();
$xml_parser = xml_parser_create();
xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, 0);
@@ -166,17 +163,24 @@ function prefs_show_global($prefs) {
echo "\n";
echo "".TD2.LG_FONT."Global preferences
These apply to all BOINC projects in which you participate
\n";
- $batteries = $prefs->dont_run_on_batteries?"No":"Yes";
- $in_use = $prefs->dont_run_if_user_active?"No":"Yes";
- $confirm = $prefs->confirm_before_connecting?"Yes":"No";
- $minimized = $prefs->run_minimized?"Yes":"No";
- $startup = $prefs->run_on_startup?"Yes":"No";
-
+ if ($prefs->dont_run_on_batteries) {
+ $batteries = "No";
+ } else {
+ $batteries = "Yes";
+ }
+ if ($prefs->dont_run_if_user_active) {
+ $in_use = "No";
+ } else {
+ $in_use = "Yes";
+ }
+ if ($prefs->confirm_before_connecting) {
+ $confirm = "Yes";
+ } 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("Run minimized: ", $minimized);
- row2a("Run on startup: ", $startup);
row2a("Minimum amount of work to buffer: ", "$prefs->low_water_days days");
row2a("Maximum amount of work to buffer: ", "$prefs->high_water_days days");
@@ -195,86 +199,104 @@ function prefs_show_project($prefs) {
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);
+ $prefs = project_specific_prefs_parse($prefs->project_specific);
project_specific_prefs_show($prefs);
echo "Edit project preferences |
\n";
echo "
";
}
function print_prefs_display($user) {
- prefs_show_global(prefs_parse($user->global_prefs));
prefs_show_project(prefs_parse($user->project_prefs));
+ prefs_show_resource(prefs_parse($user->project_prefs));
+ prefs_show_global(prefs_parse($user->global_prefs));
}
////////////////////////////////////////////
//
// Functions to display preference subsets as forms
//
-function prefs_form_global($user, $prefs) {
- echo "\n";
+function prefs_form_global($user, $prefs, $next_url) {
+ echo "
+ ";
}
-function prefs_form_project($prefs) {
- echo "\n";
+function prefs_form_resource($prefs_xml, $next_url) {
+ $prefs = project_specific_prefs_parse($prefs_xml);
+ echo "
+ ";
+}
+
+function prefs_form_project($prefs_xml, $next_url) {
+ $prefs = project_specific_prefs_parse($prefs_xml);
+ echo "
+ ";
}
////////////////////////////////////////////
@@ -286,8 +308,6 @@ function prefs_global_parse_form(&$prefs) {
$prefs->dont_run_on_batteries = isset($dont_run_on_batteries)?1:0;
$prefs->dont_run_if_user_active = isset($dont_run_if_user_active)?1:0;
$prefs->confirm_before_connecting = isset($confirm_before_connecting)?1:0;
- $prefs->run_minimized = isset($run_minimized)?1:0;
- $prefs->run_on_startup = isset($run_on_startup)?1:0;
$prefs->low_water_days = $low_water_days;
$prefs->high_water_days = $high_water_days;
$prefs->disk_max_used_gb = $disk_max_used_gb;
@@ -295,12 +315,16 @@ function prefs_global_parse_form(&$prefs) {
$prefs->disk_min_free_gb = $disk_min_free_gb;
}
-function prefs_project_parse_form(&$prefs) {
+function prefs_resource_parse_form(&$prefs) {
parse_str(getenv("QUERY_STRING"));
$prefs->resource_share = $resource_share;
+}
+
+function prefs_project_parse_form(&$prefs) {
$prefs->project_specific = project_specific_prefs_parse_form();
}
+
////////////////////////////////////////////
//
// convert prefs from structure to XML
@@ -308,29 +332,23 @@ function prefs_project_parse_form(&$prefs) {
function global_prefs_make_xml($prefs) {
$xml = "\n";
$now = time();
- $xml = $xml." $now\n";
+ $xml = $xml."$now\n";
if ($prefs->dont_run_on_batteries) {
- $xml = $xml." \n";
+ $xml = $xml."\n";
}
if ($prefs->dont_run_if_user_active) {
- $xml = $xml." \n";
+ $xml = $xml."\n";
}
if ($prefs->confirm_before_connecting) {
- $xml = $xml." \n";
+ $xml = $xml."\n";
}
- if ($prefs->run_minimized) {
- $xml = $xml." \n";
- }
- if ($prefs->run_on_startup) {
- $xml = $xml." \n";
- }
- $xml = $xml
- ." $prefs->low_water_days\n"
- ." $prefs->high_water_days\n";
- $xml = $xml
- ." $prefs->disk_max_used_gb\n"
- ." $prefs->disk_max_used_pct\n"
- ." $prefs->disk_min_free_gb\n";
+ $xml = $xml."$prefs->low_water_days
+$prefs->high_water_days
+";
+ $xml = $xml."$prefs->disk_max_used_gb
+$prefs->disk_max_used_pct
+$prefs->disk_min_free_gb
+";
$xml = $xml."\n";
return $xml;
}
diff --git a/html/user/prefs_edit_form.php b/html/user/prefs_edit_form.php
new file mode 100644
index 0000000000..a84f226c4e
--- /dev/null
+++ b/html/user/prefs_edit_form.php
@@ -0,0 +1,24 @@
+project_prefs);
+prefs_form_project($prefs);
+$prefs = prefs_parse($user->global_prefs);
+prefs_form_global($user, $prefs);
+echo "\n";
+page_tail();
+
+?>
diff --git a/html/user/prefs_edit_global_action.php b/html/user/prefs_edit_global_action.php
index 9128aca3c6..336cd30ec8 100644
--- a/html/user/prefs_edit_global_action.php
+++ b/html/user/prefs_edit_global_action.php
@@ -4,23 +4,19 @@ include_once("db.inc");
include_once("util.inc");
include_once("prefs.inc");
-$authenticator = init_session();
db_init();
+$authenticator = init_session();
$user = get_user_from_auth($authenticator);
if ($user == NULL) {
print_login_form();
exit();
}
+parse_str(getenv("QUERY_STRING"));
-page_head("Preferences");
$prefs = prefs_parse($user->prefs);
prefs_global_parse_form($prefs);
global_prefs_update($user, $prefs);
-echo "
";
-print_prefs_display($user);
-echo "\n";
-page_tail();
+Header("Location: $next_url");
?>
diff --git a/html/user/prefs_edit_project_action.php b/html/user/prefs_edit_project_action.php
index e42b1ff62a..d749eaa956 100644
--- a/html/user/prefs_edit_project_action.php
+++ b/html/user/prefs_edit_project_action.php
@@ -4,6 +4,8 @@ include_once("db.inc");
include_once("util.inc");
include_once("prefs.inc");
+parse_str(getenv("QUERY_STRING"));
+
$authenticator = init_session();
db_init();
@@ -14,12 +16,9 @@ if ($user == NULL) {
}
no_cache();
-page_head("Preferences");
$prefs = prefs_parse($user->project_prefs);
prefs_project_parse_form($prefs);
project_prefs_update($user, $prefs);
-print_prefs_display($user);
-echo "
\n";
-page_tail();
+Header("Location: $next_url");
?>
diff --git a/html/user/prefs_edit_resource_action.php b/html/user/prefs_edit_resource_action.php
new file mode 100644
index 0000000000..32c9e67d90
--- /dev/null
+++ b/html/user/prefs_edit_resource_action.php
@@ -0,0 +1,24 @@
+project_prefs);
+prefs_resource_parse_form($prefs);
+project_prefs_update($user, $prefs);
+Header("Location: $next_url");
+
+?>
diff --git a/html/user/project_specific_prefs.inc b/html/user/project_specific_prefs.inc
index daf6e8d8bd..e434d16f34 100644
--- a/html/user/project_specific_prefs.inc
+++ b/html/user/project_specific_prefs.inc
@@ -48,8 +48,7 @@ function project_specific_prefs_show($prefs) {
// parse XML, fill in struct
//
-function project_specific_prefs_parse($prefs) {
- $xml = $prefs->project_specific;
- $prefs->color_scheme = parse_element($xml, "");
+function project_specific_prefs_parse($prefs_xml) {
+ $prefs->color_scheme = parse_element($prefs_xml, "");
return $prefs;
}
diff --git a/html/user/util.inc b/html/user/util.inc
index 3bba6d93c9..90e1fea24e 100644
--- a/html/user/util.inc
+++ b/html/user/util.inc
@@ -28,11 +28,9 @@ define("MASTER_URL", "http://maggie.ssl.berkeley.edu/ap/");
//
function send_auth_email($email_addr, $auth) {
mail($email_addr, PROJECT." new account confirmation",
-"This email confirms the creation of your account with ".PROJECT.",
-a distributed computing project based on BOINC.\n
-The URL for this project: ".MASTER_URL."
+"This email confirms the creation of your ".PROJECT." account.
+".PROJECT." URL: ".MASTER_URL."
Your account key: $auth\n
-Copy and paste these into the BOINC client when prompted.\n
Please save this email, as you will need the account key
to access your account on the ".PROJECT." web site."
);
@@ -87,16 +85,16 @@ function page_head($title) {
// Put your project title and logo here
echo "".PROJECT."
\n";
- echo "$title
\n";
+ //echo "$title
\n";
}
function page_tail() {
- echo "
Return to main ".PROJECT." page
\n";
+ echo "
Return to ".PROJECT." main page
\n";
// put your copyright notice etc. here
- echo "
Copyright (c) 2002 ".PROJECT."\n";
+ echo "
Copyright (c) 2003 ".PROJECT."\n";
}
function date_str($when) {