Changeset 8 for pages/server.php


Ignore:
Timestamp:
Jun 5, 2008, 9:38:23 PM (16 years ago)
Author:
george
Message:

Přidáno: Zaznamenávání a zobrazování údaje o odezevně serverů.
Upraveno: Šablony stránek a použití jazykových proměnných ve větší míře.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pages/server.php

    r6 r8  
    11<?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'];
    211$tpl->output['server_reg_desc'] = $text['reg_desc'];
    312$tpl->output['info_place'] = $text['info_place'];
    413$tpl->output['info_avarage_players'] = $text['info_avarage_players'];
    514$tpl->output['info_owner'] = $text['info_owner'];
     15
    616$id = (int)$_GET['str1'];
    717$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));
    818
    9 if ($server_info['wss_partner']==1)
    10   {
     19if($server_info['wss_partner'] == 1)
     20{
    1121  $tpl->output['server_name'] = '<img src="templates/img/hvezda.gif" alt="WSS Partner" title="WSS Partner">'.$server_info['name'];
    12   }
     22}
    1323else
    14   {
     24{
    1525  $tpl->output['server_name'] = $server_info['name'];
    16   }
     26}
    1727$tpl->output['title_name'] = $server_info['name'];
    1828$tpl->output['server_version'] = $server_info['version'];
     
    5262$tpl->output['server_port'] = $server_info['port'];
    5363$tpl->output['server_owner'] = print_nick($server_info['owner']);
     64if($server_info['latency'] == 0) $Latency = '?'; else $Latency = round($server_info['latency']).'ms';
     65$tpl->output['server_latency'] =         $Latency;
    5466
    5567if (empty($_SESSION['id']))
Note: See TracChangeset for help on using the changeset viewer.