Changeset 27


Ignore:
Timestamp:
Aug 18, 2007, 1:45:56 PM (17 years ago)
Author:
george
Message:

Přidání ikon a textu hodností.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • global.php

    r16 r27  
    111111  <TR>
    112112    <TD id="BlankSpace">&nbsp;</td>
    113     <TD rowspan="2" class="TdSloupec" valign="top" align="center">
     113    <TD rowspan="2" id="TdSloupec" valign="top">
    114114      <div class="Nadpis">Heroes of Fantasy</div>
    115115      <div class="DivText">');
     
    127127<a href="'.$BaseUrl.'guildy.php" onMouseOver="swtch(&quot;10&quot;,&quot;guildy&quot;)" onMouseOut="swtch(&quot;9&quot;,&quot;guildy&quot;)"><IMG SRC="'.$BaseUrl.'images/guilds.jpg" alt="guildy" name="guildy" border="0"></A>
    128128<a href="'.$BaseUrl.'forum/" onMouseOver="swtch(&quot;8&quot;,&quot;Forum&quot;)" onMouseOut="swtch(&quot;7&quot;,&quot;Forum&quot;)"><IMG SRC="'.$BaseUrl.'images/forum.jpg" alt="Forum" name="Forum" border="0"></A>
    129 <a href="'.$BaseUrl.'registrace/" onMouseOver="swtch(&quot;28&quot;,&quot;registrace&quot;)" onMouseOut="swtch(&quot;27&quot;,&quot;registrace&quot;)"><IMG SRC="'.$BaseUrl.'images/registrace.jpg" alt="registrace" name="registrace" border="0"></A>
     129<a href="'.$BaseUrl.'minimanager/register.php" onMouseOver="swtch(&quot;28&quot;,&quot;registrace&quot;)" onMouseOut="swtch(&quot;27&quot;,&quot;registrace&quot;)"><IMG SRC="'.$BaseUrl.'images/registrace.jpg" alt="registrace" name="registrace" border="0"></A>
    130130<a href="'.$BaseUrl.'online_player.php" onMouseOver="swtch(&quot;20&quot;,&quot;online_player&quot;)" onMouseOut="swtch(&quot;19&quot;,&quot;online_player&quot;)"><IMG SRC="'.$BaseUrl.'images/online_player.jpg" alt="online player" name="online_player" border="0"></A>
    131131<a href="'.$BaseUrl.'honor.php" onMouseOver="swtch(&quot;12&quot;,&quot;honor&quot;)" onMouseOut="swtch(&quot;11&quot;,&quot;honor&quot;)"><IMG SRC="'.$BaseUrl.'images/honor.jpg" alt="honor" name="honor" border="0"></A>
     
    151151    </td>
    152152  </tr>
    153   <tr><td>
    154   <div class="pHlavni">');   
     153  <tr><td id="LeftCell"><div class="pHlavni">');   
    155154}
    156155
     
    160159  echo('</div>
    161160    </td>
     161  </tr>
    162162  <tr>
    163163    <td colspan="2">
     
    184184}
    185185
     186// Zobrazení èíselný seznamu stránek
     187function PagesList($URL,$Page,$TotalCount,$CountPerPage)
     188{
     189  $Count = ceil($TotalCount/$CountPerPage);
     190  $Around = 10;
     191  $Result = '';
     192  if($Count>1)
     193  {
     194    if($Page>0)
     195    {
     196      $Result.= '<a href="'.$URL.'0">&lt;&lt;</a> ';
     197      $Result.= '<a href="'.$URL.($Page-1).'">&lt;</a> ';
     198    }
     199    $PagesMax = $Count-1;
     200    $PagesMin = 0;
     201    if($PagesMax>($Page+$Around)) $PagesMax = $Page+$Around;
     202    if($PagesMin<($Page-$Around))
     203    {
     204      $Result.= ' .. ';
     205      $PagesMin = $Page-$Around;
     206    }
     207    for($i=$PagesMin;$i<=$PagesMax;$i++)
     208    {
     209      if($i==$Page) $Result.= '<strong>';
     210      $Result.= '<a href="'.$URL.$i.'">'.($i+1).'</a> ';
     211      if($i==$Page) $Result.= '</strong>';
     212    }
     213    if($PagesMax<($Count-1)) $Result .= ' .. ';
     214    if($Page<($Count-1))
     215    {
     216      $Result.= '<a href="'.$URL.($Page+1).'">&gt;</a> ';
     217      $Result.= '<a href="'.$URL.($Count-1).'">&gt;&gt;</a>';
     218    }
     219  }
     220  return($Result);
     221}
    186222
    187223?>
  • honor.php

    r25 r27  
    77  $Database->select_db('mangos');
    88
     9  $HonorRanks = array(
     10    array(1000, 'Vojín', 'Zvìd'),
     11    array(5000, 'Desátník', 'Bruèoun'),
     12    array(10000, 'Ser¾ant', 'Ser¾ant'),
     13    array(15000, 'Velící ser¾ant', 'Star¹í ser¾ant'),
     14    array(20000, 'Major ser¾ant', 'Nejvy¹¹í ser¾ant'),
     15    array(25000, 'Rytíø', 'Kamenný strá¾ce'),
     16    array(30000, 'Rytíø poruèík', 'Krvavý strá¾ce'),
     17    array(35000, 'Rytíø kapitán', 'Legionáø'),
     18    array(40000, 'Rytíø vùdce', 'Setník'),
     19    array(45000, 'Poruèík velitel', 'Vùdce'),
     20    array(50000, 'Velitel', 'Poruèík generál'),
     21    array(55000, 'Mar¹ál', 'Generál'),
     22    array(60000, 'Polní mar¹ál', 'Váleèník'),
     23    array(65001, 'Nejvy¹¹í mar¹ál', 'Vrchní váleèník'),
     24  ); 
     25 
    926        if(!array_key_exists('order_by', $_SESSION)) $_SESSION['order_by'] = 'highest_rank';
    1027        if(array_key_exists('order_by', $_GET)) $_SESSION['order_by'] = $Database->real_escape_string($_GET['order_by']);
     
    5168       
    5269        $output = "<font class=\"bold\">{$lang_index['tot_users_online']}: $total_online</font><br />
    53         <table class=\"TableGuilda\" border=\"1\" cellspacing=\"0\">
     70        <table width=\"70%\" class=\"TableGuilda\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\">
    5471        <tr>
    55         <th>Poøadí</th><th width=\"26%\"><a href=\"?order_by=name&amp;dir=$dir\">".($order_by=='name' ? "<img src=\"images/online_player/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_index['name']}</a></th>
    56         <th width=\"7%\"><a href=\"?order_by=race&amp;dir=$dir\">".($order_by=='race' ? "<img src=\"images/online_player/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_index['race']}</a></th>
    57         <th width=\"7%\"><a href=\"?order_by=class&amp;dir=$dir\">".($order_by=='class' ? "<img src=\"images/online_player/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_index['class']}</a></th>
    58         <th width=\"7%\"><a href=\"?order_by=level&amp;dir=$dir\">".($order_by=='level' ? "<img src=\"images/online_player/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_index['level']}</a></th>
    59         <th width=\"20%\"><a href=\"?order_by=map&amp;dir=$dir\">".($order_by=='map' ? "<img src=\"images/online_player/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_index['map']}</a></th>
    60         <th width=\"25%\">{$lang_index['zone']}</th>
    61     <th width=\"10%\"><a href=\"?order_by=highest_rank&amp;dir=$dir\">".($order_by=='highest_rank' ? "<img src=\"images/online_player//arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_index['honor_kills']}</a></th>
     72        <th>Poøadí</th><th><a href=\"?order_by=name&amp;dir=$dir\">".($order_by=='name' ? "<img src=\"images/online_player/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_index['name']}</a></th>
     73        <th><a href=\"?order_by=race&amp;dir=$dir\">".($order_by=='race' ? "<img src=\"images/online_player/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_index['race']}</a></th>
     74        <th><a href=\"?order_by=class&amp;dir=$dir\">".($order_by=='class' ? "<img src=\"images/online_player/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_index['class']}</a></th>
     75        <th><a href=\"?order_by=level&amp;dir=$dir\">".($order_by=='level' ? "<img src=\"images/online_player/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_index['level']}</a></th>
     76 
     77    <th colspan=\"2\"><a href=\"?order_by=highest_rank&amp;dir=$dir\">".($order_by=='highest_rank' ? "<img src=\"images/online_player//arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_index['honor_kills']}</a></th>
    6278        </tr>";
    6379
     
    6985    if($zone == ' ') $zone = '&nbsp;';
    7086    $race = get_player_race($char[2]);
    71     if(($char[2] == 1) or ($char[2] == 3) or ($char[2] == 4) or ($char[2] == 7) or ($char[2] == 11)) $color = '#9090ff';
    72     else $color = '#FF5050';
     87    if(($char[2] == 1) or ($char[2] == 3) or ($char[2] == 4) or ($char[2] == 7) or ($char[2] == 11))
     88    {
     89      $color = '#9090ff';
     90      $RankNameIndex = 1;
     91    } else
     92    {
     93      $color = '#FF5050';
     94      $RankNameIndex = 2;
     95    }
     96    $RankIndex = 0;
     97    foreach($HonorRanks as $HonorRankIndex => $HonorRank)
     98    {
     99      if($char[6] > $HonorRank[0])
     100      {
     101        $RankIndex = $HonorRankIndex;
     102      } 
     103    }
    73104                $output .= '<tr><td>'.($Index+1).".</td>
    74105                 <td style=\"color: ".$color.";\">$char[1]</td>
     
    76107                 <td><img src='images/online_player/{$char[3]}.gif' onmousemove='toolTip(\"".get_player_class($char[3])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td>
    77108                 <td>$char[7]</td>
    78                  <td>".get_map_name($char[5])."</td>
    79                  <td>".$zone."</td>
    80                  <td>$char[6]</td>
     109                 <td><img src=\"images/honor_ranks/rank".($RankIndex+1).".gif\" alt=\"".$HonorRanks[$RankIndex][$RankNameIndex]."\">&nbsp;".$HonorRanks[$RankIndex][$RankNameIndex]."</td><td>$char[6]</td>
    81110         </tr>";
    82111    $Index++;
Note: See TracChangeset for help on using the changeset viewer.