From aa2774f9cbecf4b778a855095aaff01f05f165e0 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 14 Feb 2003 00:05:56 +0000 Subject: [PATCH] login svn path=/trunk/boinc/; revision=905 --- html/ops/db.inc | 1 + html/user/account_created.php | 2 +- html/user/bug_report_form.php | 54 +++++++++++++++++++++++++++++++++-- html/user/home.php | 2 +- html/user/index.php | 5 ++-- html/user/login_action.php | 6 ++-- html/user/login_form.php | 28 +++++++----------- html/user/util.inc | 34 ++++++++++++++++++++-- test/make_project_ap.php | 2 +- test/make_project_sah.php | 2 +- 10 files changed, 104 insertions(+), 32 deletions(-) diff --git a/html/ops/db.inc b/html/ops/db.inc index 79b22c8633..3cb750f526 100644 --- a/html/ops/db.inc +++ b/html/ops/db.inc @@ -240,6 +240,7 @@ function show_user($user) { row("Total credit", $user->total_credit); row("Recent averaged credit:", $user->expavg_credit); row("Name", $user->name); + row("Authenticator", $user->authenticator); row("Email address", $user->email_addr); row("Country", $user->country); row("Postal code", $user->postal_code); diff --git a/html/user/account_created.php b/html/user/account_created.php index 87996ba988..b2682cc34f 100644 --- a/html/user/account_created.php +++ b/html/user/account_created.php @@ -11,7 +11,7 @@
Please wait until you receive this email (it may take a minute or two).
- + diff --git a/html/user/bug_report_form.php b/html/user/bug_report_form.php index 7a79898aac..3f0d3e3bf7 100644 --- a/html/user/bug_report_form.php +++ b/html/user/bug_report_form.php @@ -1,2 +1,52 @@ - - + + "; + + $result = mysql_query("select * from platform"); + while ($platform = mysql_fetch_object($result)) { + echo" +
Then copy and paste the account key here:
+ + +
Computer type + "; +print_platform_select(); +echo" +
+ Problem description: + + +

+ +
+ + "; + +?> diff --git a/html/user/home.php b/html/user/home.php index 91bdcdc30b..1ff2b92952 100644 --- a/html/user/home.php +++ b/html/user/home.php @@ -14,6 +14,6 @@ show_user_page_private($user); page_tail(); } else { - print_login_form(); + print_login_form($_SERVER[REQUEST_URI]); } ?> diff --git a/html/user/index.php b/html/user/index.php index 04f475ddab..f2e0a92189 100644 --- a/html/user/index.php +++ b/html/user/index.php @@ -9,9 +9,10 @@ project_intro(); echo " -

How to join ".PROJECT."

+

Join ".PROJECT."

-Create an account. +

Returning participants

diff --git a/html/user/login_action.php b/html/user/login_action.php index e063352660..63a6bc419c 100644 --- a/html/user/login_action.php +++ b/html/user/login_action.php @@ -34,9 +34,7 @@ // } } else { $_SESSION["authenticator"] = $user->authenticator; - $url = $HTTP_POST_VARS["url"]; - Header("Location: $url"); - //page_head("User Page"); - //show_user_page_private($user); + $next_url = $HTTP_POST_VARS["next_url"]; + Header("Location: $next_url"); } ?> diff --git a/html/user/login_form.php b/html/user/login_form.php index af3aeff241..c608bb108a 100644 --- a/html/user/login_form.php +++ b/html/user/login_form.php @@ -1,24 +1,18 @@ - - + $authenticator = init_session(); + db_init(); - -
- Your account key: - - -
-
-
- -
"; - echo " - If you don't know your account key, click here.

- "; + $user = get_user_from_auth($authenticator); + + parse_str(getenv("QUERY_STRING")); + + page_head("Log in", $user); + print_login_form_aux($next_url); + if ($user) { + echo "
Log out"; + } page_tail(); ?> diff --git a/html/user/util.inc b/html/user/util.inc index fc361b7fb4..ca4740521a 100644 --- a/html/user/util.inc +++ b/html/user/util.inc @@ -132,10 +132,38 @@ function print_country_select($country) { PassThru("$x/country_select '$country'"); } -function print_login_form() { +function print_login_form_aux($next_url) { + echo "

+ + + + + +
+ Your account key: + + +
+
+
+ +
+ "; + echo " + If you don't know your account key, + click here. + + "; +} + +function print_login_form($next_url) { page_head("Please log in"); - echo "This function requires that you be logged in.\n"; - echo "Please log in.\n

\n"; + parse_str(getenv("QUERY_STRING")); + echo " +

Please log in

+ This function requires that you log in. + "; + print_login_form_aux($next_url); page_tail(); } diff --git a/test/make_project_ap.php b/test/make_project_ap.php index fe94c775fe..224535bc25 100644 --- a/test/make_project_ap.php +++ b/test/make_project_ap.php @@ -21,7 +21,7 @@ $core_app_version = new App_Version($core_app); $core_app_version->platform = $platform; $core_app_version->exec_dir = "../apps"; - $core_app_version->exec_name = "BOINC_0.12.exe"; + $core_app_version->exec_name = "BOINC_0.13.exe"; $project->add_app($app); $project->add_app_version($app_version); diff --git a/test/make_project_sah.php b/test/make_project_sah.php index 65443a5848..e62ebb7808 100644 --- a/test/make_project_sah.php +++ b/test/make_project_sah.php @@ -21,7 +21,7 @@ $core_app_version = new App_Version($core_app); $core_app_version->platform = $platform; $core_app_version->exec_dir = "../apps"; - $core_app_version->exec_name = "BOINC_0.12.exe"; + $core_app_version->exec_name = "BOINC_0.13.exe"; $project->add_app($app); $project->add_app_version($app_version);