- Timestamp:
- May 5, 2008, 8:33:15 AM (17 years ago)
- Location:
- pages
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pages/a_servers.php
r1 r3 6 6 $tpl->output['place'] = $text['info_place']; 7 7 8 if(!array_key_exists('order', $_GET)) $_GET['order'] = 0; 8 9 $order_index = (int) $_GET['order']; 9 10 switch ($order_index) … … 57 58 $place = $text['reg_abroad']; 58 59 } 59 $tpl->output['servers_data'] .= '<tr style="overflow: hidden; "class="table center">';60 $tpl->output['servers_data'] .= ($row['wss_partner']==1)?'<td style="width: 5px;"><img src="templates/img/hvezda.gif" alt="Doporučujeme" title="Doporučujeme"></td>':'<td></td>';60 $tpl->output['servers_data'] .= '<tr>'; 61 $tpl->output['servers_data'] .= ($row['wss_partner']==1)?'<td><img src="templates/img/hvezda.gif" alt="Doporučujeme" title="Doporučujeme"></td>':'<td></td>'; 61 62 $tpl->output['servers_data'] .='<td align="left">'.ulink('server/'.$row['id'], $row['name']).'</td>'; 62 63 $tpl->output['servers_data'] .='<td>'.round($row['rating'],2).'</td>'; -
pages/servers.php
r1 r3 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 4 $tpl->output['order_by'] = $text['order_by']; 5 5 $tpl->output['place'] = $text['info_place']; 6 6 7 if(!array_key_exists('order', $_GET)) $_GET['order'] = 0; 7 8 $order_index = (int) $_GET['order']; 8 9 switch ($order_index) 9 10 { 10 11 case 0: $order = ' order by `name` desc '; break; 11 12 case 1: $order = ' order by `rating` desc '; break; … … 15 16 case 5: $order = ' order by `players` desc '; break; 16 17 case 6: $order = ' order by `online` desc '; break; 17 18 } 18 19 $tpl->output['s0'] = ''; 19 20 $tpl->output['s1'] = ''; … … 24 25 $tpl->output['s6'] = ''; 25 26 if (empty($order_index)) 26 27 { 27 28 $tpl->output['s0'] = 'SELECTED'; 28 29 } 29 30 else 30 31 { 31 32 $tpl->output['s'.$order_index] = 'SELECTED'; 32 33 } 33 34 34 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->PageSize = 20;36 $pa->PageSize = $Config['DisplayServerCountPerPage']; 36 37 $pa->PageLinksDisplayed = 5; 37 38 $pa->CountCommand = 'select count(*) as Count from `servers` where `place` =1'; … … 39 40 $tpl->output['servers_data'] = ''; 40 41 while ($row = $pa->GetOne()) 42 { 43 switch ($row['xp']) 41 44 { 42 switch ($row['xp'])43 {44 45 case 1: $xp = 'Very low'; break; 45 46 case 2: $xp = 'Low'; break; … … 47 48 case 4: $xp = 'High'; break; 48 49 case 5: $xp = 'Very high'; break; 49 50 if ($row['place'] ==1)51 50 } 51 if ($row['place'] == 1) 52 { 52 53 $place = $text['reg_czech']; 53 54 } 54 55 else 55 56 { 56 57 $place = $text['reg_abroad']; 57 58 $tpl->output['servers_data'] .= '<tr style="overflow: hidden; "class="table center">';59 $tpl->output['servers_data'] .= ($row['wss_partner'] ==1)?'<td style="width: 5px;"><img src="templates/img/hvezda.gif" alt="Doporučujeme" title="Doporučujeme"></td>':'<td></td>';58 } 59 $tpl->output['servers_data'] .= '<tr>'; 60 $tpl->output['servers_data'] .= ($row['wss_partner'] == 1)?'<td><img src="templates/img/hvezda.gif" alt="Doporučujeme" title="Doporučujeme"></td>':'<td></td>'; 60 61 $tpl->output['servers_data'] .='<td align="left">'.ulink('server/'.$row['id'], $row['name']).'</td>'; 61 $tpl->output['servers_data'] .='<td>'.round($row['rating'], 2).'</td>';62 $tpl->output['servers_data'] .='<td>'.round($row['rating'], 2).'</td>'; 62 63 $tpl->output['servers_data'] .='<td>'.$row['version'].'</td>'; 63 64 $tpl->output['servers_data'] .='<td>'.$row['type'].'</td>'; -
pages/users.php
r1 r3 34 34 while ($row = $pa->GetOne()) 35 35 { 36 $tpl->output['data'].='<tr class="table"><td>'.print_nick($row['id']).'</td><td align="center">'.$db->query_result('select count(*) as pocet from servers where owner='.$row['id']).'</td><td align="center">'.$db->query_result('select count(*) as pocet from comments where author='.$row['id']).'</td></tr>';36 $tpl->output['data'].='<tr><td align="left">'.print_nick($row['id']).'</td><td align="center">'.$db->query_result('select count(*) as pocet from servers where owner='.$row['id']).'</td><td align="center">'.$db->query_result('select count(*) as pocet from comments where author='.$row['id']).'</td></tr>'; 37 37 } 38 38 ob_start(); -
pages/wss_partners.php
r1 r3 56 56 $place = $text['reg_abroad']; 57 57 } 58 $tpl->output['servers_data'] .= '<tr style="overflow: hidden; "class="table center">';59 $tpl->output['servers_data'] .= ($row['wss_partner']==1)?'<td style="width: 5px;"><img src="templates/img/hvezda.gif" alt="Doporučujeme" title="Doporučujeme"></td>':'<td></td>';58 $tpl->output['servers_data'] .= '<tr>'; 59 $tpl->output['servers_data'] .= ($row['wss_partner']==1)?'<td><img src="templates/img/hvezda.gif" alt="Doporučujeme" title="Doporučujeme"></td>':'<td></td>'; 60 60 $tpl->output['servers_data'] .='<td align="left">'.ulink('server/'.$row['id'], $row['name']).'</td>'; 61 61 $tpl->output['servers_data'] .='<td>'.round($row['rating'],2).'</td>';
Note:
See TracChangeset
for help on using the changeset viewer.