Changeset 27 for honor.php


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.