Пример #1
0
function build_country_summary_page($countryMembers)
{
    $countries = array_keys($countryMembers);
    $filename = PROFILE_PATH . "profile_country.html";
    open_output_buffer();
    page_head("User Profiles by Country", null, null, "../");
    echo "Last updated " . pretty_time_str(time()) . "<p>";
    echo "<table border=0>\n";
    echo "<tr><td><b>Country</b></td><td align=\"center\"><b>Profiles</b></td></tr>\n";
    foreach ($countries as $country) {
        $numMembers = count($countryMembers[$country]);
        $name = get_legal_filename($country);
        echo "<tr>\n<td><a href=\"profile_country_", "{$name}_1.html\">{$country}</a></td><td align=\"center\">{$numMembers}</td></td>\n";
    }
    echo "</table>";
    page_tail(false, "../");
    close_output_buffer($filename);
}
Пример #2
0
    echo tra("%1 currently has the following applications. When you participate in %1, work for one or more of these applications will be assigned to your computer. The current version of the application will be downloaded to your computer. This happens automatically; you don't have to do anything.", PROJECT) . "<br><br>\n    ";
    start_table();
}
$apps = BoincApp::enum("deprecated=0");
foreach ($apps as $app) {
    if ($xml) {
        echo "<application>\n";
        echo "    <name>{$app->user_friendly_name}</name>\n";
        echo "    <id>{$app->id}</id>\n";
    } else {
        echo "\n            <tr><th colspan=4>{$app->user_friendly_name}</th></tr>\n            <tr>\n                <th>" . tra("Platform") . "</th>\n                <th>" . tra("Version") . "</th>\n                <th>" . tra("Installation time") . "</th>\n            </tr>\n        ";
    }
    foreach ($platforms as $platform) {
        $avs = latest_avs_app_platform($app->id, $platform->id);
        foreach ($avs as $av) {
            $create_time_f = pretty_time_str($av->create_time);
            if ($xml) {
                echo "    <version>\n";
                echo "        <platform_short>{$platform->name}</platform_short>\n";
                echo "        <platform_long>{$platform->user_friendly_name}</platform_long>\n";
                echo "        <version_num>{$av->version_num}</version_num>\n";
                echo "        <plan_class>{$av->plan_class}</plan_class>\n";
                echo "        <date>{$create_time_f}</date>\n";
                echo "        <date_unix>{$av->create_time}</date_unix>\n";
                echo "    </version>\n";
            } else {
                $version_num_f = sprintf("%0.2f", $av->version_num / 100);
                if ($av->plan_class) {
                    $version_num_f .= " ({$av->plan_class})";
                }
                echo "<tr>\n                    <td>{$platform->user_friendly_name}</td>\n                    <td>{$version_num_f}</td>\n                    <td>{$create_time_f}</td>\n                    </tr>\n                ";