Changeset 27
- Timestamp:
- Aug 18, 2007, 1:45:56 PM (17 years ago)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
global.php
r16 r27 111 111 <TR> 112 112 <TD id="BlankSpace"> </td> 113 <TD rowspan="2" class="TdSloupec" valign="top" align="center">113 <TD rowspan="2" id="TdSloupec" valign="top"> 114 114 <div class="Nadpis">Heroes of Fantasy</div> 115 115 <div class="DivText">'); … … 127 127 <a href="'.$BaseUrl.'guildy.php" onMouseOver="swtch("10","guildy")" onMouseOut="swtch("9","guildy")"><IMG SRC="'.$BaseUrl.'images/guilds.jpg" alt="guildy" name="guildy" border="0"></A> 128 128 <a href="'.$BaseUrl.'forum/" onMouseOver="swtch("8","Forum")" onMouseOut="swtch("7","Forum")"><IMG SRC="'.$BaseUrl.'images/forum.jpg" alt="Forum" name="Forum" border="0"></A> 129 <a href="'.$BaseUrl.' registrace/" onMouseOver="swtch("28","registrace")" onMouseOut="swtch("27","registrace")"><IMG SRC="'.$BaseUrl.'images/registrace.jpg" alt="registrace" name="registrace" border="0"></A>129 <a href="'.$BaseUrl.'minimanager/register.php" onMouseOver="swtch("28","registrace")" onMouseOut="swtch("27","registrace")"><IMG SRC="'.$BaseUrl.'images/registrace.jpg" alt="registrace" name="registrace" border="0"></A> 130 130 <a href="'.$BaseUrl.'online_player.php" onMouseOver="swtch("20","online_player")" onMouseOut="swtch("19","online_player")"><IMG SRC="'.$BaseUrl.'images/online_player.jpg" alt="online player" name="online_player" border="0"></A> 131 131 <a href="'.$BaseUrl.'honor.php" onMouseOver="swtch("12","honor")" onMouseOut="swtch("11","honor")"><IMG SRC="'.$BaseUrl.'images/honor.jpg" alt="honor" name="honor" border="0"></A> … … 151 151 </td> 152 152 </tr> 153 <tr><td> 154 <div class="pHlavni">'); 153 <tr><td id="LeftCell"><div class="pHlavni">'); 155 154 } 156 155 … … 160 159 echo('</div> 161 160 </td> 161 </tr> 162 162 <tr> 163 163 <td colspan="2"> … … 184 184 } 185 185 186 // Zobrazení èíselný seznamu stránek 187 function 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"><<</a> '; 197 $Result.= '<a href="'.$URL.($Page-1).'"><</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).'">></a> '; 217 $Result.= '<a href="'.$URL.($Count-1).'">>></a>'; 218 } 219 } 220 return($Result); 221 } 186 222 187 223 ?> -
honor.php
r25 r27 7 7 $Database->select_db('mangos'); 8 8 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 9 26 if(!array_key_exists('order_by', $_SESSION)) $_SESSION['order_by'] = 'highest_rank'; 10 27 if(array_key_exists('order_by', $_GET)) $_SESSION['order_by'] = $Database->real_escape_string($_GET['order_by']); … … 51 68 52 69 $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\"> 54 71 <tr> 55 <th>Poøadí</th><th width=\"26%\"><a href=\"?order_by=name&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&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&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&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&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&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&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&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&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&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&dir=$dir\">".($order_by=='highest_rank' ? "<img src=\"images/online_player//arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_index['honor_kills']}</a></th> 62 78 </tr>"; 63 79 … … 69 85 if($zone == ' ') $zone = ' '; 70 86 $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 } 73 104 $output .= '<tr><td>'.($Index+1).".</td> 74 105 <td style=\"color: ".$color.";\">$char[1]</td> … … 76 107 <td><img src='images/online_player/{$char[3]}.gif' onmousemove='toolTip(\"".get_player_class($char[3])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 77 108 <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]."\"> ".$HonorRanks[$RankIndex][$RankNameIndex]."</td><td>$char[6]</td> 81 110 </tr>"; 82 111 $Index++;
Note:
See TracChangeset
for help on using the changeset viewer.