diff --git a/checkin_notes b/checkin_notes
index e65c83a655..51db3ca821 100755
--- a/checkin_notes
+++ b/checkin_notes
@@ -12139,6 +12139,16 @@ Rom May 6 2004
index.php
pass_percentage_by_platform.php
+David May 9 2004
+ html/
+ inc/
+ gallery.inc
+ uotd.inc (new)
+ user/
+ index.php
+ team.php
+ team_lookup.php
+
David May 10 2004
- extend the set of signals that are treated as "external",
i.e. if an app exits with one of these, put it in limbo
@@ -12166,3 +12176,9 @@ David May 11 2004
zip/
*
+
+David May 11 2004
+ - remove "user" argument from page_head()
+
+ html/
+ *
diff --git a/html/forum/edit.php b/html/forum/edit.php
index 652928ce73..8046afe074 100644
--- a/html/forum/edit.php
+++ b/html/forum/edit.php
@@ -30,7 +30,7 @@ if ($_POST['submit']) {
}
-page_head('Forum', $logged_in_user);
+page_head('Forum');
if (!empty($_GET['id'])) {
$post = getPost($_GET['id']);
diff --git a/html/forum/index.php b/html/forum/index.php
index c1cbac01a3..bbe71c4234 100644
--- a/html/forum/index.php
+++ b/html/forum/index.php
@@ -4,7 +4,7 @@ require_once('../inc/forum.inc');
require_once('../inc/util.inc');
require_once('../inc/time.inc');
-page_head('Message boards', NULL, NULL);
+page_head('Message boards');
show_forum_title(NULL, NULL, false);
diff --git a/html/forum/post.php b/html/forum/post.php
index 58fa1bc3f8..206a6699b3 100644
--- a/html/forum/post.php
+++ b/html/forum/post.php
@@ -30,9 +30,9 @@ $logged_in_user = get_logged_in_user(true);
// TODO: Write a function to do this.
if ($category->is_helpdesk) {
- page_head('Help Desk', $logged_in_user);
+ page_head('Help Desk');
} else {
- page_head('Forum', $logged_in_user);
+ page_head('Forum');
}
show_forum_title($forum, NULL, $category->is_helpdesk);
@@ -66,39 +66,32 @@ if ($category->is_helpdesk) {
}
start_forum_table(array($cell), 2);
-echo "
Title";
+$x = "Title".
+ " May contain HTML tags";
if ($category->is_helpdesk) {
- echo "
+ $x .="
Describe your question in a few words.
A brief, clear summary will help others with the same
question (or an answer) find it.
-
";
}
-echo "
-
-
-
-
-
Message
-";
+$y = "";
+row2($x, $y);
+$x = "Message".
+ " May contain HTML tags";
if ($category->is_helpdesk) {
- echo "
- If you are having software problems,
+ $x .= " If you are having software problems,
mention the version number of the software,
your computer type and operating system.
-
";
}
-echo "
-
-
-";
+$y = "";
+row2($x, $y);
row2("", "Add my signature to this post");
row2("", "");
diff --git a/html/forum/rate.php b/html/forum/rate.php
index 599f7d5d0a..d5f05e3e35 100644
--- a/html/forum/rate.php
+++ b/html/forum/rate.php
@@ -56,17 +56,17 @@ function show_result_page($success, $post, $choice) {
if ($success) {
if ($choice) {
- page_head('Input Recorded', $logged_in_user);
+ page_head('Input Recorded');
echo "Helpdesk Input Recorded";
echo "
Your input has been successfully recorded. Thank you for your help.
\n");
@@ -296,87 +297,4 @@ function build_alpha_summary_page($characters) {
fclose($descriptor);
}
-function uotd_thumbnail($profile, $user) {
- return "id>";
-}
-
-function generate_uotd_page($profile, $user) {
- $filename = PROFILE_PATH."uotd.html";
- $descriptor = fopen($filename, "w");
-
- if ($profile->has_picture) {
- fwrite($descriptor, uotd_thumbnail($profile, $user));
- }
- $x = user_links($user);
- fwrite($descriptor, "The " . PROJECT . " User of the Day is $x");
- fclose($descriptor);
-}
-
-// return the last UOTD profile, or null
-//
-function get_current_uotd() {
- $result = mysql_query("SELECT * FROM profile ORDER BY uotd_time DESC LIMIT 1");
- if (mysql_num_rows($result) > 0) {
- $p = mysql_fetch_object($result);
- } else {
- $p = null;
- }
- return mysql_free_result($result);
- return $p;
-}
-
-// see if it's time to pick a new UOTD.
-// Either way, generate the UOTD page
-//
-function build_uotd_page() {
- $current_utod = get_current_uotd();
- if ($current_utod) {
- $assigned = getdate($current_uotd->uotd_time);
- $now = getdate(time());
- if ($assigned['mday'] == $now['mday']) {
- $user = lookup_user_id($current_uotd->userid);
- generate_uotd_page($current_uotd, $user);
- exit();
- }
- }
- // TODO: Verify that adding RAND() didn't screw this up.
- $result = mysql_query("SELECT * FROM profile WHERE verification = 1 AND uotd_time IS NULL ORDER BY RAND()");
-
- // If the number of approved profiles dips below a threshold,
- // email the sys admin every time we pick a new one.
- //
- if ($result && mysql_num_rows($result) < UOTD_THRESHOLD) {
- mail(SYS_ADMIN_EMAIL,
- PROJECT . ": User of the Day pool is running low!",
- "The pool of approved candidates for User of the Day has
- reached your assigned threshold: there are now only " . mysql_num_rows($result) . " approved users.\n\n
- To approve more candidates for User of the Day,
- direct your web browser to the " . PROJECT . " administration page and click \"Unrated profile\""
- );
- }
-
- if ($result && mysql_num_rows($result) == 0) {
- // If all verified profiles have been selected as UOTD, reshow the one that was shown least recently.
- $result = mysql_query("SELECT * FROM profile WHERE verification = 1 ORDER BY uotd_time ASC LIMIT 1");
- }
-
- if (!$result || mysql_num_rows($result) == 0) {
- // No valid users of the day - do something.
- exit();
- }
- $profile = mysql_fetch_object($result);
- $user = lookup_user_id($profile->userid);
- generate_uotd_page($profile, $user);
-
- $sql = "UPDATE profile SET uotd_time = " . time() . " WHERE userid=$user->id";
- mysql_query($sql);
-
- mail($user->email_addr,
- "You're the " . PROJECT . " user of the day!",
- "Congratulations!\n\nYou've been chosen as the "
- . PROJECT . " user of the day!
- Your profile will be featured on the " . PROJECT . " website for the next 24 hours."
- );
-}
-
?>
diff --git a/html/inc/uotd.inc b/html/inc/uotd.inc
new file mode 100644
index 0000000000..dcdf89dc55
--- /dev/null
+++ b/html/inc/uotd.inc
@@ -0,0 +1,85 @@
+
+
+function uotd_thumbnail($profile, $user) {
+ return "id>";
+}
+
+function generate_uotd_page($profile, $user) {
+ $filename = PROFILE_PATH."uotd.html";
+ $descriptor = fopen($filename, "w");
+
+ if ($profile->has_picture) {
+ fwrite($descriptor, uotd_thumbnail($profile, $user));
+ }
+ $x = user_links($user);
+ fwrite($descriptor, "The " . PROJECT . " User of the Day is $x");
+ fclose($descriptor);
+}
+
+// return the last UOTD profile, or null
+//
+function get_current_uotd() {
+ $result = mysql_query("SELECT * FROM profile ORDER BY uotd_time DESC LIMIT 1");
+ $p = null;
+ if (mysql_num_rows($result) > 0) {
+ $p = mysql_fetch_object($result);
+ }
+ mysql_free_result($result);
+ return $p;
+}
+
+// see if it's time to pick a new UOTD.
+// Either way, generate the UOTD page
+//
+function build_uotd_page() {
+ $current_uotd = get_current_uotd();
+ if ($current_uotd) {
+ $assigned = getdate($current_uotd->uotd_time);
+ $now = getdate(time());
+ if ($assigned['mday'] == $now['mday']) {
+ $user = lookup_user_id($current_uotd->userid);
+ generate_uotd_page($current_uotd, $user);
+ exit();
+ }
+ }
+ // TODO: Verify that adding RAND() didn't screw this up.
+ $result = mysql_query("SELECT * FROM profile WHERE verification = 1 AND uotd_time IS NULL ORDER BY RAND()");
+
+ // If the number of approved profiles dips below a threshold,
+ // email the sys admin every time we pick a new one.
+ //
+ if ($result && mysql_num_rows($result) < UOTD_THRESHOLD) {
+ mail(SYS_ADMIN_EMAIL,
+ PROJECT . ": User of the Day pool is running low!",
+ "The pool of approved candidates for User of the Day has".
+ "reached your assigned threshold: there are now only " . mysql_num_rows($result) . " approved users.\n\n".
+ "To approve more candidates for User of the Day,".
+ "go to the " . PROJECT . " administration page and click \"Unrated profile\""
+ );
+ }
+
+ if ($result && mysql_num_rows($result) == 0) {
+ // If all verified profiles have been selected as UOTD, reshow the one that was shown least recently.
+ $result = mysql_query("SELECT * FROM profile WHERE verification = 1 ORDER BY uotd_time ASC LIMIT 1");
+ }
+
+ if (!$result || mysql_num_rows($result) == 0) {
+ // No valid users of the day - do something.
+ exit();
+ }
+ $profile = mysql_fetch_object($result);
+ $user = lookup_user_id($profile->userid);
+ generate_uotd_page($profile, $user);
+
+ $sql = "UPDATE profile SET uotd_time = " . time() . " WHERE userid=$user->id";
+ mysql_query($sql);
+
+ mail($user->email_addr,
+ "You're the " . PROJECT . " user of the day!",
+ "Congratulations!\n\nYou've been chosen as the "
+ . PROJECT . " user of the day!
+ Your profile will be featured on the " . PROJECT . " website for the next 24 hours."
+ );
+}
+
+?>
diff --git a/html/inc/util.inc b/html/inc/util.inc
index 3f815dc4ef..bd337413ca 100644
--- a/html/inc/util.inc
+++ b/html/inc/util.inc
@@ -122,7 +122,7 @@ function write_fd($fd, $str) {
}
}
-function page_head($title, $user=null, $fd=null) {
+function page_head($title, $fd=null) {
$styleSheet = URL_BASE . STYLESHEET;
write_fd($fd,
@@ -132,7 +132,7 @@ function page_head($title, $user=null, $fd=null) {
"
);
- project_banner($user, $fd);
+ project_banner($fd);
}
function page_tail($is_main=false, $fd=null) {
diff --git a/html/user/account_setup.php b/html/user/account_setup.php
index def8fe5902..854dfd2662 100644
--- a/html/user/account_setup.php
+++ b/html/user/account_setup.php
@@ -6,7 +6,7 @@
$user = get_logged_in_user();
- page_head("Account setup", $user);
+ page_head("Account setup");
echo "