";
diff --git a/html/forum/text_search_form.php b/html/forum/text_search_form.php
index bfcf510d90..53623c5c7f 100644
--- a/html/forum/text_search_form.php
+++ b/html/forum/text_search_form.php
@@ -6,8 +6,6 @@ require_once("../inc/util.inc");
page_head("Message search");
echo "
- Message search
-
This page lets you search for messages containing particular words.
All Message boards and Question/answer areas will be searched.
diff --git a/html/forum/user_posts.php b/html/forum/user_posts.php
index 74b193479a..5b3fb3dc8f 100644
--- a/html/forum/user_posts.php
+++ b/html/forum/user_posts.php
@@ -11,7 +11,6 @@ $count = 10;
$user = lookup_user_id($userid);
page_head("Posts by $user->name");
-echo "Posts by $user->name \n";
$result = mysql_query("select * from post where user=$userid order by id desc limit $offset,$count");
$n = 0;
start_table();
diff --git a/html/inc/gallery.inc b/html/inc/gallery.inc
index be52abdba4..f70a3e9623 100644
--- a/html/inc/gallery.inc
+++ b/html/inc/gallery.inc
@@ -61,7 +61,7 @@ function build_picture_pages($width, $height) {
page_head("User Picture Gallery: Page $page of $numPages", $descriptor);
fwrite($descriptor,
- "User Profile Pictures Last updated "
+ "Last updated "
. pretty_time_str(time())
. "\nBrowse the user profiles by picture.
Only user profiles with pictures are listed here."
@@ -230,9 +230,8 @@ function build_profile_pages($members, $pageHead, $pageTitle, $rowsPerPage, $col
$descriptor = fopen($filename, "w");
$head = $pageHead . ": Page $page of $numPages";
- page_head($pageHead, $descriptor);
+ page_head($pageTitle, $descriptor);
- fwrite($descriptor, "
$pageTitle \n");
fwrite($descriptor, "Last updated " . pretty_time_str(time()) . "\n");
$offset = (($page-1) * $rowsPerPage * $colsPerPage);
@@ -254,7 +253,7 @@ function build_country_summary_page($countryMembers) {
$descriptor = fopen($filename, "w");
page_head("User Profiles by Country", $descriptor);
- fwrite($descriptor, "
User Profiles by Country Last updated " . pretty_time_str(time()) . "");
+ fwrite($descriptor, "Last updated " . pretty_time_str(time()) . "
");
fwrite($descriptor, "
\n");
fwrite($descriptor, "Country Profiles \n");
diff --git a/html/inc/host.inc b/html/inc/host.inc
index 540f0c7db9..44e63cfe9a 100644
--- a/html/inc/host.inc
+++ b/html/inc/host.inc
@@ -115,9 +115,8 @@ function show_host($host, $private, $ipprivate) {
}
-function host_table_start($title, $private, $show_owner) {
+function host_table_start($private, $show_owner) {
start_table();
- row1($title, 7);
echo "";
echo "Host IDClick for more info \n";
if ($private) {
diff --git a/html/inc/profile.inc b/html/inc/profile.inc
index aa1f891538..4b1ed74966 100644
--- a/html/inc/profile.inc
+++ b/html/inc/profile.inc
@@ -331,7 +331,7 @@ function show_result_page() {
page_head("Profile Saved");
echo "
-Congratulations!
+
Congratulations!
Your profile was successfully entered into our database.
id>View your profile
";
@@ -470,10 +470,6 @@ function show_profile($userid, $verify_mode=false) {
}
function show_profile_summary($user, $profile_info, $can_edit, $verify_mode) {
- echo "
-
Profile: $user->name
- ";
-
if (!$can_edit && !$verify_mode) {
show_view_buttons($user->id);
}
diff --git a/html/inc/team.inc b/html/inc/team.inc
index ce00d9caf4..999839168e 100644
--- a/html/inc/team.inc
+++ b/html/inc/team.inc
@@ -6,14 +6,11 @@ require_once("../inc/sanitize_html.inc");
require_once("../inc/countries.inc");
function display_team_page($team, $user) {
- page_head("$team->name");
- echo "Team page for ";
if (strlen($team->name_html)) {
- echo "$team->name_html";
+ page_head("$team->name_html");
} else {
- echo $team->name;
+ page_head("$team->name");
}
- echo " ";
if ($user->teamid == $team->id) {
echo "You currently belong to this team
diff --git a/html/inc/user.inc b/html/inc/user.inc
index 305ef6d51b..1b93dd3351 100644
--- a/html/inc/user.inc
+++ b/html/inc/user.inc
@@ -47,7 +47,12 @@ function show_user_profile_private($user) {
$email_text
);
row2("Name", $user->name);
- row2("URL", "http://$user->url");
+ if (strlen($user->url)) {
+ $x = "http://$user->url";
+ } else {
+ $x = "none";
+ }
+ row2("URL", $x);
row2("Country", $user->country);
row2("Postal code", $user->postal_code);
if ($user->signature) {
@@ -55,6 +60,7 @@ function show_user_profile_private($user) {
row2("Forums signature", $x);
}
row2("", "Edit account info ");
+ row2("", "Log out ");
row1("Profile");
$sql = "SELECT * FROM profile WHERE userid = ".$user->id;
diff --git a/html/inc/util.inc b/html/inc/util.inc
index db4d8f4a79..5578a86f4d 100644
--- a/html/inc/util.inc
+++ b/html/inc/util.inc
@@ -126,7 +126,7 @@ function page_head($title, $fd=null) {
$styleSheet = URL_BASE . STYLESHEET;
write_fd($fd,
- "$title
+ "".strip_tags($title)."
@@ -179,7 +179,7 @@ function pretty_time_str($x) {
return time_str($x);
}
-function start_table($extra="") {
+function start_table($extra="width=100%") {
echo "";
}
diff --git a/html/user/download_network.php b/html/user/download_network.php
index 245880d5ba..ed0b769029 100644
--- a/html/user/download_network.php
+++ b/html/user/download_network.php
@@ -8,7 +8,6 @@ init_session();
page_head("Download BOINC add-on software");
echo "
- Download BOINC add-on software
You can download applications from any of the following categories.
Please note that these applications are not endorsed by ".PROJECT." and that you use them at your own risk:\n
";
diff --git a/html/user/hosts_user.php b/html/user/hosts_user.php
index 7f959df86f..5976568b15 100644
--- a/html/user/hosts_user.php
+++ b/html/user/hosts_user.php
@@ -14,7 +14,7 @@
mysql_free_result($result);
if ($user->show_hosts) {
page_head("Computers belonging to $user->name");
- host_table_start("Computers belonging to $user->name", false, false);
+ host_table_start(false, false);
} else {
echo "Hidden\n";
exit();
@@ -24,7 +24,7 @@
$user = get_logged_in_user();
$userid = $user->id;
page_head("Your computers");
- host_table_start("Your computers", true, false);
+ host_table_start(true, false);
$private = true;
}
$i = 1;
diff --git a/html/user/index.php b/html/user/index.php
index 1a8a5ff232..9c2ad4dde0 100644
--- a/html/user/index.php
+++ b/html/user/index.php
@@ -37,6 +37,7 @@ if (project_is_stopped()) {
Your account - view stats, modify preferences
Teams - create or join a team
Download BOINC
+ Add-ons
Community
diff --git a/html/user/top_hosts.php b/html/user/top_hosts.php
index a8432ce502..9cefc475ae 100644
--- a/html/user/top_hosts.php
+++ b/html/user/top_hosts.php
@@ -26,7 +26,7 @@
$sort_clause = "expavg_credit desc, total_credit desc";
}
$result = mysql_query("select * from host order by $sort_clause limit $n offset $offset");
- host_table_start("Top computers", false, true);
+ host_table_start(false, true);
$i = $offset+1;
while ($host = mysql_fetch_object($result)) {
show_host_row($host, $i, false, true);
diff --git a/lib/util.C b/lib/util.C
index 4415dbc3df..e8e853fd7e 100755
--- a/lib/util.C
+++ b/lib/util.C
@@ -612,7 +612,7 @@ void update_average(
if (avg_time) {
double diff = now - avg_time;
- if (diff==0) diff=3600; // just in case
+ if (diff<=0) diff=3600; // just in case
double diff_days = diff/SECONDS_PER_DAY;
double weight = exp(-diff*M_LN2/half_life);
avg *= weight;