Changeset 334


Ignore:
Timestamp:
Apr 13, 2008, 9:11:05 AM (17 years ago)
Author:
george
Message:

Přidáno: Zobrazení frakce ve výpisu spolků.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guildy.php

    r309 r334  
    1 <?
     1<?php
    22  include('global.php');
    33  ShowHeader();
     
    3232  echo('<h3>Seznam spolkù:</h3><div align="center">');
    3333  echo('<table class="TableGuilda" border="1" cellpadding="3" cellspacing="0"><tr>');
     34  HeaderText('F', 'fraction');
    3435  HeaderText('Název', 'name');
    3536  HeaderText('Poèet èlenù', 'member_count');
    3637  HeaderText('Souèet levelù', 'guild_level');
    3738  HeaderText('Souèet bodù cti', 'guild_honor');
    38   HeaderText('Webové stránky', 'name');   
     39  HeaderText('Webové stránky', '');   
    3940  echo('</tr>');
    4041//  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');
    41   $Result = $Database->query('SELECT `guild`.homepage, `guild`.name, guild.guildid, COUNT(`guild_member`.`guildid`) as member_count, SUM(SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, " ", 35), " ", -1)) as guild_level, SUM(SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, " ", '.(CHAR_DATA_OFFSET_HONOR_POINTS+1).'), " ", -1)) as guild_honor FROM `guild` JOIN `guild_member` ON `guild_member`.`guildid` = `guild`.`guildid` JOIN `characters` ON `characters`.`guid`= `guild_member`.`guid` GROUP BY guild.name ORDER BY '.$order_by.' '.$order_dir);
     42  $Result = $Database->query('SELECT `guild`.homepage, `guild`.name, guild.guildid, COUNT(`guild_member`.`guildid`) as member_count, SUM(SUBSTRING_INDEX(SUBSTRING_INDEX(`memebers`.`data`, " ", 35), " ", -1)) as guild_level, SUM(SUBSTRING_INDEX(SUBSTRING_INDEX(`memebers`.`data`, " ", '.(CHAR_DATA_OFFSET_HONOR_POINTS+1).'), " ", -1)) as guild_honor, `leader`.`race` IN (1, 3, 4, 7, 11) as fraction FROM `guild` JOIN `guild_member` ON `guild_member`.`guildid` = `guild`.`guildid` JOIN `characters` as `memebers` ON `memebers`.`guid`= `guild_member`.`guid` JOIN `characters` as `leader` ON `leader`.`guid`= `guild`.`leaderguid` GROUP BY guild.name ORDER BY '.$order_by.' '.$order_dir);
    4243  while($Guild = $Result->fetch_array())
    4344  {
     45    if($Guild['fraction'] == 1) $Fraction = 'aliance'; else $Fraction = 'horda';
    4446    if($Guild['homepage'] == '') $Guild['homepage'] = '&nbsp;';
    4547      else $Guild['homepage'] = '<a href="http://'.$Guild['homepage'].'/">'.$Guild['homepage'].'</a>';
    46     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>');
     48    echo('<tr><td><img src="images/online_player/'.$Fraction.'.gif" alt="'.$Fraction.'"></td><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>');
    4749  }
    4850  echo('</table></div>');
Note: See TracChangeset for help on using the changeset viewer.