Changeset 8 for pages/servers.php


Ignore:
Timestamp:
Jun 5, 2008, 9:38:23 PM (16 years ago)
Author:
george
Message:

Přidáno: Zaznamenávání a zobrazování údaje o odezevně serverů.
Upraveno: Šablony stránek a použití jazykových proměnných ve větší míře.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pages/servers.php

    r6 r8  
    22$tpl->output['th_players'] = $text['th_players'];
    33$tpl->output['th_name'] = $text['name'];
     4$tpl->output['th_latency'] = $text['th_latency'];
     5$tpl->output['th_version'] = $text['th_version'];
     6$tpl->output['th_xp'] = $text['th_xp'];
     7$tpl->output['th_online_state'] = $text['th_online_state'];
     8$tpl->output['th_type'] = $text['th_type'];
     9$tpl->output['th_rating'] = $text['th_rating'];
     10$tpl->output['th_recommend'] = $text['th_recommend'];
    411$tpl->output['order_by'] = $text['order_by'];
    512$tpl->output['place'] = $text['info_place'];
     
    1623  case 5: $order = ' order by `players` desc '; break;
    1724  case 6: $order = ' order by `online` desc '; break;
     25  case 7: $order = ' order by `online` desc,`latency`'; break;
    1826}
    1927$tpl->output['s0'] = '';
     
    2432$tpl->output['s5'] = '';
    2533$tpl->output['s6'] = '';
     34$tpl->output['s7'] = '';
    2635if (empty($order_index))
    2736{
     
    3342}
    3443 
    35 $pa = new CleverPager('select `id`,`wss_partner`, LEFT(`name`, 25) as `name`, `place`, `rating_sum`/`ratings` as `rating`, `version`, `type`, `xp`, `online`, `online_players_sum`/`player_checks` as `players` from `servers` where `place`=1 '.$order, 'p');
     44$pa = new CleverPager('select `id`,`wss_partner`, LEFT(`name`, 25) as `name`, `place`, `rating_sum`/`ratings` as `rating`, `version`, `type`, `xp`, `online`, `online_players_sum`/`player_checks` as `players`,`latency` from `servers` where `place`=1 '.$order, 'p');
    3645$pa->PageSize = $Config['DisplayServerCountPerPage'];
    3746$pa->PageLinksDisplayed = 5;
     
    6675  $tpl->output['servers_data'] .='<td>'.(int)$row['players'].'</td>';
    6776  $tpl->output['servers_data'] .='<td>'.$row['online'].'%</td>';
     77  if($row['latency'] == 0) $Latency = '?'; else $Latency = round($row['latency']).'ms';
     78  $tpl->output['servers_data'] .='<td>'.$Latency.'</td>';
    6879  $tpl->output['servers_data'] .='</tr>';
    6980  }
Note: See TracChangeset for help on using the changeset viewer.