function show_profile_form($profile, $warning = null) { if ($profile) { page_head(tra("Edit your profile"), null, null, null, recaptcha_get_head_extra()); } else { page_head(tra("Create a profile"), null, null, null, recaptcha_get_head_extra()); } if ($warning) { echo "<p class=\"text-danger\">{$warning}</p>\n "; } echo "\n <form action=", $_SERVER['PHP_SELF'], " method=\"POST\", ENCTYPE=\"multipart/form-data\">\n "; start_table_noborder(); show_description(); show_questions($profile); show_picture_option($profile); show_submit(); end_table(); echo "</form>"; page_tail(); }
// along with BOINC. If not, see <http://www.gnu.org/licenses/>. require_once "../inc/util.inc"; require_once "../inc/profile.inc"; require_once "../inc/uotd.inc"; if (DISABLE_PROFILES) { error_page("Profiles are disabled"); } check_get_args(array("cmd", "pic")); $option = get_str('cmd', true); if ($option) { select_profile($option); exit; } page_head(tra("Profiles")); echo "\n <p>" . tra("%1Profiles%2 let individuals share backgrounds and opinions with the %3 community.", "<b>", "</b>", PROJECT) . " " . tra("Explore the diversity of your fellow volunteers, and contribute your own views for others to enjoy.") . "\n <p>" . tra("If you haven't already, you can %1create your own user profile%2 for others to see!", "<a href=\"create_profile.php\">", "</a>"); start_table_noborder(); $today = getdate(time()); $UOTD_heading = tra("User of the Day") . " -- " . $today['month'] . " " . $today['mday'] . ", " . $today['year']; row1($UOTD_heading); echo "<tr><td>"; $profile = get_current_uotd(); if ($profile) { $user = BoincUser::lookup_id($profile->userid); echo uotd_thumbnail($profile, $user); echo user_links($user) . "<br>"; $resp = output_transform($profile->response1); $resp = sanitize_tags($resp); echo sub_sentence($resp, ' ', 150, true); } echo "</td></tr>"; row1(tra("User Profile Explorer"));
function show_profile_form($profile, $warning = null) { if ($profile) { page_head(tra("Edit your profile"), null, null, null, IE_COMPAT_MODE); } else { page_head(tra("Create a profile"), null, null, null, IE_COMPAT_MODE); } if ($warning) { echo "<span class=error>{$warning}</span><p>\n "; } echo "\n <form action=", $_SERVER['PHP_SELF'], " method=\"POST\", ENCTYPE=\"multipart/form-data\">\n "; start_table_noborder(); show_description(); show_questions($profile); show_picture_option($profile); show_submit(); end_table(); echo "</form>"; page_tail(); }