Changeset 190 for guildy.php


Ignore:
Timestamp:
Jan 1, 2008, 6:32:42 PM (17 years ago)
Author:
george
Message:

Opraveno: Zobrazování bodů cti v seznamu členů guildy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guildy.php

    r179 r190  
    3030if(!array_key_exists('guild', $_GET))
    3131{
    32   echo('<h3>Seznam guild:</h3><div align="center">');
     32  echo('<h3>Seznam spolkù:</h3><div align="center">');
    3333  echo('<table class="TableGuilda" border="1" cellpadding="3" cellspacing="0"><tr>');
    3434  HeaderText('Název', 'name');
     
    4949} else {
    5050  $GuildId = addslashes($_GET['guild']);
    51   $Result = $Database->query('SELECT `guild`.name, guild.guildid, guild.leaderguid, 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` WHERE guild.guildid='.$GuildId.' GROUP BY guild.name');
     51  $Result = $Database->query('SELECT `guild`.name, guild.guildid, guild.leaderguid, COUNT(`guild_member`.`guildid`) as member_count, SUM(SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, " ", '.(CHAR_DATA_OFFSET_LEVEL+1).'), " ", -1)) as guild_level, SUM(SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, " ", '.(CHAR_DATA_OFFSET_HONOR_POINTS+1).'), " ", -1)) as guild_honor FROM `guild` JOIN `guild_member` ON `guild_member`.`guildid` = `guild`.`guildid` JOIN `character` ON `character`.`guid`= `guild_member`.`guid` WHERE guild.guildid='.$GuildId.' GROUP BY guild.name');
    5252  if($Result->num_rows > 0)
    5353  {
     
    5555    //  if($Guild['homepage'] != '') $Guild['name'] = $Guild['name'].' <a href="'.$Guild['homepage'].'">WWW</a>';
    5656    //if($Guild['info'] != '') $Guild['info'] = ''.$Guild['info'].'</i>';
    57     echo('<h3>Seznam èlenù guildy '.$Guild['name'].'</h3><div align="center">');
     57    echo('<h3>Seznam èlenù spolku '.$Guild['name'].'</h3><div align="center">');
    5858    $Result = $Database->select('character', 'name', $Guild['leaderguid'].'=guid');
    5959    $GuildMaster = $Result->fetch_array();
    60     echo('Vedoucí guildy: '.$GuildMaster['name'].'<br>');
     60    echo('Vedoucí spolku: '.$GuildMaster['name'].'<br>');
    6161    echo('<table class="TableGuilda" border="1" cellpadding="1" cellspacing="0">');
    6262    echo('<tr>');
     
    7272    while($GuildRank = $Result->fetch_array()) $GuildRanks[$GuildRank['rid']] = $GuildRank;
    7373 
    74     $Result = $Database->query('SELECT guild_member.rank, guild_member.guid, SUBSTRING_INDEX(SUBSTRING_INDEX(character.data," ", 35), " ", -1)*1 as level, SUBSTRING_INDEX(SUBSTRING_INDEX(character.data," ", 1421), " ", -1)*1 as honor, character.name FROM guild_member JOIN `character` ON guild_member.guid = character.guid AND guild_member.guildid='.$Guild['guildid'].' ORDER BY '.$order_by.' '.$order_dir);
     74    $Result = $Database->query('SELECT guild_member.rank, guild_member.guid, SUBSTRING_INDEX(SUBSTRING_INDEX(character.data," ", '.(CHAR_DATA_OFFSET_LEVEL+1).'), " ", -1)*1 as level, SUBSTRING_INDEX(SUBSTRING_INDEX(character.data," ", '.(CHAR_DATA_OFFSET_HONOR_POINTS+1).'), " ", -1)*1 as honor, character.name FROM guild_member JOIN `character` ON guild_member.guid = character.guid AND guild_member.guildid='.$Guild['guildid'].' ORDER BY '.$order_by.' '.$order_dir);
    7575    while($Member = $Result->fetch_array())
    7676    {
     
    8181    }
    8282    echo('</table>');
    83     echo('<a href="guildy.php">Zpìt na seznam guild</a></div>');
    84   } else echo('Guilda nenalezena!');
     83    echo('<a href="guildy.php">Zpìt na seznam spolkù</a></div>');
     84  } else echo('Spolek nenalezen!');
    8585}
    8686
Note: See TracChangeset for help on using the changeset viewer.