Changeset 6 for pages/servers.php


Ignore:
Timestamp:
Jun 4, 2008, 9:01:09 AM (17 years ago)
Author:
george
Message:

Upraveno: Změna systému sledování procentuálního online stavu. Přidána tabulka servers_online pro uchování stavu serveru za poslední definovanou periodu. Dosavadní systém počítal online stav od počáteční registrace daného serveru což je nevyhovující a zavádějící.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pages/servers.php

    r3 r6  
    99switch ($order_index)
    1010{
    11   case 0: $order = ' order by `name` desc '; break;
     11  case 0: $order = ' order by `name`'; break;
    1212  case 1: $order = ' order by `rating` desc '; break;
    1313  case 2: $order = ' order by `version` desc '; break;
     
    3333}
    3434 
    35 $pa = new CleverPager('select `id`,`wss_partner`, LEFT(`name`, 25) as `name`, `place`, `rating_sum`/`ratings` as `rating`, `version`, `type`, `xp`, `online`/`online_checks` as `online`, `online_players_sum`/`player_checks` as `players` from `servers` where `place`=1 '.$order, 'p');
     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');
    3636$pa->PageSize = $Config['DisplayServerCountPerPage'];
    3737$pa->PageLinksDisplayed = 5;
     
    6565  $tpl->output['servers_data'] .='<td>'.$xp.'</td>';
    6666  $tpl->output['servers_data'] .='<td>'.(int)$row['players'].'</td>';
    67   $tpl->output['servers_data'] .='<td>'.(100*$row['online']).'%</td>';
     67  $tpl->output['servers_data'] .='<td>'.$row['online'].'%</td>';
    6868  $tpl->output['servers_data'] .='</tr>';
    6969  }
Note: See TracChangeset for help on using the changeset viewer.