Legend:
- Unmodified
- Added
- Removed
-
index.php
r1 r3 26 26 $tpl = new Html_template; 27 27 $tpl->global_template = './templates/index.html'; 28 if(!array_key_exists('page', $geted)) $geted['page'] = 'servers'; 28 29 $page_info = $db->query_fetch_assoc('SELECT * FROM `pages` WHERE `page` LIKE "'.$geted['page'].'"'); 29 30 if (empty($page_info)) … … 40 41 $tpl->menu_template = './templates/menu.html'; 41 42 $tpl->output['bg_color'] = '#ffffff'; 42 $db->query('top_online','SELECT `id`, LEFT(`name`, 25) as `name`, CAST(`online_players_sum`/`player_checks` AS UNSIGNED) as online FROM `servers` ORDER BY `online` DESC LIMIT 5');43 $db->query('top_online','SELECT `id`, LEFT(`name`, 25) as `name`, CAST(`online_players_sum`/`player_checks` AS UNSIGNED) as online FROM `servers` ORDER BY `online` DESC LIMIT '.$Config['TopServersCount']); 43 44 $tpl->output['top_online']=''; 44 45 while ($row = $db->strip($db->fetch_assoc('top_online'))) … … 47 48 $tpl->output['top_online_data'].='<li>'.ulink('server/'.$row['id'], $row['name']).' - '.$row['online'].' '.$text['players'].'</li>'; 48 49 } 49 $db->query('top_rating','SELECT `id`, LEFT(`name`, 25) as `name`, `rating_sum`/`ratings` as rating FROM `servers` ORDER BY `rating` DESC LIMIT 5');50 $db->query('top_rating','SELECT `id`, LEFT(`name`, 25) as `name`, `rating_sum`/`ratings` as rating FROM `servers` ORDER BY `rating` DESC LIMIT '.$Config['TopServersCount']); 50 51 $tpl->output['top_rating_data'] = ''; 51 52 while ($row = $db->strip($db->fetch_assoc('top_rating')))
Note:
See TracChangeset
for help on using the changeset viewer.