Changeset 176


Ignore:
Timestamp:
Dec 21, 2007, 10:44:06 PM (17 years ago)
Author:
george
Message:

Oprava: Zobrazovaní www stránek guild.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guildy.php

    r141 r176  
    3838  echo('</tr>');
    3939//  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');
    40   $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 '.$order_by.' '.$order_dir);
     40  $Result = $Database->query('SELECT `guild`.homepage, `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 '.$order_by.' '.$order_dir);
    4141  while($Guild = $Result->fetch_array())
    4242  {
    43     echo('<tr><td><a href="?guild='.$Guild['guildid'].'">'.$Guild['name'].'</a></td><td>'.$Guild['member_count'].'</td><td>'.$Guild['guild_level'].'</td><td>'.$Guild['guild_honor'].'</td><td>&nbsp;</td></tr>');
     43    if($Guild['homepage'] == '') $Guild['homepage'] = '&nbsp;';
     44      else $Guild['homepage'] = '<a href="http://'.$Guild['homepage'].'/">'.$Guild['homepage'].'</a>';
     45    echo('<tr><td><a href="?guild='.$Guild['guildid'].'">'.$Guild['name'].'</a></td><td>'.$Guild['member_count'].'</td><td>'.$Guild['guild_level'].'</td><td>'.$Guild['guild_honor'].'</td><td>'.$Guild['homepage'].'</td></tr>');
    4446  }
    4547  echo('</table></div>');
Note: See TracChangeset for help on using the changeset viewer.