Changeset 589


Ignore:
Timestamp:
May 18, 2009, 9:01:38 PM (15 years ago)
Author:
george
Message:
  • Upraveno: Stránka Top hráči poopravena.
  • Přidáno: Datum založení serveru.
Location:
trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/inc/html.php

    r583 r589  
    269269      if($offset < $pocet)
    270270      {
    271         echo('<a href="'.$_SERVER['PHP_SELF'].($offset + $limit < $pocet ? '?offset='.($offset + $limit) : '').'"><-- novější</a>\n &nbsp;');
     271        echo('<a href="'.$_SERVER['PHP_SELF'].($offset + $limit < $pocet ? '?offset='.($offset + $limit) : '').'"><-- novější</a> &nbsp;');
    272272      }
    273273      if($offset > $limit)
  • trunk/pages/client.php

    r585 r589  
    44
    55echo('
    6 <br>Nejnovější verze clientu 3.2: <A href="http://wow.zdechov.net:81/InstalaceHeroesOfFantasyClient-3.2.exe.torrent">Stáhnout</A> (6,91 MB)
     6<br>Nejnovější verze clientu 3.3: <A href="http://wow.zdechov.net:81/InstalaceHeroesOfFantasyClient-3.3.exe.torrent">Stáhnout</A> (6,91 MB)
    77<br>Zrojové kody jsou veřené: <A href="http://game.zdechov.net/svn/hofclient">SVN</A> <A href="http://game.zdechov.net/trac/hofclient/browser">Trac</A>
    88<br>Debata na téma client: <A href="http://wow.zdechov.net/forum/viewforum.php?f=10">zde</A>
  • trunk/pages/server.php

    r583 r589  
    3434    <td><a href="http://game.zdechov.net:6969/">Torrent</a> server je</td>
    3535    <td>'.$server->ServerImg($server->ServerOnline($Config['Web']['WoWServerAddr'], 6969)).'</td>
     36  </tr>
     37  <tr>
     38    <td>Datum založení</td>
     39    <td>8.5.2006</td>
    3640  </tr>
    3741  <tr>
  • trunk/pages/tophraci.php

    r588 r589  
    11<?php
    22$top = 40; //kolik nejlepších
    3 $connect = mysql_pconnect($db_server, $db_user, $db_pass)  or die ("Spojení se serverem $ip nebylo uspesne");
    43
    54function getTime($total)
    65{
    7   $dny = (int)($total/86400);
    8   $total = $total - ($dny*86400);
    9   $hodiny = (int)($total/3600);
    10   $total = $total - ($hodiny*3600);
    11   $minuty = (int)($total/60);
     6  $dny = (int)($total / 86400);
     7  $total = $total - ($dny * 86400);
     8  $hodiny = (int)($total / 3600);
     9  $total = $total - ($hodiny * 3600);
     10  $minuty = (int)($total / 60);
    1211
    13   $cas = $dny."d ".$hodiny."h ".$minuty."m";
    14   return $cas;
     12  $cas = $dny.'d '.$hodiny.'h '.$minuty.'m';
     13  return($cas);
    1514}
    1615
     
    1918{
    2019  if ($online == 1):
    21     $status = "<font color=green>Online</font>";
     20    $status = '<span style="color: green;">Online</span>';
    2221  else:
    23     $status = "<font color=red>Offline</font>";
     22    $status = '<span style="color: red;">Offline</span>';
    2423  endif;
    2524 
    26   return $status;
     25  return($status);
    2726}
    2827
     28$db->select_db($Config['Mangos']['DatabaseCharacters']);
     29$sql = 'SELECT name, totaltime, online FROM characters ORDER BY totaltime DESC LIMIT '.$top;
     30$result = $db->query($sql);
    2931
    30 mysql_select_db($db_characters, $connect);
     32$i = 0;
     33echo('<h3 class="PageTitle">Nejlepších '.$top.' herních časů</h3>');
    3134
    32 
    33 $sql = "SELECT * FROM characters ORDER BY totaltime DESC LIMIT $top";
    34 $result = mysql_query($sql);
    35 
    36 
    37 $i=0;
    38 
    39 
    40 echo "<center><h2> Nejlepších $top herních časů</h2>
    41       <table>";
    42      
    43 
    44 while ($vypis=mysql_fetch_array($result))
     35echo('<table class="SimpleTable">');     
     36while($vypis = $result->fetch_assoc())
    4537{   
    46   $i=$i+1;
    47   echo "<tr><td>$i)<th>".$vypis['name']."</th>
    48         <td>".getTime($vypis['totaltime'])."</td>
    49         <td>".getOnline($vypis['online'])."</td></tr>";
     38  $i = $i + 1;
     39  echo('<tr><td>'.$i.')<th>'.$vypis['name'].'</th>
     40        <td>'.getTime($vypis['totaltime']).'</td>
     41        <td>'.getOnline($vypis['online']).'</td></tr>');
    5042
    5143}
    52 
    53 
    54 echo "<center></table>";
    55 
    56 
    57 mysql_close();
     44echo('</table>');
    5845
    5946?>
  • trunk/styles/style.css

    r583 r589  
    291291  border-color: black;
    292292}
     293
     294.SimpleTable
     295{
     296  margin-left: auto;
     297  margin-right: auto;
     298  text-align: center;
     299  border-width: 0px 0px 0px 0px;
     300  border-style: solid;
     301  border-color: black;
     302}
     303
Note: See TracChangeset for help on using the changeset viewer.