mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=3570
This commit is contained in:
parent
edd1927b04
commit
385f605cb0
|
@ -13508,3 +13508,16 @@ David 14 June 2004
|
|||
edit_email_action.php
|
||||
login_action.php
|
||||
mail_passwd.php
|
||||
|
||||
Daniel 14 June 2004
|
||||
- changed uses of mysql_fetch_assoc() to mysql_fetch_object()
|
||||
- removed utility function get_profile_from_userid() (not used
|
||||
anywhere)
|
||||
|
||||
html/inc/
|
||||
subscribe.inc
|
||||
util.inc
|
||||
html/ops/
|
||||
migrate_tables.php
|
||||
profile_ops.php
|
||||
|
||||
|
|
|
@ -71,8 +71,8 @@ function notify_subscribers($threadID) {
|
|||
$sql = "SELECT DISTINCT * FROM subscriptions WHERE threadid = " . $threadID;
|
||||
$result = mysql_query($sql);
|
||||
|
||||
while ($row = mysql_fetch_assoc($result)) {
|
||||
send_notice_email($row['userid'], $threadID);
|
||||
while ($row = mysql_fetch_object($result)) {
|
||||
send_notice_email($row->userid, $threadID);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -81,14 +81,14 @@ function send_notice_email($userId, $threadID) {
|
|||
$thread = getThread($threadID);
|
||||
|
||||
$result = mysql_query("SELECT * FROM user WHERE id = $userId");
|
||||
$row = mysql_fetch_assoc($result);
|
||||
$row = mysql_fetch_object($result);
|
||||
|
||||
$title = PROJECT . ": A user has posted to your subscribed thread.";
|
||||
$link = URL_BASE . "forum_thread.php?id=" . $threadID;
|
||||
$body = "Another " . PROJECT . " user has posted to the thread \"" . stripslashes($thread->title) . "\".\n"
|
||||
."To view the updated thread, visit the following URL:\n\n$link";
|
||||
|
||||
mail($row['email_addr'], $title, $body);
|
||||
mail($row->email_addr, $title, $body);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -55,16 +55,6 @@ function get_user_from_id($id) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
function get_profile_from_userid($userid) {
|
||||
if ($userid) {
|
||||
$result = mysql_query("SELECT * FROM profile WHERE userid = $userid");
|
||||
if ($result) {
|
||||
return mysql_fetch_assoc($result);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function get_logged_in_user($must_be_logged_in=true) {
|
||||
$authenticator = init_session();
|
||||
if (!$authenticator) {
|
||||
|
|
|
@ -102,13 +102,13 @@ function migrate_tables() {
|
|||
if ($feedback_field_map[$i] == 'userid') {
|
||||
$result = mysql_query("SELECT * FROM user WHERE seti_id = " . $feedback_data[$i]);
|
||||
if ($result) {
|
||||
$row = mysql_fetch_assoc($result);
|
||||
$row = mysql_fetch_object($result);
|
||||
} else {
|
||||
print "DB error.\n";
|
||||
exit();
|
||||
}
|
||||
$feedback_data[$i] = $row['id'];
|
||||
$new_userid = $row['id'];
|
||||
$feedback_data[$i] = $row->id;
|
||||
$new_userid = $row->id;
|
||||
} else if ($feedback_field_map[$i] == 'has_picture') {
|
||||
|
||||
// Because the userid field comes before the picture
|
||||
|
@ -158,13 +158,13 @@ function migrate_tables() {
|
|||
|
||||
$result = mysql_query("SELECT * FROM user WHERE seti_id = " . $team_data[$i]);
|
||||
if ($result) {
|
||||
$row = mysql_fetch_assoc($result);
|
||||
$row = mysql_fetch_object($result);
|
||||
} else {
|
||||
print "DB error.\n";
|
||||
exit();
|
||||
}
|
||||
|
||||
$team_data[$i] = $row['id'];
|
||||
$team_data[$i] = $row->id;
|
||||
}
|
||||
|
||||
print $team_field_map[$i] . ": " . addslashes(clean_newlines(trim($team_data[$i]))) . "\n";
|
||||
|
@ -188,18 +188,18 @@ function migrate_tables() {
|
|||
|
||||
$result = mysql_query("SELECT * FROM user WHERE seti_id IS NOT NULL");
|
||||
|
||||
while ($user = mysql_fetch_assoc($result)) {
|
||||
while ($user = mysql_fetch_object($result)) {
|
||||
// Relink team ID.
|
||||
if (!is_null($user['teamid'])) {
|
||||
$result2 = mysql_query("SELECT * FROM team WHERE seti_id = " . $user['teamid']);
|
||||
$team = mysql_fetch_assoc($result2);
|
||||
$result2 = mysql_query("UPDATE user SET teamid = " . $team['id'] . " WHERE id = " . $user['id']);
|
||||
if (!is_null($user->teamid)) {
|
||||
$result2 = mysql_query("SELECT * FROM team WHERE seti_id = " . $user->teamid);
|
||||
$team = mysql_fetch_object($result2);
|
||||
$result2 = mysql_query("UPDATE user SET teamid = " . $team->id . " WHERE id = " . $user->id);
|
||||
}
|
||||
|
||||
// Send out email.
|
||||
split_munged_email_addr($user['email_addr'], $user['authenticator'], $address);
|
||||
split_munged_email_addr($user->email_addr, $user->authenticator, $address);
|
||||
|
||||
$body = "Your SETI@Home account has been transferred to BOINC. Your authenticator is\n\n" . $user['authenticator'];
|
||||
$body = "Your SETI@Home account has been transferred to BOINC. Your authenticator is\n\n" . $user->authenticator;
|
||||
//mail($address, "Your SETI@Home BOINC account is ready!", $body);
|
||||
|
||||
}
|
||||
|
@ -324,4 +324,4 @@ function move_user_pic($img_name, $userid) {
|
|||
}
|
||||
print "Image $filename does not exist!\n";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ if (array_key_exists('num', $_GET) && array_key_exists('set', $_GET)) {
|
|||
if (!$result) {
|
||||
// TODO: DB error page;
|
||||
} else {
|
||||
$profile = mysql_fetch_assoc($result);
|
||||
$profile = mysql_fetch_object($result);
|
||||
if (!$profile) {
|
||||
echo $sql;
|
||||
echo "<br>No more profiles in this category.<p><a href=index.php>Return to ", PROJECT, " Project Management</a>";
|
||||
|
@ -57,7 +57,7 @@ if (array_key_exists('num', $_GET) && array_key_exists('set', $_GET)) {
|
|||
}
|
||||
|
||||
if ($vote == -1 || $vote == 1) {
|
||||
$sql = "UPDATE profile SET verification = $vote WHERE userid = " . $profile['userid'];
|
||||
$sql = "UPDATE profile SET verification = $vote WHERE userid = " . $profile->userid;
|
||||
mysql_query($sql);
|
||||
}
|
||||
$header = "Location: profile_ops.php?set=" . $set . "&num=" . ($num+1);
|
||||
|
@ -70,7 +70,7 @@ if (array_key_exists('num', $_GET) && array_key_exists('set', $_GET)) {
|
|||
|
||||
// Put the profile itself into a table to separate it visually from the controls.
|
||||
echo "<br><center><table border = 1><tr><td align=\"center\">";
|
||||
show_profile($profile['userid'], true);
|
||||
show_profile($profile->userid, true);
|
||||
echo "</td></tr></table>";
|
||||
echo "<p><a href=index.php>Return to ", PROJECT, " Project Management</a></center>";
|
||||
|
||||
|
@ -104,18 +104,18 @@ function show_verify_tools($num, $profile) {
|
|||
echo "
|
||||
<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#C0C0C0\">
|
||||
<tr>
|
||||
<td>User ID: <b>", $profile['userid'], "</b><br>
|
||||
<td>User ID: <b>", $profile->userid, "</b><br>
|
||||
Last selected UOTD: <b>";
|
||||
|
||||
if ($profile['uotd_time']) {
|
||||
echo date("F jS, Y", $profile['uotd_time']);
|
||||
if ($profile->uotd_time) {
|
||||
echo date("F jS, Y", $profile->uotd_time);
|
||||
} else {
|
||||
echo "Never";
|
||||
}
|
||||
|
||||
echo "</td>\n<td align=\"center\">", $profile['recommend'], " recommendation(s), ", $profile['reject'], " rejection(s).<br>";
|
||||
echo "</td>\n<td align=\"center\">", $profile->recommend, " recommendation(s), ", $profile->reject, " rejection(s).<br>";
|
||||
|
||||
echo "Current status: ", $verification[$profile['verification']];
|
||||
echo "Current status: ", $verification[$profile->verification];
|
||||
|
||||
echo"
|
||||
</td>\n<td align=\"right\">
|
||||
|
|
Loading…
Reference in New Issue