. require_once("../inc/profile.inc"); $userid = get_int('userid'); $user = BoincUser::lookup_id($userid); if (!$user) { error_page(tra("No such user")); } if (!$user->has_profile) { error_page(tra("This user has no profile")); } $logged_in_user = get_logged_in_user(false); check_whether_to_show_profile($user, $logged_in_user); $cache_args = "userid=$userid"; $cacheddata = get_cached_data(USER_PROFILE_TTL, $cache_args); if ($cacheddata){ // Already got a cached version of the information $community_links_object = unserialize($cacheddata); } else { // Need to generate a new bunch of data $community_links_object = get_community_links_object($user); set_cache_data(serialize($community_links_object), $cache_args); } page_head(tra("Profile: %1", $user->name)); start_table(); echo ""; start_table(); show_profile($user, $logged_in_user); end_table(); echo ""; start_table(); row2(tra("Account data"), "".tra("View")."" ); community_links($community_links_object, $logged_in_user); end_table(); echo ""; end_table(); page_tail(); ?>