2002-08-12 19:46:52 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
function print_edit_user_info($user) {
|
|
|
|
printf(
|
2002-08-12 21:35:41 +00:00
|
|
|
"<form method=post action=edit_action.php>\n"
|
|
|
|
.TABLE2."\n"
|
2002-08-13 23:59:34 +00:00
|
|
|
."<tr><td colspan=2><b>To edit your User Information, fill out the fields that you wish to change.\n"
|
|
|
|
." You do not need to enter anything into the fields that you wish to keep the same.</td></tr>\n"
|
|
|
|
."<tr><td colspan=2><br></td></tr>\n"
|
2002-08-14 00:27:18 +00:00
|
|
|
."<tr>".TD2.LG_FONT."<b>User name:</b></font></td></tr>\n"
|
2002-08-12 19:46:52 +00:00
|
|
|
);
|
2002-08-13 23:59:34 +00:00
|
|
|
row2("<input name=my_name type=text size=30>", $user->name);
|
|
|
|
echo "<tr><td colspan=2><br></td></tr>\n";
|
2002-08-14 00:27:18 +00:00
|
|
|
echo "<tr>".TD2.LG_FONT."<b>Email address:</b></font></td></tr>\n";
|
2002-08-13 23:59:34 +00:00
|
|
|
row2("<input name=my_email type=text size=50>", $user->email_addr);
|
|
|
|
echo "<tr><td colspan=2><br></td></tr>\n";
|
2002-08-14 00:27:18 +00:00
|
|
|
echo "<tr>".TD2.LG_FONT."<b>Country:</b></font></td></tr>\n";
|
2002-08-13 23:59:34 +00:00
|
|
|
echo "<tr><td><select name=my_country>\n";
|
2002-08-12 19:46:52 +00:00
|
|
|
print_country_select();
|
2002-08-12 21:35:41 +00:00
|
|
|
echo "</select></td>\n";
|
2002-08-13 23:59:34 +00:00
|
|
|
echo "<td>$user->country</td></tr>\n";
|
|
|
|
echo "<tr><td colspan=2><br></td></tr>\n";
|
2002-08-14 00:27:18 +00:00
|
|
|
echo "<tr>".TD2.LG_FONT."<b>Postal (ZIP) code:</b></font></td></tr>\n";
|
2002-08-13 23:59:34 +00:00
|
|
|
row2("<input name=my_zip type=text size=20>", $user->postal_code);
|
2002-08-12 19:46:52 +00:00
|
|
|
echo "</table>\n";
|
2002-08-12 21:35:41 +00:00
|
|
|
echo "<br><br>       <input type=submit value=\"Edit\">\n";
|
2002-08-13 23:59:34 +00:00
|
|
|
echo "</form>";
|
2002-08-12 21:35:41 +00:00
|
|
|
}
|
|
|
|
|
2002-08-13 23:59:34 +00:00
|
|
|
function print_change_password($user) {
|
|
|
|
printf(
|
|
|
|
"<form method=post action=change_pass_action.php>\n"
|
|
|
|
.TABLE2."\n"
|
2002-08-14 00:27:18 +00:00
|
|
|
. "<tr>".TD.LG_FONT."<b>Old Password:</b></font></td></tr>\n"
|
2002-08-13 23:59:34 +00:00
|
|
|
."<tr><td><b>To change your password, please enter your old password below:</b></td></tr>\n"
|
|
|
|
."<tr><td><input name=my_pass type=password></td></tr>\n"
|
|
|
|
."<tr><td><br></td></tr>\n"
|
2002-08-14 00:27:18 +00:00
|
|
|
."<tr>".TD.LG_FONT."<b>New Password:</b></font></td></tr>\n"
|
2002-08-13 23:59:34 +00:00
|
|
|
."<tr><td><b>Next, enter your new password:</b></td></tr>\n"
|
|
|
|
."<tr><td><input name=new_pass type=password></td></tr>\n"
|
|
|
|
."<tr><td><b>Retype password to confirm:</td></tr>"
|
|
|
|
."<tr><td></b><input name=new_pass2 type=password></td></tr>\n"
|
|
|
|
."</table>\n"
|
|
|
|
."<br><br>       <input type=submit value=\"Change Password\">\n"
|
|
|
|
."</form>\n"
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-08-12 21:35:41 +00:00
|
|
|
function print_update_ok($e_ok) {
|
|
|
|
if ($e_ok == EMAIL_EXISTS) {
|
|
|
|
printf(
|
2002-11-08 17:21:45 +00:00
|
|
|
TABLE2."\n"
|
|
|
|
."<tr><td>There's already an account with that email address. Click the <b>Back</b> button\n"
|
|
|
|
." on your browser to edit your information, or <a href=login.php>login </a>to your \n"
|
|
|
|
.$project." account.</td></tr>\n"
|
|
|
|
."<tr><td>Any other changes you've made, if any, were successfully updated.</td></tr>\n"
|
|
|
|
."</table>\n"
|
2002-08-12 21:35:41 +00:00
|
|
|
);
|
2002-08-13 00:08:08 +00:00
|
|
|
} else if ($e_ok == EMAIL_FAIL) {
|
2002-08-12 21:35:41 +00:00
|
|
|
printf(
|
2002-11-08 17:21:45 +00:00
|
|
|
TABLE2."\n"
|
|
|
|
."<tr><td>Your email address failed to be updated. Click the <b>Back</b> button\n"
|
|
|
|
." on your browser to edit your information, or try again later.</td></tr>\n"
|
|
|
|
."<tr><td>Any other changes you've made, if any, were successfully updated.</td></tr>\n"
|
|
|
|
."</table>\n"
|
2002-08-12 21:35:41 +00:00
|
|
|
);
|
2002-08-13 00:08:08 +00:00
|
|
|
} else if ($e_ok == EMAIL_UPDATED) {
|
2002-08-12 21:35:41 +00:00
|
|
|
printf(
|
2002-11-08 17:21:45 +00:00
|
|
|
TABLE2."\n"
|
|
|
|
."<tr><td>Your information was successfully updated. A new, temporary password will be sent to the\n"
|
|
|
|
." email address you provided. You must use this new password the next time you login.</td></tr>\n"
|
|
|
|
."</table>\n"
|
2002-08-13 00:08:08 +00:00
|
|
|
);
|
|
|
|
} else {
|
|
|
|
printf(
|
2002-11-08 17:21:45 +00:00
|
|
|
TABLE2."\n"
|
|
|
|
."<tr><td>Your information was successfully updated.</td></tr>\n"
|
|
|
|
."</table>\n"
|
2002-08-13 00:08:08 +00:00
|
|
|
);
|
|
|
|
}
|
2002-08-12 21:35:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function print_update_fail($e_ok) {
|
|
|
|
if ($e_ok == EMAIL_EXISTS) {
|
|
|
|
printf(
|
2002-11-08 17:21:45 +00:00
|
|
|
TABLE2."\n"
|
|
|
|
."<tr><td>There's already an account with that email address. Click the <b>Back</b> button\n"
|
|
|
|
." on your browser to edit your information, or <a href=login.php>login </a>to your \n"
|
|
|
|
.$project." account. </td></tr>\n"
|
|
|
|
."<tr><td>Any other changes you've made, if any, failed to be updated. Please try again later.</td></tr>\n"
|
|
|
|
."</table>\n"
|
2002-08-12 21:35:41 +00:00
|
|
|
);
|
2002-08-13 00:08:08 +00:00
|
|
|
} else if ($e_ok == EMAIL_FAIL) {
|
|
|
|
printf(
|
2002-11-08 17:21:45 +00:00
|
|
|
TABLE2."\n"
|
|
|
|
."<tr><td>Your information failed to be updated. Click the <b>Back</b> button\n"
|
|
|
|
." on your browser to edit your information, or try again later.</td></tr>\n"
|
|
|
|
."</table>\n"
|
2002-08-13 00:08:08 +00:00
|
|
|
);
|
|
|
|
} else if ($e_ok == EMAIL_UPDATED) {
|
|
|
|
printf(
|
2002-11-08 17:21:45 +00:00
|
|
|
TABLE2."\n"
|
|
|
|
."<tr><td>Your email address was successfully updated. A new, temporary password will be sent to the\n"
|
|
|
|
." email address you provided. You must use this new password the next time you login.</td></tr>\n"
|
|
|
|
."<tr><td>Any other changes you've made, if any, failed to be updated. Please try again later.</td></tr>\n"
|
|
|
|
."</table>\n"
|
2002-08-13 00:08:08 +00:00
|
|
|
);
|
|
|
|
} else {
|
|
|
|
printf(
|
2002-11-08 17:21:45 +00:00
|
|
|
TABLE2."\n"
|
|
|
|
."<tr><td>Your information failed to be updated. Please try again later.</td></tr>\n"
|
|
|
|
."</table>\n"
|
2002-08-13 00:08:08 +00:00
|
|
|
);
|
|
|
|
}
|
2002-08-12 19:46:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|