diff --git a/checkin_notes b/checkin_notes
index 7ba6804d14..9c72093a52 100755
--- a/checkin_notes
+++ b/checkin_notes
@@ -8952,3 +8952,33 @@ Rytis 29 Sep 2007
forum_edit.php
forum_post.php
forum_reply.php
+
+David 1 Oct 2007
+ - user web: add "team search" page, which does a multi-criteria
+ search (keywords, country, type).
+ Have the new-user scenario route the user through this page.
+ Also, link to it rather than team.php for existing users.
+ - user web: use cookies rather than URLs to identify new users,
+ and show "Welcome to X" when they reach their user page.
+ - user web: don't show user intermediate page for join/quit team.
+ Just take them to their user page.
+
+ DB update required; see ops/db_update.php
+
+ html/
+ inc/
+ team.inc
+ team_types.inc
+ user.inc
+ ops/
+ db_update.php
+ user/
+ account_finish_action.php
+ create_account_action.php
+ home.php
+ team.php
+ team_join.php
+ team_search.php
+ team_quit_action.php
+ validate_email_addr.php
+ white.css
diff --git a/doc/links.php b/doc/links.php
index f8c426c555..7c92ce8fc0 100644
--- a/doc/links.php
+++ b/doc/links.php
@@ -161,7 +161,7 @@ echo "
language("Belgium (Dutch/French/English)", array(
site("http://www.boinc.be", "www.boinc.be"),
- seti("http://icewolves.plid.be", "IceWolves"),
+ site("http://icewolves.plid.be", "IceWolves"),
));
language("Catalan", array(
site("http://www.boinc.cat", "BOINC.cat"),
diff --git a/html/inc/team.inc b/html/inc/team.inc
index b529ae2f8d..5c3dd9c678 100644
--- a/html/inc/team.inc
+++ b/html/inc/team.inc
@@ -58,7 +58,11 @@ function display_team_page($team, $offset, $sort_by) {
row2("Country", $team->country);
row2("Type", team_type_name($team->type));
if ($user->teamid != $team->id) {
- row2("Join this team", "Join");
+ $tokens = url_tokens($user->authenticator);
+ row2("",
+ "Join this team
+
Note: joining a team gives its founder access to your email address."
+ );
}
if (($user->teamid == $team->id) && ($user->id != $founder->id)) {
row2("Request team founder transfer", "Initiate transfer");
diff --git a/html/inc/team_types.inc b/html/inc/team_types.inc
index 6ebce73f30..ba44bff75c 100644
--- a/html/inc/team_types.inc
+++ b/html/inc/team_types.inc
@@ -35,7 +35,7 @@ function team_type_num($name) {
return 0;
}
-function team_type_select($team){
+function team_type_select($team, $allow_none=false){
global $team_types;
if (!empty($team)) {
@@ -43,8 +43,12 @@ function team_type_select($team){
} else {
$type = 1;
}
-
- return select_from_array('type', $team_types, $type);
+ $types = $team_types;
+ if ($allow_none) {
+ $types[0] = '---';
+ $type = 0;
+ }
+ return select_from_array('type', $types, $type);
}
?>
diff --git a/html/inc/user.inc b/html/inc/user.inc
index e37a663bc1..3d0120a4bf 100644
--- a/html/inc/user.inc
+++ b/html/inc/user.inc
@@ -211,7 +211,7 @@ function show_user_info_private($user) {
}
row2("Team", $x);
} else {
- row2("Team", "None (find a team)");
+ row2("Team", "None (find a team)");
}
$team_founder = lookup_team_founder($user->id);
diff --git a/html/ops/db_update.php b/html/ops/db_update.php
index f6be270485..74947bac19 100755
--- a/html/ops/db_update.php
+++ b/html/ops/db_update.php
@@ -445,6 +445,12 @@ function update_9_26_2007() {
do_query("ALTER TABLE team CHANGE ping_user ping_user integer NOT NULL DEFAULT 0");
}
+function update_9_28_2007() {
+ do_query("alter table team engine=myisam");
+ do_query("alter table team change description description text");
+ do_query("alter table team add fulltext index team_name_desc(name, description)");
+}
+
// modify the following to call the function you want.
// Make sure you do all needed functions, in order.
// (Look at your DB structure using "explain" queries to see
diff --git a/html/user/account_finish_action.php b/html/user/account_finish_action.php
index 273713fed7..7c20cead7a 100644
--- a/html/user/account_finish_action.php
+++ b/html/user/account_finish_action.php
@@ -26,11 +26,8 @@ if ($new_name != strip_tags($new_name)) {
}
$country = post_str("country");
-if ($country == "") {
- $country = "International";
-}
if (!is_valid_country($country)) {
- show_error( "bad country");
+ show_error( "invalid country");
}
$postal_code = strip_tags(process_user_text(post_str("postal_code", true)));
@@ -43,7 +40,8 @@ if (!$retval) {
session_start();
$_SESSION["authenticator"] = $auth;
-Header("Location: home.php?new_acct=1");
+Header("Location: team_search.php");
setcookie('auth', $auth, time()+3600*24*365);
+setcookie('init', "1", time()+3600*24*365);
?>
diff --git a/html/user/create_account_action.php b/html/user/create_account_action.php
index 213a54dfee..e5afc78c1c 100644
--- a/html/user/create_account_action.php
+++ b/html/user/create_account_action.php
@@ -125,7 +125,10 @@ if(defined('INVITE_CODES')) {
session_start();
$_SESSION["authenticator"] = $user->authenticator;
-Header("Location: home.php?new_acct=1&via_web=1");
+Header("Location: home.php");
setcookie('auth', $user->authenticator, time()+3600*24*365);
+setcookie('init', "1", time()+3600*24*365);
+setcookie('via_web', "1", time()+3600*24*365);
+
?>
diff --git a/html/user/home.php b/html/user/home.php
index 62f3581bd7..4136320c90 100644
--- a/html/user/home.php
+++ b/html/user/home.php
@@ -11,22 +11,28 @@ db_init();
$user = get_logged_in_user();
$user = getForumPreferences($user);
$user = get_other_projects($user);
-page_head("Your account");
-if (get_str("new_acct", true)) {
+$init = isset($_COOKIE['init']);
+$via_web = isset($_COOKIE['via_web']);
+
+if ($init) {
+ setcookie('init', '', time()-3600);
+ page_head("Welcome to ".PROJECT);
echo "
- Welcome to ".PROJECT.". View and edit your account preferences using the links below. "; + if ($via_web) { + setcookie('via_web', '', time()-3600); + echo " +
If you have not already done so, + download BOINC client software. + "; + } +} else { + page_head("Your account"); } -if (get_str("via_web", true)) { - echo " -
- If you have not already done so, - download BOINC client software. - "; -} + echo "
\n"; show_user_page_private($user); diff --git a/html/user/team.php b/html/user/team.php index 72b7c0540d..8e20d0c782 100644 --- a/html/user/team.php +++ b/html/user/team.php @@ -22,16 +22,18 @@ echo "
".PROJECT." participants may form teams.
- To join a team, visit its team page and click Join. + To join a team, visit its team page and click Join this team.
+ Or you can create a new team. +
+ "; + print_form(); + } else { + echo " + The following teams match your search criteria. + To join a team, click its name to go to the team page, + then click Join this team. +
+ "; + sort_list($list); + show_list($list); + } +} + +if ($_GET['submit']) { + page_head("Team search results"); + search(); +} else { + page_head("Find a team"); + echo " + You can team up with other people with similar interests, + or from the same country, company, or school. +
+ Use this form to find teams that might be right for you. +
+ "; + print_form(); + if (isset($_COOKIE['init'])) { + echo " +
+ Click here + if you're not interested in joining a team right now. + "; + } +} +page_tail(); + +?> diff --git a/html/user/validate_email_addr.php b/html/user/validate_email_addr.php new file mode 100644 index 0000000000..0df57daedb --- /dev/null +++ b/html/user/validate_email_addr.php @@ -0,0 +1,59 @@ +email_addr.$user->authenticator); + send_email( + $user, + "Validate BOINC email address", + "Please visit the following link to validate the email address\n" + ."of your ".PROJECT." account:\n" + .$master_url."validate_email_addr.php?validate=1&u=$user->id&x=$x2" + ); + page_head("Validate email sent"); + echo " + An email has been sent to $user->email_addr. + Visit the link it contains to validate your email address. + "; + page_tail(); +} + +function validate() { + $x = process_user_text(get_str("x")); + $u = process_user_text(get_int("u")); + $user = lookup_user_id($u); + if (!$user) { + error_page("No such user.\n"); + } + + $x2 = md5($user->email_addr.$user->authenticator); + if ($x2 != $x) { + error_page("Error in URL data - can't validate email address"); + } + + $result = mysql_query("update user set email_validated=1 where id=$user->id"); + if (!$result) { + error_page("Database update failed - please try again later."); + } + + page_head("Validate email address"); + echo " + The email address of your account has been validated. + "; + page_tail(); +} + +if ($_GET['validate']) { + validate(); +} else { + send_validate_email(); +} + +?> diff --git a/html/user/white.css b/html/user/white.css index 0671ce4b4a..c2003fff70 100644 --- a/html/user/white.css +++ b/html/user/white.css @@ -34,6 +34,10 @@ td.bordered { border: 1px solid gray; } +td.shaded { + background-color: #f0f0f0; +} + td.indent { border-left: 4px solid white; } @@ -305,4 +309,4 @@ span.news_date { font-weight: bold; font-size: 1.3em; border-bottom: 1px solid #cccccc; -} \ No newline at end of file +}