Пример #1
0
        $community_links = $data->clo;
    } else {
        // No data was found, generate new data for the cache and store it
        $user = lookup_user_id($id);
        BoincForumPrefs::lookup($user);
        $user = @get_other_projects($user);
        $community_links = get_community_links_object($user);
        $data->user = $user;
        $data->clo = $community_links;
        set_cached_data(USER_PAGE_TTL, serialize($data), $cache_args);
    }
    if (!$user->id) {
        error_page("No such user");
    }
    $logged_in_user = get_logged_in_user(false);
    page_head($user->name);
    start_table();
    echo "<tr><td valign=top>";
    start_table();
    show_user_summary_public($user);
    end_table();
    project_user_summary($user);
    show_other_projects($user, false);
    echo "</td><td valign=top>";
    start_table();
    show_profile_link($user);
    community_links($community_links, $logged_in_user);
    end_table();
    echo "</td></tr></table>";
    page_tail(true);
}
Пример #2
0
        $user->has_profile = 1;
    } else {
        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_cached_data(USER_PROFILE_TTL, serialize($community_links_object), $cache_args);
}
page_head(tra("Profile: %1", $user->name));
start_table();
echo "<tr><td valign=\"top\">";
start_table();
show_profile($user, $logged_in_user);
end_table();
echo "</td><td valign=\"top\">";
start_table();
row2(tra("Account data"), "<a href=\"show_user.php?userid=" . $userid . "\">" . tra("View") . "</a>");
community_links($community_links_object, $logged_in_user);
end_table();
echo "</td></tr>";
end_table();
page_tail();