- Timestamp:
- Jun 5, 2008, 9:38:23 PM (16 years ago)
- Location:
- pages
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pages/a_servers.php
r6 r8 2 2 $tpl->output['th_players'] = $text['th_players']; 3 3 $tpl->output['servers_h2'] = $text['abroad_servers']; 4 $tpl->output['th_name'] =$text['name']; 4 $tpl->output['th_players'] = $text['th_players']; 5 $tpl->output['th_name'] = $text['name']; 6 $tpl->output['th_latency'] = $text['th_latency']; 7 $tpl->output['th_version'] = $text['th_version']; 8 $tpl->output['th_xp'] = $text['th_xp']; 9 $tpl->output['th_online_state'] = $text['th_online_state']; 10 $tpl->output['th_type'] = $text['th_type']; 11 $tpl->output['th_rating'] = $text['th_rating']; 12 $tpl->output['th_recommend'] = $text['th_recommend']; 5 13 $tpl->output['order_by'] = $text['order_by']; 6 14 $tpl->output['place'] = $text['info_place']; … … 17 25 case 5: $order = ' order by `players` desc '; break; 18 26 case 6: $order = ' order by `online` desc '; break; 27 case 7: $order = ' order by `online` desc,`latency`'; break; 19 28 } 20 29 $tpl->output['s0'] = ''; … … 25 34 $tpl->output['s5'] = ''; 26 35 $tpl->output['s6'] = ''; 36 $tpl->output['s7'] = ''; 27 37 if (empty($order_index)) 28 38 { … … 34 44 } 35 45 36 $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`=2 '.$order, 'p');46 $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`=2 '.$order, 'p'); 37 47 $pa->PageSize = 20; 38 48 $pa->PageLinksDisplayed = 5; … … 67 77 $tpl->output['servers_data'] .='<td>'.(int)$row['players'].'</td>'; 68 78 $tpl->output['servers_data'] .='<td>'.($row['online']).'%</td>'; 79 if($row['latency'] == 0) $Latency = '?'; else $Latency = round($row['latency']).'ms'; 80 $tpl->output['servers_data'] .='<td>'.$Latency.'</td>'; 69 81 $tpl->output['servers_data'] .='</tr>'; 70 82 } -
pages/server.php
r6 r8 1 1 <?php 2 $tpl->output['th_players'] = $text['th_players']; 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']; 2 11 $tpl->output['server_reg_desc'] = $text['reg_desc']; 3 12 $tpl->output['info_place'] = $text['info_place']; 4 13 $tpl->output['info_avarage_players'] = $text['info_avarage_players']; 5 14 $tpl->output['info_owner'] = $text['info_owner']; 15 6 16 $id = (int)$_GET['str1']; 7 17 $server_info = $db->strip($db->query_fetch_assoc('SELECT *, CAST(`online_players_sum`/`player_checks` AS UNSIGNED) as `online_players` FROM `servers` WHERE `id` = '.$id)); 8 18 9 if ($server_info['wss_partner']==1)10 19 if($server_info['wss_partner'] == 1) 20 { 11 21 $tpl->output['server_name'] = '<img src="templates/img/hvezda.gif" alt="WSS Partner" title="WSS Partner">'.$server_info['name']; 12 22 } 13 23 else 14 24 { 15 25 $tpl->output['server_name'] = $server_info['name']; 16 26 } 17 27 $tpl->output['title_name'] = $server_info['name']; 18 28 $tpl->output['server_version'] = $server_info['version']; … … 52 62 $tpl->output['server_port'] = $server_info['port']; 53 63 $tpl->output['server_owner'] = print_nick($server_info['owner']); 64 if($server_info['latency'] == 0) $Latency = '?'; else $Latency = round($server_info['latency']).'ms'; 65 $tpl->output['server_latency'] = $Latency; 54 66 55 67 if (empty($_SESSION['id'])) -
pages/servers.php
r6 r8 2 2 $tpl->output['th_players'] = $text['th_players']; 3 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']; … … 16 23 case 5: $order = ' order by `players` desc '; break; 17 24 case 6: $order = ' order by `online` desc '; break; 25 case 7: $order = ' order by `online` desc,`latency`'; break; 18 26 } 19 27 $tpl->output['s0'] = ''; … … 24 32 $tpl->output['s5'] = ''; 25 33 $tpl->output['s6'] = ''; 34 $tpl->output['s7'] = ''; 26 35 if (empty($order_index)) 27 36 { … … 33 42 } 34 43 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'); 36 45 $pa->PageSize = $Config['DisplayServerCountPerPage']; 37 46 $pa->PageLinksDisplayed = 5; … … 66 75 $tpl->output['servers_data'] .='<td>'.(int)$row['players'].'</td>'; 67 76 $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>'; 68 79 $tpl->output['servers_data'] .='</tr>'; 69 80 } -
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.