Changeset 11 for guildy.php
- Timestamp:
- Aug 11, 2007, 12:04:22 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guildy.php
r8 r11 19 19 if(!array_key_exists('guild', $_GET)) 20 20 { 21 echo('< h3>Seznam guild:</h3>');22 echo('< div align="center"><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>');21 echo('<div align="center"><strong>Seznam guild:</strong>'); 22 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>'); 23 23 // 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'); 24 24 DB_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'); … … 30 30 } else { 31 31 $_GET['guild'] = addslashes($_GET['guild']); 32 DB_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` WHERE guild.guildid='.$_GET['guild'].' GROUP BY guild.name');32 DB_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='.$_GET['guild'].' GROUP BY guild.name'); 33 33 if(DB_NumRows() > 0) 34 34 { … … 36 36 // if($Guild['homepage'] != '') $Guild['name'] = $Guild['name'].' <a href="'.$Guild['homepage'].'">WWW</a>'; 37 37 //if($Guild['info'] != '') $Guild['info'] = ''.$Guild['info'].'</i>'; 38 echo('<h3>Seznam èlenù guildy '.$Guild['name'].':</h3>'); 39 echo('<div align="center"><table class="TableGuilda" border="1" cellpadding="1" cellspacing="0">'); 38 echo('<div align="center"><strong>Seznam èlenù guildy '.$Guild['name'].'</strong><br>'); 39 DB_Select('`character`', 'name', $Guild['leaderguid'].'=guid'); 40 $GuildMaster = DB_Row(); 41 echo('Vedoucí guildy: '.$GuildMaster['name'].'<br>'); 42 echo('<table class="TableGuilda" border="1" cellpadding="1" cellspacing="0">'); 40 43 echo('<tr><th>Jméno</th><th>Level</th><th>Hodnost</th><th>Body cti</th></tr>'); 41 44 //echo('<tr><td colspan="2" Class="TdGuilda">Informace: '.$Guild['public_info'].'</td></tr>');
Note:
See TracChangeset
for help on using the changeset viewer.