Changeset 8 for pages/wss_partners.php
- Timestamp:
- Jun 5, 2008, 9:38:23 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pages/wss_partners.php
r6 r8 1 1 <?php 2 2 $tpl->output['th_players'] = $text['th_players']; 3 $tpl->output['th_name'] =$text['name']; 3 $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']; 4 11 $tpl->output['order_by'] = $text['order_by']; 5 12 $tpl->output['place'] = $text['info_place']; 6 13 $tpl->output['wss_partners_h2'] = $menu['mm2']; 14 7 15 if(!array_key_exists('order', $_GET)) $_GET['order'] = 0; 8 16 $order_index = (int) $_GET['order']; … … 16 24 case 5: $order = ' order by `players` desc '; break; 17 25 case 6: $order = ' order by `online` desc '; break; 26 case 7: $order = ' order by `online` desc,`latency`'; break; 18 27 } 19 28 $tpl->output['s0'] = ''; … … 24 33 $tpl->output['s5'] = ''; 25 34 $tpl->output['s6'] = ''; 35 $tpl->output['s7'] = ''; 26 36 if (empty($order_index)) 27 37 { … … 33 43 } 34 44 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 `wss_partner`=1 '.$order, 'p');45 $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 `wss_partner`=1 '.$order, 'p'); 36 46 $pa->PageSize = 20; 37 47 $pa->PageLinksDisplayed = 5; … … 66 76 $tpl->output['servers_data'] .='<td>'.(int)$row['players'].'</td>'; 67 77 $tpl->output['servers_data'] .='<td>'.$row['online'].'%</td>'; 78 if($row['latency'] == 0) $Latency = '?'; else $Latency = round($row['latency']).'ms'; 79 $tpl->output['servers_data'] .='<td>'.$Latency.'</td>'; 68 80 $tpl->output['servers_data'] .='</tr>'; 69 81 }
Note:
See TracChangeset
for help on using the changeset viewer.