Changeset 190 for guildy.php
- Timestamp:
- Jan 1, 2008, 6:32:42 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guildy.php
r179 r190 30 30 if(!array_key_exists('guild', $_GET)) 31 31 { 32 echo('<h3>Seznam guild:</h3><div align="center">');32 echo('<h3>Seznam spolkù:</h3><div align="center">'); 33 33 echo('<table class="TableGuilda" border="1" cellpadding="3" cellspacing="0"><tr>'); 34 34 HeaderText('Název', 'name'); … … 49 49 } else { 50 50 $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'); 52 52 if($Result->num_rows > 0) 53 53 { … … 55 55 // if($Guild['homepage'] != '') $Guild['name'] = $Guild['name'].' <a href="'.$Guild['homepage'].'">WWW</a>'; 56 56 //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">'); 58 58 $Result = $Database->select('character', 'name', $Guild['leaderguid'].'=guid'); 59 59 $GuildMaster = $Result->fetch_array(); 60 echo('Vedoucí guildy: '.$GuildMaster['name'].'<br>');60 echo('Vedoucí spolku: '.$GuildMaster['name'].'<br>'); 61 61 echo('<table class="TableGuilda" border="1" cellpadding="1" cellspacing="0">'); 62 62 echo('<tr>'); … … 72 72 while($GuildRank = $Result->fetch_array()) $GuildRanks[$GuildRank['rid']] = $GuildRank; 73 73 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); 75 75 while($Member = $Result->fetch_array()) 76 76 { … … 81 81 } 82 82 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!'); 85 85 } 86 86
Note:
See TracChangeset
for help on using the changeset viewer.