Changeset 3 for index.php


Ignore:
Timestamp:
May 5, 2008, 8:33:15 AM (16 years ago)
Author:
george
Message:

Přidáno: Nastavení počtu zobrazených serverů na stránku a počtu nej serverů v konfiguračním souboru.
Opraveno: Pročištění použití stylů a vyřešení překrývání hlavního seznamu s pravým sloupcem u některých prohlížečů. Všechny informace o stylech musí být v souboru CSS a ne v HTML kódu.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • index.php

    r1 r3  
    2626$tpl = new Html_template;
    2727$tpl->global_template = './templates/index.html';
     28if(!array_key_exists('page', $geted)) $geted['page'] = 'servers';
    2829$page_info = $db->query_fetch_assoc('SELECT * FROM `pages` WHERE `page` LIKE  "'.$geted['page'].'"');
    2930if  (empty($page_info))
     
    4041  $tpl->menu_template = './templates/menu.html';
    4142  $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']);
    4344  $tpl->output['top_online']='';
    4445  while ($row = $db->strip($db->fetch_assoc('top_online')))
     
    4748    $tpl->output['top_online_data'].='<li>'.ulink('server/'.$row['id'], $row['name']).' - '.$row['online'].' '.$text['players'].'</li>';
    4849    }
    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']);
    5051  $tpl->output['top_rating_data'] = '';
    5152  while ($row = $db->strip($db->fetch_assoc('top_rating')))
Note: See TracChangeset for help on using the changeset viewer.