Changeset 20


Ignore:
Timestamp:
Aug 13, 2007, 9:07:49 PM (17 years ago)
Author:
george
Message:

Nová stránka Online hráči. Sestavená podle kódu z MaNGOS Minimanageru.

Files:
35 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • css/style.css

    r17 r20  
    119119   color: white;
    120120   font-family: Comic Sans MS;
     121   align: center;
    121122}
    122123.TableGuilda {
     
    124125   font-size: small;
    125126   text-align: center;
     127   background: #86272F;
    126128}
    127129.TdGuilda{
  • guildy.php

    r16 r20  
    1313{
    1414  echo('<h3>Seznam guild:</h3><div align="center">');
    15   echo('<table class="TableGuilda" style="align: center;" border="1" cellpadding="3" cellspacing="0" ><tr><th>Název</th><th>Poèet èlenù</th><th>Souèet levelù</th><th>Souèet bodù cti</th><th>Webové stránky</th></tr>');
     15  echo('<table class="TableGuilda" border="1" cellpadding="3" cellspacing="0" ><tr><th>Název</th><th>Poèet èlenù</th><th>Souèet levelù</th><th>Souèet bodù cti</th><th>Webové stránky</th></tr>');
    1616//  DB_Query(' COUNT(guild_member.guildid) as member_count FROM guild JOIN guild_member ON guild_member.guildid = guild.guildid GROUP BY guild.name ORDER BY member_count DESC');
    1717  $Result = $Database->query('SELECT `guild`.name, guild.guildid, COUNT(`guild_member`.`guildid`) as member_count, SUM(SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, " ", 35), " ", -1)) as guild_level, SUM(SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, " ", 1421), " ", -1)) as guild_honor FROM `guild` JOIN `guild_member` ON `guild_member`.`guildid` = `guild`.`guildid` JOIN `character` ON `character`.`guid`= `guild_member`.`guid` GROUP BY guild.name ORDER BY guild.name');
  • online_player.php

    r16 r20  
    33  include('global.php');
    44  ShowHeader();
    5 ?>
     5 
     6  echo('<h3>Online hráèi:</h3><div align="center">');
     7  $Database->select_db('mangos');
    68
    7 <IFRAME name="registrace_frame" src="http://wow.zdechov.net/mangos/inc/stat2.php"></IFRAME>
     9        $order_by = (isset($_GET['order_by'])) ? $Database->real_escape_string($_GET['order_by']) : "name";
    810
    9 <?
     11        $dir = (isset($_GET['dir'])) ? $Database->real_escape_string($_GET['dir']) : 1;
     12        $order_dir = ($dir) ? "ASC" : "DESC";
     13        $dir = ($dir) ? 0 : 1;
     14       
     15        $result = $Database->query("SELECT count(*) FROM `character` WHERE `online`= 1");
     16        $Row = $result->fetch_array();
     17        $total_online = $Row[0];
     18
     19        $order_side = ""; 
     20       
     21        require_once("minimanager/scripts/defines.php");
     22        $result = $Database->query("SELECT guid,name,race,class,zone,map,
     23                        CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_POINTS+1)."), ' ', -1) AS UNSIGNED) AS highest_rank,
     24                        CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1) AS UNSIGNED) AS level,account
     25                        FROM `character` WHERE `online`= 1 $order_side ORDER BY $order_by $order_dir");
     26
     27        require_once("minimanager/lang/enUS.php");
     28  $lang_index = array(
     29        // ----- INDEX.PHP -----
     30        'realm' => 'Realm',
     31        'online' => 'Online',
     32        'offline_or_let_height' => 'Offline or Latency too Height',
     33        'delete' => 'Delete',
     34        'tot_users_online' => 'Celkem hráèù online',
     35        'name' => 'Jméno',
     36        'race' => 'Rasa',
     37        'class' => 'Tøída',
     38        'level' => 'Úroveò',
     39        'map' => 'Mapa',
     40        'zone' => 'Zóna',
     41        'honor_kills' => 'Body cti',
     42  );
     43       
     44        $output = "<font class=\"bold\">{$lang_index['tot_users_online']}: $total_online</font><br />
     45        <table class=\"TableGuilda\" border=\"1\" cellspacing=\"0\">
     46        <tr>
     47        <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>
     48        <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>
     49        <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>
     50        <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>
     51        <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>
     52        <th width=\"25%\">{$lang_index['zone']}</th>
     53    <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>
     54        </tr>";
     55
     56        require_once("minimanager/scripts/id_tab.php");
     57
     58        while($char = $result->fetch_row())
     59  {
     60    $zone = get_zone_name($char[4]);
     61    if($zone == ' ') $zone = '&nbsp;';
     62    $race = get_player_race($char[2]);
     63    if(($char[2] == 1) or ($char[2] == 3) or ($char[2] == 4) or ($char[2] == 7) or ($char[2] == 11)) $color = '#9090ff';
     64    else $color = '#FF5050';
     65                $output .= "<tr>
     66                 <td style=\"color: ".$color.";\">$char[1]</td>
     67         <td><img src='images/online_player/{$char[2]}-0.gif' onmousemove='toolTip(\"".$race."\",\"item_tooltip\")' onmouseout='toolTip()' /></td>
     68                 <td><img src='images/online_player/{$char[3]}.gif' onmousemove='toolTip(\"".get_player_class($char[3])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td>
     69                 <td>$char[7]</td>
     70                 <td>".get_map_name($char[5])."</td>
     71                 <td>".$zone."</td>
     72                 <td>$char[6]</td>
     73         </tr>";
     74        }
     75   $output .= "</table></div>"; 
     76  echo($output);
     77 
    1078  ShowFooter();
    1179?>
Note: See TracChangeset for help on using the changeset viewer.