Ticket #982: statistics.diff

File statistics.diff, 4.5 KB (added by Christian Beer, 14 years ago)

statistic related pages (top_*.php)

  • user/top_hosts.php

     
    2121require_once("../inc/user.inc");
    2222require_once("../inc/host.inc");
    2323require_once("../inc/boinc_db.inc");
    24 require_once("../inc/translation.inc");
    2524
    2625$config = get_config();
    2726$hosts_per_page = parse_config($config, "<hosts_per_page>");
     
    6362if ($offset % $hosts_per_page) $offset = 0;
    6463
    6564if ($offset >= ITEM_LIMIT) {
    66     error_page("Limit exceeded - Sorry, first ".ITEM_LIMIT." items only");
     65    error_page(tra("Limit exceeded - Sorry, first %1 items only", ITEM_LIMIT));
    6766}
    6867
    6968$cache_args = "sort_by=$sort_by&offset=$offset";
     
    8988echo "</table>\n<p>";
    9089if ($offset > 0) {
    9190    $new_offset = $offset - $hosts_per_page;
    92     echo "<a href=top_hosts.php?sort_by=$sort_by&amp;offset=$new_offset>Previous ".$hosts_per_page."</a> | ";
     91    echo "<a href=top_hosts.php?sort_by=$sort_by&amp;offset=$new_offset>".tra("Previous %1", $hosts_per_page)."</a> | ";
    9392
    9493}
    9594if ($n==$hosts_per_page){ //If we aren't on the last page
    9695    $new_offset = $offset + $hosts_per_page;
    97     echo "<a href=top_hosts.php?sort_by=$sort_by&amp;offset=$new_offset>Next ".$hosts_per_page."</a>";
     96    echo "<a href=top_hosts.php?sort_by=$sort_by&amp;offset=$new_offset>".tra("Next %1", $hosts_per_page)."</a>";
    9897}
    9998
    10099page_tail();
  • user/top_teams.php

     
    2020require_once("../inc/util.inc");
    2121require_once("../inc/team.inc");
    2222require_once("../inc/db.inc");
    23 require_once("../inc/translation.inc");
    2423
    2524$config = get_config();
    2625$teams_per_page = parse_config($config, "<teams_per_page>");
     
    9695        set_cache_data(teams_to_store($data),$cache_args);
    9796    }
    9897} else {
    99     error_page("Limit exceeded - Sorry, first ".ITEM_LIMIT." items only");
     98    error_page(tra("Limit exceeded - Sorry, first %1 items only", ITEM_LIMIT));
    10099}
    101100
    102101
     
    104103page_head(tra("Top %1 teams", $type_name));
    105104
    106105if (count($data) == 0) {
    107     echo "There are no $type_name teams";
     106    echo tra("There are no %1 teams", $type_name);
    108107} else {
    109108    start_table();
    110109    team_table_start($sort_by, $type_url);
     
    117116    echo "</table>\n<p>";
    118117    if ($offset > 0) {
    119118        $new_offset = $offset - $teams_per_page;
    120         echo "<a href=top_teams.php?sort_by=$sort_by&amp;offset=$new_offset".$type_url.">Previous ".$teams_per_page."</a> | ";
     119        echo "<a href=top_teams.php?sort_by=$sort_by&amp;offset=$new_offset".$type_url.">".tra("Previous %1", $teams_per_page)."</a> | ";
    121120
    122121    }
    123122    if ($n==$teams_per_page){ //If we aren't on the last page
    124123        $new_offset = $offset + $teams_per_page;
    125         echo "<a href=top_teams.php?sort_by=$sort_by&amp;offset=$new_offset".$type_url.">Next ".$teams_per_page."</a>";
     124        echo "<a href=top_teams.php?sort_by=$sort_by&amp;offset=$new_offset".$type_url.">".tra("Next %1", $teams_per_page)."</a>";
    126125    }
    127126}
    128127page_tail();
  • user/top_users.php

     
    2020require_once("../inc/util.inc");
    2121require_once("../inc/user.inc");
    2222require_once("../inc/boinc_db.inc");
    23 require_once("../inc/translation.inc");
    2423
    2524$config = get_config();
    2625$users_per_page = parse_config($config, "<users_per_page>");
     
    108107        set_cache_data(serialize($data),$cache_args);
    109108    }
    110109} else {
    111     error_page("Limit exceeded - Sorry, first ".ITEM_LIMIT." items only");
     110    error_page(tra("Limit exceeded - Sorry, first %1 items only", ITEM_LIMIT));
    112111}
    113112
    114113// Now display what we've got (either gotten from cache or from DB)
     
    123122echo "</table>\n<p>";
    124123if ($offset > 0) {
    125124    $new_offset = $offset - $users_per_page;
    126     echo "<a href=top_users.php?sort_by=$sort_by&amp;offset=$new_offset>Previous ".$users_per_page."</a> | ";
     125    echo "<a href=top_users.php?sort_by=$sort_by&amp;offset=$new_offset>".tra("Previous %1", $users_per_page)."</a> | ";
    127126
    128127}
    129128if ($n==$users_per_page){ //If we aren't on the last page
    130129    $new_offset = $offset + $users_per_page;
    131     echo "<a href=top_users.php?sort_by=$sort_by&amp;offset=$new_offset>Next ".$users_per_page."</a>";
     130    echo "<a href=top_users.php?sort_by=$sort_by&amp;offset=$new_offset>".tra("Next %1", $users_per_page)."</a>";
    132131}
    133132
    134133page_tail();