Changeset 695 for trunk/pages/spolky.php


Ignore:
Timestamp:
Mar 20, 2010, 9:10:18 PM (15 years ago)
Author:
george
Message:
  • Upraveno: Použití názvů světů v URL namísto RealmIndex.
  • Přidáno: Stránka zobrazující informace o jednotlivých světech.
  • Odebráno: Nezobrazovat kategorie aktualit. Stačí jen jedna.
  • Přidáno: Funkce pro generování XML seznamu hráčů ve stylu WoWEmu pro wowstatus.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pages/spolky.php

    r691 r695  
    3333}
    3434
     35$Realm = new Realm($System, $_COOKIE['RealmIndex']);
     36$db2 = $Realm->CharactersDatabase;
     37
     38if(count($QueryItems) > 3)
     39{
     40  $GuildName = $QueryItems[3];
     41  $DbResult = $db2->query('SELECT guildid FROM guild WHERE '.$System->SQLURLName('Name').'="'.$GuildName.'"');
     42  $DbRow = $DbResult->fetch_assoc();
     43  $_GET['id'] = $DbRow['guildid'];
     44  include('spolek.php');
     45} else
     46{
    3547echo('<h3 class="PageTitle">Seznam spolků</h3>');
    3648echo($server->RealmSelection());
     
    4658  </tr>');
    4759
    48 $Realm = new Realm($System, $_COOKIE['RealmIndex']);
    49 $db2 = $Realm->CharactersDatabase;
    5060
    51 $sql = $db2->query('SELECT `guild`.name, `guild`.guildid, FROM_UNIXTIME(`guild`.`createdate`) AS `createdate`, COUNT(`guild_member`.`guildid`) AS member_count ,`leader`.`race` IN (1, 3, 4, 7, 11) AS fraction , `leader`.`guid` AS leader 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.';');
     61$sql = $db2->query('SELECT `guild`.name, '.$System->SQLURLName('`guild`.name').' AS URLName, `guild`.guildid, FROM_UNIXTIME(`guild`.`createdate`) AS `createdate`, COUNT(`guild_member`.`guildid`) AS member_count ,`leader`.`race` IN (1, 3, 4, 7, 11) AS fraction , `leader`.`guid` AS leader 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.';');
    5262while($row = $sql->fetch_assoc())
    5363{
     
    6474  echo('<tr>
    6575    <td align="center">'.FrakceImg($row['fraction']).'</td>
    66     <td align="center"><a href="'.$html->Link('/spolek/?id='.$row['guildid']).'">'.$row['name'].'</a></td>
     76    <td align="center"><a href="'.$html->Link($row['URLName'].'/').'">'.$row['name'].'</a></td>
    6777    <td align="center">'.$row['member_count'].'</td>
    6878    <td align="center">'.$online_mem['online_mem'].'</td>
     
    7383}
    7484echo('</table>');
     85}
    7586
    7687?>
Note: See TracChangeset for help on using the changeset viewer.