id");
if ($result) {
$profile_info = mysql_fetch_array($result, MYSQL_ASSOC);
}
setup_form();
$profile_info?page_head("Edit your Profile"):page_head("Create a Profile");
start_table_noborder();
show_description();
show_questions();
show_picture_option();
show_finale();
end_table();
close_form();
page_tail();
}
function setup_form() {
if ($_POST['submit']) {
process_results();
exit();
}
echo "
";
}
function show_description() {
global $profile_info;
global $user;
$profile_info?row1("Edit User Profile: " . $user->name):row1("Create a User Profile");
rowify("
By creating a user profile you can share your opinions and background
with the entire ".PROJECT." community.
");
rowify(" ");
}
function show_questions() {
show_profile_heading1();
show_profile_question1();
rowify(" ");
show_textarea('response1');
rowify(" ");
show_profile_heading2();
show_profile_question2();
rowify(" ");
show_textarea('response2');
rowify(" ");
show_language_selection();
rowify(" ");
}
function show_textarea($name) {
global $profile_info;
rowify("");
}
function show_picture_option() {
global $profile_info;
row1("Your Picture");
if ($profile_info['has_picture']) {
echo "
Delete
You have previously uploaded a picture of yourself to accompany your profile, shown at left.
If you would like to replace it, please click the \"Browse\" button and select the JPEG or PNG file
you would like to use instead. (No animated GIFs, please!) If you would rather not have a picture
with your profile, click the \"Delete\" checkbox. If you like your current picture, there is no need
to do anything.
NOTE: Please keep your image small (less than 50K bytes)
";
end_table();
echo "";
}
else {
rowify("
Do you have a picture of yourself on your computer?
If you would like us to include it with your profile,
please click the \"Browse\" button and select the JPEG or PNG file
you want to send. (No animated GIFs, please!)
NOTE: Please keep your image small (less than 50K bytes)
");
}
}
function show_language_selection() {
global $profile_info;
row1("Select Your Primary Language");
rowify("Selecting a language will help others with the same language preference to find each others' profiles and message board postings.");
echo "